summaryrefslogtreecommitdiff
path: root/wasp/boards/simulator/watch.py
diff options
context:
space:
mode:
authorDaniel Thompson <daniel@redfelineninja.org.uk>2020-07-24 16:04:46 (GMT)
committerDaniel Thompson <daniel@redfelineninja.org.uk>2020-07-24 16:04:46 (GMT)
commit326e06bc6bda0abf02372c8f23f7c9e60cd5cfff (patch)
tree5ad634f403a0ebf1a9b441dae41b415d66e18b90 /wasp/boards/simulator/watch.py
parenta01fb7df573e13a6f6b9fbf2e7688d4e9713df6d (diff)
StatusBar: Rename and add BLE connection status icon
Notifier was a dumb name so make it better. Now that we have a decent name it should be obvious how to handle the BLE connection status icon! Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
Diffstat (limited to 'wasp/boards/simulator/watch.py')
-rw-r--r--wasp/boards/simulator/watch.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/wasp/boards/simulator/watch.py b/wasp/boards/simulator/watch.py
index abdf571..de1b584 100644
--- a/wasp/boards/simulator/watch.py
+++ b/wasp/boards/simulator/watch.py
@@ -182,3 +182,5 @@ rtc = RTC()
touch = CST816S(I2C(0), Pin('TP_INT', Pin.IN, quiet=True), Pin('TP_RST', Pin.OUT, quiet=True))
vibrator = Vibrator(Pin('MOTOR', Pin.OUT, value=0), active_low=True)
+def connected():
+ return not (int(rtc.uptime / 30) & 1)