wasp-os/docs/main/apps.py
Daniel Thompson 4e9a576a2d 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>
2021-01-10 15:19:42 +00:00

14 lines
412 B
Python

# 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')