move: add a failsafe for velocity fixes #1043
This commit is contained in:
parent
46311e58f1
commit
432305bec9
@ -114,6 +114,9 @@ class MovePanel(ScreenPanel):
|
|||||||
printer_cfg = self._printer.get_config_section("printer")
|
printer_cfg = self._printer.get_config_section("printer")
|
||||||
# The max_velocity parameter is not optional in klipper config.
|
# The max_velocity parameter is not optional in klipper config.
|
||||||
max_velocity = int(float(printer_cfg["max_velocity"]))
|
max_velocity = int(float(printer_cfg["max_velocity"]))
|
||||||
|
if max_velocity <= 1:
|
||||||
|
logging.error(f"Error getting max_velocity\n{printer_cfg}")
|
||||||
|
max_velocity = 50
|
||||||
if "max_z_velocity" in printer_cfg:
|
if "max_z_velocity" in printer_cfg:
|
||||||
max_z_velocity = int(float(printer_cfg["max_z_velocity"]))
|
max_z_velocity = int(float(printer_cfg["max_z_velocity"]))
|
||||||
else:
|
else:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user