Commit 6eff8ad6 authored by Lorenz Meier's avatar Lorenz Meier

Merge branch 'config' of github.com:mavlink/qgroundcontrol into config

parents 3dece82d d5603052
......@@ -54,3 +54,5 @@ thirdParty/qserialport/bin/
thirdParty/qserialport/lib/
GeneratedFiles/
/qupgrade/
*.autosave
......@@ -146,13 +146,16 @@ include(src/apps/mavlinkgen/mavlinkgen.pri)
exists(qupgrade) {
SOURCES += qupgrade/src/apps/qupgrade/qgcfirmwareupgradeworker.cpp \
qupgrade/src/apps/qupgrade/uploader.cpp \
qupgrade/src/apps/qupgrade/dialog_bare.cpp
qupgrade/src/apps/qupgrade/dialog_bare.cpp \
qupgrade/src/apps/qupgrade/boardwidget.cpp
HEADERS += qupgrade/src/apps/qupgrade/qgcfirmwareupgradeworker.h \
qupgrade/src/apps/qupgrade/uploader.h \
qupgrade/src/apps/qupgrade/dialog_bare.h
qupgrade/src/apps/qupgrade/dialog_bare.h \
qupgrade/src/apps/qupgrade/boardwidget.h
FORMS += qupgrade/src/apps/qupgrade/dialog_bare.ui
FORMS += qupgrade/src/apps/qupgrade/dialog_bare.ui \
qupgrade/src/apps/qupgrade/boardwidget.ui
linux*:CONFIG += qesp_linux_udev
......@@ -163,6 +166,9 @@ exists(qupgrade) {
DEFINES += "QUPGRADE_SUPPORT"
}
# Include GLC library
#include(libs/GLC_lib/glc_lib.pri)
# Include QWT plotting library
include(libs/qwt/qwt.pri)
......@@ -285,7 +291,8 @@ FORMS += src/ui/MainWindow.ui \
src/ui/configuration/terminalconsole.ui \
src/ui/configuration/SerialSettingsDialog.ui \
src/ui/configuration/ApmFirmwareConfig.ui \
src/ui/px4_configuration/QGCPX4AirframeConfig.ui
src/ui/px4_configuration/QGCPX4AirframeConfig.ui \
src/ui/px4_configuration/QGCPX4MulticopterConfig.ui
INCLUDEPATH += src \
src/ui \
......@@ -489,7 +496,7 @@ HEADERS += src/MG.h \
src/ui/QGCPendingParamWidget.h \
src/ui/px4_configuration/QGCPX4AirframeConfig.h \
src/ui/QGCBaseParamWidget.h \
src/comm/px4_custom_mode.h
src/ui/px4_configuration/QGCPX4MulticopterConfig.h
# Google Earth is only supported on Mac OS and Windows with Visual Studio Compiler
macx|macx-g++|macx-g++42|win32-msvc2008|win32-msvc2010|win32-msvc2012::HEADERS += src/ui/map3D/QGCGoogleEarthView.h
......@@ -709,7 +716,8 @@ SOURCES += src/main.cc \
src/uas/UASParameterCommsMgr.cc \
src/ui/QGCPendingParamWidget.cc \
src/ui/px4_configuration/QGCPX4AirframeConfig.cc \
src/ui/QGCBaseParamWidget.cc
src/ui/QGCBaseParamWidget.cc \
src/ui/px4_configuration/QGCPX4MulticopterConfig.cc
# Enable Google Earth only on Mac OS and Windows with Visual Studio compiler
macx|macx-g++|macx-g++42|win32-msvc2008|win32-msvc2010|win32-msvc2012::SOURCES += src/ui/map3D/QGCGoogleEarthView.cc
......
......@@ -166,6 +166,7 @@
<file>files/images/px4/airframes/flying_wing.png</file>
<file>files/images/px4/airframes/plane_ert.png</file>
<file>files/images/px4/airframes/plane_aert.png</file>
<file>files/images/px4/airframes/quad_h.png</file>
</qresource>
<qresource prefix="/general">
<file alias="vera.ttf">files/styles/Vera.ttf</file>
......
......@@ -56,6 +56,8 @@ void QGCUASParamManager::connectToModelAndComms()
void QGCUASParamManager::clearAllPendingParams()
{
paramDataModel.clearAllPendingParams();
emit parameterStatusMsgUpdated(tr("Cleared all pending params"), UASParameterCommsMgr::ParamCommsStatusLevel_OK);
}
......
......@@ -2368,9 +2368,9 @@ void UAS::enableExtra3Transmission(int rate)
* @param component The component to set the parameter
* @param id Name of the parameter
*/
void UAS::setParameter(const int component, const QString& id, const QVariant& value)
void UAS::setParameter(const int compId, const QString& paramId, const QVariant& value)
{
if (!id.isNull())
if (!paramId.isNull())
{
mavlink_message_t msg;
mavlink_param_set_t p;
......@@ -2431,7 +2431,7 @@ void UAS::setParameter(const int component, const QString& id, const QVariant& v
p.param_value = union_value.param_float;
p.target_system = (uint8_t)uasId;
p.target_component = (uint8_t)component;
p.target_component = (uint8_t)compId;
//qDebug() << "SENT PARAM:" << value;
......@@ -2439,9 +2439,9 @@ void UAS::setParameter(const int component, const QString& id, const QVariant& v
for (unsigned int i = 0; i < sizeof(p.param_id); i++)
{
// String characters
if ((int)i < id.length())
if ((int)i < paramId.length())
{
p.param_id[i] = id.toAscii()[i];
p.param_id[i] = paramId.toAscii()[i];
}
else
{
......@@ -2449,7 +2449,7 @@ void UAS::setParameter(const int component, const QString& id, const QVariant& v
p.param_id[i] = 0;
}
}
mavlink_msg_param_set_encode(mavlink->getSystemId(), mavlink->getComponentId(), &msg, &p);
mavlink_msg_param_set_encode(mavlink->getSystemId(), compId, &msg, &p);
sendMessage(msg);
}
}
......
......@@ -842,7 +842,7 @@ public slots:
void requestParameter(int component, int id);
/** @brief Set a system parameter */
void setParameter(const int component, const QString& id, const QVariant& value);
void setParameter(const int compId, const QString& paramId, const QVariant& value);
/** @brief Write parameters to permanent storage */
void writeParametersToStorage();
......
......@@ -156,11 +156,11 @@ void UASParameterCommsMgr::emitPendingParameterCommit(int compId, const QString&
}
break;
default:
qCritical() << "ABORTED PARAM SEND, NO VALID QVARIANT TYPE";
qCritical() << "ABORTED PARAM SEND, INVALID QVARIANT TYPE" << paramType;
return;
}
setParameterStatusMsg(tr("Requested write of: %1: %2").arg(key).arg(value.toDouble()));
setParameterStatusMsg(tr("Writing %1: %2 for comp. %3").arg(key).arg(value.toDouble()).arg(compId));
}
......
......@@ -1456,11 +1456,6 @@ void MainWindow::connectCommonActions()
ui.actionSoftwareConfig->setChecked(true);
ui.actionSoftwareConfig->activate(QAction::Trigger);
}
if (currentView == VIEW_FIRMWAREUPDATE)
{
ui.actionFirmwareUpdateView->setChecked(true);
ui.actionFirmwareUpdateView->activate(QAction::Trigger);
}
if (currentView == VIEW_TERMINAL)
{
ui.actionTerminalView->setChecked(true);
......@@ -1509,7 +1504,6 @@ void MainWindow::connectCommonActions()
connect(ui.actionTerminalView,SIGNAL(triggered()),this,SLOT(loadTerminalView()));
}
connect(ui.actionFirmwareUpdateView, SIGNAL(triggered()), this, SLOT(loadFirmwareUpdateView()));
connect(ui.actionMavlinkView, SIGNAL(triggered()), this, SLOT(loadMAVLinkView()));
// Help Actions
......
......@@ -4,18 +4,26 @@
#include "QGCPX4VehicleConfig.h"
#include "QGCVehicleConfig.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*)));
//don't show a configuration widget if no vehicle is connected
//show a placeholder informational widget instead
// The config screens are required for firmware uploading
if (MainWindow::instance()->getCustomMode() == MainWindow::CUSTOM_MODE_PX4) {
config = new QGCPX4VehicleConfig();
ui->gridLayout->addWidget(config);
} else {
//don't show a configuration widget if no vehicle is connected
//show a placeholder informational widget instead
}
}
......@@ -49,10 +57,26 @@ void QGCConfigView::activeUASChanged(UASInterface* uas)
int autopilotType = mav->getAutopilotType();
switch (autopilotType) {
case MAV_AUTOPILOT_PX4:
ui->gridLayout->addWidget(new QGCPX4VehicleConfig());
{
QGCPX4VehicleConfig* px4config = qobject_cast<QGCPX4VehicleConfig*>(config);
if (!px4config) {
if (config)
delete config;
config = new QGCPX4VehicleConfig();
ui->gridLayout->addWidget(config);
}
}
break;
default:
ui->gridLayout->addWidget(new QGCVehicleConfig());
{
QGCVehicleConfig* generalconfig = qobject_cast<QGCVehicleConfig*>(config);
if (!generalconfig) {
if (config)
delete config;
config = new QGCVehicleConfig();
ui->gridLayout->addWidget(config);
}
}
break;
}
}
......
......@@ -21,6 +21,7 @@ public slots:
private:
Ui::QGCConfigView *ui;
QWidget *config;
UASInterface* mav;
};
......
......@@ -16,7 +16,6 @@
#include "QGCPX4VehicleConfig.h"
#include "QGC.h"
//#include "QGCPendingParamWidget.h"
#include "QGCToolWidget.h"
#include "UASManager.h"
#include "LinkManager.h"
......@@ -84,6 +83,11 @@ QGCPX4VehicleConfig::QGCPX4VehicleConfig(QWidget *parent) :
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);
......@@ -134,8 +138,6 @@ QGCPX4VehicleConfig::QGCPX4VehicleConfig(QWidget *parent) :
ui->rcCalibrationButton->setCheckable(true);
connect(ui->rcCalibrationButton, SIGNAL(clicked(bool)), this, SLOT(toggleCalibrationRC(bool)));
connect(ui->writeButton, SIGNAL(clicked()),
this, SLOT(writeParameters()));
//TODO connect buttons here to save/clear actions?
UASInterface* tmpMav = UASManager::instance()->getActiveUAS();
......@@ -520,26 +522,29 @@ void QGCPX4VehicleConfig::loadQgcConfig(bool primary)
}
}
// Generate widgets for the Advanced tab.
foreach (QString file,vehicledir.entryList(QDir::Files | QDir::NoDotAndDotDot))
{
if (file.toLower().endsWith(".qgw")) {
QWidget* parent = ui->advanceColumnContents;
tool = new QGCToolWidget("", parent);
if (tool->loadSettings(vehicledir.absoluteFilePath(file), false))
{
toolWidgets.append(tool);
QGroupBox *box = new QGroupBox(parent);
box->setTitle(tool->objectName());
box->setLayout(new QVBoxLayout(box));
box->layout()->addWidget(tool);
ui->advancedColumnLayout->addWidget(box);
} else {
delete tool;
}
}
}
//TODO fix and reintegrate the Advanced parameter editor
// // Generate widgets for the Advanced tab.
// foreach (QString file,vehicledir.entryList(QDir::Files | QDir::NoDotAndDotDot))
// {
// if (file.toLower().endsWith(".qgw")) {
// QWidget* parent = ui->advanceColumnContents;
// tool = new QGCToolWidget("", parent);
// if (tool->loadSettings(vehicledir.absoluteFilePath(file), false))
// {
// toolWidgets.append(tool);
// QGroupBox *box = new QGroupBox(parent);
// box->setTitle(tool->objectName());
// box->setLayout(new QVBoxLayout(box));
// box->layout()->addWidget(tool);
// ui->advancedColumnLayout->addWidget(box);
// } else {
// delete tool;
// }
// }
// }
// Load tabs for general configuration
foreach (QString dir,generaldir.entryList(QDir::Dirs | QDir::NoDotAndDotDot))
......@@ -1027,17 +1032,6 @@ void QGCPX4VehicleConfig::setActiveUAS(UASInterface* active)
{
// Hide items if NULL and abort
if (!active) {
ui->refreshButton->setEnabled(false);
ui->refreshButton->show();
ui->readButton->setEnabled(false);
ui->readButton->show();
ui->writeButton->setEnabled(false);
ui->writeButton->show();
ui->loadFileButton->setEnabled(false);
ui->loadFileButton->show();
ui->saveFileButton->setEnabled(false);
ui->saveFileButton->show();
return;
}
......@@ -1055,8 +1049,6 @@ void QGCPX4VehicleConfig::setActiveUAS(UASInterface* active)
//TODO use paramCommsMgr instead
disconnect(mav, SIGNAL(parameterChanged(int,int,QString,QVariant)), this,
SLOT(parameterChanged(int,int,QString,QVariant)));
disconnect(ui->refreshButton,SIGNAL(clicked()),
paramMgr,SLOT(requestParameterList()));
// Delete all children from all fixed tabs.
foreach(QWidget* child, ui->generalLeftContents->findChildren<QWidget*>()) {
......@@ -1097,6 +1089,7 @@ void QGCPX4VehicleConfig::setActiveUAS(UASInterface* active)
paramMgr = mav->getParamManager();
ui->pendingCommitsWidget->setUAS(mav);
ui->paramTreeWidget->setUAS(mav);
// Reset current state
resetCalibrationRC();
......@@ -1110,8 +1103,7 @@ void QGCPX4VehicleConfig::setActiveUAS(UASInterface* active)
SLOT(remoteControlChannelRawChanged(int,float)));
connect(mav, SIGNAL(parameterChanged(int,int,QString,QVariant)), this,
SLOT(parameterChanged(int,int,QString,QVariant)));
connect(ui->refreshButton, SIGNAL(clicked()),
paramMgr,SLOT(requestParameterList()));
if (systemTypeToParamMap.contains(mav->getSystemTypeName())) {
paramToWidgetMap = systemTypeToParamMap[mav->getSystemTypeName()];
......@@ -1135,22 +1127,11 @@ void QGCPX4VehicleConfig::setActiveUAS(UASInterface* active)
updateStatus(QString("Reading from system %1").arg(mav->getUASName()));
// Since a system is now connected, enable the VehicleConfig UI.
ui->refreshButton->setEnabled(true);
ui->refreshButton->show();
ui->readButton->setEnabled(true);
ui->readButton->show();
ui->writeButton->setEnabled(true);
ui->writeButton->show();
ui->loadFileButton->setEnabled(true);
ui->loadFileButton->show();
ui->saveFileButton->setEnabled(true);
ui->saveFileButton->show();
//TODO never true?
if (mav->getAutopilotTypeName() == "ARDUPILOTMEGA") {
ui->readButton->hide();
ui->writeButton->hide();
}
// Enable buttons
ui->advancedMenuButton->setEnabled(true);
ui->airframeMenuButton->setEnabled(true);
ui->sensorMenuButton->setEnabled(true);
ui->rcMenuButton->setEnabled(true);
}
void QGCPX4VehicleConfig::resetCalibrationRC()
......@@ -1226,8 +1207,13 @@ void QGCPX4VehicleConfig::remoteControlChannelRawChanged(int chan, float fval)
}
// Raw value
int delta = abs(fval - rcMappedValue[rcToFunctionMapping[chan]]);
if (!configEnabled && !calibrationEnabled && delta < 12 && delta >= 0 && rcValue[chan] > 800 && rcValue[chan] < 2200) {
float mappedVal = rcMappedValue[rcToFunctionMapping[chan]];
bool isMapped = (((float)UINT16_MAX) != mappedVal);
float delta = fabsf(fval - mappedVal);
if (!configEnabled && !calibrationEnabled &&
(!isMapped ||
(delta < 12.0f && rcValue[chan] > 800 && rcValue[chan] < 2200) )
) {
//ignore tiny jitter values
return;
}
......@@ -1694,33 +1680,33 @@ void QGCPX4VehicleConfig::parameterChanged(int uas, int component, QString param
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;
}
// 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;
// }
}
}
......
......@@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>1256</width>
<height>889</height>
<height>912</height>
</rect>
</property>
<property name="sizePolicy">
......@@ -43,7 +43,7 @@
<x>0</x>
<y>0</y>
<width>133</width>
<height>863</height>
<height>886</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_12">
......@@ -154,7 +154,7 @@ Config</string>
<item>
<widget class="QStackedWidget" name="stackedWidget">
<property name="currentIndex">
<number>1</number>
<number>5</number>
</property>
<widget class="QWidget" name="firmwareTab">
<layout class="QVBoxLayout" name="firmwareLayout">
......@@ -932,8 +932,8 @@ Config</string>
<rect>
<x>0</x>
<y>0</y>
<width>98</width>
<height>28</height>
<width>39</width>
<height>26</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_10">
......@@ -1020,8 +1020,8 @@ Config</string>
<rect>
<x>0</x>
<y>0</y>
<width>98</width>
<height>28</height>
<width>16</width>
<height>16</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_4">
......@@ -1057,8 +1057,8 @@ Config</string>
<rect>
<x>0</x>
<y>0</y>
<width>98</width>
<height>28</height>
<width>16</width>
<height>16</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_5">
......@@ -1149,8 +1149,8 @@ Config</string>
<rect>
<x>0</x>
<y>0</y>
<width>98</width>
<height>28</height>
<width>597</width>
<height>740</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_7">
......@@ -1158,90 +1158,20 @@ Config</string>
<number>0</number>
</property>
<item>
<layout class="QVBoxLayout" name="advancedColumnLayout"/>
<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>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_9">
<item>
<widget class="QPushButton" name="refreshButton">
<property name="enabled">
<bool>false</bool>
</property>
<property name="toolTip">
<string>Load parameters currently in non-permanent memory of aircraft.</string>
</property>
<property name="statusTip">
<string/>
</property>
<property name="text">
<string>Refresh</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="readButton">
<property name="enabled">
<bool>false</bool>
</property>
<property name="toolTip">
<string>Copy parameters from permanent memory to non-permanent current memory of aircraft. DOES NOT update the parameters in this view, click refresh after copying them to get them.</string>
</property>
<property name="statusTip">
<string/>
</property>
<property name="whatsThis">
<string/>
</property>
<property name="text">
<string>Read ROM</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="writeButton">
<property name="enabled">
<bool>false</bool>
</property>
<property name="toolTip">
<string>Copy current parameters in non-permanent memory of the aircraft to permanent memory. Transmit your parameters first to write these.</string>
</property>
<property name="statusTip">
<string/>
</property>
<property name="text">
<string>Write ROM</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="loadFileButton">
<property name="text">
<string>Load File</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="saveFileButton">
<property name="enabled">
<bool>false</bool>
</property>
<property name="toolTip">
<string>Save parameters in this view to a file on this computer.</string>
</property>
<property name="statusTip">
<string/>
</property>
<property name="text">
<string>Save to File</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
......@@ -1275,34 +1205,28 @@ Config</string>
<property name="title">
<string>Changes Pending</string>
</property>
<widget class="QWidget" name="verticalLayoutWidget">
<property name="geometry">
<rect>
<x>10</x>
<y>30</y>
<width>381</width>
<height>601</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_4" stretch="0">
<property name="spacing">
<number>0</number>
</property>
<item>
<widget class="QGCPendingParamWidget" name="pendingCommitsWidget" native="true">
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="autoFillBackground">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
<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>
......@@ -1354,6 +1278,12 @@ Config</string>
<header location="global">QGCMessageView.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>QGCParamWidget</class>
<extends>QWidget</extends>
<header>ui/QGCParamWidget.h</header>
<container>1</container>
</customwidget>
</customwidgets>
<resources/>
<connections/>
......
......@@ -10,6 +10,8 @@
QGCPendingParamWidget::QGCPendingParamWidget(QObject *parent) :
QGCParamWidget((QWidget*)parent)
{
//this subclass doesn't display status updates
statusLabel->hide();
}
......@@ -20,10 +22,6 @@ void QGCPendingParamWidget::connectToParamManager()
// Listen to updated param signals from the data model
connect(paramMgr, SIGNAL(pendingParamUpdate(int , const QString&, QVariant , bool )),
this, SLOT(handlePendingParamUpdate(int , const QString& , QVariant, bool )));
// Listen to communications status messages so we can display them
connect(paramMgr, SIGNAL(parameterStatusMsgUpdated(QString,int)),
this, SLOT(handleParamStatusMsgUpdate(QString , int )));
}
......@@ -33,10 +31,6 @@ void QGCPendingParamWidget::disconnectFromParamManager()
disconnect(paramMgr, SIGNAL(pendingParamUpdate(int , const QString&, QVariant , bool )),
this, SLOT(handlePendingParamUpdate(int , const QString& , QVariant, bool )));
// Listen to communications status messages so we can display them
disconnect(paramMgr, SIGNAL(parameterStatusMsgUpdated(QString,int)),
this, SLOT(handleParamStatusMsgUpdate(QString , int )));
paramMgr = NULL;
}
......
......@@ -33,9 +33,9 @@
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<y>-291</y>
<width>762</width>
<height>531</height>
<height>647</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout">
......@@ -318,6 +318,10 @@
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../../../qgroundcontrol.qrc">
<normaloff>:/files/images/px4/airframes/quad_h.png</normaloff>:/files/images/px4/airframes/quad_h.png</iconset>
</property>
<property name="iconSize">
<size>
<width>120</width>
......
#include "QGCPX4MulticopterConfig.h"
#include "ui_QGCPX4MulticopterConfig.h"
QGCPX4MulticopterConfig::QGCPX4MulticopterConfig(QWidget *parent) :
QWidget(parent),
ui(new Ui::QGCPX4MulticopterConfig)
{
ui->setupUi(this);
}
QGCPX4MulticopterConfig::~QGCPX4MulticopterConfig()
{
delete ui;
}
#ifndef QGCPX4MULTICOPTERCONFIG_H
#define QGCPX4MULTICOPTERCONFIG_H
#include <QWidget>
namespace Ui {
class QGCPX4MulticopterConfig;
}
class QGCPX4MulticopterConfig : public QWidget
{
Q_OBJECT
public:
explicit QGCPX4MulticopterConfig(QWidget *parent = 0);
~QGCPX4MulticopterConfig();
private:
Ui::QGCPX4MulticopterConfig *ui;
};
#endif // QGCPX4MULTICOPTERCONFIG_H
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>QGCPX4MulticopterConfig</class>
<widget class="QWidget" name="QGCPX4MulticopterConfig">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>605</width>
<height>449</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<widget class="QSlider" name="horizontalSlider">
<property name="geometry">
<rect>
<x>130</x>
<y>150</y>
<width>341</width>
<height>22</height>
</rect>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
<widget class="QSlider" name="horizontalSlider_2">
<property name="geometry">
<rect>
<x>130</x>
<y>400</y>
<width>351</width>
<height>22</height>
</rect>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
<widget class="QLabel" name="label">
<property name="geometry">
<rect>
<x>30</x>
<y>160</y>
<width>62</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>TextLabel</string>
</property>
</widget>
<widget class="QLabel" name="label_2">
<property name="geometry">
<rect>
<x>510</x>
<y>160</y>
<width>62</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>TextLabel</string>
</property>
</widget>
<widget class="QLabel" name="label_3">
<property name="geometry">
<rect>
<x>40</x>
<y>400</y>
<width>62</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>TextLabel</string>
</property>
</widget>
<widget class="QLabel" name="label_4">
<property name="geometry">
<rect>
<x>520</x>
<y>400</y>
<width>62</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>TextLabel</string>
</property>
</widget>
<widget class="QLabel" name="label_5">
<property name="geometry">
<rect>
<x>30</x>
<y>10</y>
<width>62</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>TextLabel</string>
</property>
</widget>
<widget class="QLabel" name="label_6">
<property name="geometry">
<rect>
<x>30</x>
<y>200</y>
<width>62</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>TextLabel</string>
</property>
</widget>
</widget>
<resources/>
<connections/>
</ui>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment