1
0
Fork 0
Commit graph

711 commits

Author SHA1 Message Date
Daniel Thompson
92812e5ad2 apps: heart: Implement a debug mode to copy out raw data
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2021-05-05 21:06:39 +01:00
Daniel Thompson
3bbd808115 wasptool: Fix progress bar numbering
Currently direct callers of draw_pbar() can have 20 or more digits after
the decimal place. Fix this by moving the rounding function.

Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2021-05-05 21:02:16 +01:00
Daniel Thompson
69a989b97e apps: testapp: Force characters to render with a not-black background
This helps pick up any problems with the glpyh rendering.

Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2021-03-29 22:17:27 +01:00
Daniel Thompson
58b5c0378e draw565: Optimize the string drawing
Currently there is a redundant fill operation issued for every character
drawn. This was added to draw the background colours correctly but the
change did not account for the optimized character rendering in
_draw_glyph().

This results in ~15% performance improvement for character rendering

Fixes: cc34c5d46d ("draw565: Fix wrong background color of strings")
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2021-03-29 22:16:43 +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
Tait Berlette
79744770b0 apps: music: Change SWIPE_LEFTRIGHT to SWIPE_UPDOWN.
The music player volume control uses up and down events, but in the
foreground function the app requests left and right events.

Signed-off-by: Tait Berlette <54515877+taitberlette@users.noreply.github.com>
2021-03-27 09:08:36 +00:00
thefenriswolf
d966c960c1 wasptool: add --battery to check battery level
Signed-off-by: thefenriswolf <stefan.rohrbacher97@gmail.com>
2021-03-27 09:03:14 +00:00
Daniel Thompson
402801c538 draw565: Avoid over-long lines when handling space
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-22 08:29:06 +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
16a9253938 apps: WordClock: Update screenshot
Update the screenshot with one that reflects the updated usage
of Capital letters.

Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2021-03-10 21:37:36 +00:00
Daniel Thompson
df5aa24d2d apps: software: Automatically track y position for checkboxes
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2021-03-10 21:33:22 +00:00
Brendan M. Sleight
cec8d97aeb apps: WordClock: Add a new word-based clock app
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-10 20:55:18 +00:00
Brendan M. Sleight
867ed324b5 Update requirements.txt
Signed-off-by: Brendan M. Sleight <bms.git@barwap.com>
2021-03-09 21:15:02 +00:00
Lyz
c09a42ca4d style: fix typo in README
Signed-off-by: Lyz <lyz@riseup.net>
2021-03-09 21:08:57 +00:00
Daniel Thompson
4879b7198e apps: steps: Reduce the graphing scale
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-03-01 20:03:07 +00:00
Daniel Thompson
7a5990072c apps: steps: Add a history graph
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-25 08:00:03 +00:00
Daniel Thompson
72f5322cc3 steplogger: Write less frequently
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-25 07:49:23 +00:00
Daniel Thompson
affa101169 steplogger: Ensure today's data is updated when we provide it
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-25 07:45:53 +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
cabe6f143c tools: wasptool: Fix binary downloads for a specific special case
Currently if the binary file being downloaded contains single quote
characters then it gets wrapped differently by repr() so we have to add
additional cases to strip the wrapper.

Fix this the "obvious" way... where by "obvious" I mean almost anything
but.

Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2021-02-25 07:25:32 +00:00
Daniel Thompson
181aad6666 steplogger: Add iterator to allow UI to read the data
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2021-02-21 21:24:24 +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
b734037115 tools: wasptool: Additional adoption of the run_command wrapper
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>
2021-02-21 17:08:32 +00:00
Daniel Thompson
326caa3fa5 tool: wasptool: Add a free memory reporting tool
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2021-02-21 17:02:02 +00:00
Daniel Thompson
88347f9c7c tools: wasptool: Better REPL integration
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>
2021-02-21 17:01:36 +00:00
Daniel Thompson
80c340b005 tools: wasptool: Add push/pull commands
--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>
2021-02-21 09:53:49 +00:00
Daniel Thompson
19db3d6398 README: Update the intro after a redraft for the release announcement
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2021-02-20 12:32:28 +00:00
Daniel Thompson
1f827866d3 TODO: Finalize v0.4 changelog
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2021-02-20 11:50:04 +00:00
Daniel Thompson
8bc1f358d8 TODO: Describe goals for 0.5
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2021-02-20 11:49:48 +00:00
Daniel Thompson
2954c3b356 docs: install: Document the binary releases
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2021-02-20 11:49:27 +00:00
Piotr Tworek
0d76b1b186 st7789: Fix incorrect variable name in ST7789_SPIs. __init__ docstring.
The data signal pin name is dc, not cs.

Signed-off-by: Piotr Tworek <tworaz@tworaz.net>
2021-02-20 08:46:59 +00:00
Shuhao Wu
268f8c06e9 Added Docker setup to build wasp-os.
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>
2021-02-20 08:44:22 +00:00
Daniel Thompson
090ed8489b apps: settings: Clamp the dates a little more tightly
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-20 08:42:16 +00:00
Daniel Thompson
a0ee26a412 docs: install: Fix typo in apt-get line for buster
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2021-02-11 18:53:13 +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
kozova1
28dbc66376
drivers: draw565: Added bounding_box() function that returns the size of a 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-05 16:42:01 +02:00
Daniel Thompson
a124734ff2 draw565: Fix an out-by-one error in _bounding_box
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-04 22:15:59 +00:00
Daniel Thompson
463ba50d2b apps: testapp: Ensure we test centred strings
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2021-02-04 22:15:45 +00:00
Isaiah Grace
c686e2cae0 apps: settings: Added labels to the dates
Signed-off-by: Isaiah Grace <isaiah@graces.com>
2021-02-03 20:20:21 +00:00
Daniel Thompson
a5b2e5ec69 install: Correct the wasptool dependencies
Fixes: a1b1502d92 ("install: Include the wasptool dependencies in the install guide")
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2021-02-03 18:01:17 +00:00
Daniel Thompson
a1b1502d92 install: Include the wasptool dependencies in the install guide
Fixes: #159
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2021-01-30 12:55:28 +00:00
Daniel Thompson
40be05d261 apps: musicplayer: Adopt GfxButton and use it for trace fwd/back
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2021-01-18 21:55:02 +00:00
Daniel Thompson
6e269d5cd7 widgets: Add a button with a graphical icon
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2021-01-18 21:52:55 +00:00
Daniel Thompson
fbc806721e drivers: st7789: Further reduce allocations during set_window()
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2021-01-17 17:44:50 +00:00
Daniel Thompson
6b41c8f3db drivers: st7789: Pre-allocate a memoryview
Reduce the cost of slicing the linebuffer by pre-allocating a memoryview.

Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2021-01-17 17:44:21 +00:00
Daniel Thompson
5abae5a7f6 drivers: st7789: Optimize set_window()
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-17 16:08:27 +00:00
Daniel Thompson
2fe3ac1388 draw565: Optimize string drawing
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-17 16:03:42 +00:00
Daniel Thompson
5170b97491 docs: appguide: Document how to upload pre-compiled files
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2021-01-17 14:55:57 +00:00