Relaunching the simulator to run tests quickly gets frustrating if
the Self Test is disabled by default. Change this.
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
Replace the pixelated Yes/No buttons with text based alternatives.
This also required changes to the pager to change the way the
redraw after changing view is implemented (improved muting and a reset
of the colours).
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
Enabling software by default allows us disable several other applications
by default because there is now a GUI based route to enable them.
This does require a few tweaks to the test suite and allows allows us to
remove a lot of boilerplate text from the application library document
since it is no longer relavent.
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
Currently wasp-os enables a narrow set of applications because we don't
want to consume RAM by importing the module and constructing the
application. We can improve on this situation by providing a small
(stateless) application that can be used to enable or diable applications.
This allows all the ROMed applications to be enabled using the GUI
without compromising on the ability to develop applications.
In fact this application significantlly reduces the RAM consumed in the
default case becasue the Self Test app does not need to maintain its
state.
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
The checkbox uses the _im(mutable) idiom to minimize the RAM overhead
of its immutable properties (position and label). However it can be useful
to retrieve the label to provide a property accessor.
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
By default bright and mid are white/grey tones, the ui widgets are
blue and the spot colours are different variants of orange.
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
Currently the theme is explicitly little endian. This does match the
underlying hardware but makes it needlessly difficult to hand edit
themes. Switch the default theme and theming tools over to big endian
form and add comments to the default theme to support hand editing.
We also expand the ASCII characters in the default them with hex codes.
This is the final step needed to make hand edited themes trivial to work
with.
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
Currently the bma421 driver simple re-initializes the sensor when asked
to set the step counter to zero. Switch over to the proper function
for this.
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
The ConfirmationView became broken when we converted it's images over to
2-bit RLE. That happened because the confirmation view relied on the
the 1-bit RLE to dynamically generate hit boxes.
Currently the code pre-calculates the hit box which is a waste of RAM.
Let's rip out the existing hit box logic and replace it with much larger
("fat finger") hit targets.
We make the touch() method more closely adopt the idioms of other UI
components (e.g. don't return the dialog status... just whether or
not we handled the touch).
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>
We are able to add this to the self tests without having to create a
special page. Instead we can modify the existing notifications test
to utilize the spinner.
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
Add functions to generate shades from a single (usually theme provided)
basic palette colour.
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
Currently if you spend more then 15 seconds looking up figures or
transcribing the answer then the system will switch back to the
clock and the answer will be lost.
Fix this by remembering the output between invocations.
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
Currently calculations such as 22/7 do not work correctly on the
simulator (which uses double precision floating point). Fix this
by explicitly truncating the strings when needed.
Additionally the current calculate() method has some problems when
the calculation cannot be evaluated since it will needlessly clear out
the calculation. Push calculate (and the exception handling) into the
caller and report errors using the vibration motor instead.
Finally we rename display_output() to the more idiomatic _update().
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
Currently the fields is a list of lists of strings. This will needlessly
consume RAM so lets switch it over to a simple string (which is immutable
and can be stored in flash).
We also replace indices with simple x and y variables. In addition to
avoiding a (temporary) memory allocation this is also easier to use
when looking up in fields.
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
Currently the calculator uses an open grid. It's a matter of taste but
I prefer a closed grid.
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
Currently the coordindates used for line drawing are "tuned" for a bug in
the line drawing code (and now draw off the edge of the screen). Fix this.
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
Currently the empty string cannot be drawn into a fixed width box.
Fix this by adding a special case for empty strings.
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
Currently the line drawing code does not draw the final pixel of
straight lines. Thus a line from (0, 0) to (10, 10) finishes on a
different pixel to (10, 0) to (10, 10).
Fix this by removing the spurious subtract one from the end point
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
The 2-bit RLE encoding, in addition to supporting colour is also fully
ROMable meaning we can save 32 bytes of RAM per image by switching to
2-bit encoding.
Switch everything in icons and font.clock over to 2-bit encoding.
Note: this requires all the clock PNG files to be reencoded (because
they were originally in 1-bit grayscale format and this is no
longer supported by the encoder).
This reduces RAM overhead by 480 bytes and has only a negligable effect
on FLASH usage (+4 bytes).
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
Currently the battery icon is overlarge compared to other status bar
icons such as the BT and notification icons (both of which are 32px
high). Fix this by redrawing the battery artwork and updating
the widgets in the status bar.
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
Update the icon so it more closely resembles the in-game visual style
(and also so it compresses better) and update the screenshot since the
old one is the wrong size (FullHD instead of 358x406) and doesn't render
correctly in the documentation.
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
Make the ticks and hands larger and shorten the hands slightly to avoid
visual glitches during "undraw".
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
Polar coordinates are very convenient for implementing anything with
radial lines (such as a traditional watch face).
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>