diff --git a/docs/features/gcode_scripts.rst b/docs/features/gcode_scripts.rst index 4fb891eb4..73d8916f8 100644 --- a/docs/features/gcode_scripts.rst +++ b/docs/features/gcode_scripts.rst @@ -157,9 +157,13 @@ The ``disable_hotends`` snippet is defined as follows: .. code-block:: jinja :caption: Default ``disable_hotends`` snippet + {% if printer_profile.extruder.sharedNozzle %} + M104 T0 S0 + {% else %} {% for tool in range(printer_profile.extruder.count) %} M104 T{{ tool }} S0 {% endfor %} + {% endif %} The ``disable_bed`` snippet is defined as follows: diff --git a/src/octoprint/settings.py b/src/octoprint/settings.py index b60a79f99..3ff933ab5 100644 --- a/src/octoprint/settings.py +++ b/src/octoprint/settings.py @@ -355,7 +355,7 @@ default_settings = { "gcode": { "afterPrintCancelled": "; disable motors\nM84\n\n;disable all heaters\n{% snippet 'disable_hotends' %}\n{% snippet 'disable_bed' %}\n;disable fan\nM106 S0", "snippets": { - "disable_hotends": "{% for tool in range(printer_profile.extruder.count) %}M104 T{{ tool }} S0\n{% endfor %}", + "disable_hotends": "{% if printer_profile.extruder.sharedNozzle %}M104 T0 S0\n{% else %}{% for tool in range(printer_profile.extruder.count) %}M104 T{{ tool }} S0\n{% endfor %}{% endif %}", "disable_bed": "{% if printer_profile.heatedBed %}M140 S0\n{% endif %}" } }