Compare commits

..

2 Commits

Author SHA1 Message Date
bd342777a8 Allow alternating raw data 2022-11-14 19:36:52 +01:00
e856fffaf5 Fix typo 2022-11-14 19:36:43 +01:00
2 changed files with 5 additions and 2 deletions

View File

@ -121,7 +121,10 @@ class Reader(util.Loggable):
def alternate_msgs(self, names, times = 3, *, dt = 0.04):
for _ in range(times):
for m in names:
self.write(msgs[m])
if type(m) == str:
self.write(msgs[m])
else:
self.write(m)
time.sleep(dt)
def send_light_msg(self):

View File

@ -123,7 +123,7 @@ class DoorControlSocket(util.Loggable):
self._bell._protocol.send_light_msg()
elif cmd == 'bell_perma_light':
self._bell._protocol.doing_light ^= True
send("Turning the light on permanently: {self._bell._protocol.doing_light}")
send(f"Turning the light on permanently: {self._bell._protocol.doing_light}")
elif cmd == 'bell_raw':
if (len(args) % 4) != 0:
send(f"Invalid number of bytes: {len(args)}")