mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-26 01:35:41 +03:00
use Throttle Setpoint, not rcDATA(throttle), for TPA
This commit is contained in:
parent
f2559fbfd8
commit
2262dfc60e
16 changed files with 37 additions and 43 deletions
|
@ -28,7 +28,6 @@ bool simulatedAirmodeEnabled = true;
|
|||
float simulatedSetpointRate[3] = { 0,0,0 };
|
||||
float simulatedPrevSetpointRate[3] = { 0,0,0 };
|
||||
float simulatedRcDeflection[3] = { 0,0,0 };
|
||||
float simulatedThrottlePIDAttenuation = 1.0f;
|
||||
float simulatedMotorMixRange = 0.0f;
|
||||
|
||||
int16_t debug[DEBUG16_VALUE_COUNT];
|
||||
|
@ -78,7 +77,6 @@ extern "C" {
|
|||
bool unitLaunchControlActive = false;
|
||||
launchControlMode_e unitLaunchControlMode = LAUNCH_CONTROL_MODE_NORMAL;
|
||||
|
||||
float getThrottlePIDAttenuation(void) { return simulatedThrottlePIDAttenuation; }
|
||||
float getMotorMixRange(void) { return simulatedMotorMixRange; }
|
||||
float getSetpointRate(int axis) { return simulatedSetpointRate[axis]; }
|
||||
bool isAirmodeActivated() { return simulatedAirmodeEnabled; }
|
||||
|
@ -180,7 +178,7 @@ timeUs_t currentTestTime(void) {
|
|||
|
||||
void resetTest(void) {
|
||||
loopIter = 0;
|
||||
simulatedThrottlePIDAttenuation = 1.0f;
|
||||
pidRuntime.tpaFactor = 1.0f;
|
||||
simulatedMotorMixRange = 0.0f;
|
||||
|
||||
pidStabilisationState(PID_STABILISATION_OFF);
|
||||
|
|
|
@ -259,7 +259,7 @@ protected:
|
|||
.thrMid8 = 0,
|
||||
.thrExpo8 = 0,
|
||||
.rates = {0, 0, 0},
|
||||
.dynThrPID = 0,
|
||||
.tpa_rate = 0,
|
||||
.rcExpo[FD_YAW] = 0,
|
||||
.tpa_breakpoint = 0
|
||||
};
|
||||
|
@ -287,7 +287,7 @@ protected:
|
|||
controlRateConfig.rates[0] = 0;
|
||||
controlRateConfig.rates[1] = 0;
|
||||
controlRateConfig.rates[2] = 0;
|
||||
controlRateConfig.dynThrPID = 0;
|
||||
controlRateConfig.tpa_rate = 0;
|
||||
controlRateConfig.tpa_breakpoint = 0;
|
||||
|
||||
PG_RESET(adjustmentRanges);
|
||||
|
@ -365,7 +365,7 @@ TEST_F(RcControlsAdjustmentsTest, processRcAdjustmentsWithRcRateFunctionSwitchUp
|
|||
.thrMid8 = 0,
|
||||
.thrExpo8 = 0,
|
||||
.rates = {0,0,0},
|
||||
.dynThrPID = 0,
|
||||
.tpa_rate = 0,
|
||||
.rcExpo[FD_YAW] = 0,
|
||||
.tpa_breakpoint = 0
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue