Merge commit 'f1214483ee5167f4a5e55fcc35e1b5b2be1f73e2' into release

This commit is contained in:
张开科 2025-01-13 18:11:45 +08:00
commit f82a191613

View File

@ -118,6 +118,15 @@ class Panel(ScreenPanel):
self.content.add(self.labels["move_menu"])
printer_cfg = self._printer.get_config_section("printer")
# The max_velocity parameter is not optional in klipper config.
# The minimum is 1, but least 2 values are needed to create a scale
max_velocity = max(int(float(printer_cfg["max_velocity"])), 2)
if "max_z_velocity" in printer_cfg:
self.max_z_velocity = max(int(float(printer_cfg["max_z_velocity"])), 2)
else:
self.max_z_velocity = max_velocity
def process_update(self, action, data):
if action != "notify_status_update":
return