From 726d5c855428239bba598a95f9a4a3e0e9c4f3aa Mon Sep 17 00:00:00 2001 From: Daniel Thompson Date: Sun, 27 Dec 2020 09:13:49 +0000 Subject: [PATCH] apps: chrono: Implement a simple analogue watch face Signed-off-by: Daniel Thompson --- README.rst | 4 ++ TODO.rst | 1 + docs/apps.rst | 11 +++++ res/ChronoApp.png | Bin 0 -> 5610 bytes wasp/apps/chrono.py | 102 ++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 118 insertions(+) create mode 100644 res/ChronoApp.png create mode 100644 wasp/apps/chrono.py diff --git a/README.rst b/README.rst index 4116cce..f565531 100644 --- a/README.rst +++ b/README.rst @@ -165,6 +165,10 @@ wasp-os also contains a library of additional applications for you to choose. These are disabled by default but can be easily enabled by adding them using one of the techniques is the Application Writer's guide. +.. image:: res/ChronoApp.png + :alt: Analogue clock application running in the wasp-os simulator + :width: 179 + .. image:: res/FiboApp.png :alt: Fibonacci clock application running in the wasp-os simulator :width: 179 diff --git a/TODO.rst b/TODO.rst index 636605c..78c9fe4 100644 --- a/TODO.rst +++ b/TODO.rst @@ -39,6 +39,7 @@ Wasp-os * [ ] Introduce fwd/back/vol+/vol- buttons to the music player * [ ] Update icon for Alarm app * [ ] Update art work for buttons in Confirmation view + * [ ] Reduce the size of the battery charge icon slightly (match bell) * [ ] Applications diff --git a/docs/apps.rst b/docs/apps.rst index c9a6bb4..f8779f0 100644 --- a/docs/apps.rst +++ b/docs/apps.rst @@ -23,6 +23,17 @@ treated as examples they are described in detail as part of the Watch faces ----------- +.. automodule:: apps.chrono + +This application is very simple and largely serves as an example of how to +implement traditional watch faces. +It is not included by default in any image. +Instead it can be transferred to the device dynamically using wasptool: + +.. code-block:: sh + + ./tools/wasptool --exec wasp/apps/chrono.py --eval 'wasp.system.register(ChronoApp())' + .. automodule:: apps.fibonacci_clock This app is enabled by default in the simulator. diff --git a/res/ChronoApp.png b/res/ChronoApp.png new file mode 100644 index 0000000000000000000000000000000000000000..bbcd751eec43ac199f78c3c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