diff --git a/stereotech_config/print_macros.cfg b/stereotech_config/print_macros.cfg index 5be5641ca87a..de5e81c3f8f1 100644 --- a/stereotech_config/print_macros.cfg +++ b/stereotech_config/print_macros.cfg @@ -164,20 +164,26 @@ gcode: [gcode_macro SDCARD_PRINT_FILE] rename_existing: SDCARD_PRINT_FILE_BASE gcode: - {% if params.DICT_STATE %} - {action_respond_info("Realise gcode_macro SDCARD_PRINT_FILE-continued printing. File start with: %s position." % params.FILE_POSITION)} - ACTIVATE_EXTRUDER EXTRUDER={params.EXTRUDER} - M140 S{params.HEATER_BED_TEMP|default(75, true)} - M190 S{params.HEATER_BED_TEMP|default(75, true)} - M104 S{params.EXTRUDER_TEMP|default(255, true)} - M109 S{params.EXTRUDER_TEMP|default(255, true)} - M82 - START - LOAD_GCODE_STATE NAME=power_off PARAMS="{params.DICT_STATE}" - RESTORE_GCODE_STATE NAME=power_off MOVE=1 MOVE_SPEED=30 - SDCARD_PRINT_FILE_BASE FILENAME={params.FILENAME} POSITION={params.FILE_POSITION} + {% set wcs_1 = printer.gcode_move.wcs_offsets[1] %} + ; checking printer is calibrate when used 5d module before printing + {% if wcs_1[0] != 0.0 or printer["gcode_button five_axis_module"].state == "RELEASED"%} + {% if params.DICT_STATE %} + {action_respond_info("Realise gcode_macro SDCARD_PRINT_FILE-continued printing. File start with: %s position." % params.FILE_POSITION)} + ACTIVATE_EXTRUDER EXTRUDER={params.EXTRUDER} + M140 S{params.HEATER_BED_TEMP|default(75, true)} + M190 S{params.HEATER_BED_TEMP|default(75, true)} + M104 S{params.EXTRUDER_TEMP|default(255, true)} + M109 S{params.EXTRUDER_TEMP|default(255, true)} + M82 + START + LOAD_GCODE_STATE NAME=power_off PARAMS="{params.DICT_STATE}" + RESTORE_GCODE_STATE NAME=power_off MOVE=1 MOVE_SPEED=30 + SDCARD_PRINT_FILE_BASE FILENAME={params.FILENAME} POSITION={params.FILE_POSITION} + {% else %} + SDCARD_PRINT_FILE_BASE FILENAME={params.FILENAME} + {% endif %} {% else %} - SDCARD_PRINT_FILE_BASE FILENAME={params.FILENAME} + {action_raise_error("Can't start printing beacose the printer not is calibrated. Please calibrate printer.")} {% endif %} [gcode_macro START]