1
0
Fork 0
Commit graph

156 commits

Author SHA1 Message Date
Daniel Thompson
bbe8add40c wasp: Switch to the faster fill routines
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-06-22 22:21:13 +01:00
Daniel Thompson
04a8daeff4 draw565: Optimize filled rectangle drawing
The original approach is *really* bad at drawing vertical lines (it ends
up working a pixel at a time and works the chip select for each one.

Optimize both the pixel fill and the use of the line buffer. The result
is 20% faster for quarter screen fills, 3x for horizontal lines and 6x
for vertical lines.

Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-06-22 22:20:34 +01:00
Daniel Thompson
d81e8e75ac apps: testapp: Filled rectangle drawing benchmarks
Measure the performance of the quarter screen fill, horizontal lines and
vertical lines.

Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-06-22 22:17:06 +01:00
Daniel Thompson
6c7337fb1e dsd6, nitrogen: Make them build again
Fixes: 9eb9b74 ("Update preprocess to use $(BOARD)").
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-06-17 21:35:19 +01:00
Daniel Thompson
823e85584d apps: [steps,stopwatch]: Increase font size of clock
We also change the colour scheme slightly because the increased size of
the clock interferes visually with the main display when it is bright
white.

Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-06-12 08:53:32 +01:00
Daniel Thompson
bd41368d2b apps: steps: Fix the overnight step counter reset
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-06-12 08:52:36 +01:00
Daniel Thompson
ab33027fff drivers: bma421: Reduce the post-reset delay
There nothing in the docs to give the delay time required after a
reset. Currently we use 200ms because that appears on some older
code for BMA423 but is removed in more recent drivers. 50ms is still
a long time (for hardware) and has held up in testing.

Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-06-12 08:51:44 +01:00
Daniel Thompson
93b3c2bf1a wasp: simulator: Improve the RTC
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-06-12 08:49:54 +01:00
Fuji Pebri
df9d80f6f7 drivers: cst816s: optimize for power saving and responsiveness
Signed-off-by: Fuji Pebri <pebri86@gmail.com>
[daniel@redfelineinja.org.uk: removed leading underscore from method
arguments, removed redundant state tracking, adopt i2c.writeto_mem]
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-06-11 21:17:16 +01:00
Daniel Thompson
acf318c122 wasp: simulator: Add interupt support for CST816S
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-06-11 21:15:47 +01:00
Daniel Thompson
93d10f74fb fonts: Add sans28 (numerals only) 2020-06-11 20:37:03 +01:00
Daniel Thompson
12e883e68b boards: pinetime: Improve safe mode implementation 2020-06-10 08:52:46 +01:00
Daniel Thompson
ccaf12750b wasp: apps: Step counter application
Currently there's no fancy algorithms to estimate stride length. Just
pure simple step counting directly from the hardware's "intelligence
engine".

Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-06-09 21:31:55 +01:00
Daniel Thompson
d62e6a22c7 Fix symbol lookup error (knob2) 2020-06-04 22:57:50 +01:00
Daniel Thompson
4c7e92d964 apps: settings: Adopt the slider... it looks more interesting 2020-05-24 14:20:20 +01:00
Daniel Thompson
de647b324c widgets: Introduce a slider widget
Currently the slider doesn't actually slide (because we process touch
events rather than swipe events) but we've called is a slider anyway.
2020-05-24 14:20:02 +01:00
Daniel Thompson
57999226fd draw565: rle2bit: Add support for palette overrides
This allows some interesting manipulations of 2-bit images.
2020-05-24 14:19:04 +01:00
Daniel Thompson
60bb43e87b apps: gameoflife: Better pixel colour selection 2020-05-18 22:19:19 +01:00
Daniel Thompson
7f6b1b9059 draw565: Switch to a different palette for RLE 2-bit images
This is an incompatible change... older 2-bit images will need to be
re-encoded to display correctly.
2020-05-18 22:17:51 +01:00
Daniel Thompson
d9bdb0c82f boards: Remove demo.py from the manifests
Fixes: #25
2020-05-18 08:12:00 +01:00
Daniel Thompson
b9e82424e9 apps: demo: Move the logo into the demo app
The logo module is currently unused but it simply sits there consuming
flash. Let's shift it to the demo app to is can consume RAM instead (but
only when we upload the demo to the watch).
2020-05-17 14:37:44 +01:00
Daniel Thompson
ac1a799bfa draw565: Fix line optimization code
sx is measured in pixels (2-bytes) and len(display.linebuffer) gives
a value in bytes so the divisor isn't right.

Whilst we are here let's make sure we use integer division too.

Fixes: #18
2020-05-17 09:47:15 +01:00
Daniel Thompson
4906d46ff4 apps: demo: Move the demo code into a fully fledged application 2020-05-17 09:45:16 +01:00
Daniel Thompson
e391480b50 wasp: watch: docstrings for the watch namespace 2020-05-14 23:22:57 +01:00
Daniel Thompson
d11e6eb4a1 Make wasp-os namig consistant
Rename WASP to wasp-os (or Wasp-os)
2020-05-14 22:41:05 +01:00
Daniel Thompson
b8efcd3053 wasp: Even more docstrings 2020-05-14 22:29:35 +01:00
Daniel Thompson
f07fb6d22a wasp: draw565: docstrings for headings and __init__ 2020-05-14 21:44:05 +01:00
Daniel Thompson
42fe7bf352 drivers: vibrator: Finalize docstrings 2020-05-14 21:42:16 +01:00
Daniel Thompson
95f1788347 drivers: st7789: Finalize docstrings 2020-05-14 21:41:02 +01:00
Daniel Thompson
9274d8cc2d drivers: signal: Finalize docstrings 2020-05-14 21:39:14 +01:00
Daniel Thompson
880083977c drivers: nrf_rtc: Finalize docstrings 2020-05-14 21:36:33 +01:00
Daniel Thompson
d5c629a9ac drivers: cst816s: Finalize docstrings 2020-05-14 21:36:09 +01:00
Daniel Thompson
85079c149b drivers: battery: Finalize docstrings 2020-05-14 21:32:01 +01:00
Daniel Thompson
93ad0e6972 wasp: draw565: docstring improvements 2020-05-11 23:07:35 +01:00
Daniel Thompson
a2fd52ef2b docs: Introduce the Application Writer's Guide. 2020-05-11 21:44:30 +01:00
Daniel Thompson
fe1bbbac52 apps: template: Fix broken docstring 2020-05-10 09:34:57 +01:00
Daniel Thompson
09071427e4 drivers: nrf_rtc: Fix some tab/space issues
These issues do not appear when parsing with micropython but when we
import this file into sphinx then things go a bit south.
2020-05-10 09:34:22 +01:00
Daniel Thompson
a4c62bb818 wasp: apps: Remove __init__.py
wasp-os contains circular import dependancies (wasp includes apps which
include wasp) but this is normally harmless.

However using __init__.py exagerated to the problem and since the benefit
of the __init__ file is pretty anyway the let's just remove it.
2020-05-10 09:33:26 +01:00
Daniel Thompson
c1f8823f61 Add PNVRAM support to avoid forgetting the time during a reboot. 2020-05-09 14:19:10 +01:00
Daniel Thompson
2d437b0f68 wasp: drivers: nrf_rtc: Fix a nasty bug when setting the time
The code to recalculate the uptime to walltime adjustment was broken
(e.g. the longer we leave it after reboot the more inaccurate the time
setting becomes).

Fixes: 80079e4 ("wasp: nrf_rtc: Add a tiny bit of extra resolution")
2020-04-26 15:01:48 +01:00
Daniel Thompson
6729ac67a5 apps: launcher: Add a scroll ready indicator 2020-04-26 15:01:48 +01:00
Daniel Thompson
8b2ba4e79c apps: launcher: Make app.ICON optional 2020-04-26 15:01:48 +01:00
Daniel Thompson
e854998268 apps: stopwatch: Fix redraw bug (and remove some old test code) 2020-04-26 15:01:48 +01:00
Daniel Thompson
9348e758b2 wasp: nrf_rtc: Add a tiny bit of extra resolution
We now have a couple of applications (stopwatch, Game of Life) that benefit
from sub-second precision. The micropython RTC/utime code for nrf still
needs a major overhaul but this allows us to paper over the cracks for
just a little longer.
2020-04-26 15:01:48 +01:00
Daniel Thompson
5b277e94f1 wasp: Manager: Avoid printing the stack trace when it can cause problems
On nRF devices if we print with the NUS console disconnected (instead
of never connected) then things we can end up hanging. Better only
to print an exception if the watch class contains a method to do
that.
2020-04-26 15:01:48 +01:00
Daniel Thompson
880764da7d wasp: apps: Conway's Game of Life 2020-04-18 11:54:03 +01:00
Daniel Thompson
bfd914a5d1 boards: simulator: Add ptr32 support 2020-04-17 17:19:11 +01:00
Daniel Thompson
66743d42c8 wasp: Manager: Bring in proper separation of apps
This is getting us much closer to the final UI concept. We have a
quick ring from which we can select typical apps such as clock and
stopwatch which will (eventually) be supplemented with step counting
and heart rate monitoriing. More exotic apps (currenrtly torch, self
test, settings) are all relagated to the launcher ring.
2020-04-14 20:05:57 +01:00
Daniel Thompson
10706a9704 wasp: stopwatch: Replace the stub with a "real" implementation
There are still some holes here. In particular the RTC resolution on
nRF devices (such as PineTime) is currently a full second (meaning
the centiseconds will always be zero. Nevertheless that isn't the apps
fault... as we can see when we run on the simulator.
2020-04-14 20:03:04 +01:00
Daniel Thompson
5fc802fb78 wasp: Manager: Push exceptions to the console as well as the crash app 2020-04-14 20:00:49 +01:00