1
0
Fork 0
Commit graph

17 commits

Author SHA1 Message Date
thiswillbeyourgithub
20027dc16a fix: don't erase previous alarm if none loaded
Signed-off-by: thiswillbeyourgithub <github@32mail.33mail.com>
2022-07-25 21:42:58 +02:00
thiswillbeyourgithub
040edba1f7 fix: asked by daniel_thompson
Signed-off-by: thiswillbeyourgithub <github@32mail.33mail.com>
2022-07-25 21:42:58 +02:00
thiswillbeyourgithub
cb51e83a28 new: increment minutes by 5 instead of 1
Signed-off-by: thiswillbeyourgithub <github@32mail.33mail.com>
2022-07-20 11:41:49 +02:00
thiswillbeyourgithub
6e9b7b374d feat: save alarms across reboots
Signed-off-by: thiswillbeyourgithub <github@32mail.33mail.com>
2022-07-20 11:41:49 +02:00
thiswillbeyourgithub
3f054b40e1 docs: mention that pressing the button will stop the watch
Signed-off-by: thiswillbeyourgithub <github@32mail.33mail.com>
2022-07-20 10:22:06 +02:00
Francesco Gazzetta
5f28d05cc0 Alarm: swap stop and snooze controls
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>
2022-02-02 12:20:06 +00:00
k
59c943d212 [alarms] Skip touch events on checkboxes of undefined alarms
Signed-off-by: k <k@klabz.org>
2021-10-16 10:37:25 +01:00
Daniel Thompson
2858826921 apps: Replace del self.x with self.x = None in all apps
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-28 22:01:04 +01:00
Adam Blair
e09b951017 Advanced alarm app
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-07-25 08:56:14 +01:00
Daniel Thompson
05310a82f8 widgets: Clarity whether spinner max is inclusive or exclusive
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>
2021-01-12 20:22:44 +00:00
Daniel Thompson
86002b4188 apps: alarm: add a full colour icon
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-12-29 20:14:13 +00:00
Daniel Thompson
e4ce90d2eb apps: alarm: Adopt the spinner widget
Replace the open coded spinner widget with the newly introduced system
one.

Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-12-29 20:13:18 +00:00
Daniel Thompson
f19188b962 apps: alarm: avoid setting a "silly" alarm during app init
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-29 20:09:47 +00:00
Daniel Thompson
b47298d446 apps: alarm: Adopt the checkbox widget
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-12-29 12:33:05 +00:00
Daniel Thompson
39c9344b14 apps: alarm: Fix touch handling when the alarm is ringing
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-29 19:14:31 +00:00
Daniel Thompson
707c4e2fa7 apps: alarm: Adopt 2-bit RLE for the icon
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-29 19:14:31 +00:00
Siroj42
27413eb5e1 apps: alarm: Add Alarm application based on the new alarm system
Signed-off-by: Joris Warmbier <siroj42@t-online.de>
2020-11-29 19:14:31 +00:00