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:
alfrix authored and Alfredo Monclus committed 2022-08-01 12:23:40 -03:00
1 parent aa2bfcbaee
commit c047bed518
5 files changed
+111 -115

No files matched your search

+4 -4
View File
@@ -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):