From e6133d302bc51f8cec0c3b1222fa1f281fea59d9 Mon Sep 17 00:00:00 2001 From: Phil Howard Date: Tue, 21 Mar 2023 16:59:30 +0000 Subject: [PATCH] Badge: Remove unhelpful help text. It's too easy to accidentally trigger this when launching an app. --- badger_os/examples/badge.py | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/badger_os/examples/badge.py b/badger_os/examples/badge.py index c376fd8..8b8ec77 100644 --- a/badger_os/examples/badge.py +++ b/badger_os/examples/badge.py @@ -1,8 +1,7 @@ -import time import badger2040 -import badger_os import jpegdec + # Global Constants WIDTH = badger2040.WIDTH HEIGHT = badger2040.HEIGHT @@ -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 @@ -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()