Commit 439d6cf8 authored by Don Gagne's avatar Don Gagne

Merge pull request #1513 from DonLakeFlyer/AndroidFirmware

Remove Firmware Update from tablet build
parents 96d6e39f ca94c02f
...@@ -103,9 +103,11 @@ DebugBuild { ...@@ -103,9 +103,11 @@ DebugBuild {
CONFIG += console CONFIG += console
} }
!AndroidBuild {
# qextserialport should not be used by general QGroundControl code. Use QSerialPort instead. This is only # qextserialport should not be used by general QGroundControl code. Use QSerialPort instead. This is only
# here to support special case Firmware Upgrade code. # here to support special case Firmware Upgrade code.
include(libs/qextserialport/src/qextserialport.pri) include(libs/qextserialport/src/qextserialport.pri)
}
# #
# External library configuration # External library configuration
...@@ -627,12 +629,16 @@ HEADERS+= \ ...@@ -627,12 +629,16 @@ HEADERS+= \
src/AutoPilotPlugins/PX4/SafetyComponent.h \ src/AutoPilotPlugins/PX4/SafetyComponent.h \
src/AutoPilotPlugins/PX4/SensorsComponent.h \ src/AutoPilotPlugins/PX4/SensorsComponent.h \
src/AutoPilotPlugins/PX4/SensorsComponentController.h \ src/AutoPilotPlugins/PX4/SensorsComponentController.h \
src/VehicleSetup/FirmwareUpgradeController.h \
src/VehicleSetup/PX4Bootloader.h \
src/VehicleSetup/PX4FirmwareUpgradeThread.h \
src/VehicleSetup/SetupView.h \ src/VehicleSetup/SetupView.h \
src/VehicleSetup/VehicleComponent.h \ src/VehicleSetup/VehicleComponent.h \
!AndroidBuild {
HEADERS += \
src/VehicleSetup/FirmwareUpgradeController.h \
src/VehicleSetup/PX4Bootloader.h \
src/VehicleSetup/PX4FirmwareUpgradeThread.h
}
SOURCES += \ SOURCES += \
src/AutoPilotPlugins/AutoPilotPlugin.cc \ src/AutoPilotPlugins/AutoPilotPlugin.cc \
src/AutoPilotPlugins/AutoPilotPluginManager.cc \ src/AutoPilotPlugins/AutoPilotPluginManager.cc \
...@@ -651,12 +657,16 @@ SOURCES += \ ...@@ -651,12 +657,16 @@ SOURCES += \
src/AutoPilotPlugins/PX4/SafetyComponent.cc \ src/AutoPilotPlugins/PX4/SafetyComponent.cc \
src/AutoPilotPlugins/PX4/SensorsComponent.cc \ src/AutoPilotPlugins/PX4/SensorsComponent.cc \
src/AutoPilotPlugins/PX4/SensorsComponentController.cc \ src/AutoPilotPlugins/PX4/SensorsComponentController.cc \
src/VehicleSetup/FirmwareUpgradeController.cc \
src/VehicleSetup/PX4Bootloader.cc \
src/VehicleSetup/PX4FirmwareUpgradeThread.cc \
src/VehicleSetup/SetupView.cc \ src/VehicleSetup/SetupView.cc \
src/VehicleSetup/VehicleComponent.cc \ src/VehicleSetup/VehicleComponent.cc \
!AndroidBuild {
SOURCES += \
src/VehicleSetup/FirmwareUpgradeController.cc \
src/VehicleSetup/PX4Bootloader.cc \
src/VehicleSetup/PX4FirmwareUpgradeThread.cc
}
# Fact System code # Fact System code
INCLUDEPATH += \ INCLUDEPATH += \
......
...@@ -33,7 +33,9 @@ ...@@ -33,7 +33,9 @@
#include "QGCQmlWidgetHolder.h" #include "QGCQmlWidgetHolder.h"
#include "MainWindow.h" #include "MainWindow.h"
#include "QGCMessageBox.h" #include "QGCMessageBox.h"
#ifndef __android__
#include "FirmwareUpgradeController.h" #include "FirmwareUpgradeController.h"
#endif
#include "ParameterEditorController.h" #include "ParameterEditorController.h"
#include <QQmlError> #include <QQmlError>
...@@ -54,7 +56,9 @@ SetupView::SetupView(QWidget* parent) : ...@@ -54,7 +56,9 @@ SetupView::SetupView(QWidget* parent) :
Q_UNUSED(fSucceeded); Q_UNUSED(fSucceeded);
Q_ASSERT(fSucceeded); Q_ASSERT(fSucceeded);
#ifndef __android__
qmlRegisterType<FirmwareUpgradeController>("QGroundControl.Controllers", 1, 0, "FirmwareUpgradeController"); qmlRegisterType<FirmwareUpgradeController>("QGroundControl.Controllers", 1, 0, "FirmwareUpgradeController");
#endif
_ui->buttonHolder->rootContext()->setContextProperty("controller", this); _ui->buttonHolder->rootContext()->setContextProperty("controller", this);
_ui->buttonHolder->setAutoPilot(NULL); _ui->buttonHolder->setAutoPilot(NULL);
...@@ -116,6 +120,8 @@ void SetupView::_changeSetupWidget(QWidget* newWidget) ...@@ -116,6 +120,8 @@ void SetupView::_changeSetupWidget(QWidget* newWidget)
void SetupView::firmwareButtonClicked(void) void SetupView::firmwareButtonClicked(void)
{ {
#ifndef __android__
//FIXME: Hack out for android for now
if (_uasCurrent && _uasCurrent->isArmed()) { if (_uasCurrent && _uasCurrent->isArmed()) {
QGCMessageBox::warning("Setup", "Firmware Update cannot be performed while vehicle is armed."); QGCMessageBox::warning("Setup", "Firmware Update cannot be performed while vehicle is armed.");
return; return;
...@@ -127,6 +133,7 @@ void SetupView::firmwareButtonClicked(void) ...@@ -127,6 +133,7 @@ void SetupView::firmwareButtonClicked(void)
setup->setSource(QUrl::fromUserInput("qrc:/qml/FirmwareUpgrade.qml")); setup->setSource(QUrl::fromUserInput("qrc:/qml/FirmwareUpgrade.qml"));
_changeSetupWidget(setup); _changeSetupWidget(setup);
#endif
} }
void SetupView::parametersButtonClicked(void) void SetupView::parametersButtonClicked(void)
......
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