update kiauh_macros.cfg

Update macros to reflect recent changes to Klipper

f10247a498
This commit is contained in:
th33xitus
2021-05-21 08:55:11 +02:00
parent 44f5609de6
commit 545b978e80

View File

@@ -1,9 +1,9 @@
#########################################################################################
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ AUTOCREATED WITH KIAUH ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
#########################################################################################
# Those are the recommended macros and config entries if you use Mainsail or Fluidd! #
# Feel free to edit or delete those macros if you already have them defined elsewhere! #
#########################################################################################
################################################################################
# ~~~~~~~~~~~~~~~~~~~~~~~~ AUTOCREATED WITH KIAUH ~~~~~~~~~~~~~~~~~~~~~~~~~~ #
################################################################################
# Recommended macros and config entries if you use Mainsail or Fluidd! #
# You can edit or delete those macros if you already defined them elsewhere! #
################################################################################
[pause_resume]
@@ -19,20 +19,18 @@ gcode:
[gcode_macro PAUSE]
rename_existing: BASE_PAUSE
# change this if you need more or less extrusion
variable_extrude: 1.0
gcode:
##### read E from pause macro #####
{% set E = printer["gcode_macro PAUSE"].extrude|float %}
##### set park positon for x and y #####
# default is your max posion from your printer.cfg
{% set x_park = printer.toolhead.axis_maximum.x|float - 5.0 %}
{% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %}
##### set defaults #####
{% set x = params.X|default(230) %} #edit to your park position
{% set y = params.Y|default(230) %} #edit to your park position
{% set z = params.Z|default(10)|float %} #edit to your park position
{% set e = params.E|default(1) %} #edit to your retract length
##### calculate save lift position #####
{% set max_z = printer.toolhead.axis_maximum.z|float %}
{% set act_z = printer.toolhead.position.z|float %}
{% if act_z < (max_z - 2.0) %}
{% set z_safe = 2.0 %}
{% set lift_z = z|abs %}
{% if act_z < (max_z - lift_z) %}
{% set z_safe = lift_z %}
{% else %}
{% set z_safe = max_z - act_z %}
{% endif %}
@@ -40,21 +38,22 @@ gcode:
SAVE_GCODE_STATE NAME=PAUSE_state
BASE_PAUSE
G91
G1 E-{E} F2100
G1 Z{z_safe} F900
G1 E-{e} F2100
G1 Z{z_safe}
G90
G1 X{x_park} Y{y_park} F6000
G1 X{x} Y{y} F6000
[gcode_macro RESUME]
rename_existing: BASE_RESUME
gcode:
##### read E from pause macro #####
{% set E = printer["gcode_macro PAUSE"].extrude|float %}
##### end of definitions #####
##### set defaults #####
{% set e = params.E|default(1) %} #edit to your retract length
G91
G1 E{E} F2100
RESTORE_GCODE_STATE NAME=PAUSE_state
G1 E{e} F2100
G90
RESTORE_GCODE_STATE NAME=PAUSE_state MOVE=1
BASE_RESUME
#########################################################################################
#########################################################################################
################################################################################
################################################################################