mirror of
https://github.com/dw-0/kiauh.git
synced 2025-12-15 19:44:29 +05:00
update kiauh_macros.cfg
Update macros to reflect recent changes to Klipper
f10247a498
This commit is contained in:
@@ -1,9 +1,9 @@
|
|||||||
#########################################################################################
|
################################################################################
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ AUTOCREATED WITH KIAUH ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
|
# ~~~~~~~~~~~~~~~~~~~~~~~~ AUTOCREATED WITH KIAUH ~~~~~~~~~~~~~~~~~~~~~~~~~~ #
|
||||||
#########################################################################################
|
################################################################################
|
||||||
# Those are the recommended macros and config entries if you use Mainsail or Fluidd! #
|
# 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! #
|
# You can edit or delete those macros if you already defined them elsewhere! #
|
||||||
#########################################################################################
|
################################################################################
|
||||||
|
|
||||||
[pause_resume]
|
[pause_resume]
|
||||||
|
|
||||||
@@ -19,20 +19,18 @@ gcode:
|
|||||||
|
|
||||||
[gcode_macro PAUSE]
|
[gcode_macro PAUSE]
|
||||||
rename_existing: BASE_PAUSE
|
rename_existing: BASE_PAUSE
|
||||||
# change this if you need more or less extrusion
|
|
||||||
variable_extrude: 1.0
|
|
||||||
gcode:
|
gcode:
|
||||||
##### read E from pause macro #####
|
##### set defaults #####
|
||||||
{% set E = printer["gcode_macro PAUSE"].extrude|float %}
|
{% set x = params.X|default(230) %} #edit to your park position
|
||||||
##### set park positon for x and y #####
|
{% set y = params.Y|default(230) %} #edit to your park position
|
||||||
# default is your max posion from your printer.cfg
|
{% set z = params.Z|default(10)|float %} #edit to your park position
|
||||||
{% set x_park = printer.toolhead.axis_maximum.x|float - 5.0 %}
|
{% set e = params.E|default(1) %} #edit to your retract length
|
||||||
{% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %}
|
|
||||||
##### calculate save lift position #####
|
##### calculate save lift position #####
|
||||||
{% set max_z = printer.toolhead.axis_maximum.z|float %}
|
{% set max_z = printer.toolhead.axis_maximum.z|float %}
|
||||||
{% set act_z = printer.toolhead.position.z|float %}
|
{% set act_z = printer.toolhead.position.z|float %}
|
||||||
{% if act_z < (max_z - 2.0) %}
|
{% set lift_z = z|abs %}
|
||||||
{% set z_safe = 2.0 %}
|
{% if act_z < (max_z - lift_z) %}
|
||||||
|
{% set z_safe = lift_z %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{% set z_safe = max_z - act_z %}
|
{% set z_safe = max_z - act_z %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@@ -40,21 +38,22 @@ gcode:
|
|||||||
SAVE_GCODE_STATE NAME=PAUSE_state
|
SAVE_GCODE_STATE NAME=PAUSE_state
|
||||||
BASE_PAUSE
|
BASE_PAUSE
|
||||||
G91
|
G91
|
||||||
G1 E-{E} F2100
|
G1 E-{e} F2100
|
||||||
G1 Z{z_safe} F900
|
G1 Z{z_safe}
|
||||||
G90
|
G90
|
||||||
G1 X{x_park} Y{y_park} F6000
|
G1 X{x} Y{y} F6000
|
||||||
|
|
||||||
|
|
||||||
[gcode_macro RESUME]
|
[gcode_macro RESUME]
|
||||||
rename_existing: BASE_RESUME
|
rename_existing: BASE_RESUME
|
||||||
gcode:
|
gcode:
|
||||||
##### read E from pause macro #####
|
##### set defaults #####
|
||||||
{% set E = printer["gcode_macro PAUSE"].extrude|float %}
|
{% set e = params.E|default(1) %} #edit to your retract length
|
||||||
##### end of definitions #####
|
|
||||||
G91
|
G91
|
||||||
G1 E{E} F2100
|
G1 E{e} F2100
|
||||||
RESTORE_GCODE_STATE NAME=PAUSE_state
|
G90
|
||||||
|
RESTORE_GCODE_STATE NAME=PAUSE_state MOVE=1
|
||||||
BASE_RESUME
|
BASE_RESUME
|
||||||
|
|
||||||
#########################################################################################
|
################################################################################
|
||||||
#########################################################################################
|
################################################################################
|
||||||
|
|||||||
Reference in New Issue
Block a user