Conversation
ezTuneUpdate() derived rcExpo8 and rcYawExpo8 from ezTune()->rate:
stabilized.rcExpo8 = scaleRange(ezTune()->rate, 0, 200, 40, 100);
The two lines directly above it set the rates from the same field, so
this reads as a copy-paste slip. The consequence is that ez_expo has no
effect at all - it is stored, carried over MSP2_INAV_EZ_TUNE in both
directions and offered in the Configurator, but never reaches the
control profile - while moving the rate slider silently changed the
expo curve as well.
The Configurator confirms the intent. tabs/pid_tuning.js draws the
EZ-Tune expo preview with
scaleRange($('#ez_tune_expo').val(), 0, 200, 40, 100)
which is the same formula against the same range, fed from the expo
slider. The curve shown to the user was therefore the one the firmware
was supposed to apply, not the one it did apply.
Both settings default to 100, so the applied expo at defaults is
unchanged at 70, which is also the rc_expo default. Only a setup that
moved the rate slider away from 100 sees a different expo, and that is
the behaviour being corrected.
Raffi1202
marked this pull request as ready for review
September 11, 2026 15:35
Contributor
|
ⓘ Qodo reviews are paused because the subscription is no longer active. Ask your workspace admin to reactivate the subscription to resume reviews. Manage billing |
PR Summary by QodoApply EZ-Tune expo setting to control profile expo
AI Description
Diagram
High-Level Assessment
Files changed (1)
|
Code Review by Qodo🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)
Great, no issues found!Qodo reviewed your code and found no material issues that require reviewTip of the day💡 Did you know, you can switch off images and animations for a plain-text comment |
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.
Problem
No issue was filed; found while writing the EZ-Tune documentation page (iNavFlight/iNavFlight.github.io#21). With EZ-Tune enabled, the expo slider (
ez_expo) in the Configurator does nothing: the stick curve stays the same however it is set, although the Configurator draws a preview curve for it. Moving the rate slider (ez_rate) changes the expo as well, with nothing on screen saying so.Cause
src/main/flight/ez_tune.c:143-144onmaintenance-10.x:ezTuneUpdate()computesstabilized.rcExpo8andstabilized.rcYawExpo8fromezTune()->rateinstead ofezTune()->expo. The three lines above set the axis rates from the same field, so the expo lines read as a copy-paste slip. On that branchezTune()->expois read in only one other place,src/main/fc/fc_msp.c:1948, which sends it back overMSP2_INAV_EZ_TUNE; the setting never reaches the control profile. The same two lines exist onrelease/9.1(src/main/flight/ez_tune.c:143-144) and the diff applies there cleanly.Change
Two lines: the
rcExpo8andrcYawExpo8assignments readezTune()->expoinstead ofezTune()->rate. The mappingscaleRange(..., 0, 200, 40, 100)is unchanged and is the one the Configurator uses for its expo preview (tabs/pid_tuning.js:107).ez_rateandez_expoboth default to 100, so the applied expo at defaults stays 70 for roll/pitch and yaw. A profile withez_rateaway from 100 gets a different expo on its nextezTuneUpdate(); that is the corrected behaviour and worth a release-note line.Test
Not run on hardware or SITL. Cause verified by reading
src/main/flight/ez_tune.c:143-144andsrc/main/fc/fc_msp.c:1948onmaintenance-10.x. The upstream "Build firmware" run for 78aebbc is waiting for maintainer approval: https://github.com/iNavFlight/inav/actions/runs/34533382666.Flash / RAM
Not measured yet. The upstream firmware CI has not been released for this PR, so no size report exists.
Docs
No documentation change needed:
docs/Settings.mdis generated fromsettings.yaml, which is unchanged, and itsez_expoentry ("EzTune expo") already describes the corrected behaviour. There is no EZ-Tune page underdocs/onmaintenance-10.x; the user-facing page is iNavFlight/iNavFlight.github.io#21.