summaryrefslogtreecommitdiff
path: root/wasp/boards/simulator
AgeCommit message (Collapse)Author
2021-12-26Add DisaBLE app that disables bluetoothFrancesco Gazzetta
Signed-off-by: Francesco Gazzetta <fgaz@fgaz.me>
2021-11-17Test and build docs for user defined apps tooFrancesco Gazzetta
Signed-off-by: Francesco Gazzetta <fgaz@fgaz.me>
2021-08-23apps: Fixed weather app with GadgetBridge.Tait Berlette
When I created the weather app I didn't have GadgetBridge installed, so I tried to follow the protocol on the [espurino website](https://www.espruino.com/Gadgetbridge), but it wasn't very helpful and I made some mistakes. This commit should fix these mistakes to stop the weather app from crashing, and so it displays the correct values. I have also added a new settings option called "Units", where apps can see what units the user would prefer (metric/imperial). Signed-off-by: Tait Berlette <54515877+taitberlette@users.noreply.github.com>
2021-07-22draw565: Improve line wrappingDaniel Thompson
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>
2021-06-20wasp: Manager: Rewrite the startup logicDaniel Thompson
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>
2021-06-20widgets: Refactor the stopwatch as a widgetDaniel Thompson
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>
2021-06-20boards: simulator: main: Update the ChronoApp exampleDaniel Thompson
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>
2021-06-20apps: DemoApp: Fully document the demo appDaniel Thompson
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>
2021-06-20apps: FacesApp: Add a watch face chooserDaniel Thompson
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>
2021-06-04draw565: Fix bounding box calculationsDaniel Thompson
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: 58b5c0378ec3 ("draw565: Optimize the string drawing") Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2021-06-03Added weather application.Tait Berlette
Signed-off-by: Tait Berlette <54515877+taitberlette@users.noreply.github.com>
2021-02-25boards: simulator: Increase the display blanking timeDaniel Thompson
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2021-02-25boards: simulator: Pick up out-of-bounds drawingDaniel Thompson
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-06simulator: test: Add Draw565.bounding_box unit testsDaniel Thompson
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2021-01-13simulator: test_qa: Update to match latest policyDaniel Thompson
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2021-01-13simulator: test_qa: Add some basic docstring testsDaniel Thompson
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-12simulator: test_qa: Check that apps are includes in the libraryDaniel Thompson
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2021-01-12simulator: test_qa: Add some simply QA tests for app screenshotsDaniel Thompson
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-12apps: settings: Allow date and time to be set on the watchDaniel Thompson
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-10simulator: tests: Update after renaming the stopwatch appDaniel Thompson
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2021-01-10boards: simulator: Add basic mute simulationDaniel Thompson
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-10boards: simulator: Enable TestApp by defaultDaniel Thompson
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-03manager: Enable Software by defaultDaniel Thompson
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>
2020-12-29simulator: Better align simulator RTC API with the nRF APIDaniel Thompson
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-12-29draw565: Add lighten/darken functionsDaniel Thompson
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-28apps: calc: Created memory-saving calculator appJohannes Wache
Signed-off-by: Johannes Wache <jbwa@posteo.de>
2020-12-28simulator: Start with a higher initial voltageDaniel Thompson
Starting with the battery full makes testing the battery meter easier... Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-12-26tests: Auto-discover applications and try to switch to themDaniel Thompson
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-13apps: testapp: Automatically report free memoryDaniel Thompson
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-12-12boards: simulator: Additional testsDaniel Thompson
Start to work (most of) the code paths in the self test application. Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-12-12boards: simulator: Improve spi.write() simulationDaniel Thompson
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-12-04simulator: Suppress the pysdl2/numpy warningDaniel Thompson
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-04simulator: test: Grey box stopwatch testDaniel Thompson
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-04simulator: tests: Parameterize the basic app testsDaniel Thompson
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-12-04simulator: Introduce fully automatic testintDaniel Thompson
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-11-29Notify level in settings appCarlosgg
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-29apps: snake: Add a snake game applicationJohannes Wache
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-29apps: alarm: Add the alarm app to the libraryDaniel Thompson
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-14manager: Implement alarm callbacks for applications to useDaniel Thompson
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-12simulator: Enable the music app in the simulatorDaniel Thompson
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-11-08docs: Add an Application Library chapterDaniel Thompson
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-08-16boards: simulator: Add an screenshot facilityDaniel Thompson
The screenshot is automatically named after the application currently running and copied into the res/ directory. This allows the application screenshots to be quickly updates if/when the screenshots get out of date as the applications are improved. Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-08-15wasp: Introduce a NEXT eventDaniel Thompson
This is useful for devices that do not have touchscreens. It can be used to cycle through the quick ring and to check out notifications. Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-07-24StatusBar: Rename and add BLE connection status iconDaniel Thompson
Notifier was a dumb name so make it better. Now that we have a decent name it should be obvious how to handle the BLE connection status icon! Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-07-09boards: simulator: Swap up/down swipe detectionDaniel Thompson
Fix swipe detection so it matches the real device. Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-07-07simulator: Provide a special main.py for the simulatorDaniel Thompson
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-06-27boards: simulator: Add swipe detection and button supportDaniel Thompson
Currently the simulator relies on the keyboard to issue touchscreen gestures and button presses. Fix this by adding swipe detection and introducing a skin which gives us the capability to press the button using touchscreens or pointer devices. Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-06-24simulator: Reverse the simulated PPG waveformDaniel Thompson
This avoids an implusive change in base value and makes the waveform a little more interesting. Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-06-22apps: heart: Introduce simple app for the heart rate sensorDaniel Thompson
The heart rate analysis step is still a work in progress but the current app allows us to visualize the the results of the signal conditioning. Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-06-12wasp: simulator: Improve the RTCDaniel Thompson
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>