Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
zellneralex committed Jan 14, 2023
2 parents f39600a + 1a1f188 commit 1d096a1
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions mainsail.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,11 @@ description: Cancel the actual running print
rename_existing: CANCEL_PRINT_BASE
gcode:
##### get user parameters or use default #####
{% set allow_park = False if printer['gcode_macro _CLIENT_VARIABLE'] is not defined
else False if printer['gcode_macro _CLIENT_VARIABLE'].park_at_cancel is not defined
else True if printer['gcode_macro _CLIENT_VARIABLE'].park_at_cancel|lower == 'true'
{% set macro_found = True if printer['gcode_macro _CLIENT_VARIABLE'] is defined else False %}
{% set client = printer['gcode_macro _CLIENT_VARIABLE'] %}
{% set allow_park = False if not macro_found
else False if client.park_at_cancel is not defined
else True if client.park_at_cancel|lower == 'true'
else False %}
{% set retract = 5.0 if not macro_found else client.cancel_retract|default(5.0)|abs %}
{% set sp_retract = 2100 if not macro_found else client.speed_retract|default(35) * 60 %}
Expand Down

0 comments on commit 1d096a1

Please sign in to comment.