mirror of https://github.com/Desuuuu/klipper.git
stepper: Fix bug causing 'enable_pin' to be required
Make sure to initialize mcu_enable to None so that it is initialized if no 'enable_pin' config value is provided. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
14810d7e80
commit
123719bf92
|
@ -21,6 +21,7 @@ class PrinterStepper:
|
|||
self.mcu_stepper.setup_step_distance(self.step_dist)
|
||||
|
||||
enable_pin = config.get('enable_pin', None)
|
||||
self.mcu_enable = None
|
||||
if enable_pin is not None:
|
||||
self.mcu_enable = pins.setup_pin(printer, 'digital_out', enable_pin)
|
||||
self.mcu_enable.setup_max_duration(0.)
|
||||
|
|
Loading…
Reference in New Issue