From a61d483e21d07c2e1e8e536c09e87fd8492b71ae Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Fri, 6 Mar 2020 16:29:18 -0500 Subject: [PATCH] tmc_uart: Use nominal mcu frequency in baud calculation 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 edcaab97..8b304a74 100644 --- a/klippy/extras/tmc_uart.py +++ b/klippy/extras/tmc_uart.py @@ -71,7 +71,7 @@ class MCU_TMC_uart_bitbang: self.tmcuart_send_cmd = None self.mcu.register_config_callback(self.build_config) def build_config(self): - bit_ticks = int(self.mcu.get_adjusted_freq() / 9000.) + bit_ticks = self.mcu.seconds_to_clock(1. / 9000.) self.mcu.add_config_cmd( "config_tmcuart oid=%d rx_pin=%s pull_up=%d tx_pin=%s bit_time=%d" % (self.oid, self.rx_pin, self.pullup, self.tx_pin, bit_ticks))