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

@@ -35,8 +35,6 @@ class ManualStepper:
self.gcode.register_mux_command('MANUAL_STEPPER', "STEPPER",
stepper_name, self.cmd_MANUAL_STEPPER,
desc=self.cmd_MANUAL_STEPPER_help)
self.printer.register_event_handler(
"toolhead:motor_off", self.handle_motor_off)
def sync_print_time(self):
toolhead = self.printer.lookup_object('toolhead')
print_time = toolhead.get_last_move_time()
@@ -114,8 +112,6 @@ class ManualStepper:
elif 'MOVE' in params:
movepos = self.gcode.get_float('MOVE', params)
self.do_move(movepos, speed, accel)
def handle_motor_off(self, print_time):
self.do_enable(0)
def load_config_prefix(config):
return ManualStepper(config)