Logging
This commit is contained in:
parent
bd342777a8
commit
1fc7162a40
|
@ -173,7 +173,7 @@ class Control(util.Loggable):
|
||||||
port = serial.Serial(self._port, 9600)
|
port = serial.Serial(self._port, 9600)
|
||||||
self._protocol = serial.threaded.ReaderThread(port, lambda: Reader(self._cb))
|
self._protocol = serial.threaded.ReaderThread(port, lambda: Reader(self._cb))
|
||||||
self._protocol.start()
|
self._protocol.start()
|
||||||
self._protocol = protocol.protocol
|
self._protocol = self._protocol.protocol
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
self._logger().exception("Port opening error")
|
self._logger().exception("Port opening error")
|
||||||
time.sleep(10)
|
time.sleep(10)
|
||||||
|
|
|
@ -130,7 +130,8 @@ class DoorControlSocket(util.Loggable):
|
||||||
return
|
return
|
||||||
data = bytes.fromhex(" ".join(args))
|
data = bytes.fromhex(" ".join(args))
|
||||||
data = [ data[i:i+4] for i in range(0, len(data), 4) ]
|
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)
|
self._bell._protocol.alternate_msgs(data)
|
||||||
elif cmd == 'rld':
|
elif cmd == 'rld':
|
||||||
self._logger().debug("Reloading tokens")
|
self._logger().debug("Reloading tokens")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user