Skip to content

Heartrate measurements in background#1718

Closed
patgruber wants to merge 5 commits intoInfiniTimeOrg:mainfrom
patgruber:heartrate-measurements-in-background
Closed

Heartrate measurements in background#1718
patgruber wants to merge 5 commits intoInfiniTimeOrg:mainfrom
patgruber:heartrate-measurements-in-background

Conversation

@patgruber
Copy link
Contributor

This implements heart rate measurements when the screen is turned off.
The ticket I found for this is: #183

When starting the heart rate measurements through the HeartRate screen and turning off the screen, the heart rate task doesn't stop but keeps running in the background until the heart rate measurement is stopped through the screen again.
The task wait delay is set to ~10 seconds (10k ticks) so the task doesn't run all the time and drains the battery too much.

Already tested it on my PineTime and works great.
Right now it was more a proof of concept, therefore the interval between background measurements is hard-coded to ~5 minutes. But I'd be happy to implement a settings screen to configure the interval or other features that are wanted.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Enhancement to an existing app/feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Heart rate measurement is stops, when the screen is turned off