Commit fe015311 authored by dogmaphobic's avatar dogmaphobic

First stab at iOS builds

parent 87b5ffaa
......@@ -20,6 +20,7 @@
include(QGCCommon.pri)
TARGET = qgroundcontrol
TEMPLATE = app
# Load additional config flags from user_config.pri
exists(user_config.pri):infile(user_config.pri, CONFIG) {
......@@ -31,19 +32,15 @@ LinuxBuild {
CONFIG += link_pkgconfig
}
message(BASEDIR $$BASEDIR DESTDIR $$DESTDIR TARGET $$TARGET)
# QGC QtLocation plugin
LIBS += -L$${LOCATION_PLUGIN_DESTDIR}
LIBS += -l$${LOCATION_PLUGIN_NAME}
LinuxBuild|MacBuild|AndroidBuild {
PRE_TARGETDEPS += $${LOCATION_PLUGIN_DESTDIR}/lib$${LOCATION_PLUGIN_NAME}.a
}
WindowsBuild {
PRE_TARGETDEPS += $${LOCATION_PLUGIN_DESTDIR}/$${LOCATION_PLUGIN_NAME}.lib
} else {
PRE_TARGETDEPS += $${LOCATION_PLUGIN_DESTDIR}/lib$${LOCATION_PLUGIN_NAME}.a
}
# Qt configuration
......@@ -51,13 +48,13 @@ WindowsBuild {
CONFIG += qt \
thread
QT += network \
QT += \
network \
concurrent \
gui \
location \
opengl \
positioning \
printsupport \
qml \
quick \
quickwidgets \
......@@ -66,8 +63,10 @@ QT += network \
widgets \
xml \
!AndroidBuild {
QT += serialport
!MobileBuild {
QT += \
printsupport \
serialport \
}
contains(DEFINES, QGC_NOTIFY_TUNES_ENABLED) {
......@@ -83,8 +82,14 @@ QT += testlib
MacBuild {
QMAKE_INFO_PLIST = Custom-Info.plist
ICON = $$BASEDIR/resources/icons/macx.icns
QT += quickwidgets
ICON = $${BASEDIR}/resources/icons/macx.icns
OTHER_FILES += Custom-Info.plist
}
iOSBuild {
QMAKE_INFO_PLIST = $${BASEDIR}/ios/iOS-Info.plist
ICON = $${BASEDIR}/resources/icons/macx.icns
OTHER_FILES += $${BASEDIR}/iOS-Info.plist
}
LinuxBuild {
......@@ -92,7 +97,7 @@ LinuxBuild {
}
WindowsBuild {
RC_FILE = $$BASEDIR/qgroundcontrol.rc
RC_FILE = $${BASEDIR}/qgroundcontrol.rc
}
#
......@@ -100,10 +105,12 @@ WindowsBuild {
#
DebugBuild {
!iOSBuild {
CONFIG += console
}
}
!AndroidBuild {
!MobileBuild {
# qextserialport should not be used by general QGroundControl code. Use QSerialPort instead. This is only
# here to support special case Firmware Upgrade code.
include(libs/qextserialport/src/qextserialport.pri)
......@@ -186,10 +193,6 @@ FORMS += \
src/ui/mission/QGCMissionOther.ui \
src/ui/QGCCommConfiguration.ui \
src/ui/QGCDataPlot2D.ui \
src/ui/QGCHilConfiguration.ui \
src/ui/QGCHilFlightGearConfiguration.ui \
src/ui/QGCHilJSBSimConfiguration.ui \
src/ui/QGCHilXPlaneConfiguration.ui \
src/ui/QGCLinkConfiguration.ui \
src/ui/QGCMapRCToParamDialog.ui \
src/ui/QGCMAVLinkInspector.ui \
......@@ -201,7 +204,6 @@ FORMS += \
src/ui/QGCUASFileViewMulti.ui \
src/ui/QGCUDPLinkConfiguration.ui \
src/ui/QGCWaypointListMulti.ui \
src/ui/SerialSettings.ui \
src/ui/SettingsDialog.ui \
src/ui/uas/QGCUnconnectedInfoWidget.ui \
src/ui/uas/UASMessageView.ui \
......@@ -216,11 +218,20 @@ FORMS += \
src/ui/WaypointList.ui \
src/ui/WaypointViewOnlyView.ui \
!AndroidBuild {
!iOSBuild {
FORMS += \
src/ui/SerialSettings.ui \
}
!MobileBuild {
FORMS += \
src/ui/JoystickButton.ui \
src/ui/JoystickAxis.ui \
src/ui/JoystickWidget.ui
src/ui/JoystickWidget.ui \
src/ui/QGCHilConfiguration.ui \
src/ui/QGCHilFlightGearConfiguration.ui \
src/ui/QGCHilJSBSimConfiguration.ui \
src/ui/QGCHilXPlaneConfiguration.ui \
}
HEADERS += \
......@@ -234,12 +245,7 @@ HEADERS += \
src/comm/MockLinkFileServer.h \
src/comm/MockLinkMissionItemHandler.h \
src/comm/ProtocolInterface.h \
src/comm/QGCFlightGearLink.h \
src/comm/QGCHilLink.h \
src/comm/QGCJSBSimLink.h \
src/comm/QGCMAVLink.h \
src/comm/QGCXPlaneLink.h \
src/comm/SerialLink.h \
src/comm/TCPLink.h \
src/comm/UDPLink.h \
src/GAudioOutput.h \
......@@ -306,10 +312,6 @@ HEADERS += \
src/ui/mission/QGCMissionOther.h \
src/ui/QGCCommConfiguration.h \
src/ui/QGCDataPlot2D.h \
src/ui/QGCHilConfiguration.h \
src/ui/QGCHilFlightGearConfiguration.h \
src/ui/QGCHilJSBSimConfiguration.h \
src/ui/QGCHilXPlaneConfiguration.h \
src/ui/QGCLinkConfiguration.h \
src/ui/QGCMainWindowAPConfigurator.h \
src/ui/QGCMapRCToParamDialog.h \
......@@ -323,7 +325,6 @@ HEADERS += \
src/ui/QGCUASFileViewMulti.h \
src/ui/QGCUDPLinkConfiguration.h \
src/ui/QGCWaypointListMulti.h \
src/ui/SerialConfigurationWindow.h \
src/ui/SettingsDialog.h \
src/ui/toolbar/MainToolBar.h \
src/ui/uas/QGCUnconnectedInfoWidget.h \
......@@ -347,13 +348,27 @@ HEADERS += \
src/ViewWidgets/ViewWidgetController.h \
src/Waypoint.h \
!AndroidBuild {
!iOSBuild {
HEADERS += \
src/comm/SerialLink.h \
src/ui/SerialConfigurationWindow.h \
}
!MobileBuild {
HEADERS += \
src/comm/QGCFlightGearLink.h \
src/comm/QGCHilLink.h \
src/comm/QGCJSBSimLink.h \
src/comm/QGCXPlaneLink.h \
src/input/JoystickInput.h \
src/ui/CameraView.h \
src/ui/JoystickAxis.h \
src/ui/JoystickButton.h \
src/ui/JoystickWidget.h \
src/ui/CameraView.h \
src/ui/QGCHilConfiguration.h \
src/ui/QGCHilFlightGearConfiguration.h \
src/ui/QGCHilJSBSimConfiguration.h \
src/ui/QGCHilXPlaneConfiguration.h \
}
SOURCES += \
......@@ -365,10 +380,6 @@ SOURCES += \
src/comm/MockLink.cc \
src/comm/MockLinkFileServer.cc \
src/comm/MockLinkMissionItemHandler.cc \
src/comm/QGCFlightGearLink.cc \
src/comm/QGCJSBSimLink.cc \
src/comm/QGCXPlaneLink.cc \
src/comm/SerialLink.cc \
src/comm/TCPLink.cc \
src/comm/UDPLink.cc \
src/GAudioOutput.cc \
......@@ -430,10 +441,6 @@ SOURCES += \
src/ui/mission/QGCMissionOther.cc \
src/ui/QGCCommConfiguration.cc \
src/ui/QGCDataPlot2D.cc \
src/ui/QGCHilConfiguration.cc \
src/ui/QGCHilFlightGearConfiguration.cc \
src/ui/QGCHilJSBSimConfiguration.cc \
src/ui/QGCHilXPlaneConfiguration.cc \
src/ui/QGCLinkConfiguration.cc \
src/ui/QGCMainWindowAPConfigurator.cc \
src/ui/QGCMapRCToParamDialog.cpp \
......@@ -447,7 +454,6 @@ SOURCES += \
src/ui/QGCUASFileViewMulti.cc \
src/ui/QGCUDPLinkConfiguration.cc \
src/ui/QGCWaypointListMulti.cc \
src/ui/SerialConfigurationWindow.cc \
src/ui/SettingsDialog.cc \
src/ui/toolbar/MainToolBar.cc \
src/ui/uas/QGCUnconnectedInfoWidget.cc \
......@@ -471,13 +477,26 @@ SOURCES += \
src/ViewWidgets/ViewWidgetController.cc \
src/Waypoint.cc \
!AndroidBuild {
!iOSBuild {
SOURCES += \
src/comm/SerialLink.cc \
src/ui/SerialConfigurationWindow.cc \
}
!MobileBuild {
SOURCES += \
src/comm/QGCFlightGearLink.cc \
src/comm/QGCJSBSimLink.cc \
src/comm/QGCXPlaneLink.cc \
src/input/JoystickInput.cc \
src/ui/CameraView.cc \
src/ui/JoystickAxis.cc \
src/ui/JoystickButton.cc \
src/ui/JoystickWidget.cc \
src/ui/CameraView.cc
src/ui/QGCHilConfiguration.cc \
src/ui/QGCHilFlightGearConfiguration.cc \
src/ui/QGCHilJSBSimConfiguration.cc \
src/ui/QGCHilXPlaneConfiguration.cc \
}
#
......@@ -494,7 +513,7 @@ DebugBuild|WindowsDebugAndRelease {
HEADERS += src/QmlControls/QmlTestWidget.h
SOURCES += src/QmlControls/QmlTestWidget.cc
!AndroidBuild {
!MobileBuild {
INCLUDEPATH += \
src/qgcunittest
......@@ -536,7 +555,7 @@ SOURCES += \
src/qgcunittest/PX4RCCalibrationTest.cc \
} # DebugBuild|WindowsDebugAndRelease
} # AndroidBuild
} # MobileBuild
#
# AutoPilot Plugin Support
......@@ -569,7 +588,7 @@ HEADERS+= \
src/VehicleSetup/SetupView.h \
src/VehicleSetup/VehicleComponent.h \
!AndroidBuild {
!MobileBuild {
HEADERS += \
src/VehicleSetup/FirmwareUpgradeController.h \
src/VehicleSetup/PX4Bootloader.h \
......@@ -599,7 +618,7 @@ SOURCES += \
src/VehicleSetup/SetupView.cc \
src/VehicleSetup/VehicleComponent.cc \
!AndroidBuild {
!MobileBuild {
SOURCES += \
src/VehicleSetup/FirmwareUpgradeController.cc \
src/VehicleSetup/PX4Bootloader.cc \
......
......@@ -32,8 +32,7 @@ linux {
CONFIG += LinuxBuild
} else : android-g++ {
message("Android build")
CONFIG += AndroidBuild
DEFINES += __mobile__
CONFIG += AndroidBuild MobileBuild
DEFINES += __android__
warning("Android build is experimental and not fully functional")
} else {
......@@ -54,8 +53,17 @@ linux {
} else {
error("Unsupported Mac toolchain, only 64-bit LLVM+clang is supported")
}
} else : ios {
message("iOS build")
CONFIG += iOSBuild MobileBuild app_bundle
DEFINES += __ios__
warning("iOS build is experimental and not yet functional")
} else {
error("Unsupported build platform, only Linux, Windows, and Mac are supported")
error("Unsupported build platform, only Linux, Windows, Android and Mac (Mac OS and iOS) are supported")
}
MobileBuild {
DEFINES += __mobile__
}
# Installer configuration
......@@ -86,29 +94,46 @@ win32:debug_and_release {
# Setup our build directories
BASEDIR = $${IN_PWD}
DebugBuild {
DESTDIR = $${OUT_PWD}/debug
BUILDDIR = $${OUT_PWD}/build-debug
}
BASEDIR = $$IN_PWD
DESTDIR = $${OUT_PWD}/debug
BUILDDIR = $${OUT_PWD}/build-debug
ReleaseBuild {
DESTDIR = $${OUT_PWD}/release
BUILDDIR = $${OUT_PWD}/build-release
}
OBJECTS_DIR = $${BUILDDIR}/obj
MOC_DIR = $${BUILDDIR}/moc
UI_DIR = $${BUILDDIR}/ui
RCC_DIR = $${BUILDDIR}/rcc
LANGUAGE = C++
iOSBuild {
# For whatever reason, the iOS build fails with these set. Some files have the full,
# properly concatenaded path and file name while others have only the second portion,
# as if BUILDDIR was empty.
OBJECTS_DIR = ~/tmp/qgcfoo
MOC_DIR = ~/tmp/qgcfoo
UI_DIR = ~/tmp/qgcfoo
RCC_DIR = ~/tmp/qgcfoo
} else {
OBJECTS_DIR = $${BUILDDIR}/obj
MOC_DIR = $${BUILDDIR}/moc
UI_DIR = $${BUILDDIR}/ui
RCC_DIR = $${BUILDDIR}/rcc
}
LANGUAGE = C++
AndroidBuild {
target.path = $$DESTDIR
}
# We place the created plugin lib into the objects dir so that make clean will clean it as well
LOCATION_PLUGIN_DESTDIR = $${OBJECTS_DIR}
LOCATION_PLUGIN_NAME = QGeoServiceProviderFactoryQGC
iOSBuild {
LOCATION_PLUGIN_DESTDIR = ~/tmp/qgcfoo
} else {
LOCATION_PLUGIN_DESTDIR = $$OBJECTS_DIR
}
LOCATION_PLUGIN_NAME = QGeoServiceProviderFactoryQGC
message(BASEDIR $$BASEDIR DESTDIR $$DESTDIR TARGET $$TARGET)
message(BASEDIR $$BASEDIR DESTDIR $$DESTDIR TARGET $$TARGET OUTPUT $$OUT_PWD)
# Turn off serial port warnings
DEFINES += _TTY_NOWARN_
......@@ -121,6 +146,10 @@ AndroidBuild {
DEFINES += __STDC_LIMIT_MACROS
}
iOSBuild {
QMAKE_IOS_DEPLOYMENT_TARGET = 7.0
}
MacBuild {
CONFIG += x86_64
CONFIG -= x86
......@@ -134,7 +163,6 @@ LinuxBuild {
WindowsBuild {
DEFINES += __STDC_LIMIT_MACROS
# Specify multi-process compilation within Visual Studio.
# (drastically improves compilation times for multi-core computers)
QMAKE_CXXFLAGS_DEBUG += -MP
......@@ -173,7 +201,6 @@ WindowsBuild {
ReleaseBuild {
DEFINES += QT_NO_DEBUG
WindowsBuild {
# Use link time code generation for better optimization (I believe this is supported in MSVC Express, but not 100% sure)
QMAKE_LFLAGS_LTCG = /LTCG
......
......@@ -6,7 +6,7 @@ CONFIG += plugin static
QT += location-private positioning-private network
PLUGIN_TYPE = geoservices
DESTDIR = $${LOCATION_PLUGIN_DESTDIR}
DESTDIR = $${LOCATION_PLUGIN_DESTDIR}
INCLUDEPATH += $$QT.location.includes
......@@ -30,4 +30,3 @@ SOURCES += \
OTHER_FILES += \
src/QtLocationPlugin/qgc_maps_plugin.json
......@@ -44,7 +44,7 @@ WindowsBuild {
BASEDIR_COPY_RESOURCE_LIST = $$replace(BASEDIR,"/","\\")
QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY_DIR \"$$BASEDIR_COPY_RESOURCE_LIST\\flightgear\" \"$$DESTDIR_COPY_RESOURCE_LIST\\flightgear\"
} else {
!AndroidBuild {
!MobileBuild {
# Make sure to keep both sides of this if using the same set of directories
QMAKE_POST_LINK += && $$QMAKE_COPY_DIR $$BASEDIR/flightgear $$DESTDIR_COPY_RESOURCE_LIST
}
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleIconFile</key>
<string></string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleGetInfoString</key>
<string>Created by Qt/QMake</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleExecutable</key>
<string>qgroundcontrol</string>
<key>CFBundleIdentifier</key>
<string>org.qgroundcontrol.${PRODUCT_NAME:rfc1034identifier}</string>
<key>CFBundleDisplayName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>NOTE</key>
<string>This file was generated by Qt/QMake.</string>
</dict>
</plist>
......@@ -79,8 +79,8 @@ EIGEN_DONT_INLINE void selfadjoint_matrix_vector_product<Scalar,Index,StorageOrd
for (Index j=FirstTriangular ? bound : 0;
j<(FirstTriangular ? size : bound);j+=2)
{
register const Scalar* EIGEN_RESTRICT A0 = lhs + j*lhsStride;
register const Scalar* EIGEN_RESTRICT A1 = lhs + (j+1)*lhsStride;
const Scalar* EIGEN_RESTRICT A0 = lhs + j*lhsStride;
const Scalar* EIGEN_RESTRICT A1 = lhs + (j+1)*lhsStride;
Scalar t0 = cjAlpha * rhs[j];
Packet ptmp0 = pset1<Packet>(t0);
......@@ -147,7 +147,7 @@ EIGEN_DONT_INLINE void selfadjoint_matrix_vector_product<Scalar,Index,StorageOrd
}
for (Index j=FirstTriangular ? 0 : bound;j<(FirstTriangular ? bound : size);j++)
{
register const Scalar* EIGEN_RESTRICT A0 = lhs + j*lhsStride;
const Scalar* EIGEN_RESTRICT A0 = lhs + j*lhsStride;
Scalar t1 = cjAlpha * rhs[j];
Scalar t2(0);
......
This diff is collapsed.
......@@ -49,7 +49,9 @@
#include "QGCMessageBox.h"
#include "MainWindow.h"
#include "UDPLink.h"
#ifndef __ios__
#include "SerialLink.h"
#endif
#include "QGCSingleton.h"
#include "LinkManager.h"
#include "UASManager.h"
......@@ -67,7 +69,7 @@
#include "SensorsComponentController.h"
#include "PowerComponentController.h"
#include "RadioComponentController.h"
#ifndef __android__
#ifndef __mobile__
#include "FirmwareUpgradeController.h"
#endif
#include "AutoPilotPlugin.h"
......@@ -144,11 +146,11 @@ QGCApplication::QGCApplication(int &argc, char* argv[], bool unitTesting) :
setAttribute(Qt::AA_DontCreateNativeWidgetSiblings);
#endif
#ifdef __android__
#ifdef __mobile__
QLoggingCategory::setFilterRules(QStringLiteral("*Log.debug=false"));
#endif
#ifndef __android__
#ifndef __mobile__
// First thing we want to do is set up the qtlogging.ini file. If it doesn't already exist we copy
// it to the correct location. This way default debug builds will have logging turned off.
......@@ -332,7 +334,7 @@ void QGCApplication::_initCommon(void)
qmlRegisterType<SensorsComponentController>("QGroundControl.Controllers", 1, 0, "SensorsComponentController");
qmlRegisterType<PowerComponentController>("QGroundControl.Controllers", 1, 0, "PowerComponentController");
qmlRegisterType<RadioComponentController>("QGroundControl.Controllers", 1, 0, "RadioComponentController");
#ifndef __android__
#ifndef __mobile__
qmlRegisterType<FirmwareUpgradeController>("QGroundControl.Controllers", 1, 0, "FirmwareUpgradeController");
#endif
......@@ -710,4 +712,4 @@ void QGCApplication::_missingParamsDisplay(void)
QGCMessageBox::critical("Missing Parameters",
QString("Parameters missing from firmware: %1.\n\n"
"You should quit QGroundControl immediately and update your firmware.").arg(params));
}
\ No newline at end of file
}
......@@ -26,7 +26,7 @@
#include <QRegularExpression>
#include "MainWindow.h"
#ifdef QT_DEBUG
#ifndef __android__
#ifndef __mobile__
#include "UnitTest.h"
#endif
#endif
......@@ -40,7 +40,7 @@ QString QGCFileDialog::getExistingDirectory(
_validate(options);
#ifdef QT_DEBUG
#ifndef __android__
#ifndef __mobile__
if (qgcApp()->runningUnitTests()) {
return UnitTest::_getExistingDirectory(parent, caption, dir, options);
} else
......@@ -61,7 +61,7 @@ QString QGCFileDialog::getOpenFileName(
_validate(options);
#ifdef QT_DEBUG
#ifndef __android__
#ifndef __mobile__
if (qgcApp()->runningUnitTests()) {
return UnitTest::_getOpenFileName(parent, caption, dir, filter, options);
} else
......@@ -82,7 +82,7 @@ QStringList QGCFileDialog::getOpenFileNames(
_validate(options);
#ifdef QT_DEBUG
#ifndef __android__
#ifndef __mobile__
if (qgcApp()->runningUnitTests()) {
return UnitTest::_getOpenFileNames(parent, caption, dir, filter, options);
} else
......@@ -105,7 +105,7 @@ QString QGCFileDialog::getSaveFileName(
_validate(options);
#ifdef QT_DEBUG
#ifndef __android__
#ifndef __mobile__
if (qgcApp()->runningUnitTests()) {
return UnitTest::_getSaveFileName(parent, caption, dir, filter, defaultSuffix, options);
} else
......@@ -217,7 +217,7 @@ void QGCFileDialog::_validate(Options& options)
Q_ASSERT(qgcApp());
Q_ASSERT_X(QThread::currentThread() == qgcApp()->thread(), "Threading issue", "QGCFileDialog can only be called from main thread");
#ifdef __android__
#ifdef __mobile__
Q_UNUSED(options)
#else
// On OSX native dialog can hang so we always use Qt dialogs
......
......@@ -29,7 +29,7 @@
#include "MainWindow.h"
#include "QGCApplication.h"
#ifdef QT_DEBUG
#ifndef __android__
#ifndef __mobile__
#include "UnitTest.h"
#endif
#endif
......@@ -106,7 +106,7 @@ private:
}
#ifdef QT_DEBUG
#ifndef __android__
#ifndef __mobile__
if (qgcApp()->runningUnitTests()) {
qDebug() << "QGCMessageBox (unit testing)" << title << text;
return UnitTest::_messageBox(icon, title, text, buttons, defaultButton);
......
......@@ -27,6 +27,7 @@ This file is part of the QGROUNDCONTROL project
* @author Gus Grubba <mavlink@grubba.com>
*/
#include "UAS.h"
#include "MainWindow.h"
#include "UASManager.h"
#include "Waypoint.h"
......
......@@ -125,6 +125,10 @@ public:
bool isAndroid () { return true; }
bool isiOS () { return false; }
bool isMobile () { return true; }
#elif defined(__ios__)
bool isAndroid () { return false; }
bool isiOS () { return true; }
bool isMobile () { return true; }
#else
bool isAndroid () { return false; }
bool isiOS () { return false; }
......
......@@ -48,6 +48,7 @@
#include <QtCore/QUrl>
#include <QtCore/QUrlQuery>
#include <QtCore/QLocale>
#include <QDebug>
#include <QtNetwork/QNetworkAccessManager>
#include <QtNetwork/QNetworkRequest>
#include <QtPositioning/QGeoCoordinate>
......
......@@ -28,11 +28,7 @@
#include "PX4Bootloader.h"
#include <QFile>
#ifdef __android__
#include "qserialportinfo.h"
#else
#include <QSerialPortInfo>
#endif
#include <QDebug>
#include <QTime>
......
......@@ -29,11 +29,7 @@
#include "PX4Bootloader.h"
#include <QTimer>
#ifdef __android__
#include "qserialportinfo.h"
#else
#include <QSerialPortInfo>
#endif
#include <QDebug>
PX4FirmwareUpgradeThreadWorker::PX4FirmwareUpgradeThreadWorker(QObject* parent) :
......
/*=====================================================================
QGroundControl Open Source Ground Control Station
(c) 2009 - 2014 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
This file is part of the QGROUNDCONTROL project
QGROUNDCONTROL is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
QGROUNDCONTROL is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QGROUNDCONTROL. If not, see <http://www.gnu.org/licenses/>.
======================================================================*/
/// @file
......@@ -32,7 +32,7 @@
#include "QGCQmlWidgetHolder.h"
#include "MainWindow.h"
#include "QGCMessageBox.h"
#ifndef __android__
#ifndef __mobile__
#include "FirmwareUpgradeController.h"
#endif
#include "ParameterEditorController.h"
......@@ -45,19 +45,19 @@ SetupView::SetupView(QWidget* parent) :
QGCQmlWidgetHolder(parent),
_uasCurrent(NULL),
_initComplete(false),
_readyAutopilot(NULL)
_readyAutopilot(NULL)
{
#ifdef __android__
#ifdef __mobile__
_showFirmware = false;
#else
_showFirmware = true;
#endif
connect(UASManager::instance(), &UASManager::activeUASSet, this, &SetupView::_setActiveUAS);
getRootContext()->setContextProperty("controller", this);
setSource(QUrl::fromUserInput("qrc:/qml/SetupView.qml"));
_setActiveUAS(UASManager::instance()->getActiveUAS());
}
......@@ -73,9 +73,9 @@ void SetupView::_setActiveUAS(UASInterface* uas)
}
_pluginReadyChanged(false);
_uasCurrent = uas;
if (_uasCurrent) {
_autopilot = AutoPilotPluginManager::instance()->getInstanceForAutoPilotPlugin(_uasCurrent);
if (_autopilot.data()->pluginReady()) {
......@@ -100,7 +100,7 @@ void SetupView::_pluginReadyChanged(bool pluginReady)
#ifdef UNITTEST_BUILD
void SetupView::showFirmware(void)
{
#ifndef __android__
#ifndef __mobile__
QVariant returnedValue;
bool success = QMetaObject::invokeMethod(getRootObject(),
"showFirmwarePanel",
......@@ -141,4 +141,4 @@ void SetupView::showVehicleComponentSetup(VehicleComponent* vehicleComponent)
AutoPilotPlugin* SetupView::autopilot(void)
{
return _readyAutopilot;
}
\ No newline at end of file