File tree 4 files changed +12
-3
lines changed
4 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -120,3 +120,7 @@ void MotionService::UnsubscribeNotification(uint16_t attributeHandle) {
120
120
else if (attributeHandle == motionValuesHandle)
121
121
motionValuesNoficationEnabled = false ;
122
122
}
123
+
124
+ bool MotionService::IsMotionNotificationSubscribed () const {
125
+ return motionValuesNoficationEnabled;
126
+ }
Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ namespace Pinetime {
21
21
22
22
void SubscribeNotification (uint16_t attributeHandle);
23
23
void UnsubscribeNotification (uint16_t attributeHandle);
24
+ bool IsMotionNotificationSubscribed () const ;
24
25
25
26
private:
26
27
NimbleController& nimble;
Original file line number Diff line number Diff line change @@ -62,6 +62,10 @@ namespace Pinetime {
62
62
this ->service = service;
63
63
}
64
64
65
+ Pinetime::Controllers::MotionService* GetService () const {
66
+ return service;
67
+ }
68
+
65
69
private:
66
70
uint32_t nbSteps = 0 ;
67
71
uint32_t currentTripSteps = 0 ;
Original file line number Diff line number Diff line change @@ -417,9 +417,9 @@ void SystemTask::UpdateMotion() {
417
417
return ;
418
418
}
419
419
420
- if (state == SystemTaskState::Sleeping &&
421
- !( settingsController.isWakeUpModeOn (Pinetime::Controllers::Settings::WakeUpMode::RaiseWrist ) ||
422
- settingsController. isWakeUpModeOn (Pinetime::Controllers::Settings::WakeUpMode::Shake) || bleController. IsConnected ())) {
420
+ if (state == SystemTaskState::Sleeping && !(settingsController. isWakeUpModeOn (Pinetime::Controllers::Settings::WakeUpMode::RaiseWrist) ||
421
+ settingsController.isWakeUpModeOn (Pinetime::Controllers::Settings::WakeUpMode::Shake ) ||
422
+ motionController. GetService ()-> IsMotionNotificationSubscribed ())) {
423
423
return ;
424
424
}
425
425
You can’t perform that action at this time.
0 commit comments