From 9f72d48a5aaae54e6d67600bddbcb7c1ca9bab5f Mon Sep 17 00:00:00 2001 From: sinseman44 Date: Tue, 10 Nov 2020 20:11:57 +0000 Subject: [PATCH] round delta with 2 digits, it's enough --- cnc/gmachine.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cnc/gmachine.py b/cnc/gmachine.py index f79e12a..4cac521 100644 --- a/cnc/gmachine.py +++ b/cnc/gmachine.py @@ -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)