fix: restore B628 mph-to-km/h speed conversion in nautilusbike - #4839
Merged
Conversation
Commit 19ffdd6 ("B616 can be miles too") replaced `if (!B616)` with `if (milesUnit)` to support B616 bikes configured in miles mode, but this broke the B628 (and similar non-B616 models) which always send speed in mph and need the conversion regardless of the UI unit setting. Restore per-model logic: non-B616 models always multiply by 1.60934, while B616 only multiplies when the user has miles mode enabled. Closes #4838 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
cagnulein
force-pushed
the
fix/nautilusbike-b628-speed-mph-to-kmh
branch
from
July 22, 2026 14:44
3f04d46 to
086ffcb
Compare
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
if (!B616)withif (milesUnit)to support B616 bikes configured in miles modeFix: restore per-model logic in
GetSpeedFromPacket:milesUnitis true (device sends km/h normally, mph when bike is in miles mode)Closes #4838
Test plan
miles_unit = false: should now show ~36 km/h matching the bike console (was ~23 before)miles_unit = true: should show the correct mph value (~22.4 mph)miles_unit = false: unchanged — device sends km/h, no conversion appliedmiles_unit = true: unchanged — multiplies by 1.60934🤖 Generated with Claude Code