Skip to content

Commit 1a30732

Browse files
committed
Add a background to the mugsy state/screen so it looks better
1 parent 298b3c5 commit 1a30732

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

PyPortal_Alarm_Clock/code.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@
6262
snooze_time = None
6363
snooze_interval = 600.0
6464

65+
# mugsy support
66+
mugsy_background = 'mugsy_background.bmp'
67+
6568
# weather support
6669

6770
icon_file = None
@@ -359,6 +362,15 @@ def tick(self, now):
359362
# Once the job is done, go back to the main screen
360363
change_to_state('time')
361364

365+
def enter(self):
366+
global low_light
367+
low_light = False
368+
pyportal.set_backlight(1.00)
369+
pyportal.set_background(mugsy_background)
370+
board.DISPLAY.refresh_soon()
371+
board.DISPLAY.wait_for_frame()
372+
373+
362374

363375
class Alarm_State(State):
364376
"""This state shows/sounds the alarm.
224 KB
Binary file not shown.

0 commit comments

Comments
 (0)