mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-03-01 18:29:16 +01:00
uncrustification
This commit is contained in:
parent
076b4bbf6e
commit
c18cd85cf5
@ -208,10 +208,9 @@ void ConfigStabilizationWidget::onBoardConnected()
|
|||||||
bool ConfigStabilizationWidget::shouldObjectBeSaved(UAVObject *object)
|
bool ConfigStabilizationWidget::shouldObjectBeSaved(UAVObject *object)
|
||||||
{
|
{
|
||||||
// AltitudeHoldSettings should only be saved for Revolution board to avoid error.
|
// AltitudeHoldSettings should only be saved for Revolution board to avoid error.
|
||||||
if((boardModel & 0xff00) != 0x0900) {
|
if ((boardModel & 0xff00) != 0x0900) {
|
||||||
return dynamic_cast<AltitudeHoldSettings*>(object) == 0;
|
return dynamic_cast<AltitudeHoldSettings *>(object) == 0;
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -43,7 +43,7 @@ class ConfigStabilizationWidget : public ConfigTaskWidget {
|
|||||||
public:
|
public:
|
||||||
ConfigStabilizationWidget(QWidget *parent = 0);
|
ConfigStabilizationWidget(QWidget *parent = 0);
|
||||||
~ConfigStabilizationWidget();
|
~ConfigStabilizationWidget();
|
||||||
bool shouldObjectBeSaved(UAVObject * object);
|
bool shouldObjectBeSaved(UAVObject *object);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui_StabilizationWidget *ui;
|
Ui_StabilizationWidget *ui;
|
||||||
@ -62,7 +62,6 @@ private slots:
|
|||||||
void linkCheckBoxes(bool value);
|
void linkCheckBoxes(bool value);
|
||||||
void processLinkedWidgets(QWidget *);
|
void processLinkedWidgets(QWidget *);
|
||||||
void onBoardConnected();
|
void onBoardConnected();
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // ConfigStabilizationWidget_H
|
#endif // ConfigStabilizationWidget_H
|
||||||
|
@ -144,7 +144,7 @@ public:
|
|||||||
void addHelpButton(QPushButton *button, QString url);
|
void addHelpButton(QPushButton *button, QString url);
|
||||||
void forceShadowUpdates();
|
void forceShadowUpdates();
|
||||||
void forceConnectedState();
|
void forceConnectedState();
|
||||||
virtual bool shouldObjectBeSaved(UAVObject * object);
|
virtual bool shouldObjectBeSaved(UAVObject *object);
|
||||||
public slots:
|
public slots:
|
||||||
void onAutopilotDisconnect();
|
void onAutopilotDisconnect();
|
||||||
void onAutopilotConnect();
|
void onAutopilotConnect();
|
||||||
|
@ -78,7 +78,7 @@ void smartSaveButton::processOperation(QPushButton *button, bool save)
|
|||||||
foreach(UAVDataObject * obj, objects) {
|
foreach(UAVDataObject * obj, objects) {
|
||||||
UAVObject::Metadata mdata = obj->getMetadata();
|
UAVObject::Metadata mdata = obj->getMetadata();
|
||||||
|
|
||||||
//Should we really save this object to the board?
|
// Should we really save this object to the board?
|
||||||
if (!configWidget->shouldObjectBeSaved(obj) || UAVObject::GetGcsAccess(mdata) == UAVObject::ACCESS_READONLY) {
|
if (!configWidget->shouldObjectBeSaved(obj) || UAVObject::GetGcsAccess(mdata) == UAVObject::ACCESS_READONLY) {
|
||||||
qDebug() << obj->getName() << "was skipped.";
|
qDebug() << obj->getName() << "was skipped.";
|
||||||
continue;
|
continue;
|
||||||
@ -95,7 +95,7 @@ void smartSaveButton::processOperation(QPushButton *button, bool save)
|
|||||||
timer.start(3000);
|
timer.start(3000);
|
||||||
loop.exec();
|
loop.exec();
|
||||||
if (!timer.isActive()) {
|
if (!timer.isActive()) {
|
||||||
qDebug() << "Upload of" << obj->getName() << "timed out." ;
|
qDebug() << "Upload of" << obj->getName() << "timed out.";
|
||||||
}
|
}
|
||||||
timer.stop();
|
timer.stop();
|
||||||
|
|
||||||
@ -116,7 +116,7 @@ void smartSaveButton::processOperation(QPushButton *button, bool save)
|
|||||||
current_objectID = obj->getObjID();
|
current_objectID = obj->getObjID();
|
||||||
if (save && (obj->isSettings())) {
|
if (save && (obj->isSettings())) {
|
||||||
for (int i = 0; i < 3; ++i) {
|
for (int i = 0; i < 3; ++i) {
|
||||||
qDebug() << "Saving" << obj->getName() << "to board.";
|
qDebug() << "Saving" << obj->getName() << "to board.";
|
||||||
connect(utilMngr, SIGNAL(saveCompleted(int, bool)), this, SLOT(saving_finished(int, bool)));
|
connect(utilMngr, SIGNAL(saveCompleted(int, bool)), this, SLOT(saving_finished(int, bool)));
|
||||||
connect(&timer, SIGNAL(timeout()), &loop, SLOT(quit()));
|
connect(&timer, SIGNAL(timeout()), &loop, SLOT(quit()));
|
||||||
utilMngr->saveObjectToSD(obj);
|
utilMngr->saveObjectToSD(obj);
|
||||||
@ -208,7 +208,7 @@ void smartSaveButton::enableControls(bool value)
|
|||||||
void smartSaveButton::resetIcons()
|
void smartSaveButton::resetIcons()
|
||||||
{
|
{
|
||||||
foreach(QPushButton * button, buttonList.keys())
|
foreach(QPushButton * button, buttonList.keys())
|
||||||
button->setIcon(QIcon());
|
button->setIcon(QIcon());
|
||||||
}
|
}
|
||||||
|
|
||||||
void smartSaveButton::apply()
|
void smartSaveButton::apply()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user