aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/extras/force_move.py
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2019-11-12 12:49:21 -0500
committerKevin O'Connor <kevin@koconnor.net>2019-11-12 17:32:18 -0500
commit0e30b862c7e94a9e259f213dd25ec1671ca560c9 (patch)
treeecb7c1e7326b6c88447aab4984dda9d005a64e80 /klippy/extras/force_move.py
parentbfb34e07017248268474281dc6678a8d141458ad (diff)
downloadkutter-0e30b862c7e94a9e259f213dd25ec1671ca560c9.tar.gz
kutter-0e30b862c7e94a9e259f213dd25ec1671ca560c9.tar.xz
kutter-0e30b862c7e94a9e259f213dd25ec1671ca560c9.zip
stepper_enable: Move enable tracking from stepper.py to stepper_enable.py
Move the enable line tracking out of the main stepper.py code. This simplifies the main kinematic code. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/extras/force_move.py')
-rw-r--r--klippy/extras/force_move.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/klippy/extras/force_move.py b/klippy/extras/force_move.py
index 2f748c0a..70d5abf6 100644
--- a/klippy/extras/force_move.py
+++ b/klippy/extras/force_move.py
@@ -53,9 +53,10 @@ class ForceMove:
def force_enable(self, stepper):
toolhead = self.printer.lookup_object('toolhead')
print_time = toolhead.get_last_move_time()
- was_enable = stepper.is_motor_enabled()
+ stepper_enable = self.printer.lookup_object('stepper_enable')
+ was_enable = stepper_enable.is_motor_enabled(stepper.get_name())
if not was_enable:
- stepper.motor_enable(print_time, 1)
+ stepper_enable.motor_enable(stepper.get_name(), print_time)
toolhead.dwell(STALL_TIME)
return was_enable
def restore_enable(self, stepper, was_enable):
@@ -63,7 +64,8 @@ class ForceMove:
toolhead = self.printer.lookup_object('toolhead')
toolhead.dwell(STALL_TIME)
print_time = toolhead.get_last_move_time()
- stepper.motor_enable(print_time, 0)
+ stepper_enable = self.printer.lookup_object('stepper_enable')
+ stepper_enable.motor_disable(stepper.get_name(), print_time)
toolhead.dwell(STALL_TIME)
def manual_move(self, stepper, dist, speed, accel=0.):
toolhead = self.printer.lookup_object('toolhead')