aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/stepper.py
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2017-11-07 12:29:51 -0500
committerKevin O'Connor <kevin@koconnor.net>2017-11-18 17:36:45 -0500
commit38643f52c97dc85bcc2bf020927852f9cfe9fff6 (patch)
tree19927ddb16399b78fb3f4e481f2da9b01a9b2f61 /klippy/stepper.py
parenteecf3b6ea87e7d9d67e26e965ebf2fe58339484d (diff)
downloadkutter-38643f52c97dc85bcc2bf020927852f9cfe9fff6.tar.gz
kutter-38643f52c97dc85bcc2bf020927852f9cfe9fff6.tar.xz
kutter-38643f52c97dc85bcc2bf020927852f9cfe9fff6.zip
stepper: Add get_endstops() / set_position wrappers
Add wrappers around mcu_endstop and mcu_stepper so that the kinematic classes do not need to directly access these low-level classes. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/stepper.py')
-rw-r--r--klippy/stepper.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/klippy/stepper.py b/klippy/stepper.py
index 5370c804..692273c0 100644
--- a/klippy/stepper.py
+++ b/klippy/stepper.py
@@ -41,6 +41,8 @@ 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 set_position(self, pos):
+ self.mcu_stepper.set_position(pos)
def motor_enable(self, print_time, enable=0):
if enable and self.need_motor_enable:
self.mcu_stepper.reset_step_clock(print_time)
@@ -115,6 +117,8 @@ 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 get_endstops(self):
+ return [(self.mcu_endstop, self.mcu_stepper, self.name)]
def get_homing_speed(self):
# Round the configured homing speed so that it is an even
# number of ticks per step.