-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Unconditionally update motion #2328
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Build size and comparison to main:
|
|
Actually we can fix shake wake calibration as well. I'll push a new commit soon |
|
what do you mean with "(not notifications)" in your issue description? |
|
With the existing code, the motion values will be updated if anything is subscribed to notifications on the BLE characteristic, but it won't update it when a characteristic is only read. Sorry that wasn't super clear, I should've specified I meant BLE read/notify |
3aaa588 to
614440f
Compare
|
Removed the ShouldShakeWake method as a method which just did one comparison felt like overabstracting |
|
still looking good |
|
@geekbozu I remember you mentioned in the pinetime channel that you've got power measurement kit set up, could I take you up on your offer with this PR? :) Testing configuration: digital watchface, sleep notification mode, all wake triggers disabled, BLE off, screen off Looking to know average power consumption in each configuration so we can decide if this PR is feasible No worries at all if you're busy at the moment, just let me know somewhere |
|
Measurements are complete! Thanks so much taking a look Tim :) With no BLE: Main: 188μA ~= 40d idle I think this is a reasonable sacrifice given the complexity of working around it. In reality most the energy of the battery is consumed by screen on time, and BLE is on, so the impact to real usage is probably no more than 1 day in the worst case and a few hours in most cases. |
|
Going to merge soon unless any other comments :) |
| // 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())) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Second I merged I realised this method can be removed... will draft a fixup soon
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Opened #2352


Polling the sensor every 100ms uses very little power, and handling out of date motion data causes excess complexity. This fixes correctness for reading (not notifications) steps/motion characteristics also
Closes #1379
Closes #1270
Closes #787
Closes #2268
Closes #2271
Closes #2272