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>
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>
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>
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>
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>
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>