v2.4: update menu, disable some stock items, add more input-lists

This commit is contained in:
Konstantin Koslowski 2021-10-13 18:46:59 +02:00
parent 8fdbec0965
commit fc28e259d5

View file

@ -6,6 +6,16 @@
[menu __main __octoprint] [menu __main __octoprint]
type: disabled type: disabled
## Control
[menu __main __control __home]
type: disabled
[menu __main __control __homez]
type: disabled
[menu __main __control __homexy]
type: disabled
## PreHeat ## PreHeat
[menu __main __temp __preheat_pla] [menu __main __temp __preheat_pla]
type: disabled type: disabled
@ -26,6 +36,17 @@ type: disabled
[menu __main __filament __unloads] [menu __main __filament __unloads]
type: disabled type: disabled
## Control
[menu __main __control __home]
type: disabled
[menu __main __control __homez]
type: disabled
[menu __main __control __homexy]
type: disabled
# Bed Probe # Bed Probe
[menu __main __setup __calib __bedprobe] [menu __main __setup __calib __bedprobe]
type: disabled type: disabled
@ -39,62 +60,82 @@ type: disabled
# Added Items to the Stock menu # Added Items to the Stock menu
[menu __main __filament __front_center] ## Control
type: command [menu __main __control __home]
name: Front Center type: input
gcode:
CENTER Y=25
[menu __main __filament __preheat_pla]
type: command
name: Preheat PLA
gcode:
PREHEAT EXTRUDER_TEMP=190
[menu __main __filament __preheat_abs]
type: command
name: Preheat ABS
gcode:
PREHEAT EXTRUDER_TEMP=215
[menu __main __filament __load]
type: command
name: Load Filament
gcode:
FILAMENT_LOAD
[menu __main __filament __unload]
type: command
name: Unload Filament
gcode:
FILAMENT_UNLOAD
[menu __main __filament __purge]
type: command
name: Purge Filament (10mm)
gcode:
FILAMENT_PURGE
[menu __main __setup __calib __home]
type: command
enable: {not printer.idle_timeout.state == "Printing"} enable: {not printer.idle_timeout.state == "Printing"}
name: Home name: Home: {['noop', 'ALL', 'XY', 'Z'][menu.input|int]}
input: 0
input_min: 0
input_max: 3
input_step: 1
gcode: gcode:
G28 {%- if menu.event == 'long_click' -%}
{[' ', 'G28', 'G28 XY', 'G28 Z'][menu.input|int]}
{%- endif -%}
[menu __main __setup __calib __center] [menu __main __control __move]
type: command type: input
enable: {not printer.idle_timeout.state == "Printing"} enable: {not printer.idle_timeout.state == "Printing"}
name: Center name: Move: {['FRONT CENTER', 'CENTER', 'REAR CENTER'][menu.input|int]}
input: 0
input_min: 0
input_max: 2
input_step: 1
gcode: gcode:
CENTER {%- if menu.event == 'long_click' -%}
CENTER {['Y=15', '', 'Y=290'][menu.input|int]}
{%- endif -%}
## Filament
[menu __main __filament __preheat]
type: input
enable: {not printer.idle_timeout.state == "Printing"}
name: Preheat: {['Off', 'ABS', 'PLA', 'PET'][menu.input|int]}
input: 0
input_min: 0
input_max: 3
input_step: 1
gcode:
{%- if menu.event == 'long_click' -%}
M104 S{[0, 215, 190, 200][menu.input|int]}
{%- endif -%}
[menu __main __filament __filament_load]
type: input
enable: {not printer.idle_timeout.state == "Printing"}
name: Filament: {['noop', 'Load', 'Unload', 'Purge (10mm)'][menu.input|int]}
input: 0
input_min: 0
input_max: 3
input_step: 1
gcode:
{%- if menu.event == 'long_click' -%}
{% if printer.extruder.can_extrude|lower == 'true' %}
M83
G1 {['E0', 'E50 F3000', 'E-75 F3000', 'E10 F300'][menu.input|int]}
G1 {['E0', 'E35 F300', 'E0', 'E0'][menu.input|int]}
M82
{% else %}
{action_respond_info("extruder not hot enough")}
{%- endif -%}
{%- endif -%}
## Calibration
[menu __main __setup __calib __bedprobe] [menu __main __setup __calib __bedprobe]
type: command type: command
enable: {not printer.idle_timeout.state == "Printing"} enable: {not printer.idle_timeout.state == "Printing"}
name: Bed probe name: Bed probe
gcode: gcode:
PROBE {%- if printer.toolhead.position.y|float < 270 -%}
PROBE
{%- else -%}
{action_respond_info("Won't probe inunsafe position")}
{%- endif -%}
## Probe & Endstop Z-Offset calibration ## Probe & Endstop Z-Offset calibration
[menu __main __setup __calib __Z_offset] [menu __main __setup __calib __Z_offset]
@ -105,20 +146,16 @@ name: Z offset
[menu __main __setup __calib __Z_offset __start] [menu __main __setup __calib __Z_offset __start]
type: input type: input
enable: {not printer.idle_timeout.state == "Printing"} enable: {not printer.idle_timeout.state == "Printing"}
name: Do {['None','Home','Probe','Endstop'][menu.input|int]} name: Calibrate: {['noop','Probe','Endstop'][menu.input|int]}
input: 0 input: 0
input_min: 0 input_min: 0
input_max: 3 input_max: 2
input_step: 1 input_step: 1
gcode: gcode:
{%- if menu.event == 'long_click' -%} {%- if menu.event == 'long_click' -%}
{menu.back()} {menu.back()}
{%- endif -%} {%- endif -%}
{%- if menu.input|int == 1 -%} {%- if menu.input|int == 1 -%}
{action_respond_info("Start Homing")}
G28
CENTER
{%- elif menu.input|int == 2 -%}
{% if "xyz" in printer.toolhead.homed_axes %} {% if "xyz" in printer.toolhead.homed_axes %}
{action_respond_info("Start Probe calibration")} {action_respond_info("Start Probe calibration")}
CENTER CENTER
@ -126,7 +163,7 @@ gcode:
{%- else -%} {%- else -%}
{action_respond_info("Printer not homed")} {action_respond_info("Printer not homed")}
{%- endif -%} {%- endif -%}
{%- elif menu.input|int == 3 -%} {%- elif menu.input|int == 2 -%}
{% if "xyz" in printer.toolhead.homed_axes %} {% if "xyz" in printer.toolhead.homed_axes %}
{action_respond_info(" Start Z-Endstop calibration")} {action_respond_info(" Start Z-Endstop calibration")}
CENTER CENTER
@ -157,14 +194,14 @@ gcode:
[menu __main __setup __calib __Z_offset __test_z] [menu __main __setup __calib __Z_offset __test_z]
type: input type: input
name: Test Z: {['++','+','+.01','+.05','+.1','+.5','-.5','-.1','-.05','-.01','-','--'][menu.input|int]} name: Test Z: {['-1.0', '-0.5', '-0.1', '-.05', '-.01', '0.0', '+0.01', '+0.05', '+0.1', '+0.5', '+1.0'][menu.input|int]}
input: 5 input: 5
input_min: 0 input_min: 0
input_max: 11 input_max: 10
input_step: 1 input_step: 1
gcode: gcode:
{%- if menu.event == 'long_click' -%} {%- if menu.event == 'long_click' -%}
TESTZ Z={['++','+','+.01','+.05','+.1','+.5','-.5','-.1','-.05','-.01','-','--'][menu.input|int]} TESTZ Z={['-1.0', '-0.5', '-0.1', '-.05', '-.01', '0', '+0.01', '+0.05', '+0.1', '+0.5', '+1.0'][menu.input|int]}
{%- endif -%} {%- endif -%}
[menu __main __setup __calib __Z_offset __test_z_live] [menu __main __setup __calib __Z_offset __test_z_live]