summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-02-20apps: settings: Clamp the dates a little more tightlyDaniel Thompson
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>
2021-02-11docs: install: Fix typo in apt-get line for busterDaniel Thompson
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-02-05drivers: draw565: Added bounding_box() function that returns the size of a ↵kozova1
string. This function returns a tuple of (width, height) of the string, as it would appear if used in draw.string() Signed-off-by: kozova1 <mug66kk@gmail.com>
2021-02-04draw565: Fix an out-by-one error in _bounding_boxDaniel Thompson
Currently we add an extra blank pixel to the end of the string but this is not required. Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2021-02-04apps: testapp: Ensure we test centred stringsDaniel Thompson
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2021-02-03apps: settings: Added labels to the datesIsaiah Grace
Signed-off-by: Isaiah Grace <isaiah@graces.com>
2021-02-03install: Correct the wasptool dependenciesDaniel Thompson
Fixes: a1b1502d926d ("install: Include the wasptool dependencies in the install guide") Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2021-01-30install: Include the wasptool dependencies in the install guideDaniel Thompson
Fixes: #159 Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2021-01-18apps: musicplayer: Adopt GfxButton and use it for trace fwd/backDaniel Thompson
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2021-01-18widgets: Add a button with a graphical iconDaniel Thompson
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2021-01-17drivers: st7789: Further reduce allocations during set_window()Daniel Thompson
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2021-01-17drivers: st7789: Pre-allocate a memoryviewDaniel Thompson
Reduce the cost of slicing the linebuffer by pre-allocating a memoryview. Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2021-01-17drivers: st7789: Optimize set_window()Daniel Thompson
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>
2021-01-17draw565: Optimize string drawingDaniel Thompson
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>
2021-01-17docs: appguide: Document how to upload pre-compiled filesDaniel Thompson
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2021-01-16docs: install: Clarify watch mode during updatesDaniel Thompson
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2021-01-15Disallow swipes while confirmation prompt is displayedGeorge Griffin
Signed-off-by: George Griffin <george@menomnom.com>
2021-01-15system: Move free memory capture into the switch methodDaniel 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-13docs: Move all applications out of the reference guideDaniel Thompson
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>
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-12docs: Add a link to the latest videoDaniel Thompson
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-12widgets: Clarity whether spinner max is inclusive or exclusiveDaniel Thompson
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>
2021-01-12docs: Normalize the timer app screenshotDaniel Thompson
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2021-01-12docs: Update calculator screenshotDaniel Thompson
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2021-01-12system: Fix app unregister functionChristianRomberg
Replace undefined 'instanceof' with 'isinstance' Signed-off-by: Christian Romberg <distjubo@gmail.com>
2021-01-10apps: software: Fix some scrolling bugsDaniel Thompson
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>
2021-01-10apps: play2048: Optimized the icon a littleDaniel Thompson
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.
2021-01-10apps: play2048: Add the 2048 game applicationMiguel Rochefort
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-10widgets: ConfirmationView: Restore default fontMiguel Rochefort
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>
2021-01-10simulator: tests: Update after renaming the stopwatch appDaniel Thompson
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2021-01-10apps: timer: Add a countdown timer applicationWolfgang Ginolas
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-10docs: Add some main.py examplesDaniel Thompson
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>
2021-01-10apps: music: Update the application iconDaniel Thompson
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>
2021-01-10wasptool: Allow files to be renamed during an uploadDaniel Thompson
For example: ./tools/wasptool --upload docs/main/chrono.py --as main.py Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2021-01-10TODO: Update the roadmap ready for a 0.4 release.Daniel Thompson
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>
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-10system: Allows apps to be registered using stringsDaniel Thompson
Use instance tests to identify strings and substitute then for an instanciated class. Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2021-01-10widgets: ConfirmationView: Adopt the button widgetDaniel Thompson
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-10widgets: button: Add a simple Button widgetDaniel Thompson
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2021-01-03sphinx: Fix docs build regressionDaniel Thompson
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>
2021-01-03apps: software: Add an apps to enable/disable other appsDaniel Thompson
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>
2021-01-03widgets: checkbox: Add a label propertyDaniel Thompson
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>
2021-01-03widgets: Use theme colours for text labelsDaniel Thompson
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>