main
Valentin Ochs 2022-11-14 19:45:24 +01:00
parent bd342777a8
commit 1fc7162a40
2 changed files with 3 additions and 2 deletions

View File

@ -173,7 +173,7 @@ class Control(util.Loggable):
port = serial.Serial(self._port, 9600)
self._protocol = serial.threaded.ReaderThread(port, lambda: Reader(self._cb))
self._protocol.start()
self._protocol = protocol.protocol
self._protocol = self._protocol.protocol
except Exception as e:
self._logger().exception("Port opening error")
time.sleep(10)

View File

@ -130,7 +130,8 @@ class DoorControlSocket(util.Loggable):
return
data = bytes.fromhex(" ".join(args))
data = [ data[i:i+4] for i in range(0, len(data), 4) ]
send(f"Sending {repr(data)}")
self._logger().debug(f"Raw data: {data}")
send(f"Sending {data}")
self._bell._protocol.alternate_msgs(data)
elif cmd == 'rld':
self._logger().debug("Reloading tokens")