Skip to content

Commit

Permalink
STEAPP-598: added checking calibrate when used 5d module before print… (
Browse files Browse the repository at this point in the history
#152)

* STEAPP-598: added checking calibrate when used 5d module before printing.

* STEAPP-598: replacing the reaction to an uncalibrated printer, warning to error.
  • Loading branch information
SokolovJek authored Aug 8, 2023
1 parent 8eda0d0 commit bfcb0e0
Showing 1 changed file with 19 additions and 13 deletions.
32 changes: 19 additions & 13 deletions stereotech_config/print_macros.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit bfcb0e0

Please sign in to comment.