refactor: add and use available commands for z_tilt and quad_level
close #1512
This commit is contained in:
@@ -42,7 +42,7 @@ name: {{ gettext('Quad Gantry Level') }}
|
||||
icon: home-z
|
||||
method: printer.gcode.script
|
||||
params: {"script":"QUAD_GANTRY_LEVEL"}
|
||||
enable: {{ 'quad_gantry_level' in printer.config_sections }}
|
||||
enable: {{ 'QUAD_GANTRY_LEVEL' in printer.available_commands }}
|
||||
active: {{ printer.quad_gantry_level.applied }}
|
||||
|
||||
[menu move homing Z-Tilt]
|
||||
@@ -50,5 +50,5 @@ name: {{ gettext('Z Tilt') }}
|
||||
icon: z-tilt
|
||||
method: printer.gcode.script
|
||||
params: {"script":"Z_TILT_ADJUST"}
|
||||
enable: {{ 'z_tilt' in printer.config_sections }}
|
||||
enable: {{ 'Z_TILT_ADJUST' in printer.available_commands }}
|
||||
active: {{ printer.z_tilt.applied }}
|
@@ -210,6 +210,7 @@ printer.gcode_macros.count # Number of gcode macros
|
||||
printer.gcode_macros.list # List of names of the gcode macros
|
||||
printer.leds.count # Number of leds
|
||||
printer.config_sections # Array of section headers of Klipper config (printer.cfg)
|
||||
printer.available_commands # List of all the commands that the printer supports
|
||||
```
|
||||
|
||||
|
||||
|
@@ -260,6 +260,7 @@ class Printer:
|
||||
"homed_axes": self.get_stat("toolhead", "homed_axes"),
|
||||
"quad_gantry_level": self.get_stat("quad_gantry_level"),
|
||||
"z_tilt": self.get_stat("z_tilt"),
|
||||
"available_commands": self.available_commands,
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user