replicape: Don't require a host alias for the enable_pin default

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2021-03-19 13:21:46 -04:00
parent afe853aecc
commit 36b1ccd598
2 changed files with 4 additions and 3 deletions

View File

@ -3659,8 +3659,9 @@ example.
revision:
# The replicape hardware revision. Currently only revision "B3" is
# supported. This parameter must be provided.
#enable_pin: !P9_41
# The replicape global enable pin. The default is !P9_41.
#enable_pin: !gpio0_20
# The replicape global enable pin. The default is !gpio0_20 (aka
# P9_41).
host_mcu:
# The name of the mcu config section that communicates with the
# Klipper "linux process" mcu instance. This parameter must be

View File

@ -167,7 +167,7 @@ class Replicape:
config.getchoice('revision', revisions)
self.host_mcu = mcu.get_printer_mcu(printer, config.get('host_mcu'))
# Setup enable pin
enable_pin = config.get('enable_pin', '!P9_41')
enable_pin = config.get('enable_pin', '!gpio0_20')
self.mcu_pwm_enable = ppins.setup_pin('digital_out', enable_pin)
self.mcu_pwm_enable.setup_max_duration(0.)
self.mcu_pwm_start_value = self.mcu_pwm_shutdown_value = False