1
0
Fork 0
Commit Graph

369 Commits (jebbatime)

Author SHA1 Message Date
ml server 3e2c687b27 rm some P8 2021-06-14 14:41:33 -06:00
ml server 2dbfd10b31 not connected. rm sim bits 2021-06-14 13:52:05 -06:00
ml server 091ea48b50 rm some ble 2021-06-14 13:38:47 -06:00
ml server ada48a8715 rm heartrate driver, maybe break sim 2021-06-14 13:13:58 -06:00
ml server b6f85dda36 rm bma421 2021-06-14 12:38:34 -06:00
ml server d1472b11ea rm bma42x-upy.... 2021-06-14 12:37:07 -06:00
ml server 7f47e75b67 rm unused boards 2021-06-14 12:16:18 -06:00
ml server 673945ff2e rm gadgetbridge/steplogger 2021-06-14 11:53:23 -06:00
ml server 728c9f3c5f rm ppg 2021-06-14 11:25:12 -06:00
jebbatime build server df6bcefdeb rm unused apps 2021-06-14 11:22:11 -06:00
ml server 2c8457f058 sim, fewer features 2021-06-12 17:43:22 -06:00
ml server 29d4b48cba no gadgetbridge 2021-06-12 15:59:27 -06:00
jebbatime build server aa56655de1 jebbatime 2021-06-12 13:49:52 -06:00
jebbatime build server 40655b78ac lobstertwobold64 2021-06-12 13:42:09 -06:00
jebbatime build server 6d3c3c2b5f lobstertwobold to python 2021-06-12 13:37:36 -06:00
Daniel Thompson fb18705b9b manager/rtc: Experimental power saving technique
Currently the time is calculated 8 times per second from (relatively) slow
python code. Optimize the power consumed by reducing the number of times
we check for wall time updates to only once-per-second and use native
code generation to reduce VM overhead when executing this critical code.

At the time of writing the difference is battery life has not yet been
measured (but we know the current master branch is worse than v0.4 and,
in theory at least, this should close the gap).

Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2021-06-04 10:49:33 +01:00
Daniel Thompson 4ad8273902 draw565: Fix bounding box calculations
wasp-os uses an drawing optimization technique to automatically place
a single pixel line on the right of glyphs when rendering them. This
results in a change to the bounding box for a rendered string (by adding
a single pixel on the right of the final character). Fix the bounding box
calculations accordingly. Among other things this eliminates graphical
artifacts when rendering labels in 2048.

Fixes: #203
Fixes: 58b5c0378e ("draw565: Optimize the string drawing")
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2021-06-04 10:46:25 +01:00
Tait Berlette 1115ac2fff MemoryError exception now shows custom message instead of CrashApp.
Signed-off-by: Tait Berlette <54515877+taitberlette@users.noreply.github.com>
2021-06-03 21:45:24 +01:00
Tait Berlette 9ded8e28a6 Added weather application.
Signed-off-by: Tait Berlette <54515877+taitberlette@users.noreply.github.com>
2021-06-03 21:43:38 +01:00
Daniel Thompson e76a4afd85 manager: Improve application registration
When an application is registered using a string that gives the class
name (e.g.  "apps.chrono.ChronoApp") when we automatically delete
the module from a couple of namespaces. This ensures the garbage
collector can do a deeper clean when the application is unregistered.

We also provide a means to directly register watch faces (e.g. to
replace the default clock).

Fixes: #214
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2021-06-03 19:57:09 +01:00
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 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
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 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
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 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
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
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 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 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