summaryrefslogtreecommitdiff
path: root/src/components/ble/NimbleController.cpp
diff options
context:
space:
mode:
authorMichele Bini <michele.bini@gmail.com>2022-03-26 03:49:12 (GMT)
committerMichele Bini <michele.bini@gmail.com>2022-03-26 03:49:12 (GMT)
commit6ef420d2407a4685b56a233f6b0f849e90c6cf49 (patch)
tree917f4304cace71ca0d7e472546a1538d8ac991a4 /src/components/ble/NimbleController.cpp
parent8b7bbf4b84a008e42a0ebba8af316690af696d5b (diff)
sans heart
Diffstat (limited to 'src/components/ble/NimbleController.cpp')
-rw-r--r--src/components/ble/NimbleController.cpp13
1 files changed, 1 insertions, 12 deletions
diff --git a/src/components/ble/NimbleController.cpp b/src/components/ble/NimbleController.cpp
index bc712f4..f63d98c 100644
--- a/src/components/ble/NimbleController.cpp
+++ b/src/components/ble/NimbleController.cpp
@@ -27,8 +27,7 @@ NimbleController::NimbleController(Pinetime::System::SystemTask& systemTask,
DateTime& dateTimeController,
NotificationManager& notificationManager,
Battery& batteryController,
- Pinetime::Drivers::SpiNorFlash& spiNorFlash,
- HeartRateController& heartRateController
+ Pinetime::Drivers::SpiNorFlash& spiNorFlash
)
: systemTask {systemTask},
bleController {bleController},
@@ -43,7 +42,6 @@ NimbleController::NimbleController(Pinetime::System::SystemTask& systemTask,
currentTimeService {dateTimeController},
batteryInformationService {batteryController},
immediateAlertService {systemTask, notificationManager},
- heartRateService {systemTask, heartRateController},
serviceDiscovery({&currentTimeClient, &alertNotificationClient}) {
}
@@ -86,7 +84,6 @@ void NimbleController::Init() {
dfuService.Init();
batteryInformationService.Init();
immediateAlertService.Init();
- heartRateService.Init();
int rc;
rc = ble_hs_util_ensure_addr(0);
@@ -243,14 +240,6 @@ int NimbleController::OnGAPEvent(ble_gap_event* event) {
event->subscribe.prev_notify,
event->subscribe.cur_notify,
event->subscribe.prev_indicate);
-
- if (event->subscribe.reason == BLE_GAP_SUBSCRIBE_REASON_TERM) {
- heartRateService.UnsubscribeNotification(event->subscribe.conn_handle, event->subscribe.attr_handle);
- } else if (event->subscribe.prev_notify == 0 && event->subscribe.cur_notify == 1) {
- heartRateService.SubscribeNotification(event->subscribe.conn_handle, event->subscribe.attr_handle);
- } else if (event->subscribe.prev_notify == 1 && event->subscribe.cur_notify == 0) {
- heartRateService.UnsubscribeNotification(event->subscribe.conn_handle, event->subscribe.attr_handle);
- }
break;
case BLE_GAP_EVENT_MTU: