mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-03-16 08:29:15 +01:00
OP-1590 Uncrustify
This commit is contained in:
parent
fc4766a25f
commit
f7f92d2b3d
@ -144,6 +144,7 @@ ConfigStabilizationWidget::ConfigStabilizationWidget(QWidget *parent) : ConfigTa
|
||||
void ConfigStabilizationWidget::setupStabBanksGUI()
|
||||
{
|
||||
StabilizationSettings *stabSettings = qobject_cast<StabilizationSettings *>(getObject("StabilizationSettings"));
|
||||
|
||||
Q_ASSERT(stabSettings);
|
||||
|
||||
m_stabSettingsBankCount = stabSettings->getField("FlightModeMap")->getOptions().count();
|
||||
@ -235,6 +236,7 @@ ConfigStabilizationWidget::~ConfigStabilizationWidget()
|
||||
void ConfigStabilizationWidget::refreshWidgetsValues(UAVObject *o)
|
||||
{
|
||||
ConfigTaskWidget::refreshWidgetsValues(o);
|
||||
|
||||
updateThrottleCurveFromObject();
|
||||
|
||||
ui->basicResponsivenessCheckBox->setChecked(ui->rateRollKp_3->value() == ui->ratePitchKp_4->value() &&
|
||||
@ -423,7 +425,8 @@ void ConfigStabilizationWidget::restoreCurrentAction()
|
||||
restoreStabBank(m_currentStabSettingsBank);
|
||||
}
|
||||
|
||||
UAVObject * ConfigStabilizationWidget::getStabBankObject(int bank) {
|
||||
UAVObject *ConfigStabilizationWidget::getStabBankObject(int bank)
|
||||
{
|
||||
return getObject(QString("StabilizationSettingsBank%1").arg(bank + 1));
|
||||
}
|
||||
|
||||
@ -431,6 +434,7 @@ void ConfigStabilizationWidget::resetStabBank(int bank)
|
||||
{
|
||||
UAVDataObject *stabBankObject =
|
||||
dynamic_cast<UAVDataObject *>(getStabBankObject(bank));
|
||||
|
||||
if (stabBankObject) {
|
||||
UAVDataObject *defaultStabBankObject = stabBankObject->dirtyClone();
|
||||
quint8 data[stabBankObject->getNumBytes()];
|
||||
@ -442,6 +446,7 @@ void ConfigStabilizationWidget::resetStabBank(int bank)
|
||||
void ConfigStabilizationWidget::restoreStabBank(int bank)
|
||||
{
|
||||
UAVObject *stabBankObject = getStabBankObject(bank);
|
||||
|
||||
if (stabBankObject) {
|
||||
ObjectPersistence *objectPersistenceObject = ObjectPersistence::GetInstance(getObjectManager());
|
||||
QTimer updateTimer(this);
|
||||
@ -473,6 +478,7 @@ void ConfigStabilizationWidget::resetCurrentStabBank()
|
||||
void ConfigStabilizationWidget::copyCurrentStabBank()
|
||||
{
|
||||
UAVObject *fromStabBankObject = getStabBankObject(m_currentStabSettingsBank);
|
||||
|
||||
if (fromStabBankObject) {
|
||||
quint8 fromStabBankObjectData[fromStabBankObject->getNumBytes()];
|
||||
fromStabBankObject->pack(fromStabBankObjectData);
|
||||
@ -487,9 +493,11 @@ void ConfigStabilizationWidget::copyCurrentStabBank()
|
||||
}
|
||||
}
|
||||
|
||||
void ConfigStabilizationWidget::copyFromBankToBank(int fromBank, int toBank) {
|
||||
void ConfigStabilizationWidget::copyFromBankToBank(int fromBank, int toBank)
|
||||
{
|
||||
UAVObject *fromStabBankObject = getStabBankObject(fromBank);
|
||||
UAVObject *toStabBankObject = getStabBankObject(toBank);
|
||||
|
||||
if (fromStabBankObject && toStabBankObject) {
|
||||
quint8 data[fromStabBankObject->getNumBytes()];
|
||||
fromStabBankObject->pack(data);
|
||||
@ -511,6 +519,7 @@ void ConfigStabilizationWidget::swapBankAndCurrent(int bank)
|
||||
{
|
||||
UAVObject *fromStabBankObject = getStabBankObject(m_currentStabSettingsBank);
|
||||
UAVObject *toStabBankObject = getStabBankObject(bank);
|
||||
|
||||
if (fromStabBankObject && toStabBankObject) {
|
||||
quint8 fromStabBankObjectData[fromStabBankObject->getNumBytes()];
|
||||
quint8 toStabBankObjectData[toStabBankObject->getNumBytes()];
|
||||
|
@ -37,8 +37,7 @@ ActuatorCommand::Metadata OutputCalibrationUtil::c_savedActuatorCommandMetaData;
|
||||
|
||||
OutputCalibrationUtil::OutputCalibrationUtil(QObject *parent) :
|
||||
QObject(parent), m_outputChannel(-1), m_safeValue(1000)
|
||||
{
|
||||
}
|
||||
{}
|
||||
|
||||
OutputCalibrationUtil::~OutputCalibrationUtil()
|
||||
{
|
||||
@ -48,6 +47,7 @@ OutputCalibrationUtil::~OutputCalibrationUtil()
|
||||
ActuatorCommand *OutputCalibrationUtil::getActuatorCommandObject()
|
||||
{
|
||||
ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance();
|
||||
|
||||
Q_ASSERT(pm);
|
||||
|
||||
UAVObjectManager *uavObjectManager = pm->getObject<UAVObjectManager>();
|
||||
|
Loading…
x
Reference in New Issue
Block a user