diff options
| author | Michele Bini <michele.bini@gmail.com> | 2022-03-26 03:11:04 (GMT) |
|---|---|---|
| committer | Michele Bini <michele.bini@gmail.com> | 2022-03-26 03:25:17 (GMT) |
| commit | 8b7bbf4b84a008e42a0ebba8af316690af696d5b (patch) | |
| tree | 21bcfb4f4da4b3f6b3ebb21d6dd85f080f8cecd3 /src/components/ble/NimbleController.cpp | |
| parent | 1589e31b71b0f45eebd6fb95b53248a156821abb (diff) | |
compactify app list
Diffstat (limited to 'src/components/ble/NimbleController.cpp')
| -rw-r--r-- | src/components/ble/NimbleController.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/components/ble/NimbleController.cpp b/src/components/ble/NimbleController.cpp index a5bc41b..bc712f4 100644 --- a/src/components/ble/NimbleController.cpp +++ b/src/components/ble/NimbleController.cpp @@ -28,8 +28,8 @@ NimbleController::NimbleController(Pinetime::System::SystemTask& systemTask, NotificationManager& notificationManager, Battery& batteryController, Pinetime::Drivers::SpiNorFlash& spiNorFlash, - HeartRateController& heartRateController, - MotionController& motionController) + HeartRateController& heartRateController + ) : systemTask {systemTask}, bleController {bleController}, dateTimeController {dateTimeController}, @@ -44,7 +44,6 @@ NimbleController::NimbleController(Pinetime::System::SystemTask& systemTask, batteryInformationService {batteryController}, immediateAlertService {systemTask, notificationManager}, heartRateService {systemTask, heartRateController}, - motionService {systemTask, motionController}, serviceDiscovery({¤tTimeClient, &alertNotificationClient}) { } @@ -88,7 +87,6 @@ void NimbleController::Init() { batteryInformationService.Init(); immediateAlertService.Init(); heartRateService.Init(); - motionService.Init(); int rc; rc = ble_hs_util_ensure_addr(0); @@ -248,13 +246,10 @@ int NimbleController::OnGAPEvent(ble_gap_event* event) { if (event->subscribe.reason == BLE_GAP_SUBSCRIBE_REASON_TERM) { heartRateService.UnsubscribeNotification(event->subscribe.conn_handle, event->subscribe.attr_handle); - motionService.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); - motionService.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); - motionService.UnsubscribeNotification(event->subscribe.conn_handle, event->subscribe.attr_handle); } break; |
