Apply resistance gain to FTMS target-resistance-level writes (Toputure TEB5) - #4795
Open
cagnulein wants to merge 2 commits into
Open
Apply resistance gain to FTMS target-resistance-level writes (Toputure TEB5)#4795cagnulein wants to merge 2 commits into
cagnulein wants to merge 2 commits into
Conversation
Fixes resistance mismatch on bikes like the Toputure TEB5, which internally amplifies the received resistance level (~25% higher than requested). The FTMS_SET_INDOOR_BIKE_SIMULATION_PARAMS branch already applied bike_resistance_gain_f/offset, but the FTMS_SET_TARGET_RESISTANCE_LEVEL branch used by TEB5 sent the raw value. Default gain is 1.0, so this is a no-op for anyone not configuring it. Fixes discussion #4793 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
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.
Summary
forceResistance()already supported a configurablebike_resistance_gain_fsetting, but it was only applied on theFTMS_SET_INDOOR_BIKE_SIMULATION_PARAMSwrite path — theFTMS_SET_TARGET_RESISTANCE_LEVELpath used by TEB5 sent the raw, uncorrected value.1.0, so behavior is unchanged for everyone who hasn't touched the setting.Fixes #4793
Test plan
bike_resistance_gain_f≈ 0.8 in Settings and confirms the bike's actual resistance now matches FitShow's requested level