Skip to content

Commit 05ae363

Browse files
committed
Change switch check
1 parent 3ec030b commit 05ae363

File tree

1 file changed

+2
-2
lines changed
  • IS31FL3741_DisplayIO/sports_glasses

1 file changed

+2
-2
lines changed

IS31FL3741_DisplayIO/sports_glasses/code.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def ScrollMessage(text, color, repeat):
5454

5555
# Update the switch and if it has been pressed abort scrolling this message
5656
switch.update()
57-
if switch.value is False:
57+
if not switch.value:
5858
return
5959

6060
time.sleep(0.025) # adjust to change scrolling speed
@@ -145,7 +145,7 @@ def Score(text, color, ring_color, repeat):
145145
switch.update()
146146

147147
# If the switch has been pressed interrupt start a special message
148-
if switch.value is False: # False means the switch has been pressed
148+
if not switch.value:
149149
Score("SCORE!", YELLOW_TEXT, BLUE_RING, 2)
150150

151151
# If the switch is not pressed pick a random message and scroll it

0 commit comments

Comments
 (0)