Move menu configuration into seperate file

Move menu configuration into sperate file menu.cfg and incude it in main
printer.cfg

Signed-off-by: Thomas Schmid <tom@lfence.de>
This commit is contained in:
Thomas 2022-01-06 12:51:39 +01:00
parent f784e3b47f
commit 1a1f3b28b3
2 changed files with 197 additions and 193 deletions

193
menu.cfg Normal file
View File

@ -0,0 +1,193 @@
### menu move 10mm ###
[menu __main __control __move_10mm]
type: list
enable: {not printer.idle_timeout.state == "Printing"}
name: Move 10mm
[menu __main __control __move_10mm __axis_x]
type: input
name: Move X:{'%05.1f' % menu.input}
realtime: True
input: {printer.gcode_move.gcode_position.x}
input_min: {printer.toolhead.axis_minimum.x}
input_max: {printer.toolhead.axis_maximum.x}
input_step: 10.0
gcode:
SAVE_GCODE_STATE NAME=__move__axis
G90
G1 X{menu.input}
RESTORE_GCODE_STATE NAME=__move__axis
[menu __main __control __move_10mm __axis_y]
type: input
name: Move Y:{'%05.1f' % menu.input}
realtime: True
input: {printer.gcode_move.gcode_position.y}
input_min: {printer.toolhead.axis_minimum.y}
input_max: {printer.toolhead.axis_maximum.y}
input_step: 10.0
gcode:
SAVE_GCODE_STATE NAME=__move__axis
G90
G1 Y{menu.input}
RESTORE_GCODE_STATE NAME=__move__axis
[menu __main __control __move_10mm __axis_z]
type: input
enable: {not printer.idle_timeout.state == "Printing"}
name: Move Z:{'%05.1f' % menu.input}
realtime: True
input: {printer.gcode_move.gcode_position.z}
input_min: 0
input_max: {printer.toolhead.axis_maximum.z}
input_step: 10.0
gcode:
SAVE_GCODE_STATE NAME=__move__axis
G90
G1 Z{menu.input}
RESTORE_GCODE_STATE NAME=__move__axis
[menu __main __control __move_10mm __axis_e]
type: input
enable: {not printer.idle_timeout.state == "Printing"}
name: Move E:{'%+06.1f' % menu.input}
realtime: True
input: 0
input_min: -{printer.configfile.config.extruder.max_extrude_only_distance|default(50)}
input_max: {printer.configfile.config.extruder.max_extrude_only_distance|default(50)}
input_step: 10.0
gcode:
SAVE_GCODE_STATE NAME=__move__axis
M83
G1 E{menu.input} F240
RESTORE_GCODE_STATE NAME=__move__axis
### menu move 1mm ###
[menu __main __control __move_1mm]
type: list
enable: {not printer.idle_timeout.state == "Printing"}
name: Move 1mm
[menu __main __control __move_1mm __axis_x]
type: input
name: Move X:{'%05.1f' % menu.input}
realtime: True
input: {printer.gcode_move.gcode_position.x}
input_min: {printer.toolhead.axis_minimum.x}
input_max: {printer.toolhead.axis_maximum.x}
input_step: 1.0
gcode:
SAVE_GCODE_STATE NAME=__move__axis
G90
G1 X{menu.input}
RESTORE_GCODE_STATE NAME=__move__axis
[menu __main __control __move_1mm __axis_y]
type: input
name: Move Y:{'%05.1f' % menu.input}
realtime: True
input: {printer.gcode_move.gcode_position.y}
input_min: {printer.toolhead.axis_minimum.y}
input_max: {printer.toolhead.axis_maximum.y}
input_step: 1.0
gcode:
SAVE_GCODE_STATE NAME=__move__axis
G90
G1 Y{menu.input}
RESTORE_GCODE_STATE NAME=__move__axis
[menu __main __control __move_1mm __axis_z]
type: input
enable: {not printer.idle_timeout.state == "Printing"}
name: Move Z:{'%05.1f' % menu.input}
realtime: True
input: {printer.gcode_move.gcode_position.z}
input_min: 0
input_max: {printer.toolhead.axis_maximum.z}
input_step: 1.0
gcode:
SAVE_GCODE_STATE NAME=__move__axis
G90
G1 Z{menu.input}
RESTORE_GCODE_STATE NAME=__move__axis
[menu __main __control __move_1mm __axis_e]
type: input
enable: {not printer.idle_timeout.state == "Printing"}
name: Move E:{'%+06.1f' % menu.input}
realtime: True
input: 0
input_min: -{printer.configfile.config.extruder.max_extrude_only_distance|default(50)}
input_max: {printer.configfile.config.extruder.max_extrude_only_distance|default(50)}
input_step: 1.0
gcode:
SAVE_GCODE_STATE NAME=__move__axis
M83
G1 E{menu.input} F240
RESTORE_GCODE_STATE NAME=__move__axis
### menu move 0.1mm ###
[menu __main __control __move_01mm]
type: list
enable: {not printer.idle_timeout.state == "Printing"}
name: Move 0.1mm
[menu __main __control __move_01mm __axis_x]
type: input
name: Move X:{'%05.1f' % menu.input}
realtime: True
input: {printer.gcode_move.gcode_position.x}
input_min: {printer.toolhead.axis_minimum.x}
input_max: {printer.toolhead.axis_maximum.x}
input_step: 0.1
gcode:
SAVE_GCODE_STATE NAME=__move__axis
G90
G1 X{menu.input}
RESTORE_GCODE_STATE NAME=__move__axis
[menu __main __control __move_01mm __axis_y]
type: input
name: Move Y:{'%05.1f' % menu.input}
realtime: True
input: {printer.gcode_move.gcode_position.y}
input_min: {printer.toolhead.axis_minimum.y}
input_max: {printer.toolhead.axis_maximum.y}
input_step: 0.1
gcode:
SAVE_GCODE_STATE NAME=__move__axis
G90
G1 Y{menu.input}
RESTORE_GCODE_STATE NAME=__move__axis
[menu __main __control __move_01mm __axis_z]
type: input
enable: {not printer.idle_timeout.state == "Printing"}
name: Move Z:{'%05.1f' % menu.input}
realtime: True
input: {printer.gcode_move.gcode_position.z}
input_min: 0
input_max: {printer.toolhead.axis_maximum.z}
input_step: 0.1
gcode:
SAVE_GCODE_STATE NAME=__move__axis
G90
G1 Z{menu.input}
RESTORE_GCODE_STATE NAME=__move__axis
[menu __main __control __move_01mm __axis_e]
type: input
enable: {not printer.idle_timeout.state == "Printing"}
name: Move E:{'%+06.1f' % menu.input}
realtime: True
input: 0
input_min: -{printer.configfile.config.extruder.max_extrude_only_distance|default(50)}
input_max: {printer.configfile.config.extruder.max_extrude_only_distance|default(50)}
input_step: 0.1
gcode:
SAVE_GCODE_STATE NAME=__move__axis
M83
G1 E{menu.input} F240
RESTORE_GCODE_STATE NAME=__move__axis
#--------------------------------------------------------------------

View File

@ -565,200 +565,11 @@ gcode:
SET_LED LED=btt_mini12864 RED=1 GREEN=1 BLUE=1 INDEX=2 TRANSMIT=0
SET_LED LED=btt_mini12864 RED=0 GREEN=0.2 BLUE=1 INDEX=3
### menu move 10mm ###
[menu __main __control __move_10mm]
type: list
enable: {not printer.idle_timeout.state == "Printing"}
name: Move 10mm
[menu __main __control __move_10mm __axis_x]
type: input
name: Move X:{'%05.1f' % menu.input}
realtime: True
input: {printer.gcode_move.gcode_position.x}
input_min: {printer.toolhead.axis_minimum.x}
input_max: {printer.toolhead.axis_maximum.x}
input_step: 10.0
gcode:
SAVE_GCODE_STATE NAME=__move__axis
G90
G1 X{menu.input}
RESTORE_GCODE_STATE NAME=__move__axis
[menu __main __control __move_10mm __axis_y]
type: input
name: Move Y:{'%05.1f' % menu.input}
realtime: True
input: {printer.gcode_move.gcode_position.y}
input_min: {printer.toolhead.axis_minimum.y}
input_max: {printer.toolhead.axis_maximum.y}
input_step: 10.0
gcode:
SAVE_GCODE_STATE NAME=__move__axis
G90
G1 Y{menu.input}
RESTORE_GCODE_STATE NAME=__move__axis
[menu __main __control __move_10mm __axis_z]
type: input
enable: {not printer.idle_timeout.state == "Printing"}
name: Move Z:{'%05.1f' % menu.input}
realtime: True
input: {printer.gcode_move.gcode_position.z}
input_min: 0
input_max: {printer.toolhead.axis_maximum.z}
input_step: 10.0
gcode:
SAVE_GCODE_STATE NAME=__move__axis
G90
G1 Z{menu.input}
RESTORE_GCODE_STATE NAME=__move__axis
[menu __main __control __move_10mm __axis_e]
type: input
enable: {not printer.idle_timeout.state == "Printing"}
name: Move E:{'%+06.1f' % menu.input}
realtime: True
input: 0
input_min: -{printer.configfile.config.extruder.max_extrude_only_distance|default(50)}
input_max: {printer.configfile.config.extruder.max_extrude_only_distance|default(50)}
input_step: 10.0
gcode:
SAVE_GCODE_STATE NAME=__move__axis
M83
G1 E{menu.input} F240
RESTORE_GCODE_STATE NAME=__move__axis
### menu move 1mm ###
[menu __main __control __move_1mm]
type: list
enable: {not printer.idle_timeout.state == "Printing"}
name: Move 1mm
[menu __main __control __move_1mm __axis_x]
type: input
name: Move X:{'%05.1f' % menu.input}
realtime: True
input: {printer.gcode_move.gcode_position.x}
input_min: {printer.toolhead.axis_minimum.x}
input_max: {printer.toolhead.axis_maximum.x}
input_step: 1.0
gcode:
SAVE_GCODE_STATE NAME=__move__axis
G90
G1 X{menu.input}
RESTORE_GCODE_STATE NAME=__move__axis
[menu __main __control __move_1mm __axis_y]
type: input
name: Move Y:{'%05.1f' % menu.input}
realtime: True
input: {printer.gcode_move.gcode_position.y}
input_min: {printer.toolhead.axis_minimum.y}
input_max: {printer.toolhead.axis_maximum.y}
input_step: 1.0
gcode:
SAVE_GCODE_STATE NAME=__move__axis
G90
G1 Y{menu.input}
RESTORE_GCODE_STATE NAME=__move__axis
[menu __main __control __move_1mm __axis_z]
type: input
enable: {not printer.idle_timeout.state == "Printing"}
name: Move Z:{'%05.1f' % menu.input}
realtime: True
input: {printer.gcode_move.gcode_position.z}
input_min: 0
input_max: {printer.toolhead.axis_maximum.z}
input_step: 1.0
gcode:
SAVE_GCODE_STATE NAME=__move__axis
G90
G1 Z{menu.input}
RESTORE_GCODE_STATE NAME=__move__axis
[menu __main __control __move_1mm __axis_e]
type: input
enable: {not printer.idle_timeout.state == "Printing"}
name: Move E:{'%+06.1f' % menu.input}
realtime: True
input: 0
input_min: -{printer.configfile.config.extruder.max_extrude_only_distance|default(50)}
input_max: {printer.configfile.config.extruder.max_extrude_only_distance|default(50)}
input_step: 1.0
gcode:
SAVE_GCODE_STATE NAME=__move__axis
M83
G1 E{menu.input} F240
RESTORE_GCODE_STATE NAME=__move__axis
### menu move 0.1mm ###
[menu __main __control __move_01mm]
type: list
enable: {not printer.idle_timeout.state == "Printing"}
name: Move 0.1mm
[menu __main __control __move_01mm __axis_x]
type: input
name: Move X:{'%05.1f' % menu.input}
realtime: True
input: {printer.gcode_move.gcode_position.x}
input_min: {printer.toolhead.axis_minimum.x}
input_max: {printer.toolhead.axis_maximum.x}
input_step: 0.1
gcode:
SAVE_GCODE_STATE NAME=__move__axis
G90
G1 X{menu.input}
RESTORE_GCODE_STATE NAME=__move__axis
[menu __main __control __move_01mm __axis_y]
type: input
name: Move Y:{'%05.1f' % menu.input}
realtime: True
input: {printer.gcode_move.gcode_position.y}
input_min: {printer.toolhead.axis_minimum.y}
input_max: {printer.toolhead.axis_maximum.y}
input_step: 0.1
gcode:
SAVE_GCODE_STATE NAME=__move__axis
G90
G1 Y{menu.input}
RESTORE_GCODE_STATE NAME=__move__axis
[menu __main __control __move_01mm __axis_z]
type: input
enable: {not printer.idle_timeout.state == "Printing"}
name: Move Z:{'%05.1f' % menu.input}
realtime: True
input: {printer.gcode_move.gcode_position.z}
input_min: 0
input_max: {printer.toolhead.axis_maximum.z}
input_step: 0.1
gcode:
SAVE_GCODE_STATE NAME=__move__axis
G90
G1 Z{menu.input}
RESTORE_GCODE_STATE NAME=__move__axis
[menu __main __control __move_01mm __axis_e]
type: input
enable: {not printer.idle_timeout.state == "Printing"}
name: Move E:{'%+06.1f' % menu.input}
realtime: True
input: 0
input_min: -{printer.configfile.config.extruder.max_extrude_only_distance|default(50)}
input_max: {printer.configfile.config.extruder.max_extrude_only_distance|default(50)}
input_step: 0.1
gcode:
SAVE_GCODE_STATE NAME=__move__axis
M83
G1 E{menu.input} F240
RESTORE_GCODE_STATE NAME=__move__axis
#--------------------------------------------------------------------
#####################################################################
# Menu
#####################################################################
[include menu.cfg]
#####################################################################
# Macros