From e21f6a7f414d1f832e8fddfeaab3b9de05aa3459 Mon Sep 17 00:00:00 2001 From: Jean-François Milants Date: Sun, 11 Jul 2021 16:55:06 +0200 Subject: Notify battery level every 10 minutes when connected to a BLE host. Refactor battery percent : only use uint8_t to store the battery % remaining. --- src/components/ble/BatteryInformationService.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/components/ble/BatteryInformationService.h') diff --git a/src/components/ble/BatteryInformationService.h b/src/components/ble/BatteryInformationService.h index 7d060909..1303fd6c 100644 --- a/src/components/ble/BatteryInformationService.h +++ b/src/components/ble/BatteryInformationService.h @@ -17,7 +17,7 @@ namespace Pinetime { void Init(); int OnBatteryServiceRequested(uint16_t connectionHandle, uint16_t attributeHandle, ble_gatt_access_ctxt* context); - + void NotifyBatteryLevel(uint16_t connectionHandle, uint8_t level); private: Controllers::Battery& batteryController; static constexpr uint16_t batteryInformationServiceId {0x180F}; -- cgit v1.2.3