1
0
Fork 0
Commit Graph

130 Commits (jebbatime)

Author SHA1 Message Date
ml server 2dbfd10b31 not connected. rm sim bits 2021-06-14 13:52:05 -06:00
ml server 091ea48b50 rm some ble 2021-06-14 13:38:47 -06:00
ml server ada48a8715 rm heartrate driver, maybe break sim 2021-06-14 13:13:58 -06:00
ml server b6f85dda36 rm bma421 2021-06-14 12:38:34 -06:00
ml server 7f47e75b67 rm unused boards 2021-06-14 12:16:18 -06:00
ml server 728c9f3c5f rm ppg 2021-06-14 11:25:12 -06:00
ml server 2c8457f058 sim, fewer features 2021-06-12 17:43:22 -06:00
jebbatime build server aa56655de1 jebbatime 2021-06-12 13:49:52 -06:00
jebbatime build server 40655b78ac lobstertwobold64 2021-06-12 13:42:09 -06:00
Daniel Thompson 4ad8273902 draw565: Fix bounding box calculations
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>
2021-06-04 10:46:25 +01:00
Tait Berlette 9ded8e28a6 Added weather application.
Signed-off-by: Tait Berlette <54515877+taitberlette@users.noreply.github.com>
2021-06-03 21:43:38 +01:00
thefenriswolf ed3f1c1e71 fonts: add 18pt font
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>
2021-03-28 08:59:25 +01:00
Benoît HERVIER 7aa2ceb05b apps: Add DualClock app.
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>
2021-03-27 09:41:54 +00:00
Daniel Thompson 86cc4844b6 apps: software: Include word clock in the available applications
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2021-03-10 21:50:01 +00:00
Daniel Thompson 474851219a boards: simulator: Increase the display blanking time
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2021-02-25 07:37:10 +00:00
Daniel Thompson 1cb1d96ef4 boards: simulator: Pick up out-of-bounds drawing
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>
2021-02-25 07:36:15 +00:00
Daniel Thompson 8940b7c3ab steplogger: Introduce code to perform data logging
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>
2021-02-21 20:27:48 +00:00
Daniel Thompson f2ad6a7d3f simulator: test: Add Draw565.bounding_box unit tests
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2021-02-06 13:30:30 +00:00
Daniel Thompson 64d03fcc11 simulator: test_qa: Update to match latest policy
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2021-01-13 22:14:33 +00:00
Daniel Thompson 39d8783055 simulator: test_qa: Add some basic docstring tests
This one picked up a lot of inconsistancy so the changes here are pretty
big.

Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2021-01-13 21:51:17 +00:00
Daniel Thompson f7ef165433 simulator: test_qa: Check that apps are includes in the library
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2021-01-12 22:33:25 +00:00
Daniel Thompson aab718f917 simulator: test_qa: Add some simply QA tests for app screenshots
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>
2021-01-12 22:02:31 +00:00
Daniel Thompson cca72ef348 apps: settings: Allow date and time to be set on the watch
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>
2021-01-12 20:27:52 +00:00
Miguel Rochefort ffff5ae52b apps: play2048: Add the 2048 game application
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>
2021-01-10 18:14:36 +00:00
Daniel Thompson bc9000c1a5 simulator: tests: Update after renaming the stopwatch app
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2021-01-10 16:07:15 +00:00
Wolfgang Ginolas 5b74c45e58 apps: timer: Add a countdown timer application
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>
2021-01-10 16:02:35 +00:00
Daniel Thompson 61c56598de boards: simulator: Add basic mute simulation
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>
2021-01-10 10:43:50 +00:00
Daniel Thompson 637f5d6e8a boards: simulator: Enable TestApp by default
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>
2021-01-10 10:40:03 +00:00
Daniel Thompson ed242b84a6 widgets: ConfirmationView: Adopt the button widget
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>
2021-01-10 10:34:37 +00:00
Daniel Thompson 8325177ec8 sphinx: Fix docs build regression
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2021-01-03 17:29:35 +00:00
Daniel Thompson 3813eb2911 manager: Enable Software by default
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>
2021-01-03 14:59:14 +00:00
Daniel Thompson 62bca4d288 simulator: Better align simulator RTC API with the nRF API
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-12-29 16:07:37 +00:00
Daniel Thompson ff76abfb8b draw565: Add lighten/darken functions
Add functions to generate shades from a single (usually theme provided)
basic palette colour.

Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-12-29 12:30:20 +00:00
Johannes Wache a1ee40016d apps: calc: Created memory-saving calculator app
Signed-off-by: Johannes Wache <jbwa@posteo.de>
2020-12-28 12:06:51 +00:00
Daniel Thompson 0edee8067e simulator: Start with a higher initial voltage
Starting with the battery full makes testing the battery meter easier...

Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-12-28 12:01:51 +00:00
Daniel Thompson 2034340f3b tests: Auto-discover applications and try to switch to them
Currently `make check` doesn't test any not-default applications.
Fix this by automatically discovering constructors and ensure that the
application can be started and stopped without generating an exception.

Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-12-26 18:07:45 +00:00
Daniel Thompson 784c9bb36d apps: testapp: Automatically report free memory
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-12-13 16:07:24 +00:00
Daniel Thompson 941d4a264d boards: simulator: Additional tests
Start to work (most of) the code paths in the self test application.

Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-12-12 18:15:15 +00:00
Daniel Thompson e3b2c7bf7d boards: simulator: Improve spi.write() simulation
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-12-12 12:57:06 +00:00
Daniel Thompson 896a4e1a8d simulator: Suppress the pysdl2/numpy warning
This makes the simulator look nicer when it starts up... but it
doesn't help the simulator.

Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-12-04 20:35:16 +00:00
Daniel Thompson 46bd454392 simulator: test: Grey box stopwatch test
Currently we can act on the controls but we cannot "see" the display
in the test suite. That leads us to a slightly odd form of "grey box"
testing. It's functionally black box testing but some of the asserts
have to reach inside the components instead of looking at the display.

Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-12-04 20:34:23 +00:00
Daniel Thompson 901e43870e simulator: tests: Parameterize the basic app tests
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-12-04 20:32:40 +00:00
Daniel Thompson f1f5cc9e0c simulator: Introduce fully automatic testint
Currently the tests do little more than fire up the simulator and
switch into (and out of) the built in applications. However this is
useful and allows us to fully integrate as a CI job.

Unfortunately the numpy warning from pysdl2 mean we have been forced
to disable all warnings to prevent pytest from collecting and reporting
them.

Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-12-04 20:11:41 +00:00
Carlosgg 3fb1faceab Notify level in settings app
Signed-off-by: Carlos Gil Gonzalez <carlosgilglez@gmail.com>
[daniel@redfelineninja.org.uk: Fixed board support for simulator and
sphinx (a.k.a. doc builder)]
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-11-29 20:20:03 +00:00
Johannes Wache e450ccf9f0 apps: snake: Add a snake game application
Signed-off-by: Johannes Wache <jbwa@posteo.de>
[daniel@redfelineninja.org.uk: Removed some couple of unwanted merge artifacts]
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-11-29 20:08:59 +00:00
Daniel Thompson 233c136a5c apps: alarm: Add the alarm app to the library
Like the other library applications this is enabled in the simulator and
included in the flash image but is disabled by default to conserve RAM
(and to give time to new apps to mature and receive improvements).

Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-11-29 19:14:31 +00:00
Daniel Thompson 66cbfa20e8 sphinx: icons: Get the doc build working again
Fixes: 393dfefc86 ("apps: pager: notifications: Added remove all notifications dialog")
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-11-29 19:12:54 +00:00
Daniel Thompson 748e5fe65a docs: Wordsmtithing updates after review
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-11-22 09:25:24 +00:00
Daniel Thompson fd0e0d77aa [pinetime,p8,k9]: Show when main.py is running
This is yet another step towards making the role of main.py more obvious.

Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-11-14 20:40:16 +00:00
Daniel Thompson d0a99d5636 manager: Implement alarm callbacks for applications to use
Create a simple time queue where actions (functions or bound methods) can
be queued against the real time clock.

Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-11-14 12:24:28 +00:00