diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2020-03-06 16:29:18 -0500 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2020-03-06 16:29:18 -0500 |
commit | a61d483e21d07c2e1e8e536c09e87fd8492b71ae (patch) | |
tree | 1cbfbfda7dfeb4b91dd5dd6cab8b061cff4e006c | |
parent | e872290c47d8a3353c9b6a5305e91d836b03a9ea (diff) | |
download | kutter-a61d483e21d07c2e1e8e536c09e87fd8492b71ae.tar.gz kutter-a61d483e21d07c2e1e8e536c09e87fd8492b71ae.tar.xz kutter-a61d483e21d07c2e1e8e536c09e87fd8492b71ae.zip |
tmc_uart: Use nominal mcu frequency in baud calculation
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
-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 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)) |