[WelcomeScreen.py] Improved the interrupt functionality

This commit is contained in:
BlueFox 2024-10-28 18:54:44 +00:00
parent 12e8fa43ab
commit 1614247f0d

View File

@ -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))