mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-30 15:52:12 +01:00
LP-56 - Better txpid option namings, fix tabs-spaces, tooltips. headers, variable namings
This commit is contained in:
parent
3490057f69
commit
13f02e7d9d
@ -302,7 +302,7 @@ static void stabilizationInnerloopTask()
|
|||||||
-StabilizationBankMaximumRateToArray(stabSettings.stabBank.MaximumRate)[t],
|
-StabilizationBankMaximumRateToArray(stabSettings.stabBank.MaximumRate)[t],
|
||||||
StabilizationBankMaximumRateToArray(stabSettings.stabBank.MaximumRate)[t]
|
StabilizationBankMaximumRateToArray(stabSettings.stabBank.MaximumRate)[t]
|
||||||
);
|
);
|
||||||
const float acro_factors[] = {
|
const float acroFactors[] = {
|
||||||
stabSettings.stabBank.AcroInsanityFactor.Roll,
|
stabSettings.stabBank.AcroInsanityFactor.Roll,
|
||||||
stabSettings.stabBank.AcroInsanityFactor.Pitch,
|
stabSettings.stabBank.AcroInsanityFactor.Pitch,
|
||||||
stabSettings.stabBank.AcroInsanityFactor.Yaw
|
stabSettings.stabBank.AcroInsanityFactor.Yaw
|
||||||
@ -310,7 +310,7 @@ static void stabilizationInnerloopTask()
|
|||||||
pid_scaler ascaler = create_pid_scaler(t);
|
pid_scaler ascaler = create_pid_scaler(t);
|
||||||
ascaler.i *= boundf(1.0f - (1.5f * fabsf(stickinput[t])), 0.0f, 1.0f); // this prevents Integral from getting too high while controlled manually
|
ascaler.i *= boundf(1.0f - (1.5f * fabsf(stickinput[t])), 0.0f, 1.0f); // this prevents Integral from getting too high while controlled manually
|
||||||
float arate = pid_apply_setpoint(&stabSettings.innerPids[t], &ascaler, rate[t], gyro_filtered[t], dT);
|
float arate = pid_apply_setpoint(&stabSettings.innerPids[t], &ascaler, rate[t], gyro_filtered[t], dT);
|
||||||
float factor = fabsf(stickinput[t]) * acro_factors[t];
|
float factor = fabsf(stickinput[t]) * acroFactors[t];
|
||||||
actuatorDesiredAxis[t] = factor * stickinput[t] + (1.0f - factor) * arate;
|
actuatorDesiredAxis[t] = factor * stickinput[t] + (1.0f - factor) * arate;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -383,13 +383,13 @@ static void updatePIDs(UAVObjEvent *ev)
|
|||||||
case TXPIDSETTINGS_PIDS_GYROTAU:
|
case TXPIDSETTINGS_PIDS_GYROTAU:
|
||||||
needsUpdateStab |= update(&stab.GyroTau, value);
|
needsUpdateStab |= update(&stab.GyroTau, value);
|
||||||
break;
|
break;
|
||||||
case TXPIDSETTINGS_PIDS_ACROPLUSFACTORROLL:
|
case TXPIDSETTINGS_PIDS_ACROROLLFACTOR:
|
||||||
needsUpdateBank |= update(&bank.AcroInsanityFactor.Roll, value);
|
needsUpdateBank |= update(&bank.AcroInsanityFactor.Roll, value);
|
||||||
break;
|
break;
|
||||||
case TXPIDSETTINGS_PIDS_ACROPLUSFACTORPITCH:
|
case TXPIDSETTINGS_PIDS_ACROPITCHFACTOR:
|
||||||
needsUpdateBank |= update(&bank.AcroInsanityFactor.Pitch, value);
|
needsUpdateBank |= update(&bank.AcroInsanityFactor.Pitch, value);
|
||||||
break;
|
break;
|
||||||
case TXPIDSETTINGS_PIDS_ACROPLUSFACTORROLLPITCH:
|
case TXPIDSETTINGS_PIDS_ACROROLLPITCHFACTOR:
|
||||||
needsUpdateBank |= update(&bank.AcroInsanityFactor.Roll, value);
|
needsUpdateBank |= update(&bank.AcroInsanityFactor.Roll, value);
|
||||||
needsUpdateBank |= update(&bank.AcroInsanityFactor.Pitch, value);
|
needsUpdateBank |= update(&bank.AcroInsanityFactor.Pitch, value);
|
||||||
break;
|
break;
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
******************************************************************************
|
******************************************************************************
|
||||||
*
|
*
|
||||||
* @file configstabilizationwidget.cpp
|
* @file configstabilizationwidget.cpp
|
||||||
|
* @author The LibrePilot Project, http://www.librepilot.org Copyright (C) 2015.
|
||||||
* @author E. Lafargue & The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
|
* @author E. Lafargue & The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
|
||||||
* @addtogroup GCSPlugins GCS Plugins
|
* @addtogroup GCSPlugins GCS Plugins
|
||||||
* @{
|
* @{
|
||||||
|
@ -164,9 +164,9 @@ static bool isExpoOption(int pidOption)
|
|||||||
static bool isAcroPlusFactorOption(int pidOption)
|
static bool isAcroPlusFactorOption(int pidOption)
|
||||||
{
|
{
|
||||||
switch (pidOption) {
|
switch (pidOption) {
|
||||||
case TxPIDSettings::PIDS_ACROPLUSFACTORPITCH:
|
case TxPIDSettings::PIDS_ACROPITCHFACTOR:
|
||||||
case TxPIDSettings::PIDS_ACROPLUSFACTORROLL:
|
case TxPIDSettings::PIDS_ACROROLLFACTOR:
|
||||||
case TxPIDSettings::PIDS_ACROPLUSFACTORROLLPITCH:
|
case TxPIDSettings::PIDS_ACROROLLPITCHFACTOR:
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@ -300,10 +300,10 @@ static float defaultValueForPidOption(const StabilizationSettingsBankX *bank, in
|
|||||||
|
|
||||||
case TxPIDSettings::PIDS_YAWEXPO:
|
case TxPIDSettings::PIDS_YAWEXPO:
|
||||||
return bank->getStickExpo_Yaw();
|
return bank->getStickExpo_Yaw();
|
||||||
case TxPIDSettings::PIDS_ACROPLUSFACTORROLL:
|
case TxPIDSettings::PIDS_ACROROLLFACTOR:
|
||||||
case TxPIDSettings::PIDS_ACROPLUSFACTORROLLPITCH:
|
case TxPIDSettings::PIDS_ACROROLLPITCHFACTOR:
|
||||||
return bank->getAcroInsanityFactor_Roll();
|
return bank->getAcroInsanityFactor_Roll();
|
||||||
case TxPIDSettings::PIDS_ACROPLUSFACTORPITCH:
|
case TxPIDSettings::PIDS_ACROPITCHFACTOR:
|
||||||
return bank->getAcroInsanityFactor_Pitch();
|
return bank->getAcroInsanityFactor_Pitch();
|
||||||
case -1: // The PID Option field was uninitialized.
|
case -1: // The PID Option field was uninitialized.
|
||||||
return 0.0f;
|
return 0.0f;
|
||||||
|
@ -208,7 +208,7 @@ margin-top: -1px;
|
|||||||
<enum>Qt::StrongFocus</enum>
|
<enum>Qt::StrongFocus</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string><html><head/><body><p>Link roll &amp; pitch sliders to move together, thus giving same value for both roll &amp; pitch when setting up a symetrical vehicle that requires both to be the same</p></body></html></string>
|
<string><html><head/><body><p>Link roll &amp; pitch sliders to move together</p></body></html></string>
|
||||||
</property>
|
</property>
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
<string notr="true"/>
|
<string notr="true"/>
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
Roll+Pitch Attitude.Kp, Roll+Pitch Attitude.Ki, Roll+Pitch Attitude.ILimit, Roll+Pitch Attitude.Resp,
|
Roll+Pitch Attitude.Kp, Roll+Pitch Attitude.Ki, Roll+Pitch Attitude.ILimit, Roll+Pitch Attitude.Resp,
|
||||||
Yaw Attitude.Kp, Yaw Attitude.Ki, Yaw Attitude.ILimit, Yaw Attitude.Resp,
|
Yaw Attitude.Kp, Yaw Attitude.Ki, Yaw Attitude.ILimit, Yaw Attitude.Resp,
|
||||||
Roll.Expo, Pitch.Expo, Roll+Pitch.Expo, Yaw.Expo,
|
Roll.Expo, Pitch.Expo, Roll+Pitch.Expo, Yaw.Expo,
|
||||||
GyroTau,AcroPlusFactorRollPitch,AcroPlusFactorRoll,AcroPlusFactorPitch,Altitude Pos.Kp,Altitude Velocity.Kp,Altitude Velocity.Ki,Altitude Velocity.Kd,Altitude Velocity.Beta,
|
GyroTau,Acro+ Roll Factor,Acro+ Pitch Factor,Acro+ Roll+Pitch Factor,Altitude Pos.Kp,Altitude Velocity.Kp,Altitude Velocity.Ki,Altitude Velocity.Kd,Altitude Velocity.Beta,
|
||||||
AccelTau, AccelKp, AccelKi"
|
AccelTau, AccelKp, AccelKi"
|
||||||
defaultvalue="Disabled"/>
|
defaultvalue="Disabled"/>
|
||||||
<field name="MinPID" units="" type="float" elementnames="Instance1,Instance2,Instance3" defaultvalue="0"/>
|
<field name="MinPID" units="" type="float" elementnames="Instance1,Instance2,Instance3" defaultvalue="0"/>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user