From e0d578bd07a4d2634f91ddce4942aef00beb0074 Mon Sep 17 00:00:00 2001 From: thirdr Date: Wed, 11 Jan 2023 09:49:31 +0000 Subject: [PATCH] Adjusted error message layout and wording --- .../examples/inky_frame/inkylauncher/daily_activity.py | 5 +++-- micropython/examples/inky_frame/inkylauncher/nasa_apod.py | 5 +++-- .../examples/inky_frame/inkylauncher/news_headlines.py | 5 +++-- micropython/examples/inky_frame/inkylauncher/random_joke.py | 5 +++-- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/micropython/examples/inky_frame/inkylauncher/daily_activity.py b/micropython/examples/inky_frame/inkylauncher/daily_activity.py index ee185a46..265c4d4a 100644 --- a/micropython/examples/inky_frame/inkylauncher/daily_activity.py +++ b/micropython/examples/inky_frame/inkylauncher/daily_activity.py @@ -117,9 +117,10 @@ def draw(): graphics.text("Participants: " + str(text[2]), 400, HEIGHT - 45, WIDTH - 20, 2) else: graphics.set_pen(4) - graphics.rectangle(0, 175, 640, 25) + graphics.rectangle(0, (HEIGHT // 2) - 20, WIDTH, 40) graphics.set_pen(1) - graphics.text("Unable to get data! Check your network settings in secrets.py", 5, 180, 600, 2) + graphics.text("Unable to get activity data!", 5, (HEIGHT // 2) - 15, WIDTH, 2) + graphics.text("Check your network settings in secrets.py", 5, (HEIGHT // 2) + 2, WIDTH, 2) graphics.update() diff --git a/micropython/examples/inky_frame/inkylauncher/nasa_apod.py b/micropython/examples/inky_frame/inkylauncher/nasa_apod.py index 610564e2..8bc8aecf 100644 --- a/micropython/examples/inky_frame/inkylauncher/nasa_apod.py +++ b/micropython/examples/inky_frame/inkylauncher/nasa_apod.py @@ -83,9 +83,10 @@ def draw(): jpeg.decode() except OSError: graphics.set_pen(4) - graphics.rectangle(0, HEIGHT // 2, WIDTH, 25) + graphics.rectangle(0, (HEIGHT // 2) - 20, WIDTH, 40) graphics.set_pen(1) - graphics.text("Unable to display image! Check your network settings in secrets.py", 5, (HEIGHT // 2) + 5, WIDTH, 2) + graphics.text("Unable to display image!", 5, (HEIGHT // 2) - 15, WIDTH, 2) + graphics.text("Check your network settings in secrets.py", 5, (HEIGHT // 2) + 2, WIDTH, 2) graphics.set_pen(0) graphics.rectangle(0, HEIGHT - 25, WIDTH, 25) diff --git a/micropython/examples/inky_frame/inkylauncher/news_headlines.py b/micropython/examples/inky_frame/inkylauncher/news_headlines.py index ad7e5195..268caab6 100644 --- a/micropython/examples/inky_frame/inkylauncher/news_headlines.py +++ b/micropython/examples/inky_frame/inkylauncher/news_headlines.py @@ -157,8 +157,9 @@ def draw(): else: graphics.set_pen(4) - graphics.rectangle(0, HEIGHT // 2, WIDTH, 25) + graphics.rectangle(0, (HEIGHT // 2) - 20, WIDTH, 40) graphics.set_pen(1) - graphics.text("Unable to display news! Check your network settings in secrets.py", 5, (HEIGHT // 2) + 5, WIDTH, 2) + graphics.text("Unable to display news feed!", 5, (HEIGHT // 2) - 15, WIDTH, 2) + graphics.text("Check your network settings in secrets.py", 5, (HEIGHT // 2) + 2, WIDTH, 2) graphics.update() diff --git a/micropython/examples/inky_frame/inkylauncher/random_joke.py b/micropython/examples/inky_frame/inkylauncher/random_joke.py index 53985d9c..ebfb827f 100644 --- a/micropython/examples/inky_frame/inkylauncher/random_joke.py +++ b/micropython/examples/inky_frame/inkylauncher/random_joke.py @@ -78,8 +78,9 @@ def draw(): jpeg.decode() except OSError: graphics.set_pen(4) - graphics.rectangle(0, 170, WIDTH, 25) + graphics.rectangle(0, (HEIGHT // 2) - 20, WIDTH, 40) graphics.set_pen(1) - graphics.text("Unable to display image! Check your network settings in secrets.py", 5, 175, 600, 2) + graphics.text("Unable to display random joke!", 5, (HEIGHT // 2) - 15, WIDTH, 2) + graphics.text("Check your network settings in secrets.py", 5, (HEIGHT // 2) + 2, WIDTH, 2) graphics.update()