-
You could use the step counting as indicator for exertion level and to change hrm logging >interval. Or just look at the latest hrm reading like you've said.
The syncing logic will probably break with changing the logging interval. I think >Gadgetbridge >expects 10 min intervals. So that would probably need tweaking as well.
Could someone point me to the code that measures the heart rate? Sorry im not familiar with the codebase at all. I'll try and make the adjustment. The health app appears to be a display app for data (not the code that does the actual measuring?).
As for synching, not an issue for me, i'll only sync once a week or so.
Will have a look at recorder, not sure i noticed it when i scanned the apps.
-
Could someone point me to the code that measures the heart rate?
Look for hrm related methods of the Bangle class in espruino reference.
I think you should find some of those in the
health
andrecorder
appsboot.js
orwidget.js
files in the BangleApps github repo. -
As for synching, not an issue for me, i'll only sync once a week or so.
Yes, but I suspect you'll run into problems anyway that would need to be solved. If Gadgetbridge expects every record entry to correspond to 10 minute periods but your entries corresponds to variable length periods - what happens? I don't know.
Not really sure if records are ever deleted automatically at all. I'd refer you to the code/readme/PRs or have someone else answer.
Two notes on implementing dynamic hrm logging:
You could use the step counting as indicator for exertion level and to change hrm logging interval. Or just look at the latest hrm reading like you've said.
The syncing logic will probably break with changing the logging interval. I think Gadgetbridge expects 10 min intervals. So that would probably need tweaking as well.
EDIT:
Also just to make sure, you're aware of the
recorder
app? Maybe you'd want to trigger that automatically instead of changing thehealth
app. Another way to acheive your goal maybe.