mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-23 00:05:33 +03:00
Removed TPA from Yaw axis and Changed variable name
PIDscaler changed to PIDweight as it suits better and is more understandable as it is percentage of the PID's used. Yaw TPA is removed as I don't find it necessary after more testing
This commit is contained in:
parent
174cf545b1
commit
4ec28b8cce
2 changed files with 17 additions and 12 deletions
|
@ -100,7 +100,7 @@ int16_t headFreeModeHold;
|
|||
int16_t telemTemperature1; // gyro sensor temperature
|
||||
static uint32_t disarmAt; // Time of automatic disarm when "Don't spin the motors when armed" is enabled and auto_disarm_delay is nonzero
|
||||
|
||||
extern uint8_t dynP8[3], dynI8[3], dynD8[3], PIDscaler[3];
|
||||
extern uint8_t dynP8[3], dynI8[3], dynD8[3], PIDweight[3];
|
||||
|
||||
typedef void (*pidControllerFuncPtr)(pidProfile_t *pidProfile, controlRateConfig_t *controlRateConfig,
|
||||
uint16_t max_angle_inclination, rollAndPitchTrims_t *angleTrim, rxConfig_t *rxConfig); // pid controller function prototype
|
||||
|
@ -218,8 +218,13 @@ void annexCode(void)
|
|||
dynI8[axis] = (uint16_t)currentProfile->pidProfile.I8[axis] * prop1 / 100;
|
||||
dynD8[axis] = (uint16_t)currentProfile->pidProfile.D8[axis] * prop1 / 100;
|
||||
|
||||
// non coupled PID reduction used in PID controller 1 and PID controller 2
|
||||
PIDscaler[axis] = prop2;
|
||||
// non coupled PID reduction scaler used in PID controller 1 and PID controller 2. YAW TPA disabled. 100 means 100% of the pids
|
||||
if (axis == YAW) {
|
||||
PIDweight[axis] = 100;
|
||||
}
|
||||
else {
|
||||
PIDweight[axis] = prop2;
|
||||
}
|
||||
|
||||
if (rcData[axis] < masterConfig.rxConfig.midrc)
|
||||
rcCommand[axis] = -rcCommand[axis];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue