Log to debug <* data

This commit is contained in:
2022-01-01 23:44:27 +01:00
parent dc71a5c04c
commit 25d8c4a3bb
2 changed files with 4 additions and 2 deletions

View File

@@ -7,4 +7,4 @@ ListeningPort = 2560
Port = /dev/ttyACM0
Baudrate = 115200
# Timeout in milliseconds
Timeout = 100
Timeout = 50

View File

@@ -32,7 +32,9 @@ class SerialDaemon:
response = line = self.ser.read()
while line.strip():
line = self.ser.read_until()
if not line.decode().startswith("<*"):
if line.decode().startswith("<*"):
logging.debug("Serial debug: {}".format(line))
else:
response += line
logging.info("Send: {}".format(response))
writer.write(response)