Skip to content

Commit

Permalink
Simplified if
Browse files Browse the repository at this point in the history
  • Loading branch information
Alan Christie committed Mar 4, 2022
1 parent fc3d00b commit 2d304f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pico/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def button_pressed() -> bool:

if display.is_pressed(display.BUTTON_A):
# Toggle night mode.
_NIGHT_MODE = False if _NIGHT_MODE else True
_NIGHT_MODE = not _NIGHT_MODE
# And then wait for button to be released
# to avoid rapid toggling.
while display.is_pressed(display.BUTTON_A):
Expand Down

0 comments on commit 2d304f4

Please sign in to comment.