summaryrefslogtreecommitdiff
path: root/src/Components/Ble/NimbleController.h
diff options
context:
space:
mode:
authorJF <jf@codingfield.com>2020-09-27 20:02:47 +0200
committerJF <jf@codingfield.com>2020-09-27 20:02:47 +0200
commit5d3a9744938b38c064379c3f78ace5a7dd87926f (patch)
treed0e73cf9c19260328a729eb3ccc398ce8536b329 /src/Components/Ble/NimbleController.h
parent079d437016e2bdbd2161fb6b3f11f9d9e346709a (diff)
Add BatteryInformationService to expose the battery level to BLE host.
Diffstat (limited to 'src/Components/Ble/NimbleController.h')
-rw-r--r--src/Components/Ble/NimbleController.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Components/Ble/NimbleController.h b/src/Components/Ble/NimbleController.h
index 50b8b0b8..2dee8987 100644
--- a/src/Components/Ble/NimbleController.h
+++ b/src/Components/Ble/NimbleController.h
@@ -8,6 +8,7 @@
#include "DfuService.h"
#include "CurrentTimeService.h"
#include "MusicService.h"
+#include "BatteryInformationService.h"
#include <host/ble_gap.h>
namespace Pinetime {
@@ -22,7 +23,7 @@ namespace Pinetime {
public:
NimbleController(Pinetime::System::SystemTask& systemTask, Pinetime::Controllers::Ble& bleController,
DateTime& dateTimeController, Pinetime::Controllers::NotificationManager& notificationManager,
- Pinetime::Drivers::SpiNorFlash& spiNorFlash);
+ Controllers::Battery& batteryController, Pinetime::Drivers::SpiNorFlash& spiNorFlash);
void Init();
void StartAdvertising();
int OnGAPEvent(ble_gap_event *event);
@@ -57,6 +58,7 @@ namespace Pinetime {
AlertNotificationClient alertNotificationClient;
CurrentTimeService currentTimeService;
MusicService musicService;
+ BatteryInformationService batteryInformationService;
uint8_t addrType; // 1 = Random, 0 = PUBLIC
uint16_t connectionHandle = 0;