File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -175,6 +175,15 @@ gcode:
175175 # Park
176176 G0 X{safe_x} Y{y} F{speed}
177177
178+ [gcode_macro ASSERT_NOZZLE_DIAMETER]
179+ gcode:
180+ {% set expected_diameter = params.NOZZLE_DIAMETER|float %}
181+ {% set actual_diameter = printer.configfile.config.extruder.nozzle_diameter|float %}
182+ {% if expected_diameter != actual_diameter %}
183+ M117 Aborting print due to nozzle-diameter mismatch between printer config and slicer.
184+ { action_raise_error(" Nozzle-diameter mismatch between printer config (%s mm) and slicer (%s mm)." % (expected_diameter, actual_diameter)) }
185+ {% endif %}
186+
178187# ####
179188# COLOR CHANGE
180189# ####
@@ -256,6 +265,10 @@ gcode:
256265 M82
257266 # Home
258267 G28
268+ # Check nozzle if told to do so
269+ {% if params.NOZZLE_DIAMETER %}
270+ ASSERT_NOZZLE_DIAMETER NOZZLE_DIAMETER ={params.NOZZLE_DIAMETER}
271+ {% endif %}
259272 M117 Heating bed...
260273 # Wait for bed to heat up
261274 M190 S{params.BED_TEMP|default(printer.heater_bed.target, true) }
You can’t perform that action at this time.
0 commit comments