Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

STEAPP-598: added checking calibrate when used 5d module before print… #152

Merged
merged 2 commits into from
Aug 8, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 19 additions & 13 deletions stereotech_config/print_macros.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -156,20 +156,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