stepper_enable: Move motor_off() logic to stepper_enable.py

Directly disable all the stepper motors on a global motor_off() from
the StepperEnable() class in stepper_enable.py.  This simplifies the
toolhead and kinematic classes.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor
2019-11-12 11:41:41 -05:00
parent f50e054bd0
commit bfb34e0701
13 changed files with 37 additions and 49 deletions

View File

@@ -125,7 +125,7 @@ class Homing:
try:
self.toolhead.get_kinematics().home(self)
except CommandError:
self.toolhead.motor_off()
self.printer.lookup_object('stepper_enable').motor_off()
raise
class CommandError(Exception):