summaryrefslogtreecommitdiff
path: root/wasp/apps
diff options
context:
space:
mode:
Diffstat (limited to 'wasp/apps')
-rw-r--r--wasp/apps/calc.py6
-rw-r--r--wasp/apps/clock.py11
-rw-r--r--wasp/apps/flashlight.py11
-rw-r--r--wasp/apps/haiku.py3
-rw-r--r--wasp/apps/heart.py17
-rw-r--r--wasp/apps/launcher.py11
-rw-r--r--wasp/apps/settings.py28
-rw-r--r--wasp/apps/snake.py6
-rw-r--r--wasp/apps/software.py14
-rw-r--r--wasp/apps/steps.py19
-rw-r--r--wasp/apps/stopwatch.py17
-rw-r--r--wasp/apps/testapp.py14
12 files changed, 93 insertions, 64 deletions
diff --git a/wasp/apps/calc.py b/wasp/apps/calc.py
index 1268a26..e283290 100644
--- a/wasp/apps/calc.py
+++ b/wasp/apps/calc.py
@@ -1,9 +1,13 @@
# SPDX-License-Identifier: LGPL-3.0-or-later
# Copyright (C) 2020 Johannes Wache
-"""Calculator application
+"""Calculator
+~~~~~~~~~~~~~
This is a simple calculator app that uses the build-in eval() function to
compute the solution.
+
+.. figure:: res/CalcApp.png
+ :width: 179
"""
import wasp, fonts
diff --git a/wasp/apps/clock.py b/wasp/apps/clock.py
index 9e6ba05..5c7854d 100644
--- a/wasp/apps/clock.py
+++ b/wasp/apps/clock.py
@@ -5,6 +5,9 @@
~~~~~~~~~~~~~~~~
Shows a time (as HH:MM) together with a battery meter and the date.
+
+.. figure:: res/ClockApp.png
+ :width: 179
"""
import wasp
@@ -21,13 +24,7 @@ DIGITS = (
MONTH = 'JanFebMarAprMayJunJulAugSepOctNovDec'
class ClockApp():
- """Simple digital clock application.
-
- .. figure:: res/ClockApp.png
- :width: 179
-
- Screenshot of the clock application
- """
+ """Simple digital clock application."""
NAME = 'Clock'
ICON = icons.clock
diff --git a/wasp/apps/flashlight.py b/wasp/apps/flashlight.py
index f5b8684..fa734c7 100644
--- a/wasp/apps/flashlight.py
+++ b/wasp/apps/flashlight.py
@@ -5,6 +5,9 @@
~~~~~~~~~~~~~
Shows a pure white screen with the backlight set to maximum.
+
+.. figure:: res/TorchApp.png
+ :width: 179
"""
import wasp
@@ -12,13 +15,7 @@ import wasp
import icons
class TorchApp(object):
- """Trivial flashlight application.
-
- .. figure:: res/TorchApp.png
- :width: 179
-
- Screenshot of the flashlight application
- """
+ """Trivial flashlight application."""
NAME = 'Torch'
ICON = icons.torch
diff --git a/wasp/apps/haiku.py b/wasp/apps/haiku.py
index ca5c3f4..2e8c8a6 100644
--- a/wasp/apps/haiku.py
+++ b/wasp/apps/haiku.py
@@ -6,6 +6,9 @@
These three lines poems are fun to write and fit nicely on a tiny screen.
+.. figure:: res/HaikuApp.png
+ :width: 179
+
If there is a file called haiku.txt in the flash filesystem then this app
allows it to be displayed three lines at a time using the pager.
diff --git a/wasp/apps/heart.py b/wasp/apps/heart.py
index 45b3a69..541e57d 100644
--- a/wasp/apps/heart.py
+++ b/wasp/apps/heart.py
@@ -1,18 +1,21 @@
# SPDX-License-Identifier: LGPL-3.0-or-later
# Copyright (C) 2020 Daniel Thompson
+"""Heart rate monitor
+~~~~~~~~~~~~~~~~~~~~~
+
+A graphing heart rate monitor using a PPG sensor.
+
+.. figure:: res/HeartApp.png
+ :width: 179
+"""
+
import wasp
import machine
import ppg
class HeartApp():
- """Heart Rate Sensing application.
-
- .. figure:: res/HeartApp.png
- :width: 179
-
- Screenshot of the heart rate application
- """
+ """Heart rate monitor application."""
NAME = 'Heart'
def foreground(self):
diff --git a/wasp/apps/launcher.py b/wasp/apps/launcher.py
index b529017..735ac70 100644
--- a/wasp/apps/launcher.py
+++ b/wasp/apps/launcher.py
@@ -3,19 +3,16 @@
"""Application launcher
~~~~~~~~~~~~~~~~~~~~~~~
+
+.. figure:: res/LauncherApp.png
+ :width: 179
"""
import wasp
import icons
class LauncherApp():
- """An application launcher application.
-
- .. figure:: res/LauncherApp.png
- :width: 179
-
- Screenshot of the application launcher
- """
+ """An application launcher application."""
NAME = 'Launcher'
ICON = icons.app
diff --git a/wasp/apps/settings.py b/wasp/apps/settings.py
index c11c971..c4708e2 100644
--- a/wasp/apps/settings.py
+++ b/wasp/apps/settings.py
@@ -1,20 +1,30 @@
# SPDX-License-Identifier: LGPL-3.0-or-later
# Copyright (C) 2020-21 Daniel Thompson
+"""Settings application
+~~~~~~~~~~~~~~~~~~~~~~~
+
+Allows a very small set of user preferences (including the date and
+time) to be set on the device itself.
+
+.. figure:: res/SettingsApp.png
+ :width: 179
+
+.. note::
+
+ The settings tool is not expected to comprehensively present every
+ user configurable preference. Some are better presented via a
+ companion app and some particular exotic ones are perhaps best
+ managed with a user-provided ``main.py``.
+"""
+
+
import wasp
import fonts
import icons
class SettingsApp():
- """Ultra-simple settings application.
-
- Currently the settings application contains only one setting: brightness
-
- .. figure:: res/SettingsApp.png
- :width: 179
-
- Screenshot of the settings application
- """
+ """Settings application."""
NAME = 'Settings'
ICON = icons.settings
diff --git a/wasp/apps/snake.py b/wasp/apps/snake.py
index e1a853a..fc00138 100644
--- a/wasp/apps/snake.py
+++ b/wasp/apps/snake.py
@@ -1,9 +1,8 @@
# SPDX-License-Identifier: LGPL-3.0-or-later
# Copyright (C) 2020 Johannes Wache
-"""
-Snake Game
-~~~~~~~~~~
+"""Snake Game
+~~~~~~~~~~~~~
This is a classic arcade game called snake.
@@ -174,4 +173,3 @@ class Snake():
draw = wasp.watch.drawable
draw.fill(x=self.oldtail[0],y=self.oldtail[1],w=15,h=15,bg=0x0000)
draw.fill(x=self.body[-1][0]+1,y=self.body[-1][1]+1,w=13,h=13,bg=0xffff)
-
diff --git a/wasp/apps/software.py b/wasp/apps/software.py
index a7c07eb..b45cc0e 100644
--- a/wasp/apps/software.py
+++ b/wasp/apps/software.py
@@ -1,6 +1,18 @@
# SPDX-License-Identifier: LGPL-3.0-or-later
# Copyright (C) 2020 Daniel Thompson
-"""Wizard to generate main.py."""
+"""Software
+~~~~~~~~~~~
+
+A tool to enable/disable applications.
+
+.. figure:: res/SoftwareApp.png
+ :width: 179
+
+Most applications are disabled by default at boot in order to conserve
+RAM (which is in short supply and very useful to anyone wanting to
+write an application). This tools allows us to boot and conserve RAM
+whilst still allowing users to activate so many awesome applications!
+"""
import wasp
import icons
diff --git a/wasp/apps/steps.py b/wasp/apps/steps.py
index c7899a6..8945d5f 100644
--- a/wasp/apps/steps.py
+++ b/wasp/apps/steps.py
@@ -1,6 +1,17 @@
# SPDX-License-Identifier: LGPL-3.0-or-later
# Copyright (C) 2020 Daniel Thompson
+"""Step counter
+~~~~~~~~~~~~~~~
+
+Provide a daily step count.
+
+ .. figure:: res/StepsApp.png
+ :width: 179
+
+The step counts automatically reset at midnight.
+"""
+
import wasp
import fonts
@@ -30,13 +41,7 @@ feet = (
)
class StepCounterApp():
- """Step counter application.
-
- .. figure:: res/StepsApp.png
- :width: 179
-
- Screenshot of the step counter application
- """
+ """Step counter application."""
NAME = 'Steps'
ICON = icons.app
diff --git a/wasp/apps/stopwatch.py b/wasp/apps/stopwatch.py
index f46baa0..c46226e 100644
--- a/wasp/apps/stopwatch.py
+++ b/wasp/apps/stopwatch.py
@@ -1,19 +1,22 @@
# SPDX-License-Identifier: LGPL-3.0-or-later
# Copyright (C) 2020 Daniel Thompson
+"""Stopwatch
+~~~~~~~~~~~~
+
+Simple stop/start watch with support for split times.
+
+.. figure:: res/StopclockApp.png
+ :width: 179
+"""
import wasp
import icons
import fonts
class StopwatchApp():
- """Stopwatch application.
-
- .. figure:: res/StopclockApp.png
- :width: 179
-
- Screenshot of the stopwatch application
- """
+ """Stopwatch application."""
# Stopwatch requires too many pixels to fit into the launcher
+
NAME = 'Stopclock'
ICON = icons.app
diff --git a/wasp/apps/testapp.py b/wasp/apps/testapp.py
index acd1735..5e4832f 100644
--- a/wasp/apps/testapp.py
+++ b/wasp/apps/testapp.py
@@ -3,6 +3,12 @@
"""Self Tests
~~~~~~~~~~~~~
+
+A collection of tests used to develop features or provide useful metrics such
+as performance indicators or memory usage.
+
+.. figure:: res/SelfTestApp.png
+ :width: 179
"""
import wasp
@@ -15,13 +21,7 @@ import machine
from apps.pager import PagerApp
class TestApp():
- """Simple test application.
-
- .. figure:: res/SelfTestApp.png
- :width: 179
-
- Screenshot of the self test application
- """
+ """Self test application."""
NAME = 'Self Test'
ICON = icons.app