Apparently Thonny doesn't clear blank lines on save

This commit is contained in:
Mike Bell 2022-03-25 00:29:09 +00:00
parent 994ddba0e1
commit e19fe9cb73
3 changed files with 5 additions and 5 deletions

View File

@ -217,7 +217,7 @@ while True:
# Pressing A and C together quits the app
if display.pressed(badger2040.BUTTON_A) and display.pressed(badger2040.BUTTON_C):
break
if display.pressed(badger2040.BUTTON_A) or display.pressed(badger2040.BUTTON_B) or display.pressed(badger2040.BUTTON_C) or display.pressed(badger2040.BUTTON_UP) or display.pressed(badger2040.BUTTON_DOWN):
draw_overlay("To change the text, connect Badger2040 to a PC, load up Thonny, and modify badge.txt",
WIDTH - OVERLAY_BORDER, HEIGHT - OVERLAY_BORDER, OVERLAY_SPACING, OVERLAY_TEXT_SIZE)
@ -225,9 +225,9 @@ while True:
time.sleep(4)
draw_badge()
display.update()
# If on battery, halt the Badger to save power, it will wake up if any of the front buttons are pressed
display.halt()
time.sleep(0.1)

View File

@ -130,7 +130,7 @@ while True:
# Pressing A and C together quits the app
if display.pressed(badger2040.BUTTON_A) and display.pressed(badger2040.BUTTON_C):
break
if display.pressed(badger2040.BUTTON_UP):
if current_image > 0:
current_image -= 1

View File

@ -226,5 +226,5 @@ while True:
if changed:
badger_os.state_save("launcher", page, font_size, inverted)
changed = False
display.halt()