mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-19 04:52:12 +01:00
Merge branch 'steve/OP-1903_Add_TxPID_controls_for_AttitudeSettings' into steve/OP-1904_Display_current_TxPID_settings_on_OSD
This commit is contained in:
commit
1cdc1635bd
@ -28,6 +28,7 @@
|
|||||||
#include "configtxpidwidget.h"
|
#include "configtxpidwidget.h"
|
||||||
#include "txpidsettings.h"
|
#include "txpidsettings.h"
|
||||||
#include "hwsettings.h"
|
#include "hwsettings.h"
|
||||||
|
#include "attitudesettings.h"
|
||||||
#include "stabilizationsettings.h"
|
#include "stabilizationsettings.h"
|
||||||
#include "stabilizationsettingsbank1.h"
|
#include "stabilizationsettingsbank1.h"
|
||||||
#include "stabilizationsettingsbank2.h"
|
#include "stabilizationsettingsbank2.h"
|
||||||
@ -305,6 +306,15 @@ float ConfigTxPIDWidget::getDefaultValueForPidOption(int pidOption)
|
|||||||
if (pidOption == TxPIDSettings::PIDS_GYROTAU) {
|
if (pidOption == TxPIDSettings::PIDS_GYROTAU) {
|
||||||
StabilizationSettings *stab = qobject_cast<StabilizationSettings *>(getObject(QString("StabilizationSettings")));
|
StabilizationSettings *stab = qobject_cast<StabilizationSettings *>(getObject(QString("StabilizationSettings")));
|
||||||
return stab->getGyroTau();
|
return stab->getGyroTau();
|
||||||
|
} else if (pidOption == TxPIDSettings::PIDS_ACCELTAU) {
|
||||||
|
AttitudeSettings *att = qobject_cast<AttitudeSettings *>(getObject(QString("AttitudeSettings")));
|
||||||
|
return att->getAccelTau();
|
||||||
|
} else if (pidOption == TxPIDSettings::PIDS_ACCELKP) {
|
||||||
|
AttitudeSettings *att = qobject_cast<AttitudeSettings *>(getObject(QString("AttitudeSettings")));
|
||||||
|
return att->getAccelKp();
|
||||||
|
} else if (pidOption == TxPIDSettings::PIDS_ACCELKI) {
|
||||||
|
AttitudeSettings *att = qobject_cast<AttitudeSettings *>(getObject(QString("AttitudeSettings")));
|
||||||
|
return att->getAccelKi();
|
||||||
}
|
}
|
||||||
|
|
||||||
int pidBankIndex = m_txpid->pidBank->currentIndex();
|
int pidBankIndex = m_txpid->pidBank->currentIndex();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user