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

This commit is contained in:
Noisyfox 2023-12-03 09:36:27 +08:00 committed by GitHub
parent 0cee513416
commit a6c927d87f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 37 additions and 6 deletions

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);