forked from zellneralex/klipper_config
-
Notifications
You must be signed in to change notification settings - Fork 0
/
display_menu.cfg
527 lines (467 loc) · 16.4 KB
/
display_menu.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
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
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
# Main
# + Power Off
# + Flexplate
# + Set Name
# + Offset 0.0
# + Tune
# + Speed: 0%
# + Flow: 0%
# + Offset Z:0.0
# + SD Card
# + Show loaded file
# + Load File
# + Unload File
# + Start printing
# + Pause printing
# + Resume printing
# + Cancel printing
# + Control
# + Fan
# + Cooling
# + Toggle: OFF
# + Speed: 0%
# + Chamber
# + Toggle: OFF
# + Temp: 0C
# + Filter
# + Toggle: OFF
# + Speed: 0%
# + Lights
# + Toggle: OFF
# + Dim: 0%
# + Runout
# + Runout: ON
# + Toolhead: ON
# + Home [ALL / Z / X Y]
# + Park
# + Move
# + Move Step: 0
# + Move X: 0.0
# + Move Y: 0.0
# + Move Z: 0.0
# + Move E: +0.0
# + Steppers off
# + Temperature
# + E0: 0.0 (0.0)
# + Bed: 0.0 (0.0)
# + Filament
# + Load
# + Unload
# + Feed: 0.0
# + Satistic
# + Time of Operation
# + Total Filament used
# + Time since Filter change
# + Time since Service
# + Reset Filter time
# + Reset Service time
[gcode_macro _MENU_LIMITS]
variable_move: {}
gcode:
{% set list = [0.1,0.5,1,5,10,50,100] %} ; define your input list
{% set max = printer.toolhead.axis_maximum %}
{% set min = printer.toolhead.axis_minimum %}
{% set index = params.INDEX|int if params.INDEX is defined and params.INDEX|int < list|length else 0 %}
{% set move = {'index': {'i': index, 'list': list },
'step' : list[index],
'max' : {'x': ((max.x - min.x) / list[index])|int,
'y': ((max.y - min.y) / list[index])|int,
'z': ( max.z / list[index])|int,
'e': (printer.configfile.settings.extruder.max_extrude_only_distance / list[index])|int}} %}
SET_GCODE_VARIABLE MACRO=_MENU_LIMITS VARIABLE=move VALUE="{move}"
[menu __voron_main]
type: list
name: Main
[menu __voron_main __power_off]
type: command
enable: {not (printer.print_stats.state == "printing" or printer.print_stats.state == "paused") and
'gcode_macro PRINTER_OFF' in printer}
name: Power Off
gcode: {menu.exit()} PRINTER_OFF
[menu __voron_main __flexplate]
type: list
name: Flexplate: {printer.save_variables.variables.plates.array[printer.save_variables.variables.plates.index].name}
enable: {'plates' in printer.save_variables.variables and
not (printer.print_stats.state == "printing" or printer.print_stats.state == "paused")}
[menu __voron_main __flexplate __set]
type: input
name: Set: {printer.save_variables.variables.plates.array[menu.input|int].name}
input: {printer.save_variables.variables.plates.index}
input_min: 0
input_max: {printer.save_variables.variables.plates.array|length - 1}
gcode: SET_PLATE INDEX={menu.input|int}
[menu __voron_main __flexplate __offset]
type: input
name: Offset:{'%01.3f' % menu.input}
input: {printer.save_variables.variables.plates.array[printer.save_variables.variables.plates.index].offset}
input_min: -1.0
input_max: 1.0
input_step: 0.001
gcode: CHANGE_PLATE_VALUE OFFSET={menu.input|float}
[menu __voron_main __tune]
type: list
enable: {printer.print_stats.state == "printing" or printer.print_stats.state == "paused"}
name: Tune
[menu __voron_main __tune __speed]
type: input
name: Speed: {'%3d' % (menu.input*100)}%
input: {printer.gcode_move.speed_factor}
input_min: 0.01
input_max: 5
input_step: 0.01
realtime: True
gcode: M220 S{'%d' % (menu.input*100)}
[menu __voron_main __tune __flow]
type: input
name: Flow: {'%3d' % (menu.input*100)}%
input: {printer.gcode_move.extrude_factor}
input_min: 0.01
input_max: 2
input_step: 0.01
realtime: True
gcode: M221 S{'%d' % (menu.input*100)}
[menu __voron_main __tune __offsetz]
type: input
name: Offset Z:{'%05.3f' % menu.input}
input: {printer.gcode_move.homing_origin.z}
input_min: -5
input_max: 5
input_step: 0.005
realtime: True
gcode: SET_GCODE_OFFSET Z={'%.3f' % menu.input} MOVE=1
[menu __voron_main __sdcard]
type: list
enable: {'virtual_sdcard' in printer}
name: SD Card
[menu __voron_main __sdcard __file]
type: command
name: File: {printer.print_stats.filename}
[menu __voron_main __sdcard __load]
type: vsdlist
enable: {not printer.virtual_sdcard.file_path and not (printer.print_stats.state == "printing" or printer.print_stats.state == "paused")}
name: Load file
[menu __voron_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
gcode:
{menu.back()} SDCARD_RESET_FILE
[menu __voron_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
gcode:
{menu.exit()}
UPDATE_DELAYED_GCODE ID=_DELAY_DISPLAY_OFF DURATION=10
M24
[menu __voron_main __sdcard __pause]
type: command
enable: {printer.print_stats.state == "printing"}
name: Pause print
gcode:
{menu.back()} PAUSE
[menu __voron_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 __voron_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
[menu __voron_main __control]
type: list
name: Control
[menu __voron_main __control __fan]
type: list
name: Fan
[menu __voron_main __control __fan __partcooling]
type: list
enable: {'fan' in printer}
name: Cooling {'%3d%s' % (printer.fan.speed*100,'%') if printer.fan.speed else 'OFF'}
[menu __voron_main __control __fan __partcooling __fanonoff]
type: input
name: Toggle: {'ON' if menu.input else 'OFF'}
input: {printer.fan.speed}
input_min: 0
input_max: 1
input_step: 1
gcode: M106 S{255 if menu.input else 0}
[menu __voron_main __control __fan __partcooling __fanspeed]
type: input
name: Speed: {'%3d%s' % (menu.input*100,'%') if menu.input else 'OFF'}
input: {printer.fan.speed}
input_min: 0
input_max: 1
input_step: 0.01
gcode: M106 S{'%d' % (menu.input*255)}
[menu __voron_main __control __fan __chamber]
type: list
enable: {'temperature_fan chamber' in printer}
name: Chamber {'%2dC' % (printer['temperature_fan chamber'].target) if printer['temperature_fan chamber'].target else 'OFF'}
[menu __voron_main __control __fan __chamber __chamberonoff]
type: input
name: Toggle: {'ON' if menu.input else 'OFF'}
input: {printer['temperature_fan chamber'].target}
input_min: 0
input_max: 1
input_step: 1
gcode: M141 S{printer["gcode_macro _USER_VARIABLE"].vent_on if menu.input else 0}
[menu __voron_main __control __fan __chamber __chamberfanspeed]
type: input
name: Temp: {'%2dC' % (menu.input) if menu.input else 'OFF'}
input: {printer['temperature_fan chamber'].target}
input_min: {printer.configfile.settings['temperature_fan chamber'].min_temp|int}
input_max: {printer.configfile.settings['temperature_fan chamber'].max_temp|int}
input_step: 1
gcode: M141 S{'%d' % (menu.input)}
[menu __voron_main __control __fan __filter]
type: list
enable: {'fan_generic filter' in printer}
name: Filter {'%3d%s' % (printer['fan_generic filter'].speed*100,'%') if printer['fan_generic filter'].speed else 'OFF'}
[menu __voron_main __control __fan __filter __filteronoff]
type: input
name: Toggle: {'ON ' if menu.input else 'OFF'}
input: {printer['fan_generic filter'].speed}
input_min: 0
input_max: 1
input_step: 1
gcode: {% if menu.input %} _FILTER_ON {% else %} _SET_FILTER S=0.0 {% endif %}
[menu __voron_main __control __fan __filter __filterspeed]
type: input
name: Speed: {'%3d%s' % (menu.input*100,'%') if menu.input else 'OFF'}
input: {printer['fan_generic filter'].speed}
input_min: 0
input_max: 1
input_step: 0.01
gcode: _SET_FILTER S={menu.input}
[menu __voron_main __control __lights]
type: list
enable: {'output_pin caselight' in printer}
name: Lights {'ON' if printer['output_pin caselight'].value != 0 else 'OFF'}
[menu __voron_main __control __lights __caselightonoff]
type: input
enable: {'output_pin caselight' in printer}
name: Toggle: {'ON ' if menu.input else 'OFF'}
input: {printer['output_pin caselight'].value}
input_min: 0
input_max: 1
input_step: 1
gcode: {% if menu.input %} _CASELIGHT_ON {% else %} _CASELIGHT_OFF {% endif %}
[menu __voron_main __control __lights __caselightpwm]
type: input
enable: {'output_pin caselight' in printer}
name: Dim: {'%3d%s' % (menu.input*100,'%') if menu.input else 'OFF'}
input: {printer['output_pin caselight'].value}
input_min: 0.0
input_max: 1.0
input_step: 0.01
gcode: SET_PIN PIN=caselight VALUE={menu.input}
[menu __voron_main __control __runout]
type: list
enable: {printer['gcode_macro _USER_VARIABLE'].hw.runout.sensor or
'filament_switch_sensor toolhead_runout' in printer.configfile.settings}
name: Runout
[menu __voron_main __control __runout __runoutonoff]
type: input
enable: {printer['gcode_macro _USER_VARIABLE'].hw.runout.sensor}
name: Runout: {'ON ' if menu.input else 'OFF'}
input: {printer["filament_" + printer['gcode_macro _USER_VARIABLE'].hw.runout.type + "_sensor runout"].enabled}
input_min: 0
input_max: 1
input_step: 1
gcode: SET_FILAMENT_SENSOR SENSOR=runout ENABLE={menu.input|int}
[menu __voron_main __control __runout __toolhead_runoitonoff]
type: input
enable: {'filament_switch_sensor toolhead_runout' in printer.configfile.settings}
name: Toolhead: {'ON ' if menu.input else 'OFF'}
input: {printer['filament_switch_sensor toolhead_runout'].enabled}
input_min: 0
input_max: 1
input_step: 1
gcode: SET_FILAMENT_SENSOR SENSOR=toolhead_runout ENABLE={menu.input|int}
[menu __voron_main __control __home]
type: input
enable: {not printer.print_stats.state == "printing" }
name: Home: {['ALL','Z','X Y'][menu.input|int]}
input: 0
input_min: 0
input_max: 2
gcode: {['G28','G28 Z','G28 X Y'][menu.input|int]}
[menu __voron_main __control __park_pos]
type: input
enable: {not printer.print_stats.state == "printing" }
name: Park: {['Bed','Center','Rear','Front','FrontLow'][menu.input|int]}
input: 0
input_min: 0
input_max: 4
gcode: PARK P={['BED','CENTER','REAR','FRONT', 'FRONTLOW'][menu.input|int]}
[menu __voron_main __control __move]
type: list
enable: {not printer.print_stats.state == "printing"}
name: Move
[menu __voron_main __control __move __move_select]
type: input
name: Move Step: {printer['gcode_macro _MENU_LIMITS'].move.index.list[menu.input|int]}
input: {printer['gcode_macro _MENU_LIMITS'].move.index.i}
input_min: 0
input_max: {printer['gcode_macro _MENU_LIMITS'].move.index.list|length - 1}
input_step: 1
gcode: _MENU_LIMITS INDEX={menu.input|int}
[menu __voron_main __control __move __move_x]
type: input
name: Move X: {'%05.1f' % (printer.toolhead.axis_minimum.x + menu.input * printer['gcode_macro _MENU_LIMITS'].move.step) if 'x' in printer.toolhead.homed_axes else 'unhomed' }
input: {((printer.gcode_move.gcode_position.x - printer.toolhead.axis_minimum.x) / printer['gcode_macro _MENU_LIMITS'].move.step)|int}
input_min: 0
input_max: {printer['gcode_macro _MENU_LIMITS'].move.max.x}
input_step: 1
realtime: True
gcode:
SAVE_GCODE_STATE NAME=__move__axis
G90
G1 X{printer.toolhead.axis_minimum.x + menu.input * printer['gcode_macro _MENU_LIMITS'].move.step} F6000
RESTORE_GCODE_STATE NAME=__move__axis
[menu __voron_main __control __move __move_y]
type: input
name: Move Y: {'%05.1f' % (printer.toolhead.axis_minimum.y + menu.input * printer['gcode_macro _MENU_LIMITS'].move.step) if 'y' in printer.toolhead.homed_axes else 'unhomed' }
input: {((printer.gcode_move.gcode_position.y - printer.toolhead.axis_minimum.y) / printer['gcode_macro _MENU_LIMITS'].move.step)|int}
input_min: 0
input_max: {printer['gcode_macro _MENU_LIMITS'].move.max.y}
input_step: 1
realtime: True
gcode:
SAVE_GCODE_STATE NAME=__move__axis
G90
G1 Y{printer.toolhead.axis_minimum.y + menu.input * printer['gcode_macro _MENU_LIMITS'].move.step} F6000
RESTORE_GCODE_STATE NAME=__move__axis
[menu __voron_main __control __move __move_z]
type: input
name: Move Z: {'%05.1f' % (menu.input * printer['gcode_macro _MENU_LIMITS'].move.step) if 'z' in printer.toolhead.homed_axes else 'unhomed' }
input: {((printer.gcode_move.gcode_position.z - printer.toolhead.axis_minimum.z) / printer['gcode_macro _MENU_LIMITS'].move.step)|int}
input_min: 0
input_max: {printer['gcode_macro _MENU_LIMITS'].move.max.z}
input_step: 1
realtime: True
gcode:
SAVE_GCODE_STATE NAME=__move__axis
G90
G1 Z{printer.toolhead.axis_minimum.z + menu.input * printer['gcode_macro _MENU_LIMITS'].move.step} F900
RESTORE_GCODE_STATE NAME=__move__axis
[menu __voron_main __control __move __move_e]
type: input
name: Move E: {'%+06.1f' % (menu.input * printer['gcode_macro _MENU_LIMITS'].move.step) if printer.extruder.can_extrude else 'to cold'}
input: 0
input_min: -{printer['gcode_macro _MENU_LIMITS'].move.max.e}
input_max: {printer['gcode_macro _MENU_LIMITS'].move.max.e}
input_step: 1
gcode:
SAVE_GCODE_STATE NAME=__move__axis
M83
G1 E{menu.input * printer['gcode_macro _MENU_LIMITS'].move.step} F240
RESTORE_GCODE_STATE NAME=__move__axis
[menu __voron_main __control __disable]
type: command
name: Steppers off
enable: {not printer.print_stats.state == "printing"}
gcode: M84
[menu __voron_main __temp]
type: list
name: Temperature
[menu __voron_main __temp __hotend0_target]
type: input
enable: {('extruder' in printer) and ('extruder' in printer.heaters.available_heaters)}
name: {"E0: %3.0f (%4.0f)" % (menu.input, printer.extruder.temperature)}
input: {printer.extruder.target}
input_min: 0
input_max: {printer.configfile.config.extruder.max_temp}
input_step: 1
gcode: M104 T0 S{'%.0f' % menu.input}
[menu __voron_main __temp __hotbed_target]
type: input
enable: {'heater_bed' in printer}
name: {"Bed:%3.0f (%4.0f)" % (menu.input, printer.heater_bed.temperature)}
input: {printer.heater_bed.target}
input_min: 0
input_max: {printer.configfile.config.heater_bed.max_temp}
input_step: 1
gcode: M140 S{'%.0f' % menu.input}
[menu __voron_main __filament]
type: list
name: Filament
[menu __voron_main __filament __load]
type: command
name: Load
gcode: FILAMENT_LOAD
[menu __voron_main __filament __unload]
type: command
name: Unload
gcode: FILAMENT_UNLOAD
[menu __voron_main __filament __feed]
type: input
name: Feed: {'%.1f' % menu.input if printer.extruder.can_extrude else 'to cold'}
input: 5
input_min: -{printer.configfile.settings.extruder.max_extrude_only_distance}
input_max: {printer.configfile.settings.extruder.max_extrude_only_distance}
input_step: 0.1
gcode:
SAVE_GCODE_STATE NAME=__filament__load
M83
G1 E{'%.1f' % menu.input} F60
RESTORE_GCODE_STATE NAME=__filament__load
[menu __voron_main __statistic]
type: list
enable: {'print_stats' in printer.save_variables.variables}
name: Satistic
[menu __voron_main __statistic __totaltime]
type: command
name: Time of Operation
gcode:
{menu.exit()}
_DISPLAY_PRINT_TIME PREFIX=Total SECONDS={printer.save_variables.variables.print_stats.time.total}
UPDATE_DELAYED_GCODE ID=_DELAY_DISPLAY_OFF DURATION=10
[menu __voron_main __statistic __filament]
type: command
name: Total Filament used
gcode:
{menu.exit()}
M117 Filerment {'%.4f' % (printer.save_variables.variables.print_stats.filament|float / 1000.0)}m
{action_respond_info("Total Filament printed: %.4fm" % (printer.save_variables.variables.print_stats.filament|float / 1000.0))}
UPDATE_DELAYED_GCODE ID=_CLEAR_DISPLAY DURATION=10
UPDATE_DELAYED_GCODE ID=_DELAY_DISPLAY_OFF DURATION=10
[menu __voron_main __statistic __filtertime]
type: command
name: Time since Filter change
gcode:
{menu.exit()}
_DISPLAY_PRINT_TIME PREFIX=Filter SECONDS={printer.save_variables.variables.print_stats.time.filter}
UPDATE_DELAYED_GCODE ID=_DELAY_DISPLAY_OFF DURATION=10
[menu __voron_main __statistic __servicetime]
type: command
name: Time since Service
gcode:
{menu.exit()}
_DISPLAY_PRINT_TIME PREFIX=Service SECONDS={printer.save_variables.variables.print_stats.time.service}
UPDATE_DELAYED_GCODE ID=_DELAY_DISPLAY_OFF DURATION=10
[menu __voron_main __statistic __rst_filter]
type: command
enable: {not (printer.print_stats.state == "printing" or printer.print_stats.state == "paused")}
name: Reset Filter time
gcode:
{menu.exit()}
RST_FILTER
UPDATE_DELAYED_GCODE ID=_DELAY_DISPLAY_OFF DURATION=10
[menu __voron_main __statistic __rst_service]
type: command
enable: {not (printer.print_stats.state == "printing" or printer.print_stats.state == "paused")}
name: Reset Service time
gcode:
{menu.exit()}
RST_SERVICE
UPDATE_DELAYED_GCODE ID=_DELAY_DISPLAY_OFF DURATION=10