From 78aebbc56e0dcf0229a4d9b0b0b75290c3d7fe6b Mon Sep 17 00:00:00 2001 From: Raphael Hunziker Date: Thu, 10 Sep 2026 23:38:51 +0200 Subject: [PATCH] ez_tune: apply the expo setting instead of the rate setting 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. --- src/main/flight/ez_tune.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/flight/ez_tune.c b/src/main/flight/ez_tune.c index 68707849071..9f962f3394b 100644 --- a/src/main/flight/ez_tune.c +++ b/src/main/flight/ez_tune.c @@ -140,8 +140,8 @@ void ezTuneUpdate(void) { ((controlConfig_t*)currentControlProfile)->stabilized.rates[FD_PITCH] = scaleRange(ezTune()->rate, 0, 200, 30, 90); ((controlConfig_t*)currentControlProfile)->stabilized.rates[FD_YAW] = scaleRange(ezTune()->rate, 0, 200, 30, 90) - 10; - ((controlConfig_t*)currentControlProfile)->stabilized.rcExpo8 = scaleRange(ezTune()->rate, 0, 200, 40, 100); - ((controlConfig_t*)currentControlProfile)->stabilized.rcYawExpo8 = scaleRange(ezTune()->rate, 0, 200, 40, 100); + ((controlConfig_t*)currentControlProfile)->stabilized.rcExpo8 = scaleRange(ezTune()->expo, 0, 200, 40, 100); + ((controlConfig_t*)currentControlProfile)->stabilized.rcYawExpo8 = scaleRange(ezTune()->expo, 0, 200, 40, 100); //D-Boost snappiness pidProfileMutable()->dBoostMin = scaleRangef(ezTune()->snappiness, 0, 100, 1.0f, 0.0f);