forked from wile-e1/klipper_config
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebclient.cfg
More file actions
191 lines (176 loc) · 7.34 KB
/
Copy pathwebclient.cfg
File metadata and controls
191 lines (176 loc) · 7.34 KB
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
[pause_resume]
[display_status]
[respond]
default_type: echo
# Sets the default prefix of the "M118" and "RESPOND" output to one
# of the following:
# echo: "echo: " (This is the default)
# command: "// "
# error: "!! "
#default_prefix: echo:
# Directly sets the default prefix. If present, this value will
# override the "default_type".
#####################################################################
# Macros
#####################################################################
[gcode_macro CANCEL_PRINT]
description: Cancel the actual running print
rename_existing: CANCEL_PRINT_BASE
variable_execute: False
gcode:
{% set user = printer['gcode_macro _USER_VARIABLE'] %}
{% set filter_off = user.peripheral.filter.run_after_print %}
{% set vent_on = user.peripheral.vent.on_val %}
{% set vent_off = user.peripheral.vent.run_after_print %}
{% set retract = user.filament.retract.end if not printer.pause_resume.is_paused
else user.filament.retract.cancel %}
SET_GCODE_VARIABLE MACRO=CANCEL_PRINT VARIABLE=execute VALUE=True
M117 Cancel
CANCEL_PRINT_BASE
{% if printer['gcode_macro PRINT_START'].state == 'Prepare' %}
{% if not printer.extruder.can_extrude %}
{action_respond_info("Extruder Temp to low heat to %3.1fC" % printer.configfile.settings.extruder.min_extrude_temp)}
M109 S{printer.configfile.settings.extruder.min_extrude_temp}
{% endif %}
M83
G1 E-{retract} F{user.speed.retract}
{% endif %}
TURN_OFF_HEATERS
{% if params.PARK|default(0)|int == 1 or (not printer.pause_resume.is_paused and user.park.park_at_cancel) %}
_TOOLHEAD_PARK P={params.PARK|default(0)} X={user.park.pause.x} Y={user.park.pause.y}
{% endif %}
M107 # turn off fan
{% if user.hw.chamber.fan %} M141 S{vent_on} {% endif %} # vent chamber (setting fan to below ambient)
_ADD_PRINT_TIME
{% if params.ERROR|default(0)|int == 1 %}
{% if user.hw.display.ena %} _LCD_KNOB COLOR=RED BLINK=0.2 {% endif %}
_SD_PRINT_STATS R='abort'
{% else %}
{% if user.hw.display.ena %} _LCD_KNOB COLOR=BLUE {% endif %}
_SD_PRINT_STATS R='canceled'
{% endif %}
_SD_PRINTER_STATS
{% if user.hw.caselight.ena %} _CASELIGHT_OFF {% endif %}
{% if user.hw.chamber.fan %} UPDATE_DELAYED_GCODE ID=_DELAY_VENT_OFF DURATION={vent_off} {% endif %}
{% if user.hw.filter.ena %} UPDATE_DELAYED_GCODE ID=_DELAY_FILTER_OFF DURATION={filter_off} {% endif %}
{% if user.unload_sd %} UPDATE_DELAYED_GCODE ID=_DELAY_SDCARD_RESET_FILE DURATION=10 {% endif %}
UPDATE_DELAYED_GCODE ID=_CLEAR_DISPLAY DURATION=10
status_ready
[gcode_macro PAUSE]
description: Pause the actual running print
rename_existing: PAUSE_BASE
variable_restore: {'absolute': {'coordinates': True, 'extrude': True}, 'speed': 1500}
gcode:
{% set user = printer['gcode_macro _USER_VARIABLE'] %}
##### store coordinates to restore them at resume #####
{% set restore = {'absolute': {'coordinates': printer.gcode_move.absolute_coordinates,
'extrude' : printer.gcode_move.absolute_extrude},
'speed' : printer.gcode_move.speed} %}
SET_GCODE_VARIABLE MACRO=PAUSE VARIABLE=restore VALUE="{restore}"
{% if user.hw.display.ena %} _LCD_KNOB COLOR=BLUE BLINK=1 {% endif %}
{% if not printer.extruder.can_extrude %}
{action_respond_info("Extruder Temp to low heat to %3.1fC" % printer.configfile.settings.extruder.min_extrude_temp)}
M109 S{printer.configfile.settings.extruder.min_extrude_temp}
{% endif %}
M83
G0 E-{user.filament.retract.pause} F{user.speed.retract}
PAUSE_BASE
_TOOLHEAD_PARK P=0 X={params.X|default(user.park.pause.x)} Y={params.Y|default(user.park.pause.y)}
M104 S{printer.extruder.target}
[gcode_macro _TOOLHEAD_PARK]
description: Helper: Park toolhead used in PAUSE and CANCEL_PRINT
gcode:
{% set user = printer['gcode_macro _USER_VARIABLE'] %}
{% set pos = {'x': user.park.bed.x if params.P|int == 1
else params.X,
'y': user.park.bed.y if params.P|int == 1
else params.Y,
'z': user.park.bed.z if params.P|int == 1
else [(printer.toolhead.position.z + user.park.pause.dz), printer.toolhead.axis_maximum.z]|min} %}
G90
G0 Z{pos.z} F{user.speed.z_hop}
G0 X{pos.x} Y{pos.y} F{user.speed.travel}
status_ready
[gcode_macro RESUME]
description: Resume the actual running print
rename_existing: RESUME_BASE
gcode:
{% set user = printer['gcode_macro _USER_VARIABLE'] %}
{% set restore = printer["gcode_macro PAUSE"].restore %}
{% if user.hw.display.ena %} _LCD_KNOB COLOR=RED {% endif %}
RESUME_BASE VELOCITY={params.VELOCITY|default(user.speed.travel/60)}
G0 E{user.filament.retract.pause} F{user.speed.retract}
G0 F{restore.speed}
{% if restore.absolute.extrude %} M82 {% endif %} # set back to absolute
{% if not restore.absolute.coordinates %} G91 {% endif %} # set back to relative
# ###########################################################################
# # Display Menu #
# # !!! Caution: Remove all below if you do not have a display defined !!! #
# ###########################################################################
# # Main
# # ...
# # + SD Card
# # + Show loaded file
# # + Load File (only if not printing and no file loaded)
# # + Unload File (only if not printing and a file is loaded)
# # + Start printing (only if not printing and a file is loaded)
# # + Pause printing (only while printing)
# # + Resume printing (only while paused)
# # + Cancel printing (only while paused)
# [menu __main __sdcard]
# type: list
# enable: {'virtual_sdcard' in printer}
# name: SD Card
# [menu __main __sdcard __file]
# type: command
# name: File: {printer.print_stats.filename}
# index: 0
# [menu __main __sdcard __load]
# type: vsdlist
# #type: list
# #event_sender: __vsdfiles
# enable: {not printer.virtual_sdcard.file_path and not (printer.print_stats.state == "printing" or printer.print_stats.state == "paused")}
# name: Load file
# index: 1
# [menu __main __sdcard __unload]
# type: command
# enable: {printer.virtual_sdcard.file_path and not (printer.print_stats.state == "printing" or printer.print_stats.state == "paused")}
# name: Unload file
# index: 2
# gcode:
# # back is needed to reload the modified menu structure
# {menu.back()}
# SDCARD_RESET_FILE
# [menu __main __sdcard __start]
# type: command
# enable: {printer.virtual_sdcard.file_path and not (printer.print_stats.state == "printing" or printer.print_stats.state == "paused")}
# name: Start print
# index: 3
# gcode:
# {menu.exit()}
# UPDATE_DELAYED_GCODE ID=_DELAY_DISPLAY_OFF DURATION=10
# M24
# [menu __main __sdcard __pause]
# type: command
# enable: {printer.print_stats.state == "printing"}
# name: Pause print
# gcode:
# # back is needed to reload the modified menu structure
# {menu.back()}
# PAUSE
# [menu __main __sdcard __resume]
# type: command
# enable: {printer.print_stats.state == "paused"}
# name: Resume print
# gcode:
# {menu.exit()}
# UPDATE_DELAYED_GCODE ID=_DELAY_DISPLAY_OFF DURATION=10
# RESUME
# [menu __main __sdcard __cancel]
# type: command
# enable: {printer.print_stats.state == "paused"}
# name: Cancel print
# gcode:
# {menu.exit()}
# UPDATE_DELAYED_GCODE ID=_DELAY_DISPLAY_OFF DURATION=10
# CANCEL_PRINT