forked from Desuuuu/klipper-macros
-
Notifications
You must be signed in to change notification settings - Fork 0
/
M600.cfg
32 lines (29 loc) · 999 Bytes
/
M600.cfg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
[gcode_macro M600]
gcode:
{% set default_x = printer.toolhead.axis_minimum.x + 20 %}
{% set default_y = printer.toolhead.axis_minimum.y + 20 %}
{% set default_e = 100 %}
{% if 'save_variables' in printer %}
{% set svv = printer.save_variables.variables %}
{% if 'park_x' in svv %}
{% set default_x = svv.park_x %}
{% endif %}
{% if 'park_y' in svv %}
{% set default_y = svv.park_y %}
{% endif %}
{% if 'bowden_len' in svv %}
{% set default_e = svv.bowden_len %}
{% endif %}
{% endif %}
{% set x = params.X|default(default_x)|float %}
{% set y = params.Y|default(default_y)|float %}
{% set z = params.Z|default(20)|float %}
{% set e = params.E|default(default_e)|float %}
{% if printer.pause_resume.is_paused %}
{action_respond_info("Already paused")}
{% elif printer.toolhead.homed_axes != "xyz" %}
{action_respond_info("Please home XYZ first")}
{% else %}
PAUSE_PARK X={x} Y={y} Z={z}
M702 U{e}
{% endif %}