diff options
Diffstat (limited to 'wasp/boards/simulator')
| -rw-r--r-- | wasp/boards/simulator/main.py | 41 | ||||
| -rw-r--r-- | wasp/boards/simulator/test_smoke.py | 10 |
2 files changed, 29 insertions, 22 deletions
diff --git a/wasp/boards/simulator/main.py b/wasp/boards/simulator/main.py index ea943f3..bd43d4e 100644 --- a/wasp/boards/simulator/main.py +++ b/wasp/boards/simulator/main.py @@ -3,26 +3,33 @@ import wasp -from apps.alarm import AlarmApp -wasp.system.register(AlarmApp()) - -from apps.fibonacci_clock import FibonacciClockApp -wasp.system.register(FibonacciClockApp()) - -from apps.gameoflife import GameOfLifeApp -wasp.system.register(GameOfLifeApp()) - -from apps.snake import SnakeGameApp -wasp.system.register(SnakeGameApp()) - -from apps.calc import CalculatorApp -wasp.system.register(CalculatorApp()) - -from apps.musicplayer import MusicPlayerApp -wasp.system.register(MusicPlayerApp()) +# Ensure there's something interesting to look at ;-) wasp.system.set_music_info({ 'track': 'Tasteless Brass Duck', 'artist': 'Dreams of Bamboo', }) +# Instantiate the analogue clock application and replace the default +# (digital) clock with this alternative. +#from chrono import ChronoApp +#clock = wasp.system.quick_ring[0] +#wasp.system.quick_ring[0] = ChronoApp() +#wasp.system.switch(wasp.system.quick_ring[0]) +#wasp.system.register(clock) + +# Adopt a basic all-orange theme +#wasp.system.set_theme( +# b'\xff\x00' # ble +# b'\xff\x00' # scroll-indicator +# b'\xff\x00' # battery +# b'\xff\x00' # status-clock +# b'\xff\x00' # notify-icon +# b'\xff\x00' # bright +# b'\xbe\xe0' # mid +# b'\xff\x00' # ui +# b'\xff\x00' # spot1 +# b'\xff\x00' # spot2 +# b'\x00\x0f' # contrast +# ) + wasp.system.run() diff --git a/wasp/boards/simulator/test_smoke.py b/wasp/boards/simulator/test_smoke.py index 26e4318..50636d0 100644 --- a/wasp/boards/simulator/test_smoke.py +++ b/wasp/boards/simulator/test_smoke.py @@ -1,6 +1,7 @@ import pytest import time import wasp +import apps.testapp def step(): wasp.system._tick() @@ -36,12 +37,11 @@ def test_quick_ring(system): def test_launcher_ring(system): names = [ x.NAME for x in system.launcher_ring ] - assert('Self Test' in names) assert('Settings' in names) - assert('Torch' in names) + assert('Software' in names) @pytest.mark.parametrize("name", - ('Steps', 'Timer', 'Heart', 'Self Test', 'Settings', 'Torch')) + ('Steps', 'Timer', 'Heart', 'Settings', 'Software')) def test_app(system, name): system.switch(system.apps[name]) for i in range(4): @@ -101,7 +101,7 @@ def test_selftests(system): will do something useful! For example it will run the benchmark for every one of the benchmark tests. """ - system.switch(system.apps['Self Test']) + system.switch(apps.testapp.TestApp()) system.step() start_point = system.app.test @@ -115,7 +115,7 @@ def test_selftests(system): assert(start_point == system.app.test) def test_selftest_crash(system): - system.switch(system.apps['Self Test']) + system.switch(apps.testapp.TestApp()) system.step() def select(name): |
