diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2018-03-12 18:32:29 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2018-03-17 12:55:48 -0400 |
commit | e78377eebd819270d5bc31cde58c60af6435f714 (patch) | |
tree | 0f80b033dd6fad53ec8180d79a09fc22679c3398 /klippy/extras/replicape.py | |
parent | 451f7d567223764c438d35fb54d68a6494e375e5 (diff) | |
download | kutter-e78377eebd819270d5bc31cde58c60af6435f714.tar.gz kutter-e78377eebd819270d5bc31cde58c60af6435f714.tar.xz kutter-e78377eebd819270d5bc31cde58c60af6435f714.zip |
replicape: Add config controls for the servo[01]_enable lines
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/extras/replicape.py')
-rw-r--r-- | klippy/extras/replicape.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/klippy/extras/replicape.py b/klippy/extras/replicape.py index 320a5701..33683585 100644 --- a/klippy/extras/replicape.py +++ b/klippy/extras/replicape.py @@ -160,6 +160,10 @@ class Replicape: self.stepper_dacs[channel] = cur / REPLICAPE_MAX_CURRENT self.pins[prefix + 'enable'] = (ReplicapeDACEnable, channel) self.enabled_channels = {ch: False for cl, ch in self.pins.values()} + if config.getboolean('servo0_enable', False): + shift_registers[1] |= 1 + if config.getboolean('servo1_enable', False): + shift_registers[2] |= 1 self.sr_disabled = tuple(reversed(shift_registers)) if [i for i in [0, 1, 2] if 11+i in self.stepper_dacs]: # Enable xyz steppers |