From f895c380b45eba3a2654a2e1cfacca7b37d14b2d Mon Sep 17 00:00:00 2001 From: Jason Antman Date: Sun, 22 Oct 2023 19:27:35 -0400 Subject: [PATCH] WIP with real panel --- py_vista_turbo_serial/communicator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/py_vista_turbo_serial/communicator.py b/py_vista_turbo_serial/communicator.py index 5f7f1ee..3021f19 100644 --- a/py_vista_turbo_serial/communicator.py +++ b/py_vista_turbo_serial/communicator.py @@ -74,7 +74,7 @@ def communicate(self) -> Generator[MessagePacket, None, None]: if self.outgoing: msg = self.outgoing.pop(0) logger.info('Sending message: %s', msg) - self.serial.write((msg + '\r\n').encode('utf-8')) + self.serial.write('{!r}'.format(msg + '\r\n')) # this might be better with select(), but let's try this... while True: # @TODO handle exception on timeout