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>
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).
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.
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.
If an application crashes let's report it on the device so it can be
distinguished from a hang (if nothing else it should mean we get better
bug reports).
There's a bunch of different changes here but there are only really three
big wins. The biggest win comes from restructuring the 2-bit RLE decode
loop to avoid the inner function (~20%) but the switch to 16-bit writes in
_fill() and adoption of quick_write (e.g. no CS toggling) are also
note worthy (and about 5% each).
This gives the simulator a more natural feel since the "swipe left" action
usually means "more a screen to the right". This will probably make
testing games impossible but makes it much easier to navigate the menus.
This is a big change that break compatiblity with existing applications
*and* with existing installed versions of main.py.
When upgrading it is import to update main.py:
./tools/wasptool --upload wasp/main.py
Moving it from applications into the watch is useful for two reasons.
Firstly it means applications don't need to know as much about the
display color depth and secondly it makes it easier to replace the
drawing routines with wasptool.
We now generate documentation for everything included in the PineTime
manifest (although, at this stage, not everything in the manifest has
all the required docstrings).
In addition to the fix (which is simple) we also modify the button handling
of the simulator because, rather by acident, it relies on the bugs in the
battery meter redraw to ensure the simulator stays active.
Migrate the filling of the line buffer into a seperate function.
This does naturally reduce the cost of the loop management but
much more importantly allows us to use viper native code
generator.
At this point both the simulator and a PineTime will come up
and show a clock (although in the case of the PineTime the clock
will just come up at 12:00).
Currently this supports time only (no date) and it based on the
RTCounter class which is customized for nRF ports. At present
the nRF port doesn't have proper machine.rtc support so we have
implemented within wasp instead.