diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2019-07-31 13:13:27 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2019-07-31 13:13:27 -0400 |
commit | c356e8362dc555ced5a137a1aabc73e95cf29561 (patch) | |
tree | 748761780c7536279e534662273fdaea56d3dd4a /klippy/extras/tmc_uart.py | |
parent | a730aec8bc609a1ddfbf4513172572eb636ce122 (diff) | |
download | kutter-c356e8362dc555ced5a137a1aabc73e95cf29561.tar.gz kutter-c356e8362dc555ced5a137a1aabc73e95cf29561.tar.xz kutter-c356e8362dc555ced5a137a1aabc73e95cf29561.zip |
tmc_uart: Make sure address is at least 0
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/extras/tmc_uart.py')
-rw-r--r-- | klippy/extras/tmc_uart.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/klippy/extras/tmc_uart.py b/klippy/extras/tmc_uart.py index 8af0be07..c2babd9c 100644 --- a/klippy/extras/tmc_uart.py +++ b/klippy/extras/tmc_uart.py @@ -175,7 +175,7 @@ def lookup_tmc_uart_bitbang(config, max_addr): if rx_pin_params['chip'] is not tx_pin_params['chip']: raise ppins.error("TMC uart rx and tx pins must be on the same mcu") select_pins_desc = config.get('select_pins', None) - addr = config.getint('uart_address', 0, maxval=max_addr) + addr = config.getint('uart_address', 0, minval=0, maxval=max_addr) mcu_uart = rx_pin_params.get('class') if mcu_uart is None: mcu_uart = MCU_TMC_uart_bitbang(rx_pin_params, tx_pin_params, |