From 5d3a9744938b38c064379c3f78ace5a7dd87926f Mon Sep 17 00:00:00 2001 From: JF Date: Sun, 27 Sep 2020 20:02:47 +0200 Subject: Add BatteryInformationService to expose the battery level to BLE host. --- src/Components/Ble/NimbleController.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/Components/Ble/NimbleController.cpp') diff --git a/src/Components/Ble/NimbleController.cpp b/src/Components/Ble/NimbleController.cpp index 7dde9d0c..a8add0df 100644 --- a/src/Components/Ble/NimbleController.cpp +++ b/src/Components/Ble/NimbleController.cpp @@ -26,6 +26,7 @@ NimbleController::NimbleController(Pinetime::System::SystemTask& systemTask, Pinetime::Controllers::Ble& bleController, DateTime& dateTimeController, Pinetime::Controllers::NotificationManager& notificationManager, + Controllers::Battery& batteryController, Pinetime::Drivers::SpiNorFlash& spiNorFlash) : systemTask{systemTask}, bleController{bleController}, @@ -37,7 +38,8 @@ NimbleController::NimbleController(Pinetime::System::SystemTask& systemTask, anService{systemTask, notificationManager}, alertNotificationClient{systemTask, notificationManager}, currentTimeService{dateTimeController}, - musicService{systemTask} { + musicService{systemTask}, + batteryInformationService{batteryController} { } @@ -83,10 +85,9 @@ void NimbleController::Init() { currentTimeClient.Init(); currentTimeService.Init(); musicService.Init(); - anService.Init(); - dfuService.Init(); + batteryInformationService.Init(); int res; res = ble_hs_util_ensure_addr(0); ASSERT(res == 0); -- cgit v1.2.3-70-g09d2