diff options
| author | Daniel Thompson <daniel@redfelineninja.org.uk> | 2020-07-24 16:04:46 (GMT) |
|---|---|---|
| committer | Daniel Thompson <daniel@redfelineninja.org.uk> | 2020-07-24 16:04:46 (GMT) |
| commit | 326e06bc6bda0abf02372c8f23f7c9e60cd5cfff (patch) | |
| tree | 5ad634f403a0ebf1a9b441dae41b415d66e18b90 /wasp/boards | |
| parent | a01fb7df573e13a6f6b9fbf2e7688d4e9713df6d (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')
| -rw-r--r-- | wasp/boards/pinetime/watch.py.in | 2 | ||||
| -rw-r--r-- | wasp/boards/simulator/watch.py | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/wasp/boards/pinetime/watch.py.in b/wasp/boards/pinetime/watch.py.in index aaed767..2e8813f 100644 --- a/wasp/boards/pinetime/watch.py.in +++ b/wasp/boards/pinetime/watch.py.in @@ -32,6 +32,8 @@ from drivers.st7789 import ST7789_SPI from drivers.vibrator import Vibrator from flash.flash_spi import FLASH +from ubluepy import uart_connected as connected + class Backlight(object): lo = Pin("BL_LO", Pin.OUT, value=0) mid = Pin("BL_MID", Pin.OUT, value=1) 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) |
