aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/extras
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2020-02-16 15:46:04 -0500
committerKevin O'Connor <kevin@koconnor.net>2020-02-20 12:01:21 -0500
commit332038ea017d458c27f1bb69fa7c17bfe36fcbd8 (patch)
tree9a9e8c04efffcc425219f063c0acb04e00c6e077 /klippy/extras
parentc6c360c4e14374a56dcb0477e1e7759683841093 (diff)
downloadkutter-332038ea017d458c27f1bb69fa7c17bfe36fcbd8.tar.gz
kutter-332038ea017d458c27f1bb69fa7c17bfe36fcbd8.tar.xz
kutter-332038ea017d458c27f1bb69fa7c17bfe36fcbd8.zip
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 <kevin@koconnor.net>
Diffstat (limited to 'klippy/extras')
-rw-r--r--klippy/extras/tmc_uart.py4
1 files changed, 2 insertions, 2 deletions
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)