1
0
Fork 0
Commit graph

96 commits

Author SHA1 Message Date
Daniel Thompson
0edee8067e simulator: Start with a higher initial voltage
Starting with the battery full makes testing the battery meter easier...

Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-12-28 12:01:51 +00:00
Daniel Thompson
2034340f3b tests: Auto-discover applications and try to switch to them
Currently `make check` doesn't test any not-default applications.
Fix this by automatically discovering constructors and ensure that the
application can be started and stopped without generating an exception.

Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-12-26 18:07:45 +00:00
Daniel Thompson
784c9bb36d apps: testapp: Automatically report free memory
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-12-13 16:07:24 +00:00
Daniel Thompson
941d4a264d boards: simulator: Additional tests
Start to work (most of) the code paths in the self test application.

Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-12-12 18:15:15 +00:00
Daniel Thompson
e3b2c7bf7d boards: simulator: Improve spi.write() simulation
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-12-12 12:57:06 +00:00
Daniel Thompson
896a4e1a8d simulator: Suppress the pysdl2/numpy warning
This makes the simulator look nicer when it starts up... but it
doesn't help the simulator.

Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-12-04 20:35:16 +00:00
Daniel Thompson
46bd454392 simulator: test: Grey box stopwatch test
Currently we can act on the controls but we cannot "see" the display
in the test suite. That leads us to a slightly odd form of "grey box"
testing. It's functionally black box testing but some of the asserts
have to reach inside the components instead of looking at the display.

Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-12-04 20:34:23 +00:00
Daniel Thompson
901e43870e simulator: tests: Parameterize the basic app tests
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-12-04 20:32:40 +00:00
Daniel Thompson
f1f5cc9e0c simulator: Introduce fully automatic testint
Currently the tests do little more than fire up the simulator and
switch into (and out of) the built in applications. However this is
useful and allows us to fully integrate as a CI job.

Unfortunately the numpy warning from pysdl2 mean we have been forced
to disable all warnings to prevent pytest from collecting and reporting
them.

Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-12-04 20:11:41 +00:00
Carlosgg
3fb1faceab Notify level in settings app
Signed-off-by: Carlos Gil Gonzalez <carlosgilglez@gmail.com>
[daniel@redfelineninja.org.uk: Fixed board support for simulator and
sphinx (a.k.a. doc builder)]
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-11-29 20:20:03 +00:00
Johannes Wache
e450ccf9f0 apps: snake: Add a snake game application
Signed-off-by: Johannes Wache <jbwa@posteo.de>
[daniel@redfelineninja.org.uk: Removed some couple of unwanted merge artifacts]
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-11-29 20:08:59 +00:00
Daniel Thompson
233c136a5c apps: alarm: Add the alarm app to the library
Like the other library applications this is enabled in the simulator and
included in the flash image but is disabled by default to conserve RAM
(and to give time to new apps to mature and receive improvements).

Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-11-29 19:14:31 +00:00
Daniel Thompson
66cbfa20e8 sphinx: icons: Get the doc build working again
Fixes: 393dfefc86 ("apps: pager: notifications: Added remove all notifications dialog")
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-11-29 19:12:54 +00:00
Daniel Thompson
748e5fe65a docs: Wordsmtithing updates after review
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-11-22 09:25:24 +00:00
Daniel Thompson
fd0e0d77aa [pinetime,p8,k9]: Show when main.py is running
This is yet another step towards making the role of main.py more obvious.

Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-11-14 20:40:16 +00:00
Daniel Thompson
d0a99d5636 manager: Implement alarm callbacks for applications to use
Create a simple time queue where actions (functions or bound methods) can
be queued against the real time clock.

Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-11-14 12:24:28 +00:00
Daniel Thompson
d2357f2325 simulator: Enable the music app in the simulator
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-11-12 21:47:38 +00:00
Carlosgg
306a1ec0a4 apps: Add music player app with GadgetBridge support
Signed-off-by: Carlos Gil <carlosgilglez@gmail.com>
[daniel@redfelineninja.org.uk: fix regressions on simulator, disable by
default (for now) on real hardware and remove a couple of whitespace
changes to existing files]
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-11-12 21:44:22 +00:00
Daniel Thompson
06f1ed36b0 docs: Add an Application Library chapter
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-11-08 14:28:38 +00:00
Daniel Thompson
c1c66fb487 boards: Introduce a shared manifest for all 240x240 devices
This also adds the Fibonaci Clock, Haiku viewer and the Game of Life
to the manifest. They are *not* registered by default at this point
since, although we can currently spare the internal flash space there
is more competition for RAM so we have to trade off out-of-the-box
convenience with keeping as much RAM as possible for users to do
"cool things".

Given the zen of wasp-os is to try to make is as easy as possible for
users to become coders we currently favour reserving the space for the
cool things (and implicitly encouraging them to write a couple of lines
of python to enable the bonus applications.

Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-10-10 14:04:44 +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
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
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
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
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
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
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
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
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
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
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
e391480b50 wasp: watch: docstrings for the watch namespace 2020-05-14 23:22:57 +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