mirror of
https://github.com/daniviga/django-ram.git
synced 2025-08-04 13:17:50 +02:00
Log to debug <* data
This commit is contained in:
@@ -7,4 +7,4 @@ ListeningPort = 2560
|
|||||||
Port = /dev/ttyACM0
|
Port = /dev/ttyACM0
|
||||||
Baudrate = 115200
|
Baudrate = 115200
|
||||||
# Timeout in milliseconds
|
# Timeout in milliseconds
|
||||||
Timeout = 100
|
Timeout = 50
|
||||||
|
@@ -32,7 +32,9 @@ class SerialDaemon:
|
|||||||
response = line = self.ser.read()
|
response = line = self.ser.read()
|
||||||
while line.strip():
|
while line.strip():
|
||||||
line = self.ser.read_until()
|
line = self.ser.read_until()
|
||||||
if not line.decode().startswith("<*"):
|
if line.decode().startswith("<*"):
|
||||||
|
logging.debug("Serial debug: {}".format(line))
|
||||||
|
else:
|
||||||
response += line
|
response += line
|
||||||
logging.info("Send: {}".format(response))
|
logging.info("Send: {}".format(response))
|
||||||
writer.write(response)
|
writer.write(response)
|
||||||
|
Reference in New Issue
Block a user