From bd342777a818e7f7fbbf68f13fbb6b4c4636d73c Mon Sep 17 00:00:00 2001 From: Valentin Ochs Date: Mon, 14 Nov 2022 19:36:52 +0100 Subject: [PATCH] Allow alternating raw data --- door_pi_control/bell.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/door_pi_control/bell.py b/door_pi_control/bell.py index c78239f..6e26833 100644 --- a/door_pi_control/bell.py +++ b/door_pi_control/bell.py @@ -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):