PID HR Pushy zone-limit/recovery-zone settings (follow-up to #4786) - #4787
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
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.