stepper_enable: Add new extras module for stepper enable line tracking

Move the M18/M84 command handling from gcode.py to new stepper_enable
module.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2019-11-10 11:55:53 -05:00
parent 064804b688
commit f50e054bd0
3 changed files with 23 additions and 5 deletions

View file

@ -70,6 +70,8 @@ class PrinterStepper:
mcu_stepper.setup_dir_pin(dir_pin_params)
step_dist = config.getfloat('step_distance', above=0.)
mcu_stepper.setup_step_distance(step_dist)
# Enable pin handling
stepper_enable = printer.try_load_module(config, 'stepper_enable')
mcu_stepper.add_active_callback(self._stepper_active)
self.enable = lookup_enable_pin(ppins, config.get('enable_pin', None))
# Register STEPPER_BUZZ command