aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/stepper.py
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2017-09-12 12:47:40 -0400
committerKevin O'Connor <kevin@koconnor.net>2017-09-19 17:25:42 -0400
commita100f174f98dc4294654da6f3145530fa05813c4 (patch)
tree5f46853022d8547d716dc6a54247c4acd3297d78 /klippy/stepper.py
parent5dfe4e1eb977dada5ae29fa03fc0f17964d7c2dc (diff)
downloadkutter-a100f174f98dc4294654da6f3145530fa05813c4.tar.gz
kutter-a100f174f98dc4294654da6f3145530fa05813c4.tar.xz
kutter-a100f174f98dc4294654da6f3145530fa05813c4.zip
mcu: Pass print_time directly to MCU calls
Now that the print_time is always synchronized with the mcu_time, there is no longer a need to track mcu_time as a separate quantity. Eliminate references to mcu_time from the code and pass print_time directly in its place. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/stepper.py')
-rw-r--r--klippy/stepper.py16
1 files changed, 6 insertions, 10 deletions
diff --git a/klippy/stepper.py b/klippy/stepper.py
index ffafb395..6bec852a 100644
--- a/klippy/stepper.py
+++ b/klippy/stepper.py
@@ -38,14 +38,12 @@ class PrinterStepper:
2. * self.step_dist, max_halt_velocity, max_accel)
min_stop_interval = second_last_step_time - last_step_time
self.mcu_stepper.setup_min_stop_interval(min_stop_interval)
- def motor_enable(self, move_time, enable=0):
+ def motor_enable(self, print_time, enable=0):
if enable and self.need_motor_enable:
- mcu_time = self.mcu_stepper.print_to_mcu_time(move_time)
- self.mcu_stepper.reset_step_clock(mcu_time)
+ self.mcu_stepper.reset_step_clock(print_time)
if (self.mcu_enable is not None
and self.mcu_enable.get_last_setting() != enable):
- mcu_time = self.mcu_enable.get_mcu().print_to_mcu_time(move_time)
- self.mcu_enable.set_digital(mcu_time, enable)
+ self.mcu_enable.set_digital(print_time, enable)
self.need_motor_enable = not enable
class PrinterHomingStepper(PrinterStepper):
@@ -97,13 +95,11 @@ class PrinterHomingStepper(PrinterStepper):
self.homing_stepper_phases = None
if self.mcu_endstop.get_mcu().is_fileoutput():
self.homing_endstop_accuracy = self.homing_stepper_phases
- def enable_endstop_checking(self, move_time, step_time):
- mcu_time = self.mcu_endstop.get_mcu().print_to_mcu_time(move_time)
- self.mcu_endstop.home_start(mcu_time, step_time)
+ def enable_endstop_checking(self, print_time, step_time):
+ self.mcu_endstop.home_start(print_time, step_time)
return self.mcu_endstop
def query_endstop(self, print_time):
- mcu_time = self.mcu_endstop.get_mcu().print_to_mcu_time(print_time)
- self.mcu_endstop.query_endstop(mcu_time)
+ self.mcu_endstop.query_endstop(print_time)
return self.mcu_endstop
def get_homing_speed(self):
# Round the configured homing speed so that it is an even