Repository navigation
fix(v15): IMU axis orientation and function switch handling - #7890
Merged
Merged
Conversation
The IMU is mounted upside down and rotated, so TltX followed the Y tilt and TltY the X tilt, both reversed. Swap X/Y in the board's IMU read (before the generic inversion and calibration, so the X/Y settings stay attached to the right source). Both axes are already inverted by default via imu_invert_x/y. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The six function switch buttons are a resistor ladder on PC5, read by sixPosUpdateFromAdc(). V15 exposed that input as P3, a FLEX pot with a MULTIPOS default, so a meaningless S3 showed up in sources and calibration. Its switch state map was also inverted: idle read as all six pressed and the held button as released, so function switches acted on release. Declare the input as RAW1 (as V12 does) and use V12's debounced six-position/function switch code. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <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.
Two HelloRadioSky V15 fixes found during hardware testing after #7867. The same fixes are in the 2.12 port (#7868).
IMU axis orientation
The IMU is mounted face down (flipped about its X=−Y diagonal), so TltX followed the Y tilt and TltY the X tilt, both reversed. The board's IMU read now swaps X/Y before the generic inversion and calibration, so the X/Y invert settings and calibration stay attached to the right tilt source.
imu_invert_x/yalready inverts both axes by default.Function switches / phantom S3
The six function switch buttons are a resistor ladder on PC5, decoded by
sixPosUpdateFromAdc().P3, a FLEX pot with a MULTIPOS default, so a meaningless S3 appeared in sources, calibration and Lua. It is nowRAW1, as on V12, at the same ADC index, soSIXPOS_SWITCH_INDEXis unchanged.Testing
commit-tests.sh(v15),generate-yaml.sh(no diff), and gtests-companion.🤖 Generated with Claude Code