The code is not yet enabled by default but it can be tested by adding
custom code to an interested user's main.py .
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
run_command has particular benefits for handle_binary_download() because
we can greatly simplify the code to handle running repr() on the target.
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
Add a run_command method for the "console". This allows running a command
on the target and capturing the result. Normally this is handled using
REPLWrapper but that doesn't work well with the NUS console because local
echo gets in the way.
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
--push is very similar to --binary --upload but handles directories
differently. --pull allows us to copy binary files from the target.
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
This should make it a bit easier for people to contribute. Also fixed
the documentations on how to setup on Debian, as certain recommended
packages don't exist.
Signed-off-by: Shuhao Wu <shuhao@shuhaowu.com>
Currently a couple of down presses on the year results in the time being
set to some time in 2099. The micropython date logic does not support
dates this far in the future and throws an exception. Adopt a simple
fix that should be OK for the next 39 years ;-) .
Reported-by: Christopher Peters <me@christopherp.de>
Fixes: #167
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
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>