summaryrefslogtreecommitdiff
path: root/wasp/apps/alarm.py
AgeCommit message (Collapse)Author
2022-02-02Alarm: swap stop and snooze controlsFrancesco Gazzetta
It was too easy to accidentally stop the alarm by touching the screen, either by moving around or by trying to press the side button to snooze. Snoozing instead of stopping is better than the opposite because it poses no risk of missing the alarm, so we swap the controls to: touch -> snooze press -> stop Signed-off-by: Francesco Gazzetta <fgaz@fgaz.me>
2021-10-16[alarms] Skip touch events on checkboxes of undefined alarmsk
Signed-off-by: k <k@klabz.org>
2021-07-28apps: Replace del self.x with self.x = None in all appsDaniel Thompson
Testing has demonstrated that del self.x does not make the memory used to store x available for garbage collection. There is clearly an additional reference from another place. In fact *after* del self.x then the memory can be made available for GC by assignment (e.g. self.x = None). However I haven't found how to release this reference and there is nothing in self.__dict__ that can help. For now we'll use a twp-step process where we set the variable to None before deleting it. This has a big impact on memory usage. For Software it is almost 1k (a.k.a. about 10% impact on free RAM). Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2021-07-25Advanced alarm appAdam Blair
Features: * Multiple alarms (up to 4) * Day of the week support * One time alarms * Snooze Changes to wasp-os for app support: * Added + and - to the 28pt and 36pt fonts * Checkboxes now require a click on the body of the checkbox if there is no label * Added a Toggle Button class that extends Button and stores a state like checkbox Signed-off-by: Adam Blair <adampblair@protonmail.com>
2021-01-12widgets: Clarity whether spinner max is inclusive or exclusiveDaniel Thompson
Currently the spinner uses exclusive max when wrapping from low to high and inclusive max when wrapping from high to low. Fix this by adopting *inclusive* max everywhere. The call sites are similarly confused. Fix this! Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-12-29apps: alarm: add a full colour iconDaniel Thompson
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-12-29apps: alarm: Adopt the spinner widgetDaniel Thompson
Replace the open coded spinner widget with the newly introduced system one. Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-12-29apps: alarm: avoid setting a "silly" alarm during app initDaniel Thompson
The alarm is off by default so there's no reason to set an alarm that is disabled. Let's stop doing that. Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-12-29apps: alarm: Adopt the checkbox widgetDaniel Thompson
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-11-29apps: alarm: Fix touch handling when the alarm is ringingDaniel Thompson
Currently the widgets react to touch when the alarm is ringing (and they are invisible. For now we fix this by disabling the alarm on a touch event. Maybe the app should reject touch events since they could acidentally dismiss the alarm... but we already disable the alarm if we get a swipe event so this doesn't make things much worse than they already are! Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-11-29apps: alarm: Adopt 2-bit RLE for the iconDaniel Thompson
The long term plan is to retire and remove the 1-bit RLE code from wasp-os so we don't want new icons using that encoding. Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-11-29apps: alarm: Add Alarm application based on the new alarm systemSiroj42
Signed-off-by: Joris Warmbier <siroj42@t-online.de>