mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-18 03:52:11 +01:00
OP-1000 Adds disabling of AH settings tab if board is not Revolution.
This commit is contained in:
parent
9cd368bd11
commit
02562902a9
@ -90,6 +90,8 @@ ConfigStabilizationWidget::ConfigStabilizationWidget(QWidget *parent) : ConfigTa
|
|||||||
|
|
||||||
connect(this, SIGNAL(widgetContentsChanged(QWidget *)), this, SLOT(processLinkedWidgets(QWidget *)));
|
connect(this, SIGNAL(widgetContentsChanged(QWidget *)), this, SLOT(processLinkedWidgets(QWidget *)));
|
||||||
|
|
||||||
|
connect(this, SIGNAL(autoPilotConnected()), this, SLOT(onBoardConnected()));
|
||||||
|
|
||||||
// Link by default
|
// Link by default
|
||||||
ui->checkBox_7->setChecked(true);
|
ui->checkBox_7->setChecked(true);
|
||||||
ui->checkBox_8->setChecked(true);
|
ui->checkBox_8->setChecked(true);
|
||||||
@ -103,7 +105,6 @@ ConfigStabilizationWidget::~ConfigStabilizationWidget()
|
|||||||
// Do nothing
|
// Do nothing
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void ConfigStabilizationWidget::refreshWidgetsValues(UAVObject *o)
|
void ConfigStabilizationWidget::refreshWidgetsValues(UAVObject *o)
|
||||||
{
|
{
|
||||||
ConfigTaskWidget::refreshWidgetsValues(o);
|
ConfigTaskWidget::refreshWidgetsValues(o);
|
||||||
@ -194,3 +195,13 @@ void ConfigStabilizationWidget::processLinkedWidgets(QWidget *widget)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ConfigStabilizationWidget::onBoardConnected()
|
||||||
|
{
|
||||||
|
ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance();
|
||||||
|
UAVObjectUtilManager *utilMngr = pm->getObject<UAVObjectUtilManager>();
|
||||||
|
Q_ASSERT(utilMngr);
|
||||||
|
|
||||||
|
// If Revolution board enable misc tab, otherwise disable it
|
||||||
|
ui->Miscellaneous->setEnabled((utilMngr->getBoardModel() & 0xff00) == 0x0900);
|
||||||
|
}
|
||||||
|
@ -58,6 +58,7 @@ private slots:
|
|||||||
void realtimeUpdatesSlot(bool value);
|
void realtimeUpdatesSlot(bool value);
|
||||||
void linkCheckBoxes(bool value);
|
void linkCheckBoxes(bool value);
|
||||||
void processLinkedWidgets(QWidget *);
|
void processLinkedWidgets(QWidget *);
|
||||||
|
void onBoardConnected();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // ConfigStabilizationWidget_H
|
#endif // ConfigStabilizationWidget_H
|
||||||
|
Loading…
x
Reference in New Issue
Block a user