GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Unconditionally update motion by mark9064 · Pull Request #2328 · InfiniTimeOrg/InfiniTime

Conversation

@mark9064

@mark9064 mark9064 commented Jun 27, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@mark9064 mark9064 added this to the 1.16.0 milestone Jun 27, 2025
@mark9064 mark9064 added the maintenance Background work label Jun 27, 2025
@github-actions

github-actions Bot commented Jun 27, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Build size and comparison to main:

Section Size Difference
text 379032B -80B
data 944B 0B
bss 22536B 0B

Run in InfiniEmu

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

NeroBurner
NeroBurner reviewed Jun 28, 2025
View reviewed changes
Comment thread src/systemtask/SystemTask.cpp Resolved

Uh oh!

There was an error while loading. Please reload this page.

NeroBurner
NeroBurner approved these changes Jun 28, 2025
View reviewed changes
@mark9064

mark9064 commented Jun 28, 2025

Copy link
Copy Markdown
Member Author

Actually we can fix shake wake calibration as well. I'll push a new commit soon

NeroBurner reacted with hooray emoji
All reactions
  • 🎉 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@NeroBurner

NeroBurner commented Jun 28, 2025

Copy link
Copy Markdown
Contributor

what do you mean with "(not notifications)" in your issue description?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mark9064

mark9064 commented Jun 28, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member Author

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

mark9064 added 2 commits June 28, 2025 20:07
@mark9064
Unconditionally update motion
e9e78db
@mark9064
Unconditionally calculate shake speed
614440f
@mark9064
mark9064 force-pushed the unconditional-motion branch from 3aaa588 to 614440f Compare June 28, 2025 19:07
@mark9064

mark9064 commented Jun 28, 2025

Copy link
Copy Markdown
Member Author

Removed the ShouldShakeWake method as a method which just did one comparison felt like overabstracting

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@NeroBurner

NeroBurner commented Jun 28, 2025

Copy link
Copy Markdown
Contributor

still looking good

mark9064 reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mark9064

mark9064 commented Jun 28, 2025

Copy link
Copy Markdown
Member Author

@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
Refs to compare are:
614440f (HEAD here)
c1b9967 (current main)

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mark9064

mark9064 commented Jun 29, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member Author

Measurements are complete! Thanks so much taking a look Tim :)

With no BLE:

Main: 188μA ~= 40d idle
This PR: 210μA ~= 36d idle
So the change is ~22μA

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.

NeroBurner reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@geekbozu

geekbozu commented Jun 29, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Main Branch
image

This PR
image

Marks summary sums it up well!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mark9064 mark9064 mentioned this pull request Jul 11, 2025
Watch reboots when shaking with a magnet near the bottom of the screen #2283
Open
1 task done
@mark9064

mark9064 commented Oct 13, 2025

Copy link
Copy Markdown
Member Author

Going to merge soon unless any other comments :)

NeroBurner reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mark9064
mark9064 merged commit 7ea36e8 into InfiniTimeOrg:main Oct 15, 2025
This was referenced Oct 15, 2025
MotionService: Fix step notification on sleep #2272
Closed
Show shake calibration being disabled when in sleep mode #2268
Closed
mark9064
mark9064 commented Oct 15, 2025
View reviewed changes
Comment thread src/systemtask/SystemTask.cpp
// 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())) {

@mark9064 mark9064 Oct 15, 2025

Copy link
Copy Markdown
Member Author

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

NeroBurner reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

@mark9064 mark9064 Oct 15, 2025

Copy link
Copy Markdown
Member Author

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
This was referenced Oct 15, 2025
Unconditional motion fixup #2352
Merged
Keep updating motion during sleep when Bluetooth is on #1207
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@NeroBurner NeroBurner NeroBurner approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

maintenance Background work

Projects

None yet

Milestone

1.16.0

Development

Successfully merging this pull request may close these issues.

Step notifications not working Shake calibration doesn't work when sleep mode is enabled InfiniTime sends Steps count from the previous day in some cases Step counter doesn't start on new day

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@mark9064 @NeroBurner @geekbozu
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.