mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-24 16:55:36 +03:00
Remove d min confusion (#13908)
* rename dMin, remove D_MIN_GAIN_MAX * rename vars * fix logic * fix logic * Revert "fix tests" This reverts commitc518c9c444
. * Revert "add yaw and other adjustment cases" This reverts commit2cacd4b360
. * Revert "fix unit test" This reverts commit3d88f4158a
. * Revert "fix D adjustments change dmax instead of D" This reverts commit7ee4e7f8af
. * Revert "Fix telemetry for Spektrum/SRXL (#13814)" This reverts commit04fe4b4461
. * review adjustments and test fixes * Reapply "Fix telemetry for Spektrum/SRXL (#13814)" This reverts commiteb7f8ee0fd
. * fix logic * Apply suggestions from code review Co-authored-by: Jan Post <Rm2k-Freak@web.de> Co-authored-by: Mark Haslinghuis <mark@numloq.nl> * fix d_max slider --------- Co-authored-by: Jan Post <Rm2k-Freak@web.de> Co-authored-by: Mark Haslinghuis <mark@numloq.nl>
This commit is contained in:
parent
c0c24d7f52
commit
908f9cc32d
16 changed files with 143 additions and 154 deletions
|
@ -550,10 +550,6 @@ TEST_F(RcControlsAdjustmentsTest, processPIDIncreasePidController0)
|
|||
pidProfile.pid[PID_YAW].I = 17;
|
||||
pidProfile.pid[PID_YAW].D = 27;
|
||||
|
||||
pidProfile.d_min[FD_PITCH] = 19;
|
||||
pidProfile.d_min[FD_ROLL] = 19;
|
||||
pidProfile.d_min[FD_YAW] = 19;
|
||||
|
||||
// and
|
||||
controlRateConfig_t controlRateConfig;
|
||||
memset(&controlRateConfig, 0, sizeof(controlRateConfig));
|
||||
|
@ -564,7 +560,7 @@ TEST_F(RcControlsAdjustmentsTest, processPIDIncreasePidController0)
|
|||
const timedAdjustmentState_t *adjustmentState4 = configureStepwiseAdjustment(AUX1 - NON_AUX_CHANNEL_COUNT, ADJUSTMENT_YAW_P_INDEX);
|
||||
const timedAdjustmentState_t *adjustmentState5 = configureStepwiseAdjustment(AUX2 - NON_AUX_CHANNEL_COUNT, ADJUSTMENT_YAW_I_INDEX);
|
||||
const timedAdjustmentState_t *adjustmentState6 = configureStepwiseAdjustment(AUX3 - NON_AUX_CHANNEL_COUNT, ADJUSTMENT_YAW_D_INDEX);
|
||||
|
||||
|
||||
// and
|
||||
for (int index = AUX1; index < MAX_SUPPORTED_RC_CHANNEL_COUNT; index++) {
|
||||
rcData[index] = PWM_RANGE_MIDDLE;
|
||||
|
@ -596,16 +592,13 @@ TEST_F(RcControlsAdjustmentsTest, processPIDIncreasePidController0)
|
|||
// and
|
||||
EXPECT_EQ(1, pidProfile.pid[PID_PITCH].P);
|
||||
EXPECT_EQ(11, pidProfile.pid[PID_PITCH].I);
|
||||
EXPECT_EQ(20, pidProfile.pid[PID_PITCH].D);
|
||||
EXPECT_EQ(20, pidProfile.d_min[FD_PITCH]);
|
||||
EXPECT_EQ(21, pidProfile.pid[PID_PITCH].D);
|
||||
EXPECT_EQ(6, pidProfile.pid[PID_ROLL].P);
|
||||
EXPECT_EQ(16, pidProfile.pid[PID_ROLL].I);
|
||||
EXPECT_EQ(25, pidProfile.pid[PID_ROLL].D);
|
||||
EXPECT_EQ(20, pidProfile.d_min[FD_ROLL]);
|
||||
EXPECT_EQ(26, pidProfile.pid[PID_ROLL].D);
|
||||
EXPECT_EQ(8, pidProfile.pid[PID_YAW].P);
|
||||
EXPECT_EQ(18, pidProfile.pid[PID_YAW].I);
|
||||
EXPECT_EQ(27, pidProfile.pid[PID_YAW].D);
|
||||
EXPECT_EQ(20, pidProfile.d_min[FD_YAW]);
|
||||
EXPECT_EQ(28, pidProfile.pid[PID_YAW].D);
|
||||
}
|
||||
|
||||
extern "C" {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue