Skip to content
Draft
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
44 changes: 44 additions & 0 deletions meta-opencentauri/recipes-apps/klipper/files/macros.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -457,3 +457,47 @@ gcode:
M109 S140
M729
SCREWS_TILT_CALCULATE

[gcode_macro PAUSE]
rename_existing: BASE_PAUSE
variable_extruder_temp: 0
variable_bed_temp: 0
gcode:
SET_GCODE_VARIABLE MACRO=PAUSE VARIABLE=extruder_temp VALUE={printer.extruder.target}
SET_GCODE_VARIABLE MACRO=PAUSE VARIABLE=bed_temp VALUE={printer.heater_bed.target}
BASE_PAUSE
G91
G1 E-5 F300
G1 Z10 F600
G90
MOVE_TO_TRAY
M104 S200

[gcode_macro RESUME]
rename_existing: BASE_RESUME
gcode:
{% set EXTRUDER_TEMP = printer["gcode_macro PAUSE"].extruder_temp|int %}
{% set BED_TEMP = printer["gcode_macro PAUSE"].bed_temp|int %}
M140 S{BED_TEMP}
{% if printer.extruder.temperature > 201 %}
M106 P3 S255
{% endif %}
M109 S200
M106 P3 S0
M729
M190 S{BED_TEMP}
M109 S{EXTRUDER_TEMP}
BASE_RESUME

[idle_timeout]
timeout: 600
gcode:
TURN_OFF_HEATERS
{% if printer.pause_resume.is_paused %}
SET_STEPPER_ENABLE STEPPER=stepper_x ENABLE=1
SET_STEPPER_ENABLE STEPPER=stepper_y ENABLE=1
SET_STEPPER_ENABLE STEPPER=stepper_z ENABLE=1
SET_STEPPER_ENABLE STEPPER=extruder ENABLE=1
{% else %}
M84
{% endif %}