diff --git a/ground/openpilotgcs/src/plugins/config/configtxpidwidget.cpp b/ground/openpilotgcs/src/plugins/config/configtxpidwidget.cpp index 4787056c4..f8d51a97b 100644 --- a/ground/openpilotgcs/src/plugins/config/configtxpidwidget.cpp +++ b/ground/openpilotgcs/src/plugins/config/configtxpidwidget.cpp @@ -28,6 +28,7 @@ #include "configtxpidwidget.h" #include "txpidsettings.h" #include "hwsettings.h" +#include "attitudesettings.h" #include "stabilizationsettings.h" #include "stabilizationsettingsbank1.h" #include "stabilizationsettingsbank2.h" @@ -305,6 +306,15 @@ float ConfigTxPIDWidget::getDefaultValueForPidOption(int pidOption) if (pidOption == TxPIDSettings::PIDS_GYROTAU) { StabilizationSettings *stab = qobject_cast(getObject(QString("StabilizationSettings"))); return stab->getGyroTau(); + } else if (pidOption == TxPIDSettings::PIDS_ACCELTAU) { + AttitudeSettings *att = qobject_cast(getObject(QString("AttitudeSettings"))); + return att->getAccelTau(); + } else if (pidOption == TxPIDSettings::PIDS_ACCELKP) { + AttitudeSettings *att = qobject_cast(getObject(QString("AttitudeSettings"))); + return att->getAccelKp(); + } else if (pidOption == TxPIDSettings::PIDS_ACCELKI) { + AttitudeSettings *att = qobject_cast(getObject(QString("AttitudeSettings"))); + return att->getAccelKi(); } int pidBankIndex = m_txpid->pidBank->currentIndex();