forked from Rat-OS/RatOS-configuration
-
Notifications
You must be signed in to change notification settings - Fork 0
/
shell-macros.cfg
80 lines (70 loc) · 3.67 KB
/
shell-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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
[gcode_shell_command generate_shaper_graph_x]
command: /home/pi/klipper_config/config/scripts/generate-shaper-graph-x.sh
timeout: 60.
verbose: True
[gcode_shell_command generate_shaper_graph_y]
command: /home/pi/klipper_config/config/scripts/generate-shaper-graph-y.sh
timeout: 60.
verbose: True
[gcode_shell_command generate_belt_tension_graph]
command: /home/pi/klipper_config/config/scripts/generate-belt-tension-graph.sh
timeout: 90.
verbose: True
[gcode_shell_command compile_binaries]
command: /home/pi/klipper_config/config/scripts/compile-binaries.sh
timeout: 600.
[gcode_shell_command change_hostname]
command: /home/pi/klipper_config/config/scripts/change-hostname.sh
timeout: 10.
[gcode_shell_command delete_and_restore_printer_data_dirs]
command: /home/pi/klipper_config/config/scripts/delete-and-restore-printer-data.sh
timeout: 10.
[gcode_macro DELETE_AND_RESTORE_PRINTER_DATA_DIRS]
gcode:
RUN_SHELL_COMMAND CMD=delete_and_restore_printer_data_dirs
[gcode_macro GENERATE_SHAPER_GRAPHS]
description: Genarates input shaper resonances graphs for analysis. Uses the AXIS parameter for if you only want to do one axis at a time, (eg. GENERATE_SHAPER_GRAPHS AXIS=X)
gcode:
{% if params.AXIS is defined %}
{% if params.AXIS|lower == 'x' %}
MAYBE_HOME
TEST_RESONANCES AXIS=X
RUN_SHELL_COMMAND CMD=generate_shaper_graph_x
RESPOND MSG="Input shaper graph generated for the X axis. You'll find it in the input_shaper folder in the machine tab!"
{% elif params.AXIS|lower == 'y' %}
MAYBE_HOME
TEST_RESONANCES AXIS=Y
RUN_SHELL_COMMAND CMD=generate_shaper_graph_y
RESPOND MSG="Input shaper graph generated for the Y axis. You'll find it in the input_shaper folder in the machine tab!"
{% else %}
{action_raise_error("Unknown axis specified. Expected X or Y.")}
{% endif %}
{% else %}
MAYBE_HOME
TEST_RESONANCES AXIS=X
TEST_RESONANCES AXIS=Y
RUN_SHELL_COMMAND CMD=generate_shaper_graph_x
RUN_SHELL_COMMAND CMD=generate_shaper_graph_y
RESPOND MSG="Input shaper graphs generated for X and Y. You'll find them in the input_shaper folder in the machine tab!"
{% endif %}
[gcode_macro MEASURE_COREXY_BELT_TENSION]
description: Generates resonance graph used to ensure belts are equally tensioned.
gcode:
TEST_RESONANCES AXIS=1,1 OUTPUT=raw_data NAME=belt-tension-upper
TEST_RESONANCES AXIS=1,-1 OUTPUT=raw_data NAME=belt-tension-lower
RUN_SHELL_COMMAND CMD=generate_belt_tension_graph
[gcode_macro COMPILE_FIRMWARE]
description: Compiles firmware with currently installed klipper version for all supported RatOS boards. Note: this may take up to 10 minutes.
gcode:
RESPOND MSG="Compiling binaries.. This can take up to 10 minutes. Please do not turn off your Raspberry Pi!"
RUN_SHELL_COMMAND CMD=compile_binaries
RESPOND MSG="Firmware binaries compiled successfully! You can find them in the firmware_binaries folder in the machine tab!"
[gcode_macro CHANGE_HOSTNAME]
description: Change the hostname of your Raspberry Pi.
gcode:
{% if params.HOSTNAME is not defined %}
RESPOND MSG='You have to specify a new hostname with the HOSTNAME parameter. Ex: CHANGE_HOSTNAME HOSTNAME="MY_NEW_HOSTNAME"'
RESPOND MSG="Please note: RFCs mandate that a hostname's labels may contain only the ASCII letters 'a' through 'z' (case-insensitive), the digits '0' through '9', and the hyphen. Hostname labels cannot begin or end with a hyphen. No other symbols, punctuation characters, or blank spaces are permitted."
{% else %}
RUN_SHELL_COMMAND CMD=change_hostname PARAMS={params.HOSTNAME}
{% endif %}