-
Notifications
You must be signed in to change notification settings - Fork 0
/
custom_macros.cfg
56 lines (45 loc) · 1.51 KB
/
custom_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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
[gcode_macro center]
gcode:
G90
G1 X175 Y175 F6000
[gcode_macro belt]
gcode:
G90
G1 X175 Y113 F6000
[gcode_macro front]
gcode:
G90
G1 X175 Y25 Z150 F6000
[gcode_macro OFF]
gcode:
M84
TURN_OFF_HEATERS
M107
#SET_FAN_SPEED FAN=exhaust_fan SPEED=0
[gcode_macro IDLE_TIMEOUT_DEF]
gcode:
SET_IDLE_TIMEOUT TIMEOUT=600
[gcode_macro IDLE_TIMEOUT_FULL_DAY]
gcode:
SET_IDLE_TIMEOUT TIMEOUT=86400
[gcode_macro EXTRUDER_OFF]
gcode:
SET_STEPPER_ENABLE STEPPER=extruder ENABLE=0
[gcode_macro DUMP_VARIABLES]
gcode:
{% set filter_name = params.NAME|default('')|string|lower %}
{% set filter_value = params.VALUE|default('')|string|lower %}
{% set show_cfg = params.SHOW_CFG|default(0)|int %}
{% set out = [] %}
{% for key1 in printer %}
{% for key2 in printer[key1] %}
{% if (show_cfg or not (key1|lower == 'configfile' and key2|lower in ['config', 'settings'])) and (filter_name in key1|lower or filter_name in key2|lower) and filter_value in printer[key1][key2]|string|lower %}
{% set dummy = out.append("printer['%s'].%s = %s" % (key1, key2, printer[key1][key2])) %}
{% endif %}
{% else %}
{% if filter_name in key1|lower and filter_value in printer[key1]|string|lower %}
{% set dummy = out.append("printer['%s'] = %s" % (key1, printer[key1])) %}
{% endif %}
{% endfor %}
{% endfor %}
{action_respond_info(out|join("\n"))}