diff --git a/src/components/ble/MotionService.cpp b/src/components/ble/MotionService.cpp index 1626a5bf4d..7b213adc3d 100644 --- a/src/components/ble/MotionService.cpp +++ b/src/components/ble/MotionService.cpp @@ -121,6 +121,6 @@ void MotionService::UnsubscribeNotification(uint16_t attributeHandle) { motionValuesNoficationEnabled = false; } -bool MotionService::IsMotionNotificationSubscribed() const { - return motionValuesNoficationEnabled; +bool MotionService::IsAnyNotificationSubscribed() const { + return stepCountNoficationEnabled || motionValuesNoficationEnabled; } diff --git a/src/components/ble/MotionService.h b/src/components/ble/MotionService.h index acc91e8d59..ee7fe8ebad 100644 --- a/src/components/ble/MotionService.h +++ b/src/components/ble/MotionService.h @@ -21,7 +21,7 @@ namespace Pinetime { void SubscribeNotification(uint16_t attributeHandle); void UnsubscribeNotification(uint16_t attributeHandle); - bool IsMotionNotificationSubscribed() const; + bool IsAnyNotificationSubscribed() const; private: NimbleController& nimble; diff --git a/src/systemtask/SystemTask.cpp b/src/systemtask/SystemTask.cpp index eb013d6d1a..b14016a157 100644 --- a/src/systemtask/SystemTask.cpp +++ b/src/systemtask/SystemTask.cpp @@ -434,7 +434,7 @@ void SystemTask::UpdateMotion() { // AOD needs motion on to show up to date step counts if (state == SystemTaskState::Sleeping && !(settingsController.isWakeUpModeOn(Pinetime::Controllers::Settings::WakeUpMode::RaiseWrist) || settingsController.isWakeUpModeOn(Pinetime::Controllers::Settings::WakeUpMode::Shake) || - motionController.GetService()->IsMotionNotificationSubscribed())) { + motionController.GetService()->IsAnyNotificationSubscribed())) { return; }