Skip to content
This repository has been archived by the owner on Dec 17, 2024. It is now read-only.

Commit

Permalink
update macros (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
zellneralex authored Jun 14, 2021
1 parent b92e729 commit 73b62a6
Showing 1 changed file with 2 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ description: Cancel the actual running print
rename_existing: CANCEL_PRINT_BASE
gcode:
TURN_OFF_HEATERS
CLEAR_PAUSE
SDCARD_RESET_FILE
CANCEL_PRINT_BASE

[gcode_macro PAUSE]
Expand All @@ -34,12 +32,10 @@ gcode:
{% else %}
{% set z_safe = max_z - act_z %}
{% endif %}
{%set min_extrude_temp = printer.configfile.settings["extruder"]["min_extrude_temp"]|int %}
{%set act_extrude_temp = printer.extruder.temperature|int %}
##### end of definitions #####
PAUSE_BASE
G91
{% if act_extrude_temp > min_extrude_temp %}
{% if printer.extruder.can_extrude|lower == 'true' %}
G1 E-{E} F2100
{% else %}
{action_respond_info("Extruder not hot enough")}
Expand All @@ -58,16 +54,14 @@ rename_existing: RESUME_BASE
gcode:
##### read E from pause macro #####
{% set E = printer["gcode_macro PAUSE"].extrude|float %}
{%set min_extrude_temp = printer.configfile.settings["extruder"]["min_extrude_temp"]|int %}
{%set act_extrude_temp = printer.extruder.temperature|int %}
#### get VELOCITY parameter if specified ####
{% if 'VELOCITY' in params|upper %}
{% set get_params = ('VELOCITY=' + params.VELOCITY) %}
{%else %}
{% set get_params = "" %}
{% endif %}
##### end of definitions #####
{% if act_extrude_temp > min_extrude_temp %}
{% if printer.extruder.can_extrude|lower == 'true' %}
G91
G1 E{E} F2100
{% else %}
Expand Down

0 comments on commit 73b62a6

Please sign in to comment.