Browse Source

QUpgrade enabled macro renamed to QGC_QUPGRADE_ENABLED for consistency.

Also fixed some code in QGCPX4VehicleConfig to remove unnecessary DialogBare references.
QGC4.4
Bryant 11 years ago
parent
commit
ee0768fc9f
  1. 3
      QGCExternalLibs.pri
  2. 9
      src/ui/QGCPX4VehicleConfig.cc
  3. 2
      src/ui/QGCPX4VehicleConfig.h

3
QGCExternalLibs.pri

@ -30,12 +30,13 @@ WindowsBuild { @@ -30,12 +30,13 @@ WindowsBuild {
# define like: `qmake DEFINES=DISABLE_QUPGRADE`
contains(DEFINES, DISABLE_QUPGRADE) {
message("Skipping support for QUpgrade (manual override)")
DEFINES -= DISABLE_QUPGRADE
}
# If the QUpgrade submodule has been initialized, build in support by default.
else:exists(qupgrade/.git) {
message("Including support for QUpgrade")
DEFINES += QUPGRADE_SUPPORT
DEFINES += QGC_QUPGRADE_ENABLED
INCLUDEPATH += qupgrade/src/apps/qupgrade

9
src/ui/QGCPX4VehicleConfig.cc

@ -24,7 +24,7 @@ @@ -24,7 +24,7 @@
#include "px4_configuration/QGCPX4AirframeConfig.h"
#include "px4_configuration/QGCPX4SensorCalibration.h"
#ifdef QUPGRADE_SUPPORT
#ifdef QGC_QUPGRADE_ENABLED
#include <dialog_bare.h>
#endif
@ -59,9 +59,6 @@ QGCPX4VehicleConfig::QGCPX4VehicleConfig(QWidget *parent) : @@ -59,9 +59,6 @@ QGCPX4VehicleConfig::QGCPX4VehicleConfig(QWidget *parent) :
calibrationEnabled(false),
configEnabled(false),
px4AirframeConfig(NULL),
#ifdef QUPGRADE_SUPPORT
firmwareDialog(NULL),
#endif
planeBack(":/files/images/px4/rc/cessna_back.png"),
planeSide(":/files/images/px4/rc/cessna_side.png"),
px4SensorCalibration(NULL),
@ -102,8 +99,8 @@ QGCPX4VehicleConfig::QGCPX4VehicleConfig(QWidget *parent) : @@ -102,8 +99,8 @@ QGCPX4VehicleConfig::QGCPX4VehicleConfig(QWidget *parent) :
px4SensorCalibration = new QGCPX4SensorCalibration(this);
ui->sensorLayout->addWidget(px4SensorCalibration);
#ifdef QUPGRADE_SUPPORT
firmwareDialog = new DialogBare(this);
#ifdef QGC_QUPGRADE_ENABLED
DialogBare *firmwareDialog = new DialogBare(this);
ui->firmwareLayout->addWidget(firmwareDialog);
connect(firmwareDialog, SIGNAL(connectLinks()), LinkManager::instance(), SLOT(connectAll()));

2
src/ui/QGCPX4VehicleConfig.h

@ -15,7 +15,6 @@ @@ -15,7 +15,6 @@
#include "px4_configuration/QGCPX4AirframeConfig.h"
class UASParameterCommsMgr;
class DialogBare;
class QGCPX4SensorCalibration;
namespace Ui {
@ -328,7 +327,6 @@ protected: @@ -328,7 +327,6 @@ protected:
QMap<QString,QString> paramTooltips; ///< Tooltips for the ? button next to a parameter.
QGCPX4AirframeConfig* px4AirframeConfig;
DialogBare* firmwareDialog;
QPixmap planeBack;
QPixmap planeSide;
QGCPX4SensorCalibration* px4SensorCalibration;

Loading…
Cancel
Save