Add heart rate BLE service.
This commit is contained in:
parent
3a3a14115a
commit
68674cec53
9 changed files with 152 additions and 7 deletions
|
|
@ -22,7 +22,8 @@ NimbleController::NimbleController(Pinetime::System::SystemTask& systemTask,
|
|||
DateTime& dateTimeController,
|
||||
Pinetime::Controllers::NotificationManager& notificationManager,
|
||||
Controllers::Battery& batteryController,
|
||||
Pinetime::Drivers::SpiNorFlash& spiNorFlash) :
|
||||
Pinetime::Drivers::SpiNorFlash& spiNorFlash,
|
||||
Controllers::HeartRateController& heartRateController) :
|
||||
systemTask{systemTask},
|
||||
bleController{bleController},
|
||||
dateTimeController{dateTimeController},
|
||||
|
|
@ -36,7 +37,8 @@ NimbleController::NimbleController(Pinetime::System::SystemTask& systemTask,
|
|||
musicService{systemTask},
|
||||
batteryInformationService{batteryController},
|
||||
immediateAlertService{systemTask, notificationManager},
|
||||
serviceDiscovery({¤tTimeClient, &alertNotificationClient}) {
|
||||
serviceDiscovery({¤tTimeClient, &alertNotificationClient}),
|
||||
heartRateService{systemTask, heartRateController} {
|
||||
}
|
||||
|
||||
int GAPEventCallback(struct ble_gap_event *event, void *arg) {
|
||||
|
|
@ -58,6 +60,7 @@ void NimbleController::Init() {
|
|||
dfuService.Init();
|
||||
batteryInformationService.Init();
|
||||
immediateAlertService.Init();
|
||||
heartRateService.Init();
|
||||
int res;
|
||||
res = ble_hs_util_ensure_addr(0);
|
||||
ASSERT(res == 0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue