Add option to disable emitting M73 gcode (#2114) (#2940)

This commit is contained in:
Noisyfox authored and GitHub committed 2023-12-03 09:36:27 +08:00
1 parent 0cee513416
commit a6c927d87f
8 files changed
+37 -6

No files matched your search

+4
View File
@@ -341,6 +341,10 @@ std::string GCodeWriter::update_progress(unsigned int num, unsigned int tot, boo
{
if (FLAVOR_IS_NOT(gcfMakerWare) && FLAVOR_IS_NOT(gcfSailfish))
return "";
if (config.disable_m73) {
return "";
}
unsigned int percent = (unsigned int)floor(100.0 * num / tot + 0.5);
if (!allow_100) percent = std::min(percent, (unsigned int)99);