For small graphical items (line drawing, font glyphs) the performance
of the set_window() method is critical.
Emit native code for this function and optimize the SPI write_cmd()
method to avoid memory allocation. This give a performance boost of
a little over 15% for (24pt) font rendering and 30% for line drawing.
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
Avoid needless bouncing the chip select when drawing glyphs. This
improved performance by around 15% for 24pt fonts.
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
The auto-generated application docs isn't really worthy of the reference
guide. There's too many methods described as "draws the screen" and this
simply doesn't add anything over the template application includes in
the application writer's guide.
Move everything over into the Application Library.
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
Add tests to make sure every app has a screenshot... and fix the
problems picked up by the new tests!
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
Currently many first-time users excitedly install wasp-os and then
struggle to set the time using the various BLE based methods
(REPL, wasptool, GadgetBridge, etc). This results in "is there
another way to set the time" being *the* frequently asked
question.
Whilst getting the BLE tools is highly recommened to get the best
from wasp-os we can delivery a better out-of-the-box experience
for first time users is we provide on board date/time setting.
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
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>
Currently the number of pages is (acidentally) hardcoded where it need
not be and the scroll directions aren't right as soon as we go beyond
two pages (where scroll up and down are equivalent actions).
Fix both.
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
wasp-os uses a rather eccentric "2-bit" RLE encoding which works best
when there are only three colors (and black) in a single line. Modify
the screenshot slightly to allow it to be encoded with fewer palette
updated.
2048 is a popular sliding block puzzle game in which tiles are combined
to make the number 2048.
It's one of the few games that are enjoyable to play on such a small
form factor.
This started as a port of a TkInter implementation of the 2048 game. I
implemented all of the TkInter APIs used by the game and it worked on
wasp-os without any code change in the game. However, the performance
was very poor and it consumed too much RAM. I have since reimplemented
the whole game from scratch and managed to achieve acceptable
performance, although more improvements could still be made.
Because names in Python can't start with numbers, I had some trouble
naming things. The module is called "ttfe" (two-thousand-forty-eight),
the class name is Play2048App, and the software.py entry is "Play 2048".
Signed-off-by: Miguel Rochefort <miguelrochefort@gmail.com>
[daniel@redfelineninja.org.uk: Renamed the python filename, normalized
the screenshot and included the app in the docs]
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
The title will render with the last font used, and this isn't always
right for the ConfirmationView. Setting the font explicitly solves that
issue.
Signed-off-by: Miguel Rochefort <miguelrochefort@gmail.com>
Signed-off-by: Wolfgang Ginolas <wolfgang.ginolas@gwif.eu>
[daniel@redfelineninja.org.uk: squashed into a single commit, rebase to
latest master, integrate with the Software application and rename the
screenshots to match the application name]
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
These still need to be integrated into the generated documentation but
there were included in the most recent wasp-os video so let's get them
into the source code.
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
Switch from a headphone to music notation metaphor and take the (lazy?)
approach of using the watch chassis to frame the icon.
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
Admitedly we can become "ready" by reducing the scope a little. On the
other hand there's been some big steps forward in terms of new applications
so I'd like to refocus the 0.4 release to showcase those new apps.
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
Currently the simulator shows redraw artifacts that are concealed
on the real device by using display on/off. We can improve this by
avoiding the refresh when the display is off. This does not match
the behaviour of the real hardware (which goes dark during transitions)
but does make the simulator feel much more comfortable to use.
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
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>