round delta with 2 digits, it's enough

This commit is contained in:
sinseman44
2020-11-10 20:11:57 +00:00
parent f6ca47c5ee
commit 9f72d48a5a

View File

@@ -119,10 +119,10 @@ class GMachine(object):
def _move_linear(self, delta, velocity, safe_zero=False):
if not safe_zero:
delta = delta.round(1.0 / STEPPER_PULSES_PER_MM_X,
1.0 / STEPPER_PULSES_PER_MM_Y,
1.0 / STEPPER_PULSES_PER_MM_Z,
1.0 / STEPPER_PULSES_PER_MM_E)
delta = delta.round(round(1.0 / STEPPER_PULSES_PER_MM_X, 2),
round(1.0 / STEPPER_PULSES_PER_MM_Y, 2),
round(1.0 / STEPPER_PULSES_PER_MM_Z, 2),
round(1.0 / STEPPER_PULSES_PER_MM_E, 2))
if delta.is_zero():
return
self.__check_delta(delta)