Skip to content

PID HR Pushy zone-limit/recovery-zone settings (follow-up to #4786) - #4787

Merged
cagnulein merged 8 commits into
masterfrom
codex/pid-hr-pushy-followup
Jul 6, 2026
Merged

PID HR Pushy zone-limit/recovery-zone settings (follow-up to #4786)#4787
cagnulein merged 8 commits into
masterfrom
codex/pid-hr-pushy-followup

Conversation

@cagnulein

Copy link
Copy Markdown
Owner

Follow-up to #4786, which split #4494 into everything except the heart-rate bluetooth belt refactor. That split accidentally also dropped the PID HR "Pushy" zone-limit / recovery-zone settings and behavior, which were unrelated to the bluetooth heart changes. This PR brings just that part over from #4494.

Included (cherry-picked from #4494, no bluetooth.cpp/h changes):

Resolved a few merge conflicts against current master (settingCount / allSettingsCount bookkeeping, and one PID zone-1 threshold calc that had diverged). settings-catalog.json settingCount (962) now matches the actual entries array, and allSettingsCount (974) matches the allSettings array size.

Not compiled yet — will verify manually before merging.

cagnulein and others added 8 commits July 6, 2026 15:28
The 0.8 threshold controlling how far into the next zone the PID
'Pushy' mode can push was hardcoded. Exposed it as a QSettings entry
(default 0.8) and added a TextField control under Training Program
Options in settings.qml.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
When HR enters the upper part of the zone (above the slowdown threshold),
proactively reduce speed rather than waiting for the HR to cross into the
next zone. Threshold is the midpoint between pushyZoneLimit and the zone
top: e.g. pushy=0.8 -> slowdown at zone+0.9, leaving a neutral dead band
[0.8, 0.9] that prevents oscillation.

The outer condition guard is also relaxed from currentSpeed < maxSpeed
to plain trainprogram_pid_pushy so the slowdown path can fire even when
already at max speed.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace the auto-computed zone 1 lower boundary (zone1Limit - zoneWidth)
with a user-adjustable setting trainprogram_pid_hr_recovery_zone_limit
(default 60% of max HR). Appears in UI above the existing Pushy Zone Limit
setting. Allows users to fine-tune the lower boundary of zone 1 so the
speed-up trigger adapts to their individual heart rate profile.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@cagnulein
cagnulein merged commit 5e08fcb into master Jul 6, 2026
15 of 17 checks passed
@cagnulein
cagnulein deleted the codex/pid-hr-pushy-followup branch July 6, 2026 13:32
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.

1 participant