Skip to content

settings: add 5-minute heart rate monitoring option - #1999

Open
parc94 wants to merge 1 commit into
coredevices:mainfrom
parc94:feat/5min-hr-interval
Open

parc94 wants to merge 1 commit into
coredevices:mainfrom
parc94:feat/5min-hr-interval

Conversation

@parc94

@parc94 parc94 commented Sep 5, 2026

Copy link
Copy Markdown

This PR adds a 5 Minutes interval option to background heart rate monitoring in Settings > Health.

Per maintainer feedback (@gmarull / @ericmigi), the battery warning confirmation dialog has been removed — selecting 5 Minutes now directly applies the setting like any other interval option. The branch has also been rebased onto the latest main.

Background & Story

I am an original Pebble owner and wanted to contribute back to the community managing PebbleOS. By no means am I an experienced firmware developer — this feature was vibe coded with AI assistance and thoroughly tested in the QEMU emulator.

The motivation behind this: I previously used a Xiaomi Band that tracked heart rate every 5 minutes when I was monitoring my HR (I had concerns about a possible heart issue at the time, which fortunately turned out to be completely fine!). I found having that 5-minute granularity very reassuring, and hopefully having this option in PebbleOS will be helpful to others as well.

Changes

  • include/pbl/services/activity/activity.h: Add HRMonitoringInterval_5Min before HRMonitoringIntervalCount (preserving backwards compatibility of enum values 0–3).
  • src/fw/services/activity/activity.c: Return 5 * SECONDS_PER_MINUTE in prv_get_hrm_period_sec() for the 5-minute interval.
  • src/fw/apps/system/settings/health.c:
    • Add "5 Minutes" to the Heart Rate monitoring intervals list.
    • Selecting "5 Minutes" immediately applies the preference and dismisses the option menu without extra popups.
    • Separate HRM and SpO2 interval lists so Heart Rate gets the new 5-minute option while Blood Oxygen (SpO2) preserves its existing options (10m, 30m, 1h, Disabled).

Testing

  • Automated Tests: Ran pbl test — 333/333 tests passed.
  • Compliance: Verified with gitlint against upstream/main.
  • Manual Verification in QEMU (qemu_emery):
    • Verified Settings > Health > HR Monitoring shows "5 Minutes" as an option.
    • Selecting "5 Minutes" immediately applies without warning dialogs.
    • Verified returning to Health settings reflects "5 Minutes" as subtitle, and re-opening the menu shows the radio button accurately selected.
    • Verified SpO2 monitoring options remain intact.

@gmarull gmarull left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I, personally, don't think we need extra pop-ups, there are other settings that will have higher impact and do not warn nowadays. Having said that, I'm fine with the new option, will defer to @ericmigi

@ericmigi

Copy link
Copy Markdown
Collaborator

Sure ok without warning

@parc94

parc94 commented Sep 17, 2026

Copy link
Copy Markdown
Author

@gmarull should i update the PR? to remove the warning?

@ericmigi

Copy link
Copy Markdown
Collaborator

yes

@parc94
parc94 force-pushed the feat/5min-hr-interval branch from 268c72d to 5db627c Compare September 18, 2026 17:40
@parc94 parc94 changed the title settings: add 5-minute heart rate monitoring option with battery warning settings: add 5-minute heart rate monitoring option Sep 18, 2026
Add a 5-minute measurement interval option to background heart rate
monitoring in Settings -> Health.

Note from contributor:
I am by no means a developer, but as an original Pebble owner I wanted to
contribute back to the PebbleOS community. I vibe coded this and tested
it myself in QEMU.

Story time: I used a Xiaomi band that supported 5-minute HR tracking
while investigating heart concerns (which thankfully turned out to be
nothing). Having a 5-minute sampling interval on Pebble was something I
really missed and wanted to bring to PebbleOS, hoping it helps others who
want finer-grained heart rate tracking.

Co-Authored-By: Gemini 3.8 Flash <noreply@google.com>
Signed-off-by: Pedro Reyes <peter140394@gmail.com>
@parc94
parc94 force-pushed the feat/5min-hr-interval branch from 5db627c to d599be2 Compare September 18, 2026 23:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants