Merge commit '3bfc1aa714e282d74b801155d830377ca58d8f59' into release

This commit is contained in:
张开科 2025-01-02 11:18:07 +08:00
commit dc3478b48c

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