Browse Source

Remove unused code

QGC4.4
Don Gagne 10 years ago
parent
commit
44a11040d1
  1. 1
      qgroundcontrol.pro
  2. 76
      src/ui/QGCConfigView.cc
  3. 29
      src/ui/QGCConfigView.h
  4. 31
      src/ui/QGCConfigView.ui
  5. 331
      src/ui/QGCPX4VehicleConfig.cc
  6. 90
      src/ui/QGCPX4VehicleConfig.h
  7. 563
      src/ui/QGCPX4VehicleConfig.ui
  8. 507
      src/ui/px4_configuration/QGCPX4SensorCalibration.cc
  9. 92
      src/ui/px4_configuration/QGCPX4SensorCalibration.h
  10. 275
      src/ui/px4_configuration/QGCPX4SensorCalibration.ui

1
qgroundcontrol.pro

@ -717,7 +717,6 @@ INCLUDEPATH += \ @@ -717,7 +717,6 @@ INCLUDEPATH += \
FORMS += \
src/VehicleSetup/ParameterEditor.ui \
src/ui/QGCPX4VehicleConfig.ui \
src/VehicleSetup/SetupView.ui \
HEADERS+= \

76
src/ui/QGCConfigView.cc

@ -1,76 +0,0 @@ @@ -1,76 +0,0 @@
#include "QGCConfigView.h"
#include "ui_QGCConfigView.h"
#include "UASManager.h"
#include "QGCPX4VehicleConfig.h"
#include "MainWindow.h"
QGCConfigView::QGCConfigView(QWidget *parent) :
QWidget(parent),
ui(new Ui::QGCConfigView),
config(NULL),
mav(NULL)
{
ui->setupUi(this);
connect(UASManager::instance(), SIGNAL(activeUASSet(UASInterface*)), this, SLOT(activeUASChanged(UASInterface*)));
ui->gridLayout->removeWidget(ui->waitingLabel);
ui->waitingLabel->setVisible(false);
delete ui->waitingLabel;
ui->waitingLabel = NULL;
config = new QGCPX4VehicleConfig();
ui->gridLayout->addWidget(config);
}
QGCConfigView::~QGCConfigView()
{
delete ui;
}
void QGCConfigView::activeUASChanged(UASInterface* uas)
{
if (mav == uas)
return;
int type = -1;
if (mav)
type = mav->getAutopilotType();
mav = uas;
if (uas && type != uas->getAutopilotType()) {
if (ui->waitingLabel) {
ui->gridLayout->removeWidget(ui->waitingLabel);
ui->waitingLabel->setVisible(false);
}
//remove all child widgets since they could contain stale data
//for example, when we switch from one PX4 UAS to another UAS
foreach (QObject* obj, ui->gridLayout->children()) {
QWidget* w = dynamic_cast<QWidget*>(obj);
if (w) {
if (obj != ui->waitingLabel) {
ui->gridLayout->removeWidget(w);
delete obj;
}
}
}
QGCPX4VehicleConfig* px4config = qobject_cast<QGCPX4VehicleConfig*>(config);
if (!px4config) {
if (config)
delete config;
config = new QGCPX4VehicleConfig();
ui->gridLayout->addWidget(config);
}
}
else {
if (ui->waitingLabel) {
//restore waiting label if we no longer have a connection
ui->gridLayout->addWidget(ui->waitingLabel);
ui->waitingLabel->setVisible(true);
}
}
}

29
src/ui/QGCConfigView.h

@ -1,29 +0,0 @@ @@ -1,29 +0,0 @@
#ifndef QGCCONFIGVIEW_H
#define QGCCONFIGVIEW_H
#include <QWidget>
#include <UASInterface.h>
namespace Ui {
class QGCConfigView;
}
class QGCConfigView : public QWidget
{
Q_OBJECT
public:
explicit QGCConfigView(QWidget *parent = 0);
~QGCConfigView();
public slots:
void activeUASChanged(UASInterface* uas);
private:
Ui::QGCConfigView *ui;
QWidget *config;
UASInterface* mav;
};
#endif // QGCCONFIGVIEW_H

31
src/ui/QGCConfigView.ui

@ -1,31 +0,0 @@ @@ -1,31 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>QGCConfigView</class>
<widget class="QWidget" name="QGCConfigView">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>300</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<property name="margin">
<number>0</number>
</property>
<item row="0" column="0">
<widget class="QLabel" name="waitingLabel">
<property name="text">
<string>Waiting for connection...</string>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>

331
src/ui/QGCPX4VehicleConfig.cc

@ -1,331 +0,0 @@ @@ -1,331 +0,0 @@
// On Windows (for VS2010) stdint.h contains the limits normally contained in limits.h
// It also needs the __STDC_LIMIT_MACROS macro defined in order to include them (done
// in qgroundcontrol.pri).
#ifdef WIN32
#include <stdint.h>
#else
#include <limits.h>
#endif
#include <QTimer>
#include <QDir>
#include <QXmlStreamReader>
#include <QLabel>
#include "QGCPX4VehicleConfig.h"
#include "QGC.h"
#include "QGCToolWidget.h"
#include "UASManager.h"
#include "LinkManager.h"
#include "UASParameterCommsMgr.h"
#include "ui_QGCPX4VehicleConfig.h"
#include "px4_configuration/QGCPX4AirframeConfig.h"
#include "px4_configuration/QGCPX4SensorCalibration.h"
#include "px4_configuration/PX4RCCalibration.h"
#include "PX4FirmwareUpgrade.h"
#define WIDGET_INDEX_FIRMWARE 0
#define WIDGET_INDEX_RC 1
#define WIDGET_INDEX_SENSOR_CAL 2
#define WIDGET_INDEX_AIRFRAME_CONFIG 3
#define WIDGET_INDEX_GENERAL_CONFIG 4
#define WIDGET_INDEX_ADV_CONFIG 5
#define MIN_PWM_VAL 800
#define MAX_PWM_VAL 2200
QGCPX4VehicleConfig::QGCPX4VehicleConfig(QWidget *parent) :
QWidget(parent),
mav(NULL),
px4AirframeConfig(NULL),
planeBack(":/files/images/px4/rc/cessna_back.png"),
planeSide(":/files/images/px4/rc/cessna_side.png"),
px4SensorCalibration(NULL),
ui(new Ui::QGCPX4VehicleConfig)
{
doneLoadingConfig = false;
setObjectName("QGC_VEHICLECONFIG");
ui->setupUi(this);
ui->advancedMenuButton->setEnabled(false);
ui->airframeMenuButton->setEnabled(false);
ui->sensorMenuButton->setEnabled(false);
ui->rcMenuButton->setEnabled(false);
px4AirframeConfig = new QGCPX4AirframeConfig(this);
ui->airframeLayout->addWidget(px4AirframeConfig);
px4SensorCalibration = new QGCPX4SensorCalibration(this);
ui->sensorLayout->addWidget(px4SensorCalibration);
px4RCCalibration = new PX4RCCalibration(this);
ui->rcLayout->addWidget(px4RCCalibration);
PX4FirmwareUpgrade* firmwareUpgrade = new PX4FirmwareUpgrade(this);
ui->firmwareLayout->addWidget(firmwareUpgrade);
connect(ui->rcMenuButton,SIGNAL(clicked()),
this,SLOT(rcMenuButtonClicked()));
connect(ui->sensorMenuButton,SIGNAL(clicked()),
this,SLOT(sensorMenuButtonClicked()));
connect(ui->flightModeMenuButton, SIGNAL(clicked()),
this, SLOT(flightModeMenuButtonClicked()));
connect(ui->safetyConfigButton, SIGNAL(clicked()),
this, SLOT(safetyConfigMenuButtonClicked()));
connect(ui->tuningMenuButton,SIGNAL(clicked()),
this,SLOT(tuningMenuButtonClicked()));
connect(ui->advancedMenuButton,SIGNAL(clicked()),
this,SLOT(advancedMenuButtonClicked()));
connect(ui->airframeMenuButton, SIGNAL(clicked()),
this, SLOT(airframeMenuButtonClicked()));
connect(ui->firmwareMenuButton, SIGNAL(clicked()),
this, SLOT(firmwareMenuButtonClicked()));
//TODO connect buttons here to save/clear actions?
UASInterface* tmpMav = UASManager::instance()->getActiveUAS();
if (tmpMav) {
ui->pendingCommitsWidget->initWithUAS(tmpMav);
ui->pendingCommitsWidget->update();
setActiveUAS(tmpMav);
}
connect(UASManager::instance(), SIGNAL(activeUASSet(UASInterface*)),
this, SLOT(setActiveUAS(UASInterface*)));
firmwareMenuButtonClicked();
}
QGCPX4VehicleConfig::~QGCPX4VehicleConfig()
{
delete ui;
}
void QGCPX4VehicleConfig::rcMenuButtonClicked()
{
ui->stackedWidget->setCurrentWidget(ui->rcTab);
ui->tabTitleLabel->setText(tr("Radio Calibration"));
}
void QGCPX4VehicleConfig::sensorMenuButtonClicked()
{
ui->stackedWidget->setCurrentWidget(ui->sensorTab);
ui->tabTitleLabel->setText(tr("Sensor Calibration"));
}
void QGCPX4VehicleConfig::tuningMenuButtonClicked()
{
ui->stackedWidget->setCurrentWidget(ui->tuningTab);
ui->tabTitleLabel->setText(tr("Controller Tuning"));
}
void QGCPX4VehicleConfig::flightModeMenuButtonClicked()
{
ui->stackedWidget->setCurrentWidget(ui->flightModeTab);
ui->tabTitleLabel->setText(tr("Flight Mode Configuration"));
}
void QGCPX4VehicleConfig::safetyConfigMenuButtonClicked()
{
ui->stackedWidget->setCurrentWidget(ui->safetyConfigTab);
ui->tabTitleLabel->setText(tr("Safety Feature Configuration"));
}
void QGCPX4VehicleConfig::advancedMenuButtonClicked()
{
ui->stackedWidget->setCurrentWidget(ui->advancedTab);
ui->tabTitleLabel->setText(tr("Advanced Configuration Options"));
}
void QGCPX4VehicleConfig::airframeMenuButtonClicked()
{
ui->stackedWidget->setCurrentWidget(ui->airframeTab);
ui->tabTitleLabel->setText(tr("Airframe Configuration"));
}
void QGCPX4VehicleConfig::firmwareMenuButtonClicked()
{
ui->stackedWidget->setCurrentWidget(ui->firmwareTab);
ui->tabTitleLabel->setText(tr("Firmware Upgrade"));
}
void QGCPX4VehicleConfig::menuButtonClicked()
{
QPushButton *button = qobject_cast<QPushButton*>(sender());
if (!button)
{
return;
}
if (buttonToWidgetMap.contains(button))
{
ui->stackedWidget->setCurrentWidget(buttonToWidgetMap[button]);
}
}
void QGCPX4VehicleConfig::setActiveUAS(UASInterface* active)
{
// Hide items if NULL and abort
if (!active) {
return;
}
// Do nothing if UAS is already visible
if (mav == active)
return;
if (mav)
{
//TODO use paramCommsMgr instead
disconnect(mav, SIGNAL(parameterChanged(int,int,QString,QVariant)), this,
SLOT(parameterChanged(int,int,QString,QVariant)));
foreach(QWidget* child, ui->airframeLayout->findChildren<QWidget*>())
{
child->deleteLater();
}
// And then delete any custom tabs
foreach(QWidget* child, additionalTabs) {
child->deleteLater();
}
additionalTabs.clear();
toolWidgets.clear();
paramToWidgetMap.clear();
libParamToWidgetMap.clear();
systemTypeToParamMap.clear();
toolToBoxMap.clear();
paramTooltips.clear();
}
// Connect new system
mav = active;
paramMgr = mav->getParamManager();
ui->pendingCommitsWidget->setUAS(mav);
ui->paramTreeWidget->setUAS(mav);
//TODO eliminate the separate RC_TYPE call
mav->requestParameter(0, "RC_TYPE");
// Connect new system
connect(mav, SIGNAL(parameterChanged(int,int,QString,QVariant)), this,
SLOT(parameterChanged(int,int,QString,QVariant)));
if (systemTypeToParamMap.contains(mav->getSystemTypeName())) {
paramToWidgetMap = systemTypeToParamMap[mav->getSystemTypeName()];
}
else {
//Indication that we have no meta data for this system type.
qDebug() << "No parameters defined for system type:" << mav->getSystemTypeName();
paramToWidgetMap = systemTypeToParamMap[mav->getSystemTypeName()];
}
if (!paramTooltips.isEmpty()) {
mav->getParamManager()->setParamDescriptions(paramTooltips);
}
qDebug() << "CALIBRATION!! System Type Name:" << mav->getSystemTypeName();
updateStatus(QString("Reading from system %1").arg(mav->getUASName()));
// Since a system is now connected, enable the VehicleConfig UI.
// Enable buttons
bool px4Firmware = mav->getAutopilotType() == MAV_AUTOPILOT_PX4;
ui->airframeMenuButton->setEnabled(px4Firmware);
ui->sensorMenuButton->setEnabled(px4Firmware);
ui->rcMenuButton->setEnabled(px4Firmware);
ui->advancedMenuButton->setEnabled(true);
}
void QGCPX4VehicleConfig::parameterChanged(int uas, int component, QString parameterName, QVariant value)
{
if (!doneLoadingConfig) {
//We do not want to attempt to generate any UI elements until loading of the config file is complete.
//We should re-request params later if needed, that is not implemented yet.
return;
}
if (paramToWidgetMap.contains(parameterName)) {
//Main group of parameters of the selected airframe
paramToWidgetMap.value(parameterName)->setParameterValue(uas,component,parameterName,value);
if (toolToBoxMap.contains(paramToWidgetMap.value(parameterName))) {
toolToBoxMap[paramToWidgetMap.value(parameterName)]->show();
}
else {
qCritical() << "Widget with no box, possible memory corruption for param:" << parameterName;
}
}
else if (libParamToWidgetMap.contains(parameterName)) {
//All the library parameters
libParamToWidgetMap.value(parameterName)->setParameterValue(uas,component,parameterName,value);
if (toolToBoxMap.contains(libParamToWidgetMap.value(parameterName))) {
toolToBoxMap[libParamToWidgetMap.value(parameterName)]->show();
}
else {
qCritical() << "Widget with no box, possible memory corruption for param:" << parameterName;
}
}
else {
//Param recieved that we have no metadata for. Search to see if it belongs in a
//group with some other params
//bool found = false;
for (int i=0;i<toolWidgets.size();i++) {
if (parameterName.startsWith(toolWidgets[i]->objectName())) {
//It should be grouped with this one, add it.
toolWidgets[i]->addParam(uas,component,parameterName,value);
libParamToWidgetMap.insert(parameterName,toolWidgets[i]);
//found = true;
break;
}
}
// if (!found) {
// //New param type, create a QGroupBox for it.
// QWidget* parent = ui->advanceColumnContents;
// // Create the tool, attaching it to the QGroupBox
// QGCToolWidget *tool = new QGCToolWidget("", parent);
// QString tooltitle = parameterName;
// if (parameterName.split("_").size() > 1) {
// tooltitle = parameterName.split("_")[0] + "_";
// }
// tool->setTitle(tooltitle);
// tool->setObjectName(tooltitle);
// //tool->setSettings(set);
// libParamToWidgetMap.insert(parameterName,tool);
// toolWidgets.append(tool);
// tool->addParam(uas, component, parameterName, value);
// QGroupBox *box = new QGroupBox(parent);
// box->setTitle(tool->objectName());
// box->setLayout(new QVBoxLayout(box));
// box->layout()->addWidget(tool);
// libParamToWidgetMap.insert(parameterName,tool);
// toolWidgets.append(tool);
// ui->advancedColumnLayout->addWidget(box);
// toolToBoxMap[tool] = box;
// }
}
}
void QGCPX4VehicleConfig::updateStatus(const QString& str)
{
ui->advancedStatusLabel->setText(str);
ui->advancedStatusLabel->setStyleSheet("");
}
void QGCPX4VehicleConfig::updateError(const QString& str)
{
ui->advancedStatusLabel->setText(str);
ui->advancedStatusLabel->setStyleSheet(QString("QLabel { margin: 0px 2px; font: 14px; color: %1; background-color: %2; }").arg(QGC::colorDarkWhite.name()).arg(QGC::colorMagenta.name()));
}

90
src/ui/QGCPX4VehicleConfig.h

@ -1,90 +0,0 @@ @@ -1,90 +0,0 @@
#ifndef QGCPX4VehicleConfig_H
#define QGCPX4VehicleConfig_H
#include <QWidget>
#include <QTimer>
#include <QList>
#include <QGroupBox>
#include <QPushButton>
#include <QStringList>
#include <QGraphicsScene>
#include "QGCToolWidget.h"
#include "UASInterface.h"
#include "px4_configuration/QGCPX4AirframeConfig.h"
class UASParameterCommsMgr;
class QGCPX4SensorCalibration;
class PX4RCCalibration;
namespace Ui {
class QGCPX4VehicleConfig;
}
class QGCPX4VehicleConfig : public QWidget
{
Q_OBJECT
public:
explicit QGCPX4VehicleConfig(QWidget *parent = 0);
~QGCPX4VehicleConfig();
enum RC_MODE {
RC_MODE_1 = 1,
RC_MODE_2 = 2,
RC_MODE_3 = 3,
RC_MODE_4 = 4,
RC_MODE_NONE = 5
};
public slots:
void rcMenuButtonClicked();
void sensorMenuButtonClicked();
void tuningMenuButtonClicked();
void flightModeMenuButtonClicked();
void safetyConfigMenuButtonClicked();
void advancedMenuButtonClicked();
void airframeMenuButtonClicked();
void firmwareMenuButtonClicked();
/** Set the MAV currently being calibrated */
void setActiveUAS(UASInterface* active);
protected slots:
void menuButtonClicked();
/** Parameter changed onboard */
void parameterChanged(int uas, int component, QString parameterName, QVariant value);
void updateStatus(const QString& str);
void updateError(const QString& str);
protected:
bool doneLoadingConfig;
UASInterface* mav; ///< The current MAV
QGCUASParamManagerInterface* paramMgr; ///< params mgr for the mav
QList<QGCToolWidget*> toolWidgets; ///< Configurable widgets
QMap<QString,QGCToolWidget*> toolWidgetsByName; ///<
QMap<QString,QGCToolWidget*> paramToWidgetMap; ///< Holds the current active MAV's parameter widgets.
QList<QWidget*> additionalTabs; ///< Stores additional tabs loaded for this vehicle/autopilot configuration. Used for cleaning up.
QMap<QString,QGCToolWidget*> libParamToWidgetMap; ///< Holds the library parameter widgets
QMap<QString,QMap<QString,QGCToolWidget*> > systemTypeToParamMap; ///< Holds all loaded MAV specific parameter widgets, for every MAV.
QMap<QGCToolWidget*,QGroupBox*> toolToBoxMap; ///< Easy method of figuring out which QGroupBox is tied to which ToolWidget.
QMap<QString,QString> paramTooltips; ///< Tooltips for the ? button next to a parameter.
QGCPX4AirframeConfig* px4AirframeConfig;
QPixmap planeBack;
QPixmap planeSide;
QGCPX4SensorCalibration* px4SensorCalibration;
PX4RCCalibration* px4RCCalibration;
QGraphicsScene scene;
QPushButton* skipActionButton;
private:
Ui::QGCPX4VehicleConfig *ui;
QMap<QPushButton*,QWidget*> buttonToWidgetMap;
signals:
void visibilityChanged(bool visible);
};
#endif // QGCPX4VehicleConfig_H

563
src/ui/QGCPX4VehicleConfig.ui

@ -1,563 +0,0 @@ @@ -1,563 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>QGCPX4VehicleConfig</class>
<widget class="QWidget" name="QGCPX4VehicleConfig">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>1293</width>
<height>1132</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QGridLayout" name="gridLayout_3">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item row="1" column="1">
<widget class="QLabel" name="tabTitleLabel">
<property name="font">
<font>
<pointsize>16</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="2" column="1">
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QStackedWidget" name="stackedWidget">
<property name="currentIndex">
<number>1</number>
</property>
<widget class="QWidget" name="firmwareTab">
<layout class="QVBoxLayout" name="firmwareLayout"/>
</widget>
<widget class="QWidget" name="rcTab">
<property name="font">
<font>
<pointsize>16</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<layout class="QHBoxLayout" name="rcLayout"/>
</widget>
<widget class="QWidget" name="sensorTab">
<property name="font">
<font>
<pointsize>16</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<layout class="QHBoxLayout" name="sensorLayout"/>
</widget>
<widget class="QWidget" name="airframeTab">
<layout class="QHBoxLayout" name="airframeLayout"/>
</widget>
<widget class="QWidget" name="tuningTab">
<property name="font">
<font>
<pointsize>16</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<layout class="QVBoxLayout" name="tuningLayout">
<item>
<widget class="QTextBrowser" name="textBrowser">
<property name="html">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'.Helvetica Neue DeskInterface'; font-size:16pt; font-weight:600; font-style:normal;&quot;&gt;
&lt;p align=&quot;center&quot; style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'.Lucida Grande UI';&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p align=&quot;center&quot; style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'.Lucida Grande UI'; font-size:24pt; font-weight:400;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p align=&quot;center&quot; style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'.Lucida Grande UI'; font-size:24pt; font-weight:400;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p align=&quot;center&quot; style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'.Lucida Grande UI'; font-size:24pt; font-weight:400;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p align=&quot;center&quot; style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'.Lucida Grande UI'; font-size:24pt; font-weight:400;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p align=&quot;center&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'.Lucida Grande UI'; font-size:24pt; font-weight:400;&quot;&gt;Coming Soon&lt;/span&gt;&lt;/p&gt;
&lt;p align=&quot;center&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'.Lucida Grande UI'; font-size:24pt; font-weight:400;&quot;&gt;(Use Advanced Config instead)&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="advancedTab">
<layout class="QVBoxLayout" name="verticalLayout_13">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<widget class="QGroupBox" name="advancedConfigurationGroupBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>3</horstretch>
<verstretch>1</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>Onboard Configuration</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QScrollArea" name="scrollArea_4">
<property name="widgetResizable">
<bool>true</bool>
</property>
<widget class="QWidget" name="advanceColumnContents">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>16</width>
<height>16</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_7">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<layout class="QVBoxLayout" name="advancedColumnLayout">
<item>
<widget class="QGCParamWidget" name="paramTreeWidget" native="true">
<property name="autoFillBackground">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_5">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>10</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QGroupBox" name="pendingChangesGroupBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>2</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>329</width>
<height>0</height>
</size>
</property>
<property name="title">
<string>Changes Pending</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_8">
<item>
<layout class="QVBoxLayout" name="verticalLayout_4" stretch="0">
<property name="spacing">
<number>-1</number>
</property>
<item>
<widget class="QGCPendingParamWidget" name="pendingCommitsWidget" native="true">
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="autoFillBackground">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_13">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>10</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item>
<widget class="QLabel" name="advancedStatusLabel">
<property name="text">
<string>Status</string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="flightModeTab">
<layout class="QVBoxLayout" name="flightModeLayout">
<item>
<widget class="QTextBrowser" name="textBrowser_3">
<property name="html">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'.Helvetica Neue DeskInterface'; font-size:13pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p align=&quot;center&quot; style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'.Lucida Grande UI';&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p align=&quot;center&quot; style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'.Lucida Grande UI'; font-size:24pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p align=&quot;center&quot; style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'.Lucida Grande UI'; font-size:24pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p align=&quot;center&quot; style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'.Lucida Grande UI'; font-size:24pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p align=&quot;center&quot; style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'.Lucida Grande UI'; font-size:24pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p align=&quot;center&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'.Lucida Grande UI'; font-size:24pt;&quot;&gt;Coming Soon&lt;/span&gt;&lt;/p&gt;
&lt;p align=&quot;center&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'.Lucida Grande UI'; font-size:24pt;&quot;&gt;(Use Radio Calibration instead)&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="safetyConfigTab">
<layout class="QVBoxLayout" name="safetyConfigLayout">
<item>
<widget class="QTextBrowser" name="textBrowser_2">
<property name="html">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'.Helvetica Neue DeskInterface'; font-size:13pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p align=&quot;center&quot; style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'.Lucida Grande UI';&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p align=&quot;center&quot; style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'.Lucida Grande UI'; font-size:24pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p align=&quot;center&quot; style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'.Lucida Grande UI'; font-size:24pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p align=&quot;center&quot; style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'.Lucida Grande UI'; font-size:24pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p align=&quot;center&quot; style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'.Lucida Grande UI'; font-size:24pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p align=&quot;center&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'.Lucida Grande UI'; font-size:24pt;&quot;&gt;Coming Soon&lt;/span&gt;&lt;/p&gt;
&lt;p align=&quot;center&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'.Lucida Grande UI'; font-size:24pt;&quot;&gt;(Use Advanced Config instead)&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</item>
<item row="0" column="0" rowspan="3">
<widget class="QWidget" name="navBarWidget" native="true">
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<layout class="QVBoxLayout" name="navBarLayout">
<property name="sizeConstraint">
<enum>QLayout::SetMinAndMaxSize</enum>
</property>
<property name="leftMargin">
<number>12</number>
</property>
<property name="topMargin">
<number>12</number>
</property>
<property name="rightMargin">
<number>24</number>
</property>
<property name="bottomMargin">
<number>12</number>
</property>
<item>
<widget class="QPushButton" name="firmwareMenuButton">
<property name="text">
<string>Firmware
Upgrade</string>
</property>
<property name="icon">
<iconset resource="../../qgroundcontrol.qrc">
<normaloff>:/files/images/px4/menu/firmware_upgrade.png</normaloff>:/files/images/px4/menu/firmware_upgrade.png</iconset>
</property>
<property name="iconSize">
<size>
<width>60</width>
<height>60</height>
</size>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="airframeMenuButton">
<property name="text">
<string>Airframe
Config</string>
</property>
<property name="icon">
<iconset resource="../../qgroundcontrol.qrc">
<normaloff>:/files/images/px4/menu/plane.png</normaloff>:/files/images/px4/menu/plane.png</iconset>
</property>
<property name="iconSize">
<size>
<width>60</width>
<height>60</height>
</size>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="sensorMenuButton">
<property name="minimumSize">
<size>
<width>100</width>
<height>75</height>
</size>
</property>
<property name="text">
<string>Sensor
Calibration</string>
</property>
<property name="icon">
<iconset resource="../../qgroundcontrol.qrc">
<normaloff>:/files/images/px4/menu/sensors.png</normaloff>:/files/images/px4/menu/sensors.png</iconset>
</property>
<property name="iconSize">
<size>
<width>60</width>
<height>60</height>
</size>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="rcMenuButton">
<property name="minimumSize">
<size>
<width>100</width>
<height>75</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string>Radio
Calibration</string>
</property>
<property name="icon">
<iconset resource="../../qgroundcontrol.qrc">
<normaloff>:/files/images/px4/menu/remote.png</normaloff>:/files/images/px4/menu/remote.png</iconset>
</property>
<property name="iconSize">
<size>
<width>60</width>
<height>60</height>
</size>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="flightModeMenuButton">
<property name="minimumSize">
<size>
<width>100</width>
<height>75</height>
</size>
</property>
<property name="text">
<string>Flight Mode
Config</string>
</property>
<property name="icon">
<iconset resource="../../qgroundcontrol.qrc">
<normaloff>:/files/images/px4/menu/toggle_switch.png</normaloff>:/files/images/px4/menu/toggle_switch.png</iconset>
</property>
<property name="iconSize">
<size>
<width>60</width>
<height>60</height>
</size>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="safetyConfigButton">
<property name="minimumSize">
<size>
<width>100</width>
<height>75</height>
</size>
</property>
<property name="text">
<string>Safety
Config</string>
</property>
<property name="icon">
<iconset resource="../../qgroundcontrol.qrc">
<normaloff>:/files/images/px4/menu/cogwheels.png</normaloff>:/files/images/px4/menu/cogwheels.png</iconset>
</property>
<property name="iconSize">
<size>
<width>60</width>
<height>60</height>
</size>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="tuningMenuButton">
<property name="minimumSize">
<size>
<width>100</width>
<height>75</height>
</size>
</property>
<property name="text">
<string>Controller
Tuning</string>
</property>
<property name="icon">
<iconset resource="../../qgroundcontrol.qrc">
<normaloff>:/files/images/px4/menu/cogwheels.png</normaloff>:/files/images/px4/menu/cogwheels.png</iconset>
</property>
<property name="iconSize">
<size>
<width>60</width>
<height>60</height>
</size>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="advancedMenuButton">
<property name="minimumSize">
<size>
<width>100</width>
<height>75</height>
</size>
</property>
<property name="text">
<string>Advanced
Config</string>
</property>
<property name="icon">
<iconset resource="../../qgroundcontrol.qrc">
<normaloff>:/files/images/px4/menu/cogwheels.png</normaloff>:/files/images/px4/menu/cogwheels.png</iconset>
</property>
<property name="iconSize">
<size>
<width>60</width>
<height>60</height>
</size>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>QGCPendingParamWidget</class>
<extends>QWidget</extends>
<header>ui/QGCPendingParamWidget.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>QGCParamWidget</class>
<extends>QWidget</extends>
<header>ui/QGCParamWidget.h</header>
<container>1</container>
</customwidget>
</customwidgets>
<resources>
<include location="../../qgroundcontrol.qrc"/>
</resources>
<connections/>
</ui>

507
src/ui/px4_configuration/QGCPX4SensorCalibration.cc

@ -1,507 +0,0 @@ @@ -1,507 +0,0 @@
#include "QGCPX4SensorCalibration.h"
#include "ui_QGCPX4SensorCalibration.h"
#include <UASManager.h>
#include <QMenu>
#include <QScrollBar>
#include <QDebug>
QGCPX4SensorCalibration::QGCPX4SensorCalibration(QWidget *parent) :
QWidget(parent),
activeUAS(NULL),
clearAction(new QAction(tr("Clear Text"), this)),
ui(new Ui::QGCPX4SensorCalibration)
{
ui->setupUi(this);
connect(clearAction, SIGNAL(triggered()), ui->textView, SLOT(clear()));
connect(ui->gyroButton, SIGNAL(clicked()), this, SLOT(gyroButtonClicked()));
connect(ui->magButton, SIGNAL(clicked()), this, SLOT(magButtonClicked()));
connect(ui->accelButton, SIGNAL(clicked()), this, SLOT(accelButtonClicked()));
connect(ui->diffPressureButton, SIGNAL(clicked()), this, SLOT(diffPressureButtonClicked()));
connect(ui->logCheckBox, SIGNAL(clicked(bool)), ui->textView, SLOT(setVisible(bool)));
ui->logCheckBox->setChecked(false);
ui->textView->setVisible(false);
ui->gyroButton->setEnabled(false);
ui->magButton->setEnabled(false);
ui->accelButton->setEnabled(false);
ui->autopilotComboBox->setEnabled(false);
ui->magComboBox->setEnabled(false);
setInstructionImage(":/files/images/px4/calibration/accel_down.png");
setAutopilotImage(":/files/images/px4/calibration/accel_down.png");
setGpsImage(":/files/images/px4/calibration/accel_down.png");
// Fill combo boxes
ui->autopilotComboBox->addItem(tr("Default Orientation"), 0);
ui->autopilotComboBox->addItem(tr("ROTATION_YAW_45"), 1);
ui->autopilotComboBox->addItem(tr("ROTATION_YAW_90"), 2);
ui->autopilotComboBox->addItem(tr("ROTATION_YAW_135"), 3);
ui->autopilotComboBox->addItem(tr("ROTATION_YAW_180"), 4);
ui->autopilotComboBox->addItem(tr("ROTATION_YAW_225"), 5);
ui->autopilotComboBox->addItem(tr("ROTATION_YAW_270"), 6);
ui->autopilotComboBox->addItem(tr("ROTATION_YAW_315"), 7);
ui->autopilotComboBox->addItem(tr("ROTATION_ROLL_180"), 8);
ui->autopilotComboBox->addItem(tr("ROTATION_ROLL_180_YAW_45"), 9);
ui->autopilotComboBox->addItem(tr("ROTATION_ROLL_180_YAW_90"), 10);
ui->autopilotComboBox->addItem(tr("ROTATION_ROLL_180_YAW_135"), 11);
ui->autopilotComboBox->addItem(tr("ROTATION_PITCH_180"), 12);
ui->autopilotComboBox->addItem(tr("ROTATION_ROLL_180_YAW_225"), 13);
ui->autopilotComboBox->addItem(tr("ROTATION_ROLL_180_YAW_270"), 14);
ui->autopilotComboBox->addItem(tr("ROTATION_ROLL_180_YAW_315"), 15);
ui->autopilotComboBox->addItem(tr("ROTATION_ROLL_90"), 16);
ui->autopilotComboBox->addItem(tr("ROTATION_ROLL_90_YAW_45"), 17);
ui->autopilotComboBox->addItem(tr("ROTATION_ROLL_90_YAW_90"), 18);
ui->autopilotComboBox->addItem(tr("ROTATION_ROLL_90_YAW_135"), 19);
ui->autopilotComboBox->addItem(tr("ROTATION_ROLL_270"), 20);
ui->autopilotComboBox->addItem(tr("ROTATION_ROLL_270_YAW_45"), 21);
ui->autopilotComboBox->addItem(tr("ROTATION_ROLL_270_YAW_90"), 22);
ui->autopilotComboBox->addItem(tr("ROTATION_ROLL_270_YAW_135"), 23);
ui->autopilotComboBox->addItem(tr("ROTATION_PITCH_90"), 24);
ui->autopilotComboBox->addItem(tr("ROTATION_PITCH_270"), 25);
ui->autopilotComboBox->addItem(tr("ROTATION_PITCH_180_YAW_90"), 26);
ui->autopilotComboBox->addItem(tr("ROTATION_PITCH_180_YAW_270"), 27);
ui->autopilotComboBox->addItem(tr("ROTATION_ROLL_90_PITCH_90"), 28);
ui->autopilotComboBox->addItem(tr("ROTATION_ROLL_180_PITCH_90"), 29);
ui->autopilotComboBox->addItem(tr("ROTATION_ROLL_270_PITCH_90"), 30);
ui->autopilotComboBox->addItem(tr("ROTATION_ROLL_90_PITCH_180"), 31);
ui->autopilotComboBox->addItem(tr("ROTATION_ROLL_270_PITCH_180"), 32);
ui->autopilotComboBox->addItem(tr("ROTATION_ROLL_90_PITCH_270"), 33);
ui->autopilotComboBox->addItem(tr("ROTATION_ROLL_180_PITCH_270"), 34);
ui->autopilotComboBox->addItem(tr("ROTATION_ROLL_270_PITCH_270"), 35);
ui->autopilotComboBox->addItem(tr("ROTATION_ROLL_90_PITCH_180_YAW_90"), 36);
ui->autopilotComboBox->addItem(tr("ROTATION_ROLL_90_YAW_270"), 37);
ui->magComboBox->addItem(tr("Default Orientation"), 0);
ui->magComboBox->addItem(tr("ROTATION_YAW_45"), 1);
ui->magComboBox->addItem(tr("ROTATION_YAW_90"), 2);
ui->magComboBox->addItem(tr("ROTATION_YAW_135"), 3);
ui->magComboBox->addItem(tr("ROTATION_YAW_180"), 4);
ui->magComboBox->addItem(tr("ROTATION_YAW_225"), 5);
ui->magComboBox->addItem(tr("ROTATION_YAW_270"), 6);
ui->magComboBox->addItem(tr("ROTATION_YAW_315"), 7);
ui->magComboBox->addItem(tr("ROTATION_ROLL_180"), 8);
ui->magComboBox->addItem(tr("ROTATION_ROLL_180_YAW_45"), 9);
ui->magComboBox->addItem(tr("ROTATION_ROLL_180_YAW_90"), 10);
ui->magComboBox->addItem(tr("ROTATION_ROLL_180_YAW_135"), 11);
ui->magComboBox->addItem(tr("ROTATION_PITCH_180"), 12);
ui->magComboBox->addItem(tr("ROTATION_ROLL_180_YAW_225"), 13);
ui->magComboBox->addItem(tr("ROTATION_ROLL_180_YAW_270"), 14);
ui->magComboBox->addItem(tr("ROTATION_ROLL_180_YAW_315"), 15);
ui->magComboBox->addItem(tr("ROTATION_ROLL_90"), 16);
ui->magComboBox->addItem(tr("ROTATION_ROLL_90_YAW_45"), 17);
ui->magComboBox->addItem(tr("ROTATION_ROLL_90_YAW_90"), 18);
ui->magComboBox->addItem(tr("ROTATION_ROLL_90_YAW_135"), 19);
ui->magComboBox->addItem(tr("ROTATION_ROLL_270"), 20);
ui->magComboBox->addItem(tr("ROTATION_ROLL_270_YAW_45"), 21);
ui->magComboBox->addItem(tr("ROTATION_ROLL_270_YAW_90"), 22);
ui->magComboBox->addItem(tr("ROTATION_ROLL_270_YAW_135"), 23);
ui->magComboBox->addItem(tr("ROTATION_PITCH_90"), 24);
ui->magComboBox->addItem(tr("ROTATION_PITCH_270"), 25);
setObjectName("PX4_SENSOR_CALIBRATION");
setStyleSheet("QScrollArea { border: 0px; } QPlainTextEdit { border: 0px }");
setActiveUAS(UASManager::instance()->getActiveUAS());
connect(UASManager::instance(), SIGNAL(activeUASSet(UASInterface*)), this, SLOT(setActiveUAS(UASInterface*)));
ui->progressBar->setValue(0);
connect(ui->autopilotComboBox, SIGNAL(activated(int)), this, SLOT(setAutopilotOrientation(int)));
connect(ui->magComboBox, SIGNAL(activated(int)), this, SLOT(setGpsOrientation(int)));
updateIcons();
}
QGCPX4SensorCalibration::~QGCPX4SensorCalibration()
{
delete ui;
}
void QGCPX4SensorCalibration::parameterChanged(int uas, int component, QString parameterName, QVariant value)
{
Q_UNUSED(uas);
Q_UNUSED(component);
int index = (int)value.toFloat();
if (parameterName.contains("SENS_BOARD_ROT"))
{
ui->autopilotComboBox->setCurrentIndex(index);
setAutopilotImage(index);
ui->autopilotComboBox->setEnabled(true);
}
if (parameterName.contains("SENS_EXT_MAG_ROT"))
{
ui->magComboBox->setCurrentIndex(index);
setGpsImage(index);
ui->magComboBox->setEnabled(true);
}
// Check mag calibration naively
if (parameterName.contains("SENS_MAG_XOFF") || parameterName.contains("CAL_MAG0_ID")) {
float offset = value.toFloat();
if (offset < 0.000001f && offset > -0.000001f) {
// Must be zero, not good
setMagCalibrated(false);
} else {
setMagCalibrated(true);
}
}
// Check gyro calibration naively
if (parameterName.contains("SENS_GYRO_XOFF") || parameterName.contains("CAL_GYRO0_ID")) {
float offset = value.toFloat();
if (offset < 0.000001f && offset > -0.000001f) {
// Must be zero, not good
setGyroCalibrated(false);
} else {
setGyroCalibrated(true);
}
}
// Check accel calibration naively
if (parameterName.contains("SENS_ACC_XOFF") || parameterName.contains("CAL_ACC0_ID")) {
float offset = value.toFloat();
if (offset < 0.000001f && offset > -0.000001f) {
// Must be zero, not good
setAccelCalibrated(false);
} else {
setAccelCalibrated(true);
}
}
// Check differential pressure calibration naively
if (parameterName.contains("SENS_DPRES_OFF")) {
float offset = value.toFloat();
if (offset < 0.000001f && offset > -0.000001f) {
// Must be zero, not good
setDiffPressureCalibrated(false);
} else {
setDiffPressureCalibrated(true);
}
}
}
void QGCPX4SensorCalibration::setMagCalibrated(bool calibrated)
{
if (calibrated) {
ui->magLabel->setText(tr("MAG CALIBRATED"));
ui->magLabel->setStyleSheet("QLabel { color: #FFFFFF;"
"background-color: #20AA20;"
"}");
} else {
ui->magLabel->setText(tr("MAG UNCALIBRATED"));
ui->magLabel->setStyleSheet("QLabel { color: #FFFFFF;"
"background-color: #FF0037;"
"}");
}
}
void QGCPX4SensorCalibration::setGyroCalibrated(bool calibrated)
{
if (calibrated) {
ui->gyroLabel->setText(tr("GYRO CALIBRATED"));
ui->gyroLabel->setStyleSheet("QLabel { color: #FFFFFF;"
"background-color: #20AA20;"
"}");
} else {
ui->gyroLabel->setText(tr("GYRO UNCALIBRATED"));
ui->gyroLabel->setStyleSheet("QLabel { color: #FFFFFF;"
"background-color: #FF0037;"
"}");
}
}
void QGCPX4SensorCalibration::setAccelCalibrated(bool calibrated)
{
if (calibrated) {
ui->accelLabel->setText(tr("ACCEL CALIBRATED"));
ui->accelLabel->setStyleSheet("QLabel { color: #FFFFFF;"
"background-color: #20AA20;"
"}");
} else {
ui->accelLabel->setText(tr("ACCEL UNCALIBRATED"));
ui->accelLabel->setStyleSheet("QLabel { color: #FFFFFF;"
"background-color: #FF0037;"
"}");
}
}
void QGCPX4SensorCalibration::setDiffPressureCalibrated(bool calibrated)
{
if (calibrated) {
ui->diffPressureLabel->setText(tr("DIFF. PRESSURE CALIBRATED"));
ui->diffPressureLabel->setStyleSheet("QLabel { color: #FFFFFF;"
"background-color: #20AA20;"
"}");
} else {
ui->diffPressureLabel->setText(tr("DIFF. PRESSURE UNCALIBRATED"));
ui->diffPressureLabel->setStyleSheet("QLabel { color: #FFFFFF;"
"background-color: #FF0037;"
"}");
}
}
void QGCPX4SensorCalibration::setInstructionImage(const QString &path)
{
instructionIcon.load(path);
int w = ui->iconLabel->width();
int h = ui->iconLabel->height();
ui->iconLabel->setPixmap(instructionIcon.scaled(w, h, Qt::KeepAspectRatio, Qt::SmoothTransformation));
}
void QGCPX4SensorCalibration::setAutopilotImage(int index)
{
Q_UNUSED(index);
// FIXME: This was referencing a non-existent png. Need to figure out what this was trying to do.
//setAutopilotImage(QString(":/files/images/px4/calibration/pixhawk_%1.png").arg(index, 2, 10, QChar('0')));
}
void QGCPX4SensorCalibration::setGpsImage(int index)
{
setGpsImage(QString(":/files/images/px4/calibration/3dr_gps/gps_%1.png").arg(index, 2, 10, QChar('0')));
}
void QGCPX4SensorCalibration::setAutopilotOrientation(int index)
{
if (activeUAS) {
activeUAS->getParamManager()->setPendingParam(0, "SENS_BOARD_ROT", (int)index);
activeUAS->getParamManager()->sendPendingParameters(true);
}
}
void QGCPX4SensorCalibration::setGpsOrientation(int index)
{
if (activeUAS) {
activeUAS->getParamManager()->setPendingParam(0, "SENS_EXT_MAG_ROT", (int)index);
activeUAS->getParamManager()->sendPendingParameters(true);
}
}
void QGCPX4SensorCalibration::setAutopilotImage(const QString &path)
{
if (autopilotIcon.load(path)) {
int w = ui->autopilotLabel->width();
int h = ui->autopilotLabel->height();
ui->autopilotLabel->setPixmap(autopilotIcon.scaled(w, h, Qt::KeepAspectRatio, Qt::SmoothTransformation));
} else {
qDebug() << "AutoPilot Icon image did not load" << path;
}
}
void QGCPX4SensorCalibration::setGpsImage(const QString &path)
{
if (gpsIcon.load(path)) {
int w = ui->gpsLabel->width();
int h = ui->gpsLabel->height();
ui->gpsLabel->setPixmap(gpsIcon.scaled(w, h, Qt::KeepAspectRatio, Qt::SmoothTransformation));
} else {
qDebug() << "GPS Icon image did not load" << path;
}
}
void QGCPX4SensorCalibration::updateIcons()
{
int w = ui->iconLabel->width();
int h = ui->iconLabel->height();
ui->iconLabel->setPixmap(instructionIcon.scaled(w, h, Qt::KeepAspectRatio, Qt::SmoothTransformation));
int wa = ui->autopilotLabel->width();
int ha = ui->autopilotLabel->height();
ui->autopilotLabel->setPixmap(autopilotIcon.scaled(wa, ha, Qt::KeepAspectRatio, Qt::SmoothTransformation));
int wg = ui->gpsLabel->width();
int hg = ui->gpsLabel->height();
ui->gpsLabel->setPixmap(gpsIcon.scaled(wg, hg, Qt::KeepAspectRatio, Qt::SmoothTransformation));
}
void QGCPX4SensorCalibration::resizeEvent(QResizeEvent* event)
{
updateIcons();
QWidget::resizeEvent(event);
}
void QGCPX4SensorCalibration::setActiveUAS(UASInterface* uas)
{
if (!uas)
return;
if (activeUAS) {
disconnect(activeUAS, SIGNAL(textMessageReceived(int,int,int,QString)), this, SLOT(handleTextMessage(int,int,int,QString)));
disconnect(activeUAS, SIGNAL(parameterChanged(int,int,QString,QVariant)), this, SLOT(parameterChanged(int,int,QString,QVariant)));
ui->textView->clear();
}
ui->gyroButton->setEnabled(true);
ui->magButton->setEnabled(true);
ui->accelButton->setEnabled(true);
connect(uas, SIGNAL(textMessageReceived(int,int,int,QString)), this, SLOT(handleTextMessage(int,int,int,QString)));
connect(uas, SIGNAL(parameterChanged(int,int,QString,QVariant)), this, SLOT(parameterChanged(int,int,QString,QVariant)));
connect(uas, SIGNAL(systemSpecsChanged(int)), this, SLOT(updateSystemSpecs(int)));
activeUAS = uas;
updateSystemSpecs(uas->getUASID());
// If the parameters are ready, we aren't going to get paramterChanged signals. So re-request them in order to make the UI work.
if (uas->getParamManager()->parametersReady()) {
_requestAllSensorParameters();
}
}
void QGCPX4SensorCalibration::updateSystemSpecs(int id)
{
Q_UNUSED(id);
if (activeUAS->isRotaryWing()) {
// Users are confused by the config button
ui->diffPressureButton->hide();
ui->diffPressureLabel->hide();
} else {
ui->diffPressureButton->show();
ui->diffPressureLabel->show();
}
}
void QGCPX4SensorCalibration::handleTextMessage(int uasid, int compId, int severity, QString text)
{
Q_UNUSED(uasid);
Q_UNUSED(compId);
Q_UNUSED(severity);
if (text.startsWith("[cmd]") ||
text.startsWith("[mavlink pm]"))
return;
if (text.contains("progress <")) {
QString percent = text.split("<").last().split(">").first();
bool ok;
int p = percent.toInt(&ok);
if (ok)
ui->progressBar->setValue(p);
return;
}
ui->instructionLabel->setText(QString("%1").arg(text));
if (text.startsWith("Hold still, starting to measure ")) {
QString axis = text.section(" ", -2, -2);
setInstructionImage(QString(":/files/images/px4/calibration/accel_%1.png").arg(axis));
}
if (text.startsWith("pending: ")) {
QString axis = text.section(" ", 1, 1);
setInstructionImage(QString(":/files/images/px4/calibration/accel_%1.png").arg(axis));
}
if (text == "rotate in a figure 8 around all axis" /* support for old typo */
|| text == "rotate in a figure 8 around all axes" /* current version */) {
setInstructionImage(":/files/images/px4/calibration/mag_calibration_figure8.png");
}
if (text.endsWith(" calibration: done") || text.endsWith(" calibration: failed")) {
// XXX use a confirmation image or something
setInstructionImage(":/files/images/px4/calibration/accel_down.png");
if (text.endsWith(" calibration: done")) {
ui->progressBar->setValue(100);
} else {
ui->progressBar->setValue(0);
}
if (activeUAS) {
_requestAllSensorParameters();
}
}
if (text.endsWith(" calibration: started")) {
setInstructionImage(":/files/images/px4/calibration/accel_down.png");
}
// XXX color messages according to severity
QPlainTextEdit *msgWidget = ui->textView;
//turn off updates while we're appending content to avoid breaking the autoscroll behavior
msgWidget->setUpdatesEnabled(false);
QScrollBar *scroller = msgWidget->verticalScrollBar();
msgWidget->appendHtml(QString("%4").arg(text));
// Ensure text area scrolls correctly
scroller->setValue(scroller->maximum());
msgWidget->setUpdatesEnabled(true);
}
void QGCPX4SensorCalibration::gyroButtonClicked()
{
setInstructionImage(":/files/images/px4/calibration/accel_down.png");
activeUAS->executeCommand(MAV_CMD_PREFLIGHT_CALIBRATION, 1, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0);
ui->progressBar->setValue(0);
}
void QGCPX4SensorCalibration::magButtonClicked()
{
setInstructionImage(":/files/images/px4/calibration/accel_down.png");
activeUAS->executeCommand(MAV_CMD_PREFLIGHT_CALIBRATION, 1, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0);
ui->progressBar->setValue(0);
}
void QGCPX4SensorCalibration::accelButtonClicked()
{
setInstructionImage(":/files/images/px4/calibration/accel_down.png");
activeUAS->executeCommand(MAV_CMD_PREFLIGHT_CALIBRATION, 1, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0);
ui->progressBar->setValue(0);
}
void QGCPX4SensorCalibration::diffPressureButtonClicked()
{
setInstructionImage(":/files/images/px4/calibration/accel_down.png");
activeUAS->executeCommand(MAV_CMD_PREFLIGHT_CALIBRATION, 1, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0);
ui->progressBar->setValue(0);
}
void QGCPX4SensorCalibration::contextMenuEvent(QContextMenuEvent* event)
{
QMenu menu(this);
menu.addAction(clearAction);
menu.exec(event->globalPos());
}
void QGCPX4SensorCalibration::_requestAllSensorParameters(void)
{
static const char* rgSensorsCalParamsV1[] = {
"SENS_ACC_XOFF", "SENS_ACC_YOFF", "SENS_ACC_ZOFF", "SENS_ACC_XSCALE", "SENS_ACC_YSCALE", "SENS_ACC_ZSCALE",
"SENS_GYRO_XOFF", "SENS_GYRO_YOFF", "SENS_GYRO_ZOFF", "SENS_GYRO_XSCALE", "SENS_GYRO_YSCALE", "SENS_GYRO_ZSCALE",
"SENS_MAG_XOFF", "SENS_MAG_YOFF", "SENS_MAG_ZOFF", "SENS_MAG_XSCALE", "SENS_MAG_YSCALE", "SENS_MAG_ZSCALE", "SENS_EXT_MAG_ROT",
"SENS_DPRES_OFF", "SENS_DPRES_ANA",
"SENS_BOARD_ROT",
NULL };
static const char* rgSensorsCalParamsV2[] = {
"CAL_ACC0_ID", "CAL_ACC0_XOFF", "CAL_ACC0_YOFF", "CAL_ACC0_ZOFF", "CAL_ACC0_XSCALE", "CAL_ACC0_YSCALE", "CAL_ACC0_ZSCALE",
"CAL_GYRO0_ID", "CAL_GYRO0_XOFF", "CAL_GYRO0_YOFF", "CAL_GYRO0_ZOFF", "CAL_GYRO0_XSCALE", "CAL_GYRO0_YSCALE", "CAL_GYRO0_ZSCALE",
"CAL_MAG0_ID", "CAL_MAG0_XOFF", "CAL_MAG0_YOFF", "CAL_MAG0_ZOFF", "CAL_MAG0_XSCALE", "CAL_MAG0_YSCALE", "CAL_MAG0_ZSCALE", "SENS_EXT_MAG_ROT",
"SENS_DPRES_OFF", "SENS_DPRES_ANA",
"SENS_BOARD_ROT",
NULL };
Q_ASSERT(activeUAS);
QGCUASParamManagerInterface* paramMgr = activeUAS->getParamManager();
// Temp hack for parameter mapping
bool paramsV1 = paramMgr->getComponentForParam("SENS_MAG_XOFF").count();
static const char** prgParamList = paramsV1 ? rgSensorsCalParamsV1 : rgSensorsCalParamsV2;
for (size_t i=0; prgParamList[i] != NULL; i++) {
qDebug() << "Requesting" << prgParamList[i];
activeUAS->requestParameter(0, prgParamList[i]);
}
}

92
src/ui/px4_configuration/QGCPX4SensorCalibration.h

@ -1,92 +0,0 @@ @@ -1,92 +0,0 @@
#ifndef QGCPX4SENSORCALIBRATION_H
#define QGCPX4SENSORCALIBRATION_H
#include <QWidget>
#include <UASInterface.h>
#include <QAction>
namespace Ui {
class QGCPX4SensorCalibration;
}
class QGCPX4SensorCalibration : public QWidget
{
Q_OBJECT
public:
explicit QGCPX4SensorCalibration(QWidget *parent = 0);
~QGCPX4SensorCalibration();
public slots:
/**
* @brief Set currently active UAS
* @param uas the current active UAS
*/
void setActiveUAS(UASInterface* uas);
/**
* @brief Handle text message from current active UAS
* @param uasid
* @param componentid
* @param severity
* @param text
*/
void handleTextMessage(int uasid, int componentid, int severity, QString text);
/**
* @brief Update system specs / properties
* @param id the UID of the aircraft
*/
void updateSystemSpecs(int id);
void gyroButtonClicked();
void magButtonClicked();
void accelButtonClicked();
void diffPressureButtonClicked();
/**
* @brief Hand context menu event
* @param event
*/
virtual void contextMenuEvent(QContextMenuEvent* event);
void setAutopilotOrientation(int index);
void setGpsOrientation(int index);
void parameterChanged(int uas, int component, QString parameterName, QVariant value);
protected slots:
void setInstructionImage(const QString &path);
void setAutopilotImage(const QString &path);
void setGpsImage(const int index);
void setAutopilotImage(const int index);
void setGpsImage(const QString &path);
protected:
UASInterface* activeUAS;
QAction* clearAction;
QPixmap instructionIcon;
QPixmap autopilotIcon;
QPixmap gpsIcon;
virtual void resizeEvent(QResizeEvent* event);
void setMagCalibrated(bool calibrated);
void setGyroCalibrated(bool calibrated);
void setAccelCalibrated(bool calibrated);
void setDiffPressureCalibrated(bool calibrated);
void updateIcons();
private:
void _requestAllSensorParameters(void);
Ui::QGCPX4SensorCalibration *ui;
};
#endif // QGCPX4SENSORCALIBRATION_H

275
src/ui/px4_configuration/QGCPX4SensorCalibration.ui

@ -1,275 +0,0 @@ @@ -1,275 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>QGCPX4SensorCalibration</class>
<widget class="QWidget" name="QGCPX4SensorCalibration">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>659</width>
<height>636</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<property name="styleSheet">
<string notr="true">QPushButton#magButton {
background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #73D95D, stop: 1 #18A154);
border-radius: 8px;
min-height: 25px;
max-height: 30px;
min-width: 60px;
max-width: 140px;
margin: 5px;
border: 2px solid #465158;
}
QPushButton#gyroButton, QPushButton#accelButton, QPushButton#diffPressureButton {
background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #D3795D, stop: 1 #A81154);
border-radius: 8px;
min-height: 25px;
max-height: 30px;
min-width: 60px;
max-width: 140px;
margin: 5px;
border: 2px solid #465158;
}</string>
</property>
<layout class="QGridLayout" name="gridLayout" rowstretch="40,5,1,1,1,1,1,1" columnstretch="1,2,30,1,1,10">
<item row="0" column="4" rowspan="6" colspan="2">
<layout class="QVBoxLayout" name="verticalLayout_4" stretch="0,10,10">
<item>
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QGroupBox" name="groupBox_2">
<property name="title">
<string>Autopilot Orientation</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QLabel" name="autopilotLabel">
<property name="minimumSize">
<size>
<width>0</width>
<height>250</height>
</size>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="autopilotComboBox"/>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>Magnetometer Orientation</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QLabel" name="gpsLabel">
<property name="minimumSize">
<size>
<width>150</width>
<height>120</height>
</size>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="magComboBox"/>
</item>
</layout>
</widget>
</item>
</layout>
</item>
<item row="6" column="2" colspan="4">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>498</width>
<height>5</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="0" rowspan="2" colspan="4">
<widget class="QLabel" name="iconLabel">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="2" column="2" colspan="2">
<widget class="QProgressBar" name="progressBar">
<property name="value">
<number>24</number>
</property>
</widget>
</item>
<item row="3" column="0" colspan="4">
<widget class="QPlainTextEdit" name="textView">
<property name="enabled">
<bool>false</bool>
</property>
</widget>
</item>
<item row="7" column="0" colspan="4">
<layout class="QGridLayout" name="gridLayout_2" columnstretch="1,1,1,1">
<item row="0" column="2">
<widget class="QLabel" name="accelLabel">
<property name="text">
<string/>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="gyroLabel">
<property name="text">
<string/>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QPushButton" name="gyroButton">
<property name="text">
<string>Gyroscope</string>
</property>
<property name="icon">
<iconset resource="../../../qgroundcontrol.qrc">
<normaloff>:/files/images/px4/calibration/arrows.png</normaloff>:/files/images/px4/calibration/arrows.png</iconset>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QPushButton" name="magButton">
<property name="text">
<string>Magnetometer</string>
</property>
<property name="icon">
<iconset resource="../../../qgroundcontrol.qrc">
<normaloff>:/files/images/px4/calibration/arrows.png</normaloff>:/files/images/px4/calibration/arrows.png</iconset>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QPushButton" name="accelButton">
<property name="text">
<string>Accelerometer</string>
</property>
<property name="icon">
<iconset resource="../../../qgroundcontrol.qrc">
<normaloff>:/files/images/px4/calibration/arrows.png</normaloff>:/files/images/px4/calibration/arrows.png</iconset>
</property>
</widget>
</item>
<item row="1" column="3">
<widget class="QPushButton" name="diffPressureButton">
<property name="text">
<string>Diff. pressure</string>
</property>
<property name="icon">
<iconset resource="../../../qgroundcontrol.qrc">
<normaloff>:/files/images/px4/calibration/arrows.png</normaloff>:/files/images/px4/calibration/arrows.png</iconset>
</property>
</widget>
</item>
<item row="0" column="3">
<widget class="QLabel" name="diffPressureLabel">
<property name="text">
<string/>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="magLabel">
<property name="text">
<string/>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
</layout>
</item>
<item row="5" column="0" colspan="4">
<widget class="QLabel" name="instructionLabel">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="7" column="4">
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="2" column="0">
<widget class="QCheckBox" name="logCheckBox">
<property name="text">
<string>Log</string>
</property>
</widget>
</item>
<item row="2" column="1">
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<resources>
<include location="../../../qgroundcontrol.qrc"/>
</resources>
<connections/>
</ui>
Loading…
Cancel
Save