diff options
| author | Jean-François Milants <jf@codingfield.com> | 2021-07-11 14:55:06 (GMT) |
|---|---|---|
| committer | Jean-François Milants <jf@codingfield.com> | 2021-07-11 14:55:06 (GMT) |
| commit | e21f6a7f414d1f832e8fddfeaab3b9de05aa3459 (patch) | |
| tree | a4ebbc3a74ba7daf87aa99c0eafcb0e9e7bc6c35 /src/components/ble/NimbleController.h | |
| parent | 6a91b83b12ef849f68d54f490153b02f0ecf58dc (diff) | |
Notify battery level every 10 minutes when connected to a BLE host.
Refactor battery percent : only use uint8_t to store the battery % remaining.
Diffstat (limited to 'src/components/ble/NimbleController.h')
| -rw-r--r-- | src/components/ble/NimbleController.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/components/ble/NimbleController.h b/src/components/ble/NimbleController.h index 5dd01e4..0cfe983 100644 --- a/src/components/ble/NimbleController.h +++ b/src/components/ble/NimbleController.h @@ -70,6 +70,7 @@ namespace Pinetime { }; uint16_t connHandle(); + void NotifyBatteryLevel(uint8_t level); private: static constexpr const char* deviceName = "InfiniTime"; @@ -92,7 +93,7 @@ namespace Pinetime { HeartRateService heartRateService; uint8_t addrType; // 1 = Random, 0 = PUBLIC - uint16_t connectionHandle = 0; + uint16_t connectionHandle = BLE_HS_CONN_HANDLE_NONE; ble_uuid128_t dfuServiceUuid { .u {.type = BLE_UUID_TYPE_128}, |
