stepper: Add a is_stepper_enabled() method to PrinterStepper

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor
2018-06-21 17:58:18 -04:00
parent 28b7a28651
commit 9a97a348ae
4 changed files with 5 additions and 3 deletions

View File

@@ -76,6 +76,8 @@ class PrinterStepper:
if self.need_motor_enable != (not enable):
self.enable.set_enable(print_time, enable)
self.need_motor_enable = not enable
def is_motor_enabled(self):
return not self.need_motor_enable
# Support for stepper controlled linear axis with an endstop
class PrinterHomingStepper(PrinterStepper):