Compare commits
2 Commits
a0f164d176
...
bd342777a8
Author | SHA1 | Date | |
---|---|---|---|
bd342777a8 | |||
e856fffaf5 |
|
@ -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):
|
||||
|
|
|
@ -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)}")
|
||||
|
|
Loading…
Reference in New Issue
Block a user