Heart Rate measurements regularly every 60 seconds #1094
Closed
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.
This pull requests starts a Heart Rate measurement every 60 seconds.
It's a bit wanky if the user wants to stop the heart rate sensor in the app while a measurement is running. At the moment it turns off the sensor, but will turn it back on the next time it checks if it needs to go on (currently 1 tenth of a second I think), because I thought it would be confusing if the sensor wouldn't turn off at all.
It's also not detected by the Heart Rate App yet if the sensor is running before the app is started, so it still gives the option to start the sensor, even though it is on, the press has no effect though (except that the app starts to show the current heart Rate). The digi watch face was able to detect the heart rate and showed that a measurement is going on.
In the future it might be a good idea to average out the heart rate over a prolonged period instead of taking the first avaible value to reduce noise, this would depend on #1092.
This might be useful for general fitness tracking (#749), sleep tracking (#307) or just to keep track of your heart rate (#895).
The intervall could easily be implemented as a setting, I don't know how to implement new settings though, especially if they are supposed to be persistent.
60 Seconds does seem quite often when my watch was just laying aroung on the table, so the standard might be something more like 90/120.
I'll let the watch run overnight to see how much power would be consumed by this feature.