Add debugging method

This commit is contained in:
2025-12-27 13:40:35 +01:00
parent 7a399f4467
commit 495868a170
2 changed files with 11 additions and 2 deletions

View File

@@ -37,4 +37,14 @@ class SerialReader:
line = self.serial.readline()
if line:
data = line.decode('utf-8', errors='ignore')
self.__notify(data)
self.__notify(data)
if __name__ == "__main__":
def callback(data):
print(data)
reader = SerialReader("/dev/ttyUSB1", 57600)
reader.subscribe(callback)
reader.start()