diff --git a/WelcomeScreen.py b/WelcomeScreen.py index 82adc3a..a57da76 100644 --- a/WelcomeScreen.py +++ b/WelcomeScreen.py @@ -73,8 +73,8 @@ class WelcomeScreen: self.lcd.putstr(padding_hyphen) # get the current pin values (only if there are pins specified) (when something changes, the interrupt happens and the cycle stops) + break_flag = False if self.interrupt_pins: - break_flag = False pin_values = [] for p in self.interrupt_pins: pin_values.append(p.value()) @@ -92,8 +92,10 @@ class WelcomeScreen: for i, p in enumerate(self.interrupt_pins): if pin_values[i] != p.value(): break_flag = True - if break_flag: - break + if break_flag: + break + if break_flag: + break self.lcd.move_to(0,y_offset) self.lcd.putstr(self.started_msg.center(16))