summaryrefslogtreecommitdiff
path: root/wasp/wasp.py
diff options
context:
space:
mode:
authorDaniel Thompson <daniel@redfelineninja.org.uk>2020-04-14 19:05:57 (GMT)
committerDaniel Thompson <daniel@redfelineninja.org.uk>2020-04-14 19:05:57 (GMT)
commit66743d42c83ac0943f628fe2e6ab6852ba9b3f4f (patch)
tree94391c5f87755d79c1a802de9b572ee7eee49186 /wasp/wasp.py
parent10706a9704fc75dac2e623341652b8b6f1fdf23f (diff)
wasp: Manager: Bring in proper separation of apps
This is getting us much closer to the final UI concept. We have a quick ring from which we can select typical apps such as clock and stopwatch which will (eventually) be supplemented with step counting and heart rate monitoriing. More exotic apps (currenrtly torch, self test, settings) are all relagated to the launcher ring.
Diffstat (limited to 'wasp/wasp.py')
-rw-r--r--wasp/wasp.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/wasp/wasp.py b/wasp/wasp.py
index 0f6327d..12a9536 100644
--- a/wasp/wasp.py
+++ b/wasp/wasp.py
@@ -100,12 +100,16 @@ class Manager():
self.register(SettingsApp(), False)
self.register(TestApp(), False)
- def register(self, app, quick_ring=True):
+ def register(self, app, quick_ring=False):
"""Register an application with the system.
:param object app: The application to regsister
"""
- self.quick_ring.append(app)
+ if quick_ring == True:
+ self.quick_ring.append(app)
+ else:
+ self.launcher_ring.append(app)
+ self.launcher_ring.sort(key = lambda x: x.NAME)
@property
def brightness(self):
@@ -296,7 +300,7 @@ class Manager():
watch.rtc.update()
if 1 == self._button.get_event() or \
- self._charging != watch.battery.changing():
+ self._charging != watch.battery.charging():
self.wake()
def run(self, no_except=True):