From c356e8362dc555ced5a137a1aabc73e95cf29561 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Wed, 31 Jul 2019 13:13:27 -0400 Subject: [PATCH] tmc_uart: Make sure address is at least 0 Signed-off-by: Kevin O'Connor --- klippy/extras/tmc_uart.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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,