Skip to content

Commit

Permalink
Badge: Remove unhelpful help text.
Browse files Browse the repository at this point in the history
It's too easy to accidentally trigger this when launching an app.
  • Loading branch information
Gadgetoid committed Mar 21, 2023
1 parent 4e121ea commit e6133d3
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions badger_os/examples/badge.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import time
import badger2040
import badger_os
import jpegdec


# Global Constants
WIDTH = badger2040.WIDTH
HEIGHT = badger2040.HEIGHT
Expand Down Expand Up @@ -110,6 +109,8 @@ def draw_badge():
display.text(detail2_title, LEFT_PADDING, HEIGHT - (DETAILS_HEIGHT // 2), WIDTH, DETAILS_TEXT_SIZE)
display.text(detail2_text, LEFT_PADDING + name_length + DETAIL_SPACING, HEIGHT - (DETAILS_HEIGHT // 2), WIDTH, DETAILS_TEXT_SIZE)

display.update()


# ------------------------------
# Program setup
Expand Down Expand Up @@ -164,13 +165,5 @@ def draw_badge():
# powered *through* HALT, so latch the power back on.
display.keepalive()

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):
badger_os.warning(display, "To change the text, connect Badger2040 to a PC, load up Thonny, and modify badge.txt")
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()

0 comments on commit e6133d3

Please sign in to comment.