1
0
Fork 0
Commit graph

189 commits

Author SHA1 Message Date
Daniel Thompson
11640d8362 apps: haiku: Add a simple Haiku viewer
This app serves as an example of using the filesystem to make an
application more flexible. Both the verses and the icon will be
loaded from the filesystem rather than being burned into the
wasp-os binaries.

Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-10-10 12:12:59 +01:00
Daniel Thompson
6e91e0e414 drivers: flash: Automatic wake/sleep to minimise idle current
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-10-10 11:45:25 +01:00
Daniel Thompson
b9daf05fbc boards: pinetime: Don't add nor_cs to the namespace
Having an extra identifier for the Pin() is a waste of RAM... if you need
the CS pin then grab it from watch.flash._cspins instead.

Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-10-10 11:30:32 +01:00
Daniel Thompson
942e9f0bb4 apps: pager: Avoid crashes for notifications with no body
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-10-10 11:28:25 +01:00
Jeffrey Bailey
f924bb6414 boards: Remove flash wake up commands
Wake from deep power down is now handled in the driver. Remove attempt
to wake the board files.

Signed-off-by: Jeffrey Bailey <wb.jeffrey@gmail.com>
[daniel@redfelineninja.org.uk: Update commit message, simplify
slightly, extended to all boards with spinor flash and update
gitmodules to bring in the flash driver updates.]
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-09-27 14:26:29 +01:00
Daniel Thompson
7075f5689e wasp: Fix broken indention
Currently the simulator cannot run correctly because the indentation
in Manager.__init__ mixes tab and spaces. This is something CPython3
doesn't like but MicroPython is ok about.

Fix the obvious by using correct indentation.

Fixes: 889115f ("wasp: Allow app initialization to fail")
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-09-22 21:14:45 +01:00
Daniel Thompson
6bf350a6e9 drivers: cst816s: Clear the event buffer during a wake up
Currently with CST816S controllers (but not CST716S controllers) then a
swipe delivered whilst the device is asleep will sometimes be processed
after we wake it up. That's never likely to be useful. Fix this by
explicitly clearing the event buffer as part of the wakeup sequence.

Reported-by: Siroj42 <siroj42@users.noreply.github.com>
Fixes: #65
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-09-21 20:12:38 +01:00
Daniel Thompson
889115f4b0 wasp: Allow app initialization to fail
Colmi has released a new revision of the P8 hardware based on a different
accelerometer. That makes it impossible for the StepCounterApp to
initialize and currently this takes down the whole GUI due to the
uncaught exception.

Fix this by skipping applications that will not initialize.

Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-09-16 21:47:22 +01:00
Daniel Thompson
e8ae2ed47e boards: simulator: Add an screenshot facility
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-16 18:49:40 +01:00
Daniel Thompson
9877ea99bd README: Add a (fairly) comprehensive screenshot tour
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-08-16 18:48:15 +01:00
Daniel Thompson
cd97893d2c apps: stopwatch: Add NEXT support
On a device with NEXT support we need to make sure we reset the stopwatch
when switching away from it (if it is not running) since there may not
be any other way to reset it.

Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-08-15 20:43:22 +01:00
Daniel Thompson
44ba8ebd22 drivers: cst816s: Handle a failure to sleep
Exceptions on th sleep path more or less kill the device (it is half
alseep and is not on... but not off enough for the power button to work.

Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-08-15 20:40:26 +01:00
Daniel Thompson
34ca73ee60 gadgetbridge: Disable the not-implemented message
Currently the not-implemented message provokes GadgetBridget into
issuing lots of annoying toaster messages. It's still useful for debugging
but let's disable it by default.

Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-08-15 20:37:52 +01:00
Daniel Thompson
5ae327ea54 wasp: Introduce a NEXT event
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-08-15 17:00:49 +01:00
Daniel Thompson
a87b3faa4a k9: Disable safe-mode
Currently the K9 is wedged in safe-mode. Oops! Fix this.

Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-08-15 16:56:28 +01:00
Daniel Thompson
d535b8b16c k9: watch.py.in: Fix backlight
Currently the backlight is permanently on at its lowest level. The
backlight is so dim that this is almost impossible to detect. I only
found it when lying in a field in total darkness and observing that the
screen wasn't quite as black as I expected.

Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-08-15 16:55:56 +01:00
Daniel Thompson
a47e0921b3
Merge pull request #48 from Siroj42/master
Fix background color of strings.
2020-08-09 21:23:39 +01:00
Daniel Thompson
2d1942f76a k9: Add support for Senbono K9
The K9 is similar to the PineTime and P8 devices but does not appear
to use the CST[78]16 touch screen controllers. At present the protocol
is not known (readfrom yields all zeros, readfrom_mem provokes an
exception) so we have a hugely limited interface consisting of the side
button and the touchscreen interrupts (in other words we can treat the
touchscreen like a second button).

Works suprisingly well considering...

Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-08-09 20:06:45 +01:00
Siroj42
cc34c5d46d draw565: Fix wrong background color of strings
Signed-off-by: Joris Warmbier <siroj42@t-online.de>
2020-08-02 21:55:04 +02:00
Daniel Thompson
13b35611e2 boards: p8: Full support for Colmi P8
All the components (bootloader, reloader, micropython) has P8 support added
some time back but without full integration at the wasp-os level. Let's
add it!

Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-07-27 22:15:42 +01:00
Daniel Thompson
326e06bc6b StatusBar: Rename and add BLE connection status icon
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-24 17:04:46 +01:00
Daniel Thompson
a01fb7df57 Introduction basic notification support
This requires a modified version of Gadgetbridge and currently works by
implementing the BangleJS protocol.

In Gadgetbridge ensure "Sync time" is *not* set and choose "Don't pair"
when adding the PineTime device.
2020-07-19 20:50:33 +01:00
Daniel Thompson
c739df119b boards: simulator: Swap up/down swipe detection
Fix swipe detection so it matches the real device.

Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-07-09 22:29:57 +01:00
Daniel Thompson
eac72188cf simulator: Provide a special main.py for the simulator
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-07-07 21:22:12 +01:00
Daniel Thompson
ae5743529f wasp: Switch to scheduling from interrupt
This has two useful properties. Firstly it means the watch will be
maintained in the background, allowing the REPL to be used for
notifications and other updates. Secondly it will save a little bit
of power by reducing the work needed to handle spurious wake ups.

Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-06-30 23:04:01 +01:00
Daniel Thompson
11be7ca328 apps: stopwatch: Improve splits... and colour scheme
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-06-27 14:34:36 +01:00
Daniel Thompson
7b3e0f917d boards: simulator: Add swipe detection and button support
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-27 12:22:23 +01:00
Daniel Thompson
eb8dfcc57c boards: spinx: Fix the documentation generation
Currently the template app documentation will not generate. Fix that!

Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-06-25 22:08:02 +01:00
Daniel Thompson
95e129e331 ppg: Pull the PPG signal processing into a seperate library
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-06-25 21:59:32 +01:00
Daniel Thompson
e6811bb693 apps: heart: Initial heart rate detection
The algorithm is fairly crude and the GUI is pretty simple but, if you stay
still for 10 seconds, there's a good chance of an accurate pulse
reading.

Of course if you jog on the spot for ten seconds it more likely to
calculate how many steps per minutes you are performing!

Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-06-24 21:20:47 +01:00
Daniel Thompson
b1faec667d simulator: Reverse the simulated PPG waveform
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-24 21:20:47 +01:00
Daniel Thompson
88418fd1b5 apps: heart: Introduce simple app for the heart rate sensor
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-22 22:51:06 +01:00
Daniel Thompson
417e408dc4 drivers: hrs3300: Add a basic HRS3300 sensor driver
Add the driver and enable it on PineTime.

Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-06-22 22:22:40 +01:00
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