From 332038ea017d458c27f1bb69fa7c17bfe36fcbd8 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Sun, 16 Feb 2020 15:46:04 -0500 Subject: serialhdl: Convert queries to use new notify message ack system Convert standard queries to use the acknowledgments of the sent command to determine if the response was received or not. This also controls command retransmissions (should the response have been lost). The tmc_uart.py will continue to use the old mechanism as the tmcuart responses are not sent synchronously with the query command. Signed-off-by: Kevin O'Connor --- klippy/extras/tmc_uart.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'klippy/extras/tmc_uart.py') diff --git a/klippy/extras/tmc_uart.py b/klippy/extras/tmc_uart.py index 7eab1240..7191c9b5 100644 --- a/klippy/extras/tmc_uart.py +++ b/klippy/extras/tmc_uart.py @@ -148,7 +148,7 @@ class MCU_TMC_uart_bitbang: if self.analog_mux is not None: self.analog_mux.activate(instance_id) msg = self._encode_read(0xf5, addr, reg) - params = self.tmcuart_send_cmd.send_with_response( + params = self.tmcuart_send_cmd.send_with_async_response( [self.oid, msg, 10], 'tmcuart_response', self.oid) return self._decode_read(reg, params['read']) def reg_write(self, instance_id, addr, reg, val, print_time=None): @@ -158,7 +158,7 @@ class MCU_TMC_uart_bitbang: if self.analog_mux is not None: self.analog_mux.activate(instance_id) msg = self._encode_write(0xf5, addr, reg | 0x80, val) - self.tmcuart_send_cmd.send_with_response( + self.tmcuart_send_cmd.send_with_async_response( [self.oid, msg, 0], 'tmcuart_response', self.oid, minclock=minclock) -- cgit v1.2.3-70-g09d2