v2.4: update macros, add Y parameter to PARK
This commit is contained in:
parent
b8638e4535
commit
bbe58d0642
1 changed files with 20 additions and 16 deletions
36
macros.cfg
36
macros.cfg
|
@ -17,7 +17,7 @@ gcode:
|
||||||
description: Change filament
|
description: Change filament
|
||||||
gcode:
|
gcode:
|
||||||
SAVE_GCODE_STATE NAME=M600_state
|
SAVE_GCODE_STATE NAME=M600_state
|
||||||
PAUSE
|
PAUSE Y=15
|
||||||
M117 > change filament
|
M117 > change filament
|
||||||
RESTORE_GCODE_STATE NAME=M600_state
|
RESTORE_GCODE_STATE NAME=M600_state
|
||||||
|
|
||||||
|
@ -44,12 +44,15 @@ gcode:
|
||||||
|
|
||||||
[gcode_macro PARK]
|
[gcode_macro PARK]
|
||||||
gcode:
|
gcode:
|
||||||
|
{% set Y=params.Y|default(295) %}
|
||||||
{% if "xyz" in printer.toolhead.homed_axes %}
|
{% if "xyz" in printer.toolhead.homed_axes %}
|
||||||
# set park positon for x and y
|
# set park positon for x and y
|
||||||
## close to max
|
## close to max
|
||||||
{% set x_park = printer.toolhead.axis_maximum.x|float - 5.0 %}
|
{% set x_park = printer.toolhead.axis_maximum.x|float - 5.0 %}
|
||||||
## close to min
|
{% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %}
|
||||||
{% set y_park = printer.toolhead.axis_minimum.y|float + 5.0 %}
|
{% if Y != y_park %}
|
||||||
|
{% set y_park = Y %}
|
||||||
|
{% endif %}
|
||||||
# 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 %}
|
||||||
|
@ -73,19 +76,20 @@ rename_existing: PAUSE_BASE
|
||||||
# change this if you need more or less extrusion
|
# change this if you need more or less extrusion
|
||||||
variable_extrude: 1.0
|
variable_extrude: 1.0
|
||||||
gcode:
|
gcode:
|
||||||
# read E from pause macro
|
{% set Y=params.Y|default(295) %}
|
||||||
{% set E = printer["gcode_macro PAUSE"].extrude|float %}
|
# read E from pause macro
|
||||||
# end of definitions
|
{% set E = printer["gcode_macro PAUSE"].extrude|float %}
|
||||||
M117 > pause
|
# end of definitions
|
||||||
PAUSE_BASE
|
M117 > pause
|
||||||
{% if printer.extruder.can_extrude|lower == 'true' %}
|
PAUSE_BASE
|
||||||
G91
|
{% if printer.extruder.can_extrude|lower == 'true' %}
|
||||||
G1 E-{E} F2100
|
G91
|
||||||
G90
|
G1 E-{E} F2100
|
||||||
{% else %}
|
G90
|
||||||
{action_respond_info("Extruder not hot enough")}
|
{% else %}
|
||||||
{% endif %}
|
{action_respond_info("Extruder not hot enough")}
|
||||||
PARK
|
{% endif %}
|
||||||
|
PARK Y={Y}
|
||||||
|
|
||||||
|
|
||||||
[gcode_macro RESUME]
|
[gcode_macro RESUME]
|
||||||
|
|
Loading…
Reference in a new issue