summaryrefslogtreecommitdiff
path: root/docs/main/apps.py
diff options
context:
space:
mode:
authorDaniel Thompson <daniel@redfelineninja.org.uk>2021-01-10 15:19:42 (GMT)
committerDaniel Thompson <daniel@redfelineninja.org.uk>2021-01-10 15:19:42 (GMT)
commit4e9a576a2df3476a19522df177f845fade7b1fa6 (patch)
treefc7d65ce07734dda969d768211db7f2c369e1cf2 /docs/main/apps.py
parent1670be2672c3bc0df2e398f8eb16c9c33ba6aa35 (diff)
docs: Add some main.py examples
These still need to be integrated into the generated documentation but there were included in the most recent wasp-os video so let's get them into the source code. Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
Diffstat (limited to 'docs/main/apps.py')
-rw-r--r--docs/main/apps.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/docs/main/apps.py b/docs/main/apps.py
new file mode 100644
index 0000000..e80d61f
--- /dev/null
+++ b/docs/main/apps.py
@@ -0,0 +1,13 @@
+# SPDX-License-Identifier: LGPL-3.0-or-later
+# Copyright (C) 2020 Daniel Thompson
+
+import wasp
+
+from gadgetbridge import *
+wasp.system.schedule()
+
+# Registering normal apps *after* the schedule() ensures the
+# watch will still (partially) boot even if we end up taking
+# an exception during application init.
+wasp.system.register('apps.flashlight.TorchApp')
+wasp.system.register('apps.gameoflife.GameOfLifeApp')