bed_level: hide the panel if bed_screws or screws_tilt_calculate are not defined
there are printers with fixed beds that don't need this panel
This commit is contained in:
1 parent
aa2bfcbaee
commit
c047bed518
5 files changed
+111
-115
No files matched your search
@@ -137,6 +137,7 @@ panel: console
|
||||
name: {{ gettext('Bed Level') }}
|
||||
icon: bed-level
|
||||
panel: bed_level
|
||||
enable: {{ printer.bed_screws or printer.screws_tilt_adjust}}
|
||||
|
||||
[menu __main config bedmesh]
|
||||
name: {{ gettext('Bed Mesh') }}
|
||||
|
||||
@@ -244,14 +244,10 @@ class Printer:
|
||||
"temperature_devices": {"count": self.tempdevcount},
|
||||
"fans": {"count": self.fancount},
|
||||
"output_pins": {"count": self.output_pin_count},
|
||||
"bltouch": self.config_section_exists("bltouch"),
|
||||
"gcode_macros": {"count": len(self.get_gcode_macros())},
|
||||
"idle_timeout": self.get_stat("idle_timeout").copy(),
|
||||
"pause_resume": {"is_paused": self.state == "paused"},
|
||||
"power_devices": {"count": len(self.get_power_devices())},
|
||||
"probe": self.config_section_exists("probe"),
|
||||
"firmware_retraction": self.config_section_exists("firmware_retraction"),
|
||||
"input_shaper": self.config_section_exists("input_shaper")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -260,6 +256,10 @@ class Printer:
|
||||
if self.config_section_exists(section):
|
||||
data["printer"][section] = self.get_config_section(section).copy()
|
||||
|
||||
sections = ["firmware_retraction", "input_shaper", "bed_screws", "screws_tilt_adjust"]
|
||||
for section in sections:
|
||||
data["printer"][section] = self.config_section_exists(section)
|
||||
|
||||
return data
|
||||
|
||||
def get_klipper_version(self):
|
||||
|
||||
Reference in new issue
Block a user