forked from viesturz/klipper-toolchanger
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmacros.cfg
35 lines (34 loc) · 1.11 KB
/
macros.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
33
34
35
[gcode_macro M104]
rename_existing: M104.1
description: [T<index>] [S<temperature>]
Set tool temperature.
T= Tool number, optional. If this parameter is not provided, the current tool is used.
S= Target temperature
gcode:
{% if params.T is defined %}
{% set newparameters = "" %}
{% set newparameters = newparameters ~ " T="~params.T %}
{% if params.S is defined %}
{% set newparameters = newparameters ~ " TARGET="~params.S %}
{% endif %}
SET_TOOL_TEMPERATURE{newparameters}
{% else %}
M104.1 {rawparams}
{% endif %}
[gcode_macro M109]
rename_existing: M109.1
description: [T<index>] [S<temperature>]
Set tool temperature and wait.
T= Tool number, optional. If this parameter is not provided, the current tool is used.
S= Target temperature
gcode:
{% if params.T is defined %}
{% set newparameters = "" %}
{% set newparameters = newparameters ~ " T="~params.T %}
{% if params.S is defined %}
{% set newparameters = newparameters ~ " TARGET="~params.S %}
{% endif %}
SET_TOOL_TEMPERATURE WAIT=1 {newparameters}
{% else %}
M109.1 {rawparams}
{% endif %}