summaryrefslogtreecommitdiff
path: root/wasp
AgeCommit message (Collapse)Author
2021-03-22draw565: Avoid over-long lines when handling spaceDaniel Thompson
Currently, if the line wrapper attempts to break a line on a space and that space character is outside the bounding box, then we generate an over-long line. Fix this by handling line break generation *after* we have checked the length of the current line. Fixes: #193 Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2021-03-10apps: software: Include word clock in the available applicationsDaniel Thompson
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2021-03-10apps: software: Automatically track y position for checkboxesDaniel Thompson
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2021-03-10apps: WordClock: Add a new word-based clock appBrendan M. Sleight
Signed-off-by: Brendan M. Sleight <bms.git@barwap.com> [daniel@redfelineninja.org.uk: Squashed down into a single commit and updated subject] Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk
2021-03-09Update requirements.txtBrendan M. Sleight
Signed-off-by: Brendan M. Sleight <bms.git@barwap.com>
2021-03-01apps: steps: Reduce the graphing scaleDaniel Thompson
Currently then even fast walking will run off the top of the graph. Change the scale to that fast walking shows in full. I think at this level fast running will probably run off the top but I need to gather a few more details before settling on the final scale. Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2021-02-25apps: steps: Add a history graphDaniel Thompson
The steplogger records steps but currently there is no way to see the data recorded on the device itself. Make a first attempt at graphing the step data. Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2021-02-25steplogger: Write less frequentlyDaniel Thompson
Currently we dump the step data every 30 minutes. This was a good interval for testing but we can extend it a little without any problems. Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2021-02-25steplogger: Ensure today's data is updated when we provide itDaniel Thompson
Currently steps from the last six minutes do not appear in the data. We can fix this by updating the data before creating the iterator. Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
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-21steplogger: Add iterator to allow UI to read the dataDaniel Thompson
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2021-02-21steplogger: Introduce code to perform data loggingDaniel Thompson
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-20st7789: Fix incorrect variable name in ST7789_SPIs. __init__ docstring.Piotr Tworek
The data signal pin name is dc, not cs. Signed-off-by: Piotr Tworek <tworaz@tworaz.net>
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-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-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-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-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-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-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-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-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>