Tweak snooze behavior
@@ -187,7 +187,7 @@ class Time_State(State):
self.snooze_icon = displayio.Group()
self.snooze_icon.x = 270
- self.snooze_icon.y = 62
+ self.snooze_icon.y = 63
self.snooze_file = None
# each button has it's edges as well as the state to transition to when touched
@@ -335,7 +335,6 @@ class Time_State(State):
pixel_shader=displayio.ColorConverter(),
position=(0, 0))
self.snooze_icon.append(icon_sprite)
-
pyportal.splash.append(self.snooze_icon)
if alarm_enabled:
self.text_areas[1].text = '%2d:%02d' % (alarm_hour, alarm_minute)
@@ -411,8 +410,7 @@ class Alarm_State(State):
def enter(self):
- global low_light, snooze_time
- snooze_time = None
+ global low_light
self.sound_alarm_time = time.monotonic()
pyportal.set_backlight(1.00)
pyportal.set_background(alarm_background)
@@ -492,6 +490,9 @@ class Setting_State(State):
def enter(self):
+ global snooze_time
+ snooze_time = None
+
pyportal.set_background(self.background)
for ta in self.text_areas:
pyportal.splash.append(ta)
