From d632d91e798686a6e46abd7ba2a823eda7ac64ae Mon Sep 17 00:00:00 2001 From: Lukas Matena Date: Thu, 31 Oct 2019 15:05:39 +0100 Subject: [PATCH] WipeTower.cpp: The M220 B/R gcode is only emitted for Marlin firmware flavor The extended gcode is now only supported by Prusa (https://github.com/prusa3d/PrusaSlicer/issues/3114) A pull request https://github.com/MarlinFirmware/Marlin/pull/15739 aims to extend the gcode in upstream Marlin as well --- src/libslic3r/GCode/WipeTower.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/libslic3r/GCode/WipeTower.cpp b/src/libslic3r/GCode/WipeTower.cpp index b464a39b82..73dc91c405 100644 --- a/src/libslic3r/GCode/WipeTower.cpp +++ b/src/libslic3r/GCode/WipeTower.cpp @@ -331,15 +331,18 @@ public: // Let the firmware back up the active speed override value. WipeTowerWriter& speed_override_backup() - { - m_gcode += "M220 B\n"; + { + // This is only supported by Prusa at this point (https://github.com/prusa3d/PrusaSlicer/issues/3114) + if (m_gcode_flavor == gcfMarlin) + m_gcode += "M220 B\n"; return *this; } // Let the firmware restore the active speed override value. WipeTowerWriter& speed_override_restore() { - m_gcode += "M220 R\n"; + if (m_gcode_flavor == gcfMarlin) + m_gcode += "M220 R\n"; return *this; }