Skip to content

Improve trainer recovery and terrain gearing#14

Merged
ridecontrol merged 2 commits into
mainfrom
fix/trainer-recovery-and-gearing
Jul 23, 2026
Merged

Improve trainer recovery and terrain gearing#14
ridecontrol merged 2 commits into
mainfrom
fix/trainer-recovery-and-gearing

Conversation

@ridecontrol

Copy link
Copy Markdown
Collaborator

What changed

  • makes trainer, heart-rate, and controller pairing attempts cancellable and makes forgetting a device update the UI immediately
  • coalesces live FTMS resistance commands, waits for matching control acknowledgements, and cleanly reconnects after transport failures
  • gives required FTMS setup a trainer-appropriate timeout while retaining fast runtime command failure recovery
  • prevents advertisements received during an active handshake from collapsing retry backoff into a reconnect loop
  • removes route-specific base resistance and applies one shared grade-driven terrain target before virtual gearing
  • recalibrates the 24 physical gear ratios, keeps modest climbs easy in gear 1, and improves resistance chart scaling

Why

Recent rides exposed stalled Bluetooth states, stale command queues, aggressive service-discovery timeouts, and resistance that remained too high in low gears. Route-specific resistance baselines also conflicted with the shared terrain and virtual-gearing model.

Impact

Trainer connections recover more predictably across FTMS-compatible hardware, pairing can always be stopped or forgotten, and terrain load is derived consistently from grade with the selected virtual gear applied afterward.

Validation

  • bun run ci
  • Biome clean with warnings treated as errors
  • Tailwind diagnostics passed
  • 270 unit tests passed
  • TypeScript check passed
  • production build passed

@ridecontrol
ridecontrol marked this pull request as ready for review July 23, 2026 06:58
@ridecontrol
ridecontrol merged commit 2460f31 into main Jul 23, 2026
1 check passed
@ridecontrol
ridecontrol deleted the fix/trainer-recovery-and-gearing branch July 23, 2026 06:59
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