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 final word of wrapped text will always appear as a single
word on its own line. Fix this by rearranging the break cases to avoid
searching for the most recent space when we get to the end of the text.
Fixes: #230
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
Reduce the number of applications imported by the manager and alter
the way applications are initially registered to allow main.py
complete control over the initial applications (but only if it wants
it).
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
This app is functional... although it lacking in almost every
costmetic way, from the icon to the main screen.
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
Many widgets adopted the _im(mutable) idiom to allow us to reduce the
RAM overhead of each widget. Where the immutable data considers entirely
of integers smaller than 256 then we can push this just a little further
by switching from a tuple to a bytes.
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
This is purely a refactoring for the purposes of code reuse. No change
of behaviour is expected.
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
Tested on Debian bullseye using wasp/requirements.txt in order to get
the latest version of click.
Fixes: #211
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
Currently the ChronoApp example code is both broken (missing apps. prefix)
and doesn't use the latest API for registering watch faces. Fix this.
Whilst here let's also provide an example for the DemoApp since that
is not included in the Software chooser.
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
The demo app is of somewhat niche interest and is disabled by default
but arguable that makes it more important to document it fully since
this app is harder to find the many others.
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
This app is enabled by default and allows users to select a watch face
based on a fullscreen preview of how the app will draw the screen.
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
One benefit from wasp-os' dirt simple drawing model is that it is very
easy for apps to provide full screen previews of themselves. Add this
for all clocks ready for us to add a watch face chooser application.
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
So... waking up once per second turns out to be a dumb idea because it
regresses the stop watch and HRS tools (which now also only wake up once
per second).
Undo this change but sprinkle a few more micropython.native decorations
on methods used on the wakeup path to minimise power.
Fixes: fb18705b9b ("manager/rtc: Experimental power saving technique")
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
Currently the time is calculated 8 times per second from (relatively) slow
python code. Optimize the power consumed by reducing the number of times
we check for wall time updates to only once-per-second and use native
code generation to reduce VM overhead when executing this critical code.
At the time of writing the difference is battery life has not yet been
measured (but we know the current master branch is worse than v0.4 and,
in theory at least, this should close the gap).
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
wasp-os uses an drawing optimization technique to automatically place
a single pixel line on the right of glyphs when rendering them. This
results in a change to the bounding box for a rendered string (by adding
a single pixel on the right of the final character). Fix the bounding box
calculations accordingly. Among other things this eliminates graphical
artifacts when rendering labels in 2048.
Fixes: #203
Fixes: 58b5c0378e ("draw565: Optimize the string drawing")
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
When an application is registered using a string that gives the class
name (e.g. "apps.chrono.ChronoApp") when we automatically delete
the module from a couple of namespaces. This ensures the garbage
collector can do a deeper clean when the application is unregistered.
We also provide a means to directly register watch faces (e.g. to
replace the default clock).
Fixes: #214
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
Currently direct callers of draw_pbar() can have 20 or more digits after
the decimal place. Fix this by moving the rounding function.
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
Currently there is a redundant fill operation issued for every character
drawn. This was added to draw the background colours correctly but the
change did not account for the optimized character rendering in
_draw_glyph().
This results in ~15% performance improvement for character rendering
Fixes: cc34c5d46d ("draw565: Fix wrong background color of strings")
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
Signed-off-by: thefenriswolf <stefan.rohrbacher97@gmail.com>
[daniel@redfelineninja.org.uk: fixed up the manifest]
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
Signed-off-by: Benoît HERVIER <b@rvier.fr>
[daniel@redfelineninja.org.uk: Removed unused dual clock fonts from
clock_dual.py, fixed up the manifest]
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
The music player volume control uses up and down events, but in the
foreground function the app requests left and right events.
Signed-off-by: Tait Berlette <54515877+taitberlette@users.noreply.github.com>
Currently, if the line wrapper attempts to break a line on a space and
that space character is outside the bounding box, then we generate an
over-long line.
Fix this by handling line break generation *after* we have checked the
length of the current line.
Fixes: #193
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
Signed-off-by: Brendan M. Sleight <bms.git@barwap.com>
[daniel@redfelineninja.org.uk: Squashed down into a single commit and
updated subject]
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk
Currently then even fast walking will run off the top of the graph. Change
the scale to that fast walking shows in full. I think at this level fast
running will probably run off the top but I need to gather a few more
details before settling on the final scale.
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
The steplogger records steps but currently there is no way to see the data
recorded on the device itself. Make a first attempt at graphing the
step data.
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
Currently we dump the step data every 30 minutes. This was a good
interval for testing but we can extend it a little without any
problems.
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
Currently steps from the last six minutes do not appear in the data. We
can fix this by updating the data before creating the iterator.
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
Currently, if we ask the simulator to draw out-of-bounds then it will
do exactly that, it will draw outside of the "screen" and corrupt the
pixels of the watch frame that surrounds it. This is an obviously poor
simulation of the real watch and when the out-of-bounds error is only
an out-by-one error can be easily overlooked until we load the code on
the device.
Let's just throw an exception if we draw out-of-bounds. That can easily
be picked up during testing.
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
Currently if the binary file being downloaded contains single quote
characters then it gets wrapped differently by repr() so we have to add
additional cases to strip the wrapper.
Fix this the "obvious" way... where by "obvious" I mean almost anything
but.
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>