1
0
Fork 0
Commit graph

34 commits

Author SHA1 Message Date
Daniel Thompson
231f3b6fdd apps: software: Add an apps to enable/disable other apps
Currently wasp-os enables a narrow set of applications because we don't
want to consume RAM by importing the module and constructing the
application. We can improve on this situation by providing a small
(stateless) application that can be used to enable or diable applications.
This allows all the ROMed applications to be enabled using the GUI
without compromising on the ability to develop applications.

In fact this application significantlly reduces the RAM consumed in the
default case becasue the Self Test app does not need to maintain its
state.

Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2021-01-03 14:54:34 +00:00
Daniel Thompson
2641616ff6 widgets: Spinner: Add a simple spinner widget
We are able to add this to the self tests without having to create a
special page. Instead we can modify the existing notifications test
to utilize the spinner.

Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-12-29 20:07:50 +00:00
Daniel Thompson
632ec713a4 widgets: Checkbox: Add a simple checkbox widget
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-12-29 12:32:38 +00:00
Daniel Thompson
8c03ddbb7a draw565: Add width to the line drawing function
Currently all lines are a single pixel wide. To draw wider lines we
must draw two parallel lines with a single pixel offset and this is
a *very* inefficient approach, espeically on ST7789 where we spend
longer setting the clipping window than we do drawing each pixel.

Fix this by constructing a line using a variable sized square rather than
a single pixel. This will "overdraw" (some pixels will be drawn more than
once) but since square blocks can be efficiently transferred to the
display the overdraw is acceptable.

Note: It is a difficult decision whether to maintain the convention that
      color is the last argument or to keep compatibility with existing
      line drawing tests. This patch opts for the former and fixes up
      all uses within the existing codebase.

Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-12-27 08:52:54 +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
338925b4a8 apps: testapp: Make the line benchmark use 360 degrees
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-12-12 18:19:57 +00:00
Kozova1
c17abd1728 draw565: Added line drawing function
This is the API:
drawable.line(x1, y1, x2, y2, color)

The function has optimizations for the case of vertical or horizontal lines.

Signed-off-by: Kozova1 <mug66kk@gmail.com>
[daniel@redfelineninja.org.uk: Minor update to commit message]
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-12-12 18:18:01 +00:00
Daniel Thompson
e105c8bb68 apps: testapp: Add an alarm test
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-11-14 20:36:41 +00: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
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
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
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
b8efcd3053 wasp: Even more docstrings 2020-05-14 22:29:35 +01:00
Daniel Thompson
64a97fce58 wasp: testapp: Sort tests alphabetically 2020-04-12 08:40:11 +01:00
Daniel Thompson
f68eb610c5 wasp: On-device crash reporting
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).
2020-04-11 20:15:02 +01:00
Daniel Thompson
22ca8886c2 wasp: draw565: Automatic RLE format conversion
From here we can also bring colour to the launcher!
2020-04-10 20:22:51 +01:00
Daniel Thompson
841fbef8a6 wasp: testapp: Add RLE drawing benchmarks. 2020-04-06 22:04:21 +01:00
Daniel Thompson
8ed80eeeba wasp: launcher: Experimental launcher implementation
It is not really the launcher itself that is immature. Rather that the
framework and UI concepts to move between applications isn't complete
yet.
2020-04-06 22:04:21 +01:00
Daniel Thompson
2b5ebcef72 wasp: widgets: Add a scrolling indicator
As we enrich the navigation options we will increasinly need to visualize
between apps where up/down will switch us between rings and there
up/down is needed to scroll through content.
2020-04-06 22:04:21 +01:00
Daniel Thompson
bb4e76d852 wasp: testapp: Add an option to force an exception
We will shortly be adding machinary to handle application errors more
gracefully. This is a useful way to force an application error!
2020-04-06 22:04:20 +01:00
Daniel Thompson
83cc56969e wasp: manager: make sleep() and background() callbacks optional
Making callbacks optional reduces pointless boilerplate in applications.
2020-04-06 22:04:20 +01:00
Daniel Thompson
b2622b579d wasp: Add button presses to the event system.
Here the biggest changes are in the test application because we
refactor a number of the tests to make better use of the button.

Although applications may consume button events it does have a
default behavior which is to switch to the default application
(usually the clock).
2020-04-06 22:04:20 +01:00
Daniel Thompson
0cc7987689 apps: Remove unused support for effect animation
After a bit of testing I have not yet come up with a fast, visually
acceptable horizontal animated effect. Instead we simply reply on
screen blanking during the redraw... meaning there is no need for an
effect hint.
2020-04-06 22:04:20 +01:00
Daniel Thompson
d10f3dbc49 wasp: Get the terminology straight
As it turned out Direction was only a Direction because there were things
missing from the enumeration!
2020-04-06 22:04:20 +01:00
Daniel Thompson
a9413db5cf wasp: Move the constants into seperate container classes 2020-03-26 20:42:03 +00:00
Daniel Thompson
b9fe31241c Add licensing information for all wasp-os files. 2020-03-22 15:40:18 +00:00
Daniel Thompson
f8bd1a7461 Rename manager.py and expose its interfaces to all applications
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
2020-03-22 12:37:19 +00:00
Daniel Thompson
5a234c16ad wasp: Rotate the swipe UI by 90 degrees
This is something of an experiment but now the app roll is traversed using
horizontal swipes and applications should primarily use vertical swipes
to navigate internally. This is mostly because if "feels" better but it
also leaves the vertical scrolling hardware available for use by the
app.
2020-03-13 19:02:29 +00:00
Daniel Thompson
031d139b7c wasp: draw565: Refactor to allow apps to focus on the drawable. 2020-03-09 00:00:13 +00:00
Daniel Thompson
5413d826d7 wasp: Re-factor how Draw565 is used.
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.
2020-03-08 23:16:30 +00:00
Daniel Thompson
24438ad05d testapp: Smoother transitions between tests 2020-03-08 21:31:17 +00:00
Daniel Thompson
d236db68dc testapp: Show the render time for the string test 2020-03-08 21:22:54 +00:00
Daniel Thompson
cfffeddd77 wasp: testapp: Extend with a string render test 2020-03-08 20:48:48 +00:00
Daniel Thompson
799a66c9b9 wasp: Move the apps into their own directory. 2020-03-08 17:39:39 +00:00
Renamed from wasp/testapp.py (Browse further)