aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/stepper.py
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2016-11-10 12:44:04 -0500
committerKevin O'Connor <kevin@koconnor.net>2016-11-13 18:29:45 -0500
commit7554c7f69423bf3d22f340a8b4851c25de855983 (patch)
tree18a29f6829b7eb0cd77a49b4dc29b98631350c70 /klippy/stepper.py
parent79da35d023dade5718c9979405b6637f0f40888b (diff)
downloadkutter-7554c7f69423bf3d22f340a8b4851c25de855983.tar.gz
kutter-7554c7f69423bf3d22f340a8b4851c25de855983.tar.xz
kutter-7554c7f69423bf3d22f340a8b4851c25de855983.zip
stepcompress: Do all step rounding in C code
Commits f0cefebf and 8f331f08 changed the way the code determined what steps to take on fractional steps. Unfortunately, it was possible in some situations for the C code to round differently from the python code which could result in warnings and lost steps. Change the code so that all fractional step handling is done in the C code. Implementing the step rounding logic in one location avoids any conflicts. In order to efficiently handle the step rounding in the C code, the C code has also been extended to directly send the "set_next_step_dir" command. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/stepper.py')
-rw-r--r--klippy/stepper.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/klippy/stepper.py b/klippy/stepper.py
index 8881c99f..57a5e9ae 100644
--- a/klippy/stepper.py
+++ b/klippy/stepper.py
@@ -69,9 +69,9 @@ class PrinterStepper:
mcu_time = self.mcu_enable.print_to_mcu_time(move_time)
self.mcu_enable.set_digital(mcu_time, enable)
self.need_motor_enable = True
- def prep_move(self, move_time, sdir):
+ def prep_move(self, move_time):
mcu_time = self.mcu_stepper.print_to_mcu_time(move_time)
- self.mcu_stepper.set_next_step_dir(mcu_time, sdir)
+ self.mcu_stepper.check_reset(mcu_time)
if self.need_motor_enable:
self.motor_enable(move_time, 1)
self.need_motor_enable = False