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]
|
||||
);
|
||||
const float acro_factors[] = {
|
||||
const float acroFactors[] = {
|
||||
stabSettings.stabBank.AcroInsanityFactor.Roll,
|
||||
stabSettings.stabBank.AcroInsanityFactor.Pitch,
|
||||
stabSettings.stabBank.AcroInsanityFactor.Yaw
|
||||
@ -310,7 +310,7 @@ static void stabilizationInnerloopTask()
|
||||
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
|
||||
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;
|
||||
}
|
||||
break;
|
||||
|
@ -383,13 +383,13 @@ static void updatePIDs(UAVObjEvent *ev)
|
||||
case TXPIDSETTINGS_PIDS_GYROTAU:
|
||||
needsUpdateStab |= update(&stab.GyroTau, value);
|
||||
break;
|
||||
case TXPIDSETTINGS_PIDS_ACROPLUSFACTORROLL:
|
||||
case TXPIDSETTINGS_PIDS_ACROROLLFACTOR:
|
||||
needsUpdateBank |= update(&bank.AcroInsanityFactor.Roll, value);
|
||||
break;
|
||||
case TXPIDSETTINGS_PIDS_ACROPLUSFACTORPITCH:
|
||||
case TXPIDSETTINGS_PIDS_ACROPITCHFACTOR:
|
||||
needsUpdateBank |= update(&bank.AcroInsanityFactor.Pitch, value);
|
||||
break;
|
||||
case TXPIDSETTINGS_PIDS_ACROPLUSFACTORROLLPITCH:
|
||||
case TXPIDSETTINGS_PIDS_ACROROLLPITCHFACTOR:
|
||||
needsUpdateBank |= update(&bank.AcroInsanityFactor.Roll, value);
|
||||
needsUpdateBank |= update(&bank.AcroInsanityFactor.Pitch, value);
|
||||
break;
|
||||
|
@ -2,6 +2,7 @@
|
||||
******************************************************************************
|
||||
*
|
||||
* @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.
|
||||
* @addtogroup GCSPlugins GCS Plugins
|
||||
* @{
|
||||
|
@ -164,9 +164,9 @@ static bool isExpoOption(int pidOption)
|
||||
static bool isAcroPlusFactorOption(int pidOption)
|
||||
{
|
||||
switch (pidOption) {
|
||||
case TxPIDSettings::PIDS_ACROPLUSFACTORPITCH:
|
||||
case TxPIDSettings::PIDS_ACROPLUSFACTORROLL:
|
||||
case TxPIDSettings::PIDS_ACROPLUSFACTORROLLPITCH:
|
||||
case TxPIDSettings::PIDS_ACROPITCHFACTOR:
|
||||
case TxPIDSettings::PIDS_ACROROLLFACTOR:
|
||||
case TxPIDSettings::PIDS_ACROROLLPITCHFACTOR:
|
||||
return true;
|
||||
|
||||
default:
|
||||
@ -300,10 +300,10 @@ static float defaultValueForPidOption(const StabilizationSettingsBankX *bank, in
|
||||
|
||||
case TxPIDSettings::PIDS_YAWEXPO:
|
||||
return bank->getStickExpo_Yaw();
|
||||
case TxPIDSettings::PIDS_ACROPLUSFACTORROLL:
|
||||
case TxPIDSettings::PIDS_ACROPLUSFACTORROLLPITCH:
|
||||
case TxPIDSettings::PIDS_ACROROLLFACTOR:
|
||||
case TxPIDSettings::PIDS_ACROROLLPITCHFACTOR:
|
||||
return bank->getAcroInsanityFactor_Roll();
|
||||
case TxPIDSettings::PIDS_ACROPLUSFACTORPITCH:
|
||||
case TxPIDSettings::PIDS_ACROPITCHFACTOR:
|
||||
return bank->getAcroInsanityFactor_Pitch();
|
||||
case -1: // The PID Option field was uninitialized.
|
||||
return 0.0f;
|
||||
|
@ -208,7 +208,7 @@ margin-top: -1px;
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<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 name="styleSheet">
|
||||
<string notr="true"/>
|
||||
|
@ -16,8 +16,8 @@
|
||||
<field name="PitchPI" units="" type="float" elementnames="Kp,Ki,ILimit" defaultvalue="2.5,0,50" limits="%BE:0:10; %BE:0:10; "/>
|
||||
<field name="YawPI" units="" type="float" elementnames="Kp,Ki,ILimit"/>
|
||||
|
||||
<field name="AcroInsanityFactor" units="percent" type="float" elementnames="Roll,Pitch,Yaw" defaultvalue="0.4" limits="%BE:0.0:1.0"/>
|
||||
|
||||
<field name="AcroInsanityFactor" units="percent" type="float" elementnames="Roll,Pitch,Yaw" defaultvalue="0.4" limits="%BE:0.0:1.0"/>
|
||||
|
||||
<field name="EnablePiroComp" units="" type="enum" elements="1" options="FALSE,TRUE" defaultvalue="TRUE"/>
|
||||
|
||||
<field name="EnableThrustPIDScaling" units="" type="enum" elements="1" options="FALSE,TRUE" defaultvalue="FALSE"/>
|
||||
|
@ -16,7 +16,7 @@
|
||||
<field name="PitchPI" units="" type="float" elementnames="Kp,Ki,ILimit" defaultvalue="2.5,0,50" limits="%BE:0:10; %BE:0:10; "/>
|
||||
<field name="YawPI" units="" type="float" elementnames="Kp,Ki,ILimit" defaultvalue="2.5,0,50" limits="%BE:0:10; %BE:0:10; "/>
|
||||
|
||||
<field name="AcroInsanityFactor" units="percent" type="float" elementnames="Roll,Pitch,Yaw" defaultvalue="0.4" limits="%BE:0.0:1.0"/>
|
||||
<field name="AcroInsanityFactor" units="percent" type="float" elementnames="Roll,Pitch,Yaw" defaultvalue="0.4" limits="%BE:0.0:1.0"/>
|
||||
|
||||
<field name="EnablePiroComp" units="" type="enum" elements="1" options="FALSE,TRUE" defaultvalue="TRUE"/>
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
<field name="PitchPI" units="" type="float" elementnames="Kp,Ki,ILimit" defaultvalue="2.5,0,50" limits="%BE:0:10; %BE:0:10; "/>
|
||||
<field name="YawPI" units="" type="float" elementnames="Kp,Ki,ILimit" defaultvalue="2.5,0,50" limits="%BE:0:10; %BE:0:10; "/>
|
||||
|
||||
<field name="AcroInsanityFactor" units="percent" type="float" elementnames="Roll,Pitch,Yaw" defaultvalue="0.4" limits="%BE:0.0:1.0"/>
|
||||
<field name="AcroInsanityFactor" units="percent" type="float" elementnames="Roll,Pitch,Yaw" defaultvalue="0.4" limits="%BE:0.0:1.0"/>
|
||||
|
||||
<field name="EnablePiroComp" units="" type="enum" elements="1" options="FALSE,TRUE" defaultvalue="TRUE"/>
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
<field name="PitchPI" units="" type="float" elementnames="Kp,Ki,ILimit" defaultvalue="2.5,0,50" limits="%BE:0:10; %BE:0:10; "/>
|
||||
<field name="YawPI" units="" type="float" elementnames="Kp,Ki,ILimit" defaultvalue="2.5,0,50" limits="%BE:0:10; %BE:0:10; "/>
|
||||
|
||||
<field name="AcroInsanityFactor" units="percent" type="float" elementnames="Roll,Pitch,Yaw" defaultvalue="0.4" limits="%BE:0.0:1.0"/>
|
||||
<field name="AcroInsanityFactor" units="percent" type="float" elementnames="Roll,Pitch,Yaw" defaultvalue="0.4" limits="%BE:0.0:1.0"/>
|
||||
|
||||
<field name="EnablePiroComp" units="" type="enum" elements="1" options="FALSE,TRUE" defaultvalue="TRUE"/>
|
||||
|
||||
|
@ -7,8 +7,8 @@
|
||||
elementnames="Instance1,Instance2,Instance3"
|
||||
options="Throttle,Accessory0,Accessory1,Accessory2,Accessory3,Accessory4,Accessory5"
|
||||
defaultvalue="Throttle,Accessory0,Accessory1"/>
|
||||
<field name="ThrottleRange" units="%" type="float" elements="2" elementnames="Min,Max" defaultvalue="0.20,0.80"/>
|
||||
<field name="PIDs" units="option" type="enum"
|
||||
<field name="ThrottleRange" units="%" type="float" elements="2" elementnames="Min,Max" defaultvalue="0.20,0.80"/>
|
||||
<field name="PIDs" units="option" type="enum"
|
||||
elementnames="Instance1,Instance2,Instance3"
|
||||
options="Disabled,
|
||||
Roll Rate.Kp, Roll Rate.Ki, Roll Rate.Kd, Roll Rate.ILimit, Roll Rate.Resp,
|
||||
@ -20,7 +20,7 @@
|
||||
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,
|
||||
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"
|
||||
defaultvalue="Disabled"/>
|
||||
<field name="MinPID" units="" type="float" elementnames="Instance1,Instance2,Instance3" defaultvalue="0"/>
|
||||
|
Loading…
x
Reference in New Issue
Block a user