Commit fe015311 authored by dogmaphobic's avatar dogmaphobic

First stab at iOS builds

parent 87b5ffaa
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
include(QGCCommon.pri) include(QGCCommon.pri)
TARGET = qgroundcontrol TARGET = qgroundcontrol
TEMPLATE = app
# Load additional config flags from user_config.pri # Load additional config flags from user_config.pri
exists(user_config.pri):infile(user_config.pri, CONFIG) { exists(user_config.pri):infile(user_config.pri, CONFIG) {
...@@ -31,19 +32,15 @@ LinuxBuild { ...@@ -31,19 +32,15 @@ LinuxBuild {
CONFIG += link_pkgconfig CONFIG += link_pkgconfig
} }
message(BASEDIR $$BASEDIR DESTDIR $$DESTDIR TARGET $$TARGET)
# QGC QtLocation plugin # QGC QtLocation plugin
LIBS += -L$${LOCATION_PLUGIN_DESTDIR} LIBS += -L$${LOCATION_PLUGIN_DESTDIR}
LIBS += -l$${LOCATION_PLUGIN_NAME} LIBS += -l$${LOCATION_PLUGIN_NAME}
LinuxBuild|MacBuild|AndroidBuild {
PRE_TARGETDEPS += $${LOCATION_PLUGIN_DESTDIR}/lib$${LOCATION_PLUGIN_NAME}.a
}
WindowsBuild { WindowsBuild {
PRE_TARGETDEPS += $${LOCATION_PLUGIN_DESTDIR}/$${LOCATION_PLUGIN_NAME}.lib PRE_TARGETDEPS += $${LOCATION_PLUGIN_DESTDIR}/$${LOCATION_PLUGIN_NAME}.lib
} else {
PRE_TARGETDEPS += $${LOCATION_PLUGIN_DESTDIR}/lib$${LOCATION_PLUGIN_NAME}.a
} }
# Qt configuration # Qt configuration
...@@ -51,13 +48,13 @@ WindowsBuild { ...@@ -51,13 +48,13 @@ WindowsBuild {
CONFIG += qt \ CONFIG += qt \
thread thread
QT += network \ QT += \
network \
concurrent \ concurrent \
gui \ gui \
location \ location \
opengl \ opengl \
positioning \ positioning \
printsupport \
qml \ qml \
quick \ quick \
quickwidgets \ quickwidgets \
...@@ -66,8 +63,10 @@ QT += network \ ...@@ -66,8 +63,10 @@ QT += network \
widgets \ widgets \
xml \ xml \
!AndroidBuild { !MobileBuild {
QT += serialport QT += \
printsupport \
serialport \
} }
contains(DEFINES, QGC_NOTIFY_TUNES_ENABLED) { contains(DEFINES, QGC_NOTIFY_TUNES_ENABLED) {
...@@ -83,8 +82,14 @@ QT += testlib ...@@ -83,8 +82,14 @@ QT += testlib
MacBuild { MacBuild {
QMAKE_INFO_PLIST = Custom-Info.plist QMAKE_INFO_PLIST = Custom-Info.plist
ICON = $$BASEDIR/resources/icons/macx.icns ICON = $${BASEDIR}/resources/icons/macx.icns
QT += quickwidgets 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 { LinuxBuild {
...@@ -92,7 +97,7 @@ LinuxBuild { ...@@ -92,7 +97,7 @@ LinuxBuild {
} }
WindowsBuild { WindowsBuild {
RC_FILE = $$BASEDIR/qgroundcontrol.rc RC_FILE = $${BASEDIR}/qgroundcontrol.rc
} }
# #
...@@ -100,10 +105,12 @@ WindowsBuild { ...@@ -100,10 +105,12 @@ WindowsBuild {
# #
DebugBuild { DebugBuild {
!iOSBuild {
CONFIG += console CONFIG += console
} }
}
!AndroidBuild { !MobileBuild {
# 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)
...@@ -186,10 +193,6 @@ FORMS += \ ...@@ -186,10 +193,6 @@ FORMS += \
src/ui/mission/QGCMissionOther.ui \ src/ui/mission/QGCMissionOther.ui \
src/ui/QGCCommConfiguration.ui \ src/ui/QGCCommConfiguration.ui \
src/ui/QGCDataPlot2D.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/QGCLinkConfiguration.ui \
src/ui/QGCMapRCToParamDialog.ui \ src/ui/QGCMapRCToParamDialog.ui \
src/ui/QGCMAVLinkInspector.ui \ src/ui/QGCMAVLinkInspector.ui \
...@@ -201,7 +204,6 @@ FORMS += \ ...@@ -201,7 +204,6 @@ FORMS += \
src/ui/QGCUASFileViewMulti.ui \ src/ui/QGCUASFileViewMulti.ui \
src/ui/QGCUDPLinkConfiguration.ui \ src/ui/QGCUDPLinkConfiguration.ui \
src/ui/QGCWaypointListMulti.ui \ src/ui/QGCWaypointListMulti.ui \
src/ui/SerialSettings.ui \
src/ui/SettingsDialog.ui \ src/ui/SettingsDialog.ui \
src/ui/uas/QGCUnconnectedInfoWidget.ui \ src/ui/uas/QGCUnconnectedInfoWidget.ui \
src/ui/uas/UASMessageView.ui \ src/ui/uas/UASMessageView.ui \
...@@ -216,11 +218,20 @@ FORMS += \ ...@@ -216,11 +218,20 @@ FORMS += \
src/ui/WaypointList.ui \ src/ui/WaypointList.ui \
src/ui/WaypointViewOnlyView.ui \ src/ui/WaypointViewOnlyView.ui \
!AndroidBuild { !iOSBuild {
FORMS += \
src/ui/SerialSettings.ui \
}
!MobileBuild {
FORMS += \ FORMS += \
src/ui/JoystickButton.ui \ src/ui/JoystickButton.ui \
src/ui/JoystickAxis.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 += \ HEADERS += \
...@@ -234,12 +245,7 @@ HEADERS += \ ...@@ -234,12 +245,7 @@ HEADERS += \
src/comm/MockLinkFileServer.h \ src/comm/MockLinkFileServer.h \
src/comm/MockLinkMissionItemHandler.h \ src/comm/MockLinkMissionItemHandler.h \
src/comm/ProtocolInterface.h \ src/comm/ProtocolInterface.h \
src/comm/QGCFlightGearLink.h \
src/comm/QGCHilLink.h \
src/comm/QGCJSBSimLink.h \
src/comm/QGCMAVLink.h \ src/comm/QGCMAVLink.h \
src/comm/QGCXPlaneLink.h \
src/comm/SerialLink.h \
src/comm/TCPLink.h \ src/comm/TCPLink.h \
src/comm/UDPLink.h \ src/comm/UDPLink.h \
src/GAudioOutput.h \ src/GAudioOutput.h \
...@@ -306,10 +312,6 @@ HEADERS += \ ...@@ -306,10 +312,6 @@ HEADERS += \
src/ui/mission/QGCMissionOther.h \ src/ui/mission/QGCMissionOther.h \
src/ui/QGCCommConfiguration.h \ src/ui/QGCCommConfiguration.h \
src/ui/QGCDataPlot2D.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/QGCLinkConfiguration.h \
src/ui/QGCMainWindowAPConfigurator.h \ src/ui/QGCMainWindowAPConfigurator.h \
src/ui/QGCMapRCToParamDialog.h \ src/ui/QGCMapRCToParamDialog.h \
...@@ -323,7 +325,6 @@ HEADERS += \ ...@@ -323,7 +325,6 @@ HEADERS += \
src/ui/QGCUASFileViewMulti.h \ src/ui/QGCUASFileViewMulti.h \
src/ui/QGCUDPLinkConfiguration.h \ src/ui/QGCUDPLinkConfiguration.h \
src/ui/QGCWaypointListMulti.h \ src/ui/QGCWaypointListMulti.h \
src/ui/SerialConfigurationWindow.h \
src/ui/SettingsDialog.h \ src/ui/SettingsDialog.h \
src/ui/toolbar/MainToolBar.h \ src/ui/toolbar/MainToolBar.h \
src/ui/uas/QGCUnconnectedInfoWidget.h \ src/ui/uas/QGCUnconnectedInfoWidget.h \
...@@ -347,13 +348,27 @@ HEADERS += \ ...@@ -347,13 +348,27 @@ HEADERS += \
src/ViewWidgets/ViewWidgetController.h \ src/ViewWidgets/ViewWidgetController.h \
src/Waypoint.h \ src/Waypoint.h \
!AndroidBuild { !iOSBuild {
HEADERS += \ 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/input/JoystickInput.h \
src/ui/CameraView.h \
src/ui/JoystickAxis.h \ src/ui/JoystickAxis.h \
src/ui/JoystickButton.h \ src/ui/JoystickButton.h \
src/ui/JoystickWidget.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 += \ SOURCES += \
...@@ -365,10 +380,6 @@ SOURCES += \ ...@@ -365,10 +380,6 @@ SOURCES += \
src/comm/MockLink.cc \ src/comm/MockLink.cc \
src/comm/MockLinkFileServer.cc \ src/comm/MockLinkFileServer.cc \
src/comm/MockLinkMissionItemHandler.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/TCPLink.cc \
src/comm/UDPLink.cc \ src/comm/UDPLink.cc \
src/GAudioOutput.cc \ src/GAudioOutput.cc \
...@@ -430,10 +441,6 @@ SOURCES += \ ...@@ -430,10 +441,6 @@ SOURCES += \
src/ui/mission/QGCMissionOther.cc \ src/ui/mission/QGCMissionOther.cc \
src/ui/QGCCommConfiguration.cc \ src/ui/QGCCommConfiguration.cc \
src/ui/QGCDataPlot2D.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/QGCLinkConfiguration.cc \
src/ui/QGCMainWindowAPConfigurator.cc \ src/ui/QGCMainWindowAPConfigurator.cc \
src/ui/QGCMapRCToParamDialog.cpp \ src/ui/QGCMapRCToParamDialog.cpp \
...@@ -447,7 +454,6 @@ SOURCES += \ ...@@ -447,7 +454,6 @@ SOURCES += \
src/ui/QGCUASFileViewMulti.cc \ src/ui/QGCUASFileViewMulti.cc \
src/ui/QGCUDPLinkConfiguration.cc \ src/ui/QGCUDPLinkConfiguration.cc \
src/ui/QGCWaypointListMulti.cc \ src/ui/QGCWaypointListMulti.cc \
src/ui/SerialConfigurationWindow.cc \
src/ui/SettingsDialog.cc \ src/ui/SettingsDialog.cc \
src/ui/toolbar/MainToolBar.cc \ src/ui/toolbar/MainToolBar.cc \
src/ui/uas/QGCUnconnectedInfoWidget.cc \ src/ui/uas/QGCUnconnectedInfoWidget.cc \
...@@ -471,13 +477,26 @@ SOURCES += \ ...@@ -471,13 +477,26 @@ SOURCES += \
src/ViewWidgets/ViewWidgetController.cc \ src/ViewWidgets/ViewWidgetController.cc \
src/Waypoint.cc \ src/Waypoint.cc \
!AndroidBuild { !iOSBuild {
SOURCES += \ 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/input/JoystickInput.cc \
src/ui/CameraView.cc \
src/ui/JoystickAxis.cc \ src/ui/JoystickAxis.cc \
src/ui/JoystickButton.cc \ src/ui/JoystickButton.cc \
src/ui/JoystickWidget.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 { ...@@ -494,7 +513,7 @@ DebugBuild|WindowsDebugAndRelease {
HEADERS += src/QmlControls/QmlTestWidget.h HEADERS += src/QmlControls/QmlTestWidget.h
SOURCES += src/QmlControls/QmlTestWidget.cc SOURCES += src/QmlControls/QmlTestWidget.cc
!AndroidBuild { !MobileBuild {
INCLUDEPATH += \ INCLUDEPATH += \
src/qgcunittest src/qgcunittest
...@@ -536,7 +555,7 @@ SOURCES += \ ...@@ -536,7 +555,7 @@ SOURCES += \
src/qgcunittest/PX4RCCalibrationTest.cc \ src/qgcunittest/PX4RCCalibrationTest.cc \
} # DebugBuild|WindowsDebugAndRelease } # DebugBuild|WindowsDebugAndRelease
} # AndroidBuild } # MobileBuild
# #
# AutoPilot Plugin Support # AutoPilot Plugin Support
...@@ -569,7 +588,7 @@ HEADERS+= \ ...@@ -569,7 +588,7 @@ HEADERS+= \
src/VehicleSetup/SetupView.h \ src/VehicleSetup/SetupView.h \
src/VehicleSetup/VehicleComponent.h \ src/VehicleSetup/VehicleComponent.h \
!AndroidBuild { !MobileBuild {
HEADERS += \ HEADERS += \
src/VehicleSetup/FirmwareUpgradeController.h \ src/VehicleSetup/FirmwareUpgradeController.h \
src/VehicleSetup/PX4Bootloader.h \ src/VehicleSetup/PX4Bootloader.h \
...@@ -599,7 +618,7 @@ SOURCES += \ ...@@ -599,7 +618,7 @@ SOURCES += \
src/VehicleSetup/SetupView.cc \ src/VehicleSetup/SetupView.cc \
src/VehicleSetup/VehicleComponent.cc \ src/VehicleSetup/VehicleComponent.cc \
!AndroidBuild { !MobileBuild {
SOURCES += \ SOURCES += \
src/VehicleSetup/FirmwareUpgradeController.cc \ src/VehicleSetup/FirmwareUpgradeController.cc \
src/VehicleSetup/PX4Bootloader.cc \ src/VehicleSetup/PX4Bootloader.cc \
......
...@@ -32,8 +32,7 @@ linux { ...@@ -32,8 +32,7 @@ linux {
CONFIG += LinuxBuild CONFIG += LinuxBuild
} else : android-g++ { } else : android-g++ {
message("Android build") message("Android build")
CONFIG += AndroidBuild CONFIG += AndroidBuild MobileBuild
DEFINES += __mobile__
DEFINES += __android__ DEFINES += __android__
warning("Android build is experimental and not fully functional") warning("Android build is experimental and not fully functional")
} else { } else {
...@@ -54,8 +53,17 @@ linux { ...@@ -54,8 +53,17 @@ linux {
} else { } else {
error("Unsupported Mac toolchain, only 64-bit LLVM+clang is supported") 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 { } 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 # Installer configuration
...@@ -86,29 +94,46 @@ win32:debug_and_release { ...@@ -86,29 +94,46 @@ win32:debug_and_release {
# Setup our build directories # Setup our build directories
BASEDIR = $${IN_PWD} BASEDIR = $$IN_PWD
DESTDIR = $${OUT_PWD}/debug
DebugBuild { BUILDDIR = $${OUT_PWD}/build-debug
DESTDIR = $${OUT_PWD}/debug
BUILDDIR = $${OUT_PWD}/build-debug
}
ReleaseBuild { ReleaseBuild {
DESTDIR = $${OUT_PWD}/release DESTDIR = $${OUT_PWD}/release
BUILDDIR = $${OUT_PWD}/build-release BUILDDIR = $${OUT_PWD}/build-release
} }
OBJECTS_DIR = $${BUILDDIR}/obj iOSBuild {
MOC_DIR = $${BUILDDIR}/moc # For whatever reason, the iOS build fails with these set. Some files have the full,
UI_DIR = $${BUILDDIR}/ui # properly concatenaded path and file name while others have only the second portion,
RCC_DIR = $${BUILDDIR}/rcc # as if BUILDDIR was empty.
LANGUAGE = C++ 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 # We place the created plugin lib into the objects dir so that make clean will clean it as well
LOCATION_PLUGIN_DESTDIR = $${OBJECTS_DIR} iOSBuild {
LOCATION_PLUGIN_NAME = QGeoServiceProviderFactoryQGC 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 # Turn off serial port warnings
DEFINES += _TTY_NOWARN_ DEFINES += _TTY_NOWARN_
...@@ -121,6 +146,10 @@ AndroidBuild { ...@@ -121,6 +146,10 @@ AndroidBuild {
DEFINES += __STDC_LIMIT_MACROS DEFINES += __STDC_LIMIT_MACROS
} }
iOSBuild {
QMAKE_IOS_DEPLOYMENT_TARGET = 7.0
}
MacBuild { MacBuild {
CONFIG += x86_64 CONFIG += x86_64
CONFIG -= x86 CONFIG -= x86
...@@ -134,7 +163,6 @@ LinuxBuild { ...@@ -134,7 +163,6 @@ LinuxBuild {
WindowsBuild { WindowsBuild {
DEFINES += __STDC_LIMIT_MACROS DEFINES += __STDC_LIMIT_MACROS
# Specify multi-process compilation within Visual Studio. # Specify multi-process compilation within Visual Studio.
# (drastically improves compilation times for multi-core computers) # (drastically improves compilation times for multi-core computers)
QMAKE_CXXFLAGS_DEBUG += -MP QMAKE_CXXFLAGS_DEBUG += -MP
...@@ -173,7 +201,6 @@ WindowsBuild { ...@@ -173,7 +201,6 @@ WindowsBuild {
ReleaseBuild { ReleaseBuild {
DEFINES += QT_NO_DEBUG DEFINES += QT_NO_DEBUG
WindowsBuild { WindowsBuild {
# Use link time code generation for better optimization (I believe this is supported in MSVC Express, but not 100% sure) # Use link time code generation for better optimization (I believe this is supported in MSVC Express, but not 100% sure)
QMAKE_LFLAGS_LTCG = /LTCG QMAKE_LFLAGS_LTCG = /LTCG
......
...@@ -6,7 +6,7 @@ CONFIG += plugin static ...@@ -6,7 +6,7 @@ CONFIG += plugin static
QT += location-private positioning-private network QT += location-private positioning-private network
PLUGIN_TYPE = geoservices PLUGIN_TYPE = geoservices
DESTDIR = $${LOCATION_PLUGIN_DESTDIR} DESTDIR = $${LOCATION_PLUGIN_DESTDIR}
INCLUDEPATH += $$QT.location.includes INCLUDEPATH += $$QT.location.includes
...@@ -30,4 +30,3 @@ SOURCES += \ ...@@ -30,4 +30,3 @@ SOURCES += \
OTHER_FILES += \ OTHER_FILES += \
src/QtLocationPlugin/qgc_maps_plugin.json src/QtLocationPlugin/qgc_maps_plugin.json
...@@ -44,7 +44,7 @@ WindowsBuild { ...@@ -44,7 +44,7 @@ WindowsBuild {
BASEDIR_COPY_RESOURCE_LIST = $$replace(BASEDIR,"/","\\") 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\" QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY_DIR \"$$BASEDIR_COPY_RESOURCE_LIST\\flightgear\" \"$$DESTDIR_COPY_RESOURCE_LIST\\flightgear\"
} else { } else {
!AndroidBuild { !MobileBuild {
# Make sure to keep both sides of this if using the same set of directories # 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 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 ...@@ -79,8 +79,8 @@ EIGEN_DONT_INLINE void selfadjoint_matrix_vector_product<Scalar,Index,StorageOrd
for (Index j=FirstTriangular ? bound : 0; for (Index j=FirstTriangular ? bound : 0;
j<(FirstTriangular ? size : bound);j+=2) j<(FirstTriangular ? size : bound);j+=2)
{ {
register const Scalar* EIGEN_RESTRICT A0 = lhs + j*lhsStride; const Scalar* EIGEN_RESTRICT A0 = lhs + j*lhsStride;
register const Scalar* EIGEN_RESTRICT A1 = lhs + (j+1)*lhsStride; const Scalar* EIGEN_RESTRICT A1 = lhs + (j+1)*lhsStride;
Scalar t0 = cjAlpha * rhs[j]; Scalar t0 = cjAlpha * rhs[j];
Packet ptmp0 = pset1<Packet>(t0); Packet ptmp0 = pset1<Packet>(t0);
...@@ -147,7 +147,7 @@ EIGEN_DONT_INLINE void selfadjoint_matrix_vector_product<Scalar,Index,StorageOrd ...@@ -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++) 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 t1 = cjAlpha * rhs[j];
Scalar t2(0); Scalar t2(0);
......
This diff is collapsed.
...@@ -49,7 +49,9 @@ ...@@ -49,7 +49,9 @@
#include "QGCMessageBox.h" #include "QGCMessageBox.h"
#include "MainWindow.h" #include "MainWindow.h"
#include "UDPLink.h" #include "UDPLink.h"
#ifndef __ios__
#include "SerialLink.h" #include "SerialLink.h"
#endif
#include "QGCSingleton.h" #include "QGCSingleton.h"
#include "LinkManager.h" #include "LinkManager.h"
#include "UASManager.h" #include "UASManager.h"
...@@ -67,7 +69,7 @@ ...@@ -67,7 +69,7 @@
#include "SensorsComponentController.h" #include "SensorsComponentController.h"
#include "PowerComponentController.h" #include "PowerComponentController.h"
#include "RadioComponentController.h" #include "RadioComponentController.h"
#ifndef __android__ #ifndef __mobile__
#include "FirmwareUpgradeController.h" #include "FirmwareUpgradeController.h"
#endif #endif
#include "AutoPilotPlugin.h" #include "AutoPilotPlugin.h"
...@@ -144,11 +146,11 @@ QGCApplication::QGCApplication(int &argc, char* argv[], bool unitTesting) : ...@@ -144,11 +146,11 @@ QGCApplication::QGCApplication(int &argc, char* argv[], bool unitTesting) :
setAttribute(Qt::AA_DontCreateNativeWidgetSiblings); setAttribute(Qt::AA_DontCreateNativeWidgetSiblings);
#endif #endif
#ifdef __android__ #ifdef __mobile__
QLoggingCategory::setFilterRules(QStringLiteral("*Log.debug=false")); QLoggingCategory::setFilterRules(QStringLiteral("*Log.debug=false"));
#endif #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 // 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. // it to the correct location. This way default debug builds will have logging turned off.
...@@ -332,7 +334,7 @@ void QGCApplication::_initCommon(void) ...@@ -332,7 +334,7 @@ void QGCApplication::_initCommon(void)
qmlRegisterType<SensorsComponentController>("QGroundControl.Controllers", 1, 0, "SensorsComponentController"); qmlRegisterType<SensorsComponentController>("QGroundControl.Controllers", 1, 0, "SensorsComponentController");
qmlRegisterType<PowerComponentController>("QGroundControl.Controllers", 1, 0, "PowerComponentController"); qmlRegisterType<PowerComponentController>("QGroundControl.Controllers", 1, 0, "PowerComponentController");
qmlRegisterType<RadioComponentController>("QGroundControl.Controllers", 1, 0, "RadioComponentController"); qmlRegisterType<RadioComponentController>("QGroundControl.Controllers", 1, 0, "RadioComponentController");
#ifndef __android__ #ifndef __mobile__
qmlRegisterType<FirmwareUpgradeController>("QGroundControl.Controllers", 1, 0, "FirmwareUpgradeController"); qmlRegisterType<FirmwareUpgradeController>("QGroundControl.Controllers", 1, 0, "FirmwareUpgradeController");
#endif #endif
...@@ -710,4 +712,4 @@ void QGCApplication::_missingParamsDisplay(void) ...@@ -710,4 +712,4 @@ void QGCApplication::_missingParamsDisplay(void)
QGCMessageBox::critical("Missing Parameters", QGCMessageBox::critical("Missing Parameters",
QString("Parameters missing from firmware: %1.\n\n" QString("Parameters missing from firmware: %1.\n\n"
"You should quit QGroundControl immediately and update your firmware.").arg(params)); "You should quit QGroundControl immediately and update your firmware.").arg(params));
} }
\ No newline at end of file
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
#include <QRegularExpression> #include <QRegularExpression>
#include "MainWindow.h" #include "MainWindow.h"
#ifdef QT_DEBUG #ifdef QT_DEBUG
#ifndef __android__ #ifndef __mobile__
#include "UnitTest.h" #include "UnitTest.h"
#endif #endif
#endif #endif
...@@ -40,7 +40,7 @@ QString QGCFileDialog::getExistingDirectory( ...@@ -40,7 +40,7 @@ QString QGCFileDialog::getExistingDirectory(
_validate(options); _validate(options);
#ifdef QT_DEBUG #ifdef QT_DEBUG
#ifndef __android__ #ifndef __mobile__
if (qgcApp()->runningUnitTests()) { if (qgcApp()->runningUnitTests()) {
return UnitTest::_getExistingDirectory(parent, caption, dir, options); return UnitTest::_getExistingDirectory(parent, caption, dir, options);
} else } else
...@@ -61,7 +61,7 @@ QString QGCFileDialog::getOpenFileName( ...@@ -61,7 +61,7 @@ QString QGCFileDialog::getOpenFileName(
_validate(options); _validate(options);
#ifdef QT_DEBUG #ifdef QT_DEBUG
#ifndef __android__ #ifndef __mobile__
if (qgcApp()->runningUnitTests()) { if (qgcApp()->runningUnitTests()) {
return UnitTest::_getOpenFileName(parent, caption, dir, filter, options); return UnitTest::_getOpenFileName(parent, caption, dir, filter, options);
} else } else
...@@ -82,7 +82,7 @@ QStringList QGCFileDialog::getOpenFileNames( ...@@ -82,7 +82,7 @@ QStringList QGCFileDialog::getOpenFileNames(
_validate(options); _validate(options);
#ifdef QT_DEBUG #ifdef QT_DEBUG
#ifndef __android__ #ifndef __mobile__
if (qgcApp()->runningUnitTests()) { if (qgcApp()->runningUnitTests()) {
return UnitTest::_getOpenFileNames(parent, caption, dir, filter, options); return UnitTest::_getOpenFileNames(parent, caption, dir, filter, options);
} else } else
...@@ -105,7 +105,7 @@ QString QGCFileDialog::getSaveFileName( ...@@ -105,7 +105,7 @@ QString QGCFileDialog::getSaveFileName(
_validate(options); _validate(options);
#ifdef QT_DEBUG #ifdef QT_DEBUG
#ifndef __android__ #ifndef __mobile__
if (qgcApp()->runningUnitTests()) { if (qgcApp()->runningUnitTests()) {
return UnitTest::_getSaveFileName(parent, caption, dir, filter, defaultSuffix, options); return UnitTest::_getSaveFileName(parent, caption, dir, filter, defaultSuffix, options);
} else } else
...@@ -217,7 +217,7 @@ void QGCFileDialog::_validate(Options& options) ...@@ -217,7 +217,7 @@ void QGCFileDialog::_validate(Options& options)
Q_ASSERT(qgcApp()); Q_ASSERT(qgcApp());
Q_ASSERT_X(QThread::currentThread() == qgcApp()->thread(), "Threading issue", "QGCFileDialog can only be called from main thread"); Q_ASSERT_X(QThread::currentThread() == qgcApp()->thread(), "Threading issue", "QGCFileDialog can only be called from main thread");
#ifdef __android__ #ifdef __mobile__
Q_UNUSED(options) Q_UNUSED(options)
#else #else
// On OSX native dialog can hang so we always use Qt dialogs // On OSX native dialog can hang so we always use Qt dialogs
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
#include "MainWindow.h" #include "MainWindow.h"
#include "QGCApplication.h" #include "QGCApplication.h"
#ifdef QT_DEBUG #ifdef QT_DEBUG
#ifndef __android__ #ifndef __mobile__
#include "UnitTest.h" #include "UnitTest.h"
#endif #endif
#endif #endif
...@@ -106,7 +106,7 @@ private: ...@@ -106,7 +106,7 @@ private:
} }
#ifdef QT_DEBUG #ifdef QT_DEBUG
#ifndef __android__ #ifndef __mobile__
if (qgcApp()->runningUnitTests()) { if (qgcApp()->runningUnitTests()) {
qDebug() << "QGCMessageBox (unit testing)" << title << text; qDebug() << "QGCMessageBox (unit testing)" << title << text;
return UnitTest::_messageBox(icon, title, text, buttons, defaultButton); return UnitTest::_messageBox(icon, title, text, buttons, defaultButton);
......
...@@ -27,6 +27,7 @@ This file is part of the QGROUNDCONTROL project ...@@ -27,6 +27,7 @@ This file is part of the QGROUNDCONTROL project
* @author Gus Grubba <mavlink@grubba.com> * @author Gus Grubba <mavlink@grubba.com>
*/ */
#include "UAS.h"
#include "MainWindow.h" #include "MainWindow.h"
#include "UASManager.h" #include "UASManager.h"
#include "Waypoint.h" #include "Waypoint.h"
......
...@@ -125,6 +125,10 @@ public: ...@@ -125,6 +125,10 @@ public:
bool isAndroid () { return true; } bool isAndroid () { return true; }
bool isiOS () { return false; } bool isiOS () { return false; }
bool isMobile () { return true; } bool isMobile () { return true; }
#elif defined(__ios__)
bool isAndroid () { return false; }
bool isiOS () { return true; }
bool isMobile () { return true; }
#else #else
bool isAndroid () { return false; } bool isAndroid () { return false; }
bool isiOS () { return false; } bool isiOS () { return false; }
......
...@@ -48,6 +48,7 @@ ...@@ -48,6 +48,7 @@
#include <QtCore/QUrl> #include <QtCore/QUrl>
#include <QtCore/QUrlQuery> #include <QtCore/QUrlQuery>
#include <QtCore/QLocale> #include <QtCore/QLocale>
#include <QDebug>
#include <QtNetwork/QNetworkAccessManager> #include <QtNetwork/QNetworkAccessManager>
#include <QtNetwork/QNetworkRequest> #include <QtNetwork/QNetworkRequest>
#include <QtPositioning/QGeoCoordinate> #include <QtPositioning/QGeoCoordinate>
......
...@@ -28,11 +28,7 @@ ...@@ -28,11 +28,7 @@
#include "PX4Bootloader.h" #include "PX4Bootloader.h"
#include <QFile> #include <QFile>
#ifdef __android__
#include "qserialportinfo.h"
#else
#include <QSerialPortInfo> #include <QSerialPortInfo>
#endif
#include <QDebug> #include <QDebug>
#include <QTime> #include <QTime>
......
...@@ -29,11 +29,7 @@ ...@@ -29,11 +29,7 @@
#include "PX4Bootloader.h" #include "PX4Bootloader.h"
#include <QTimer> #include <QTimer>
#ifdef __android__
#include "qserialportinfo.h"
#else
#include <QSerialPortInfo> #include <QSerialPortInfo>
#endif
#include <QDebug> #include <QDebug>
PX4FirmwareUpgradeThreadWorker::PX4FirmwareUpgradeThreadWorker(QObject* parent) : PX4FirmwareUpgradeThreadWorker::PX4FirmwareUpgradeThreadWorker(QObject* parent) :
......
/*===================================================================== /*=====================================================================
QGroundControl Open Source Ground Control Station QGroundControl Open Source Ground Control Station
(c) 2009 - 2014 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org> (c) 2009 - 2014 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
This file is part of the QGROUNDCONTROL project This file is part of the QGROUNDCONTROL project
QGROUNDCONTROL is free software: you can redistribute it and/or modify QGROUNDCONTROL is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or the Free Software Foundation, either version 3 of the License, or
(at your option) any later version. (at your option) any later version.
QGROUNDCONTROL is distributed in the hope that it will be useful, QGROUNDCONTROL is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with QGROUNDCONTROL. If not, see <http://www.gnu.org/licenses/>. along with QGROUNDCONTROL. If not, see <http://www.gnu.org/licenses/>.
======================================================================*/ ======================================================================*/
/// @file /// @file
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
#include "QGCQmlWidgetHolder.h" #include "QGCQmlWidgetHolder.h"
#include "MainWindow.h" #include "MainWindow.h"
#include "QGCMessageBox.h" #include "QGCMessageBox.h"
#ifndef __android__ #ifndef __mobile__
#include "FirmwareUpgradeController.h" #include "FirmwareUpgradeController.h"
#endif #endif
#include "ParameterEditorController.h" #include "ParameterEditorController.h"
...@@ -45,19 +45,19 @@ SetupView::SetupView(QWidget* parent) : ...@@ -45,19 +45,19 @@ SetupView::SetupView(QWidget* parent) :
QGCQmlWidgetHolder(parent), QGCQmlWidgetHolder(parent),
_uasCurrent(NULL), _uasCurrent(NULL),
_initComplete(false), _initComplete(false),
_readyAutopilot(NULL) _readyAutopilot(NULL)
{ {
#ifdef __android__ #ifdef __mobile__
_showFirmware = false; _showFirmware = false;
#else #else
_showFirmware = true; _showFirmware = true;
#endif #endif
connect(UASManager::instance(), &UASManager::activeUASSet, this, &SetupView::_setActiveUAS); connect(UASManager::instance(), &UASManager::activeUASSet, this, &SetupView::_setActiveUAS);
getRootContext()->setContextProperty("controller", this); getRootContext()->setContextProperty("controller", this);
setSource(QUrl::fromUserInput("qrc:/qml/SetupView.qml")); setSource(QUrl::fromUserInput("qrc:/qml/SetupView.qml"));
_setActiveUAS(UASManager::instance()->getActiveUAS()); _setActiveUAS(UASManager::instance()->getActiveUAS());
} }
...@@ -73,9 +73,9 @@ void SetupView::_setActiveUAS(UASInterface* uas) ...@@ -73,9 +73,9 @@ void SetupView::_setActiveUAS(UASInterface* uas)
} }
_pluginReadyChanged(false); _pluginReadyChanged(false);
_uasCurrent = uas; _uasCurrent = uas;
if (_uasCurrent) { if (_uasCurrent) {
_autopilot = AutoPilotPluginManager::instance()->getInstanceForAutoPilotPlugin(_uasCurrent); _autopilot = AutoPilotPluginManager::instance()->getInstanceForAutoPilotPlugin(_uasCurrent);
if (_autopilot.data()->pluginReady()) { if (_autopilot.data()->pluginReady()) {
...@@ -100,7 +100,7 @@ void SetupView::_pluginReadyChanged(bool pluginReady) ...@@ -100,7 +100,7 @@ void SetupView::_pluginReadyChanged(bool pluginReady)
#ifdef UNITTEST_BUILD #ifdef UNITTEST_BUILD
void SetupView::showFirmware(void) void SetupView::showFirmware(void)
{ {
#ifndef __android__ #ifndef __mobile__
QVariant returnedValue; QVariant returnedValue;
bool success = QMetaObject::invokeMethod(getRootObject(), bool success = QMetaObject::invokeMethod(getRootObject(),
"showFirmwarePanel", "showFirmwarePanel",
...@@ -141,4 +141,4 @@ void SetupView::showVehicleComponentSetup(VehicleComponent* vehicleComponent) ...@@ -141,4 +141,4 @@ void SetupView::showVehicleComponentSetup(VehicleComponent* vehicleComponent)
AutoPilotPlugin* SetupView::autopilot(void) AutoPilotPlugin* SetupView::autopilot(void)
{ {
return _readyAutopilot; return _readyAutopilot;
} }
\ No newline at end of file
...@@ -28,7 +28,9 @@ This file is part of the QGROUNDCONTROL project ...@@ -28,7 +28,9 @@ This file is part of the QGROUNDCONTROL project
*/ */
#include "LinkConfiguration.h" #include "LinkConfiguration.h"
#ifndef __ios__
#include "SerialLink.h" #include "SerialLink.h"
#endif
#include "UDPLink.h" #include "UDPLink.h"
#include "TCPLink.h" #include "TCPLink.h"
...@@ -82,9 +84,11 @@ LinkConfiguration* LinkConfiguration::createSettings(int type, const QString& na ...@@ -82,9 +84,11 @@ LinkConfiguration* LinkConfiguration::createSettings(int type, const QString& na
{ {
LinkConfiguration* config = NULL; LinkConfiguration* config = NULL;
switch(type) { switch(type) {
#ifndef __ios__
case LinkConfiguration::TypeSerial: case LinkConfiguration::TypeSerial:
config = new SerialConfiguration(name); config = new SerialConfiguration(name);
break; break;
#endif
case LinkConfiguration::TypeUdp: case LinkConfiguration::TypeUdp:
config = new UDPConfiguration(name); config = new UDPConfiguration(name);
break; break;
...@@ -108,9 +112,11 @@ LinkConfiguration* LinkConfiguration::duplicateSettings(LinkConfiguration* sourc ...@@ -108,9 +112,11 @@ LinkConfiguration* LinkConfiguration::duplicateSettings(LinkConfiguration* sourc
{ {
LinkConfiguration* dupe = NULL; LinkConfiguration* dupe = NULL;
switch(source->type()) { switch(source->type()) {
#ifndef __ios__
case TypeSerial: case TypeSerial:
dupe = new SerialConfiguration(dynamic_cast<SerialConfiguration*>(source)); dupe = new SerialConfiguration(dynamic_cast<SerialConfiguration*>(source));
break; break;
#endif
case TypeUdp: case TypeUdp:
dupe = new UDPConfiguration(dynamic_cast<UDPConfiguration*>(source)); dupe = new UDPConfiguration(dynamic_cast<UDPConfiguration*>(source));
break; break;
......
...@@ -39,7 +39,9 @@ public: ...@@ -39,7 +39,9 @@ public:
/// The link types supported by QGC /// The link types supported by QGC
enum { enum {
#ifndef __ios__
TypeSerial, ///< Serial Link TypeSerial, ///< Serial Link
#endif
TypeUdp, ///< UDP Link TypeUdp, ///< UDP Link
TypeTcp, ///< TCP Link TypeTcp, ///< TCP Link
// TODO Below is not yet implemented // TODO Below is not yet implemented
......
...@@ -32,11 +32,14 @@ This file is part of the QGROUNDCONTROL project ...@@ -32,11 +32,14 @@ This file is part of the QGROUNDCONTROL project
#include <QList> #include <QList>
#include <QApplication> #include <QApplication>
#include <QDebug> #include <QDebug>
#ifndef __ios__
#ifdef __android__ #ifdef __android__
#include "qserialportinfo.h" #include "qserialportinfo.h"
#else #else
#include <QSerialPortInfo> #include <QSerialPortInfo>
#endif #endif
#endif
#include "LinkManager.h" #include "LinkManager.h"
#include "MainWindow.h" #include "MainWindow.h"
...@@ -59,8 +62,10 @@ LinkManager::LinkManager(QObject* parent) ...@@ -59,8 +62,10 @@ LinkManager::LinkManager(QObject* parent)
, _mavlinkChannelsUsedBitMask(0) , _mavlinkChannelsUsedBitMask(0)
, _nullSharedLink(NULL) , _nullSharedLink(NULL)
{ {
#ifndef __ios__
connect(&_portListTimer, &QTimer::timeout, this, &LinkManager::_updateConfigurationList); connect(&_portListTimer, &QTimer::timeout, this, &LinkManager::_updateConfigurationList);
_portListTimer.start(1000); _portListTimer.start(1000);
#endif
} }
LinkManager::~LinkManager() LinkManager::~LinkManager()
...@@ -79,9 +84,11 @@ LinkInterface* LinkManager::createConnectedLink(LinkConfiguration* config) ...@@ -79,9 +84,11 @@ LinkInterface* LinkManager::createConnectedLink(LinkConfiguration* config)
Q_ASSERT(config); Q_ASSERT(config);
LinkInterface* pLink = NULL; LinkInterface* pLink = NULL;
switch(config->type()) { switch(config->type()) {
#ifndef __ios__
case LinkConfiguration::TypeSerial: case LinkConfiguration::TypeSerial:
pLink = new SerialLink(dynamic_cast<SerialConfiguration*>(config)); pLink = new SerialLink(dynamic_cast<SerialConfiguration*>(config));
break; break;
#endif
case LinkConfiguration::TypeUdp: case LinkConfiguration::TypeUdp:
pLink = new UDPLink(dynamic_cast<UDPConfiguration*>(config)); pLink = new UDPLink(dynamic_cast<UDPConfiguration*>(config));
break; break;
...@@ -370,10 +377,12 @@ void LinkManager::loadLinkConfigurationList() ...@@ -370,10 +377,12 @@ void LinkManager::loadLinkConfigurationList()
} }
LinkConfiguration* pLink = NULL; LinkConfiguration* pLink = NULL;
switch(type) { switch(type) {
#ifndef __ios__
case LinkConfiguration::TypeSerial: case LinkConfiguration::TypeSerial:
pLink = (LinkConfiguration*)new SerialConfiguration(name); pLink = (LinkConfiguration*)new SerialConfiguration(name);
pLink->setPreferred(preferred); pLink->setPreferred(preferred);
break; break;
#endif
case LinkConfiguration::TypeUdp: case LinkConfiguration::TypeUdp:
pLink = (LinkConfiguration*)new UDPConfiguration(name); pLink = (LinkConfiguration*)new UDPConfiguration(name);
pLink->setPreferred(preferred); pLink->setPreferred(preferred);
...@@ -422,6 +431,7 @@ void LinkManager::loadLinkConfigurationList() ...@@ -422,6 +431,7 @@ void LinkManager::loadLinkConfigurationList()
_configurationsLoaded = true; _configurationsLoaded = true;
} }
#ifndef __ios__
SerialConfiguration* LinkManager::_findSerialConfiguration(const QString& portName) SerialConfiguration* LinkManager::_findSerialConfiguration(const QString& portName)
{ {
QString searchPort = portName.trimmed(); QString searchPort = portName.trimmed();
...@@ -436,7 +446,9 @@ SerialConfiguration* LinkManager::_findSerialConfiguration(const QString& portNa ...@@ -436,7 +446,9 @@ SerialConfiguration* LinkManager::_findSerialConfiguration(const QString& portNa
} }
return NULL; return NULL;
} }
#endif
#ifndef __ios__
void LinkManager::_updateConfigurationList(void) void LinkManager::_updateConfigurationList(void)
{ {
if (_configUpdateSuspended || !_configurationsLoaded) { if (_configUpdateSuspended || !_configurationsLoaded) {
...@@ -526,6 +538,7 @@ void LinkManager::_updateConfigurationList(void) ...@@ -526,6 +538,7 @@ void LinkManager::_updateConfigurationList(void)
saveLinkConfigurationList(); saveLinkConfigurationList();
} }
} }
#endif
bool LinkManager::containsLink(LinkInterface* link) bool LinkManager::containsLink(LinkInterface* link)
{ {
......
...@@ -35,7 +35,9 @@ This file is part of the PIXHAWK project ...@@ -35,7 +35,9 @@ This file is part of the PIXHAWK project
#include "LinkInterface.h" #include "LinkInterface.h"
// Links // Links
#ifndef __ios__
#include "SerialLink.h" #include "SerialLink.h"
#endif
#include "UDPLink.h" #include "UDPLink.h"
#include "TCPLink.h" #include "TCPLink.h"
...@@ -94,8 +96,9 @@ public: ...@@ -94,8 +96,9 @@ public:
const QList<LinkInterface*> getLinks(); const QList<LinkInterface*> getLinks();
// Returns list of all serial links // Returns list of all serial links
#ifndef __ios__
const QList<SerialLink*> getSerialLinks(); const QList<SerialLink*> getSerialLinks();
#endif
/// Sets the flag to suspend the all new connections /// Sets the flag to suspend the all new connections
/// @param reason User visible reason to suspend connections /// @param reason User visible reason to suspend connections
void setConnectionsSuspended(QString reason); void setConnectionsSuspended(QString reason);
...@@ -156,8 +159,9 @@ private: ...@@ -156,8 +159,9 @@ private:
bool _connectionsSuspendedMsg(void); bool _connectionsSuspendedMsg(void);
void _updateConfigurationList(void); void _updateConfigurationList(void);
#ifndef __ios__
SerialConfiguration* _findSerialConfiguration(const QString& portName); SerialConfiguration* _findSerialConfiguration(const QString& portName);
#endif
QList<LinkConfiguration*> _linkConfigurations; ///< List of configured links QList<LinkConfiguration*> _linkConfigurations; ///< List of configured links
/// List of available links kept as QSharedPointers. We use QSharedPointer since /// List of available links kept as QSharedPointers. We use QSharedPointer since
...@@ -171,8 +175,9 @@ private: ...@@ -171,8 +175,9 @@ private:
bool _configurationsLoaded; ///< true: Link configurations have been loaded bool _configurationsLoaded; ///< true: Link configurations have been loaded
bool _connectionsSuspended; ///< true: all new connections should not be allowed bool _connectionsSuspended; ///< true: all new connections should not be allowed
QString _connectionsSuspendedReason; ///< User visible reason for suspension QString _connectionsSuspendedReason; ///< User visible reason for suspension
#ifndef __ios__
QTimer _portListTimer; QTimer _portListTimer;
#endif
uint32_t _mavlinkChannelsUsedBitMask; uint32_t _mavlinkChannelsUsedBitMask;
SharedLinkInterface _nullSharedLink; SharedLinkInterface _nullSharedLink;
......
...@@ -36,6 +36,7 @@ This file is part of the QGROUNDCONTROL project ...@@ -36,6 +36,7 @@ This file is part of the QGROUNDCONTROL project
#include <iostream> #include <iostream>
#include "UAS.h"
#include "QGCJSBSimLink.h" #include "QGCJSBSimLink.h"
#include "QGC.h" #include "QGC.h"
#include "QGCMessageBox.h" #include "QGCMessageBox.h"
......
...@@ -40,6 +40,7 @@ class SerialLink; ...@@ -40,6 +40,7 @@ class SerialLink;
#include <QThread> #include <QThread>
#include <QMutex> #include <QMutex>
#include <QString> #include <QString>
#ifdef __android__ #ifdef __android__
#include "qserialport.h" #include "qserialport.h"
#else #else
......
...@@ -35,7 +35,7 @@ This file is part of the QGROUNDCONTROL project ...@@ -35,7 +35,7 @@ This file is part of the QGROUNDCONTROL project
#include "MainWindow.h" #include "MainWindow.h"
#include "configuration.h" #include "configuration.h"
#ifdef QT_DEBUG #ifdef QT_DEBUG
#ifndef __android__ #ifndef __mobile__
#include "UnitTest.h" #include "UnitTest.h"
#endif #endif
#include "CmdLineOptParser.h" #include "CmdLineOptParser.h"
...@@ -101,7 +101,9 @@ int main(int argc, char *argv[]) ...@@ -101,7 +101,9 @@ int main(int argc, char *argv[])
// that we use these types in signals, and without calling qRegisterMetaType we can't queue // that we use these types in signals, and without calling qRegisterMetaType we can't queue
// these signals. In general we don't queue these signals, but we do what the warning says // these signals. In general we don't queue these signals, but we do what the warning says
// anyway to silence the debug output. // anyway to silence the debug output.
#ifndef __ios__
qRegisterMetaType<QSerialPort::SerialPortError>(); qRegisterMetaType<QSerialPort::SerialPortError>();
#endif
qRegisterMetaType<QAbstractSocket::SocketError>(); qRegisterMetaType<QAbstractSocket::SocketError>();
// We statically link to the google QtLocation plugin // We statically link to the google QtLocation plugin
...@@ -158,7 +160,7 @@ int main(int argc, char *argv[]) ...@@ -158,7 +160,7 @@ int main(int argc, char *argv[])
int exitCode; int exitCode;
#ifndef __android__ #ifndef __mobile__
#ifdef QT_DEBUG #ifdef QT_DEBUG
if (runUnitTests) { if (runUnitTests) {
if (!app->_initForUnitTests()) { if (!app->_initForUnitTests()) {
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
#ifndef UNITTEST_H #ifndef UNITTEST_H
#define UNITTEST_H #define UNITTEST_H
#ifndef __android__ #ifndef __mobile__
#include <QObject> #include <QObject>
#include <QtTest> #include <QtTest>
......
...@@ -26,7 +26,9 @@ ...@@ -26,7 +26,9 @@
#include "MAVLinkProtocol.h" #include "MAVLinkProtocol.h"
#include "QGCMAVLink.h" #include "QGCMAVLink.h"
#include "LinkManager.h" #include "LinkManager.h"
#ifndef __ios__
#include "SerialLink.h" #include "SerialLink.h"
#endif
#include <Eigen/Geometry> #include <Eigen/Geometry>
#include "AutoPilotPluginManager.h" #include "AutoPilotPluginManager.h"
#include "QGCMessageBox.h" #include "QGCMessageBox.h"
...@@ -141,8 +143,9 @@ UAS::UAS(MAVLinkProtocol* protocol, int id) : UASInterface(), ...@@ -141,8 +143,9 @@ UAS::UAS(MAVLinkProtocol* protocol, int id) : UASInterface(),
blockHomePositionChanges(false), blockHomePositionChanges(false),
receivedMode(false), receivedMode(false),
#ifndef __mobile__
simulation(0), simulation(0),
#endif
// The protected members. // The protected members.
connectionLost(false), connectionLost(false),
...@@ -2401,6 +2404,7 @@ void UAS::toggleAutonomy() ...@@ -2401,6 +2404,7 @@ void UAS::toggleAutonomy()
* Set the manual control commands. * Set the manual control commands.
* This can only be done if the system has manual inputs enabled and is armed. * This can only be done if the system has manual inputs enabled and is armed.
*/ */
#ifndef __mobile__
void UAS::setExternalControlSetpoint(float roll, float pitch, float yaw, float thrust, qint8 xHat, qint8 yHat, quint16 buttons, quint8 joystickMode) void UAS::setExternalControlSetpoint(float roll, float pitch, float yaw, float thrust, qint8 xHat, qint8 yHat, quint16 buttons, quint8 joystickMode)
{ {
Q_UNUSED(xHat); Q_UNUSED(xHat);
...@@ -2580,7 +2584,9 @@ void UAS::setExternalControlSetpoint(float roll, float pitch, float yaw, float t ...@@ -2580,7 +2584,9 @@ void UAS::setExternalControlSetpoint(float roll, float pitch, float yaw, float t
} }
} }
} }
#endif
#ifndef __mobile__
void UAS::setManual6DOFControlCommands(double x, double y, double z, double roll, double pitch, double yaw) void UAS::setManual6DOFControlCommands(double x, double y, double z, double roll, double pitch, double yaw)
{ {
// If system has manual inputs enabled and is armed // If system has manual inputs enabled and is armed
...@@ -2614,6 +2620,7 @@ void UAS::setManual6DOFControlCommands(double x, double y, double z, double roll ...@@ -2614,6 +2620,7 @@ void UAS::setManual6DOFControlCommands(double x, double y, double z, double roll
qDebug() << "3DMOUSE/MANUAL CONTROL: IGNORING COMMANDS: Set mode to MANUAL to send 3DMouse commands first"; qDebug() << "3DMOUSE/MANUAL CONTROL: IGNORING COMMANDS: Set mode to MANUAL to send 3DMouse commands first";
} }
} }
#endif
/** /**
* @return the type of the system * @return the type of the system
...@@ -2747,6 +2754,7 @@ bool UAS::emergencyKILL() ...@@ -2747,6 +2754,7 @@ bool UAS::emergencyKILL()
/** /**
* If enabled, connect the flight gear link. * If enabled, connect the flight gear link.
*/ */
#ifndef __mobile__
void UAS::enableHilFlightGear(bool enable, QString options, bool sensorHil, QObject * configuration) void UAS::enableHilFlightGear(bool enable, QString options, bool sensorHil, QObject * configuration)
{ {
Q_UNUSED(configuration); Q_UNUSED(configuration);
...@@ -2775,10 +2783,12 @@ void UAS::enableHilFlightGear(bool enable, QString options, bool sensorHil, QObj ...@@ -2775,10 +2783,12 @@ void UAS::enableHilFlightGear(bool enable, QString options, bool sensorHil, QObj
stopHil(); stopHil();
} }
} }
#endif
/** /**
* If enabled, connect the JSBSim link. * If enabled, connect the JSBSim link.
*/ */
#ifndef __mobile__
void UAS::enableHilJSBSim(bool enable, QString options) void UAS::enableHilJSBSim(bool enable, QString options)
{ {
QGCJSBSimLink* link = dynamic_cast<QGCJSBSimLink*>(simulation); QGCJSBSimLink* link = dynamic_cast<QGCJSBSimLink*>(simulation);
...@@ -2802,10 +2812,12 @@ void UAS::enableHilJSBSim(bool enable, QString options) ...@@ -2802,10 +2812,12 @@ void UAS::enableHilJSBSim(bool enable, QString options)
stopHil(); stopHil();
} }
} }
#endif
/** /**
* If enabled, connect the X-plane gear link. * If enabled, connect the X-plane gear link.
*/ */
#ifndef __mobile__
void UAS::enableHilXPlane(bool enable) void UAS::enableHilXPlane(bool enable)
{ {
QGCXPlaneLink* link = dynamic_cast<QGCXPlaneLink*>(simulation); QGCXPlaneLink* link = dynamic_cast<QGCXPlaneLink*>(simulation);
...@@ -2827,6 +2839,7 @@ void UAS::enableHilXPlane(bool enable) ...@@ -2827,6 +2839,7 @@ void UAS::enableHilXPlane(bool enable)
stopHil(); stopHil();
} }
} }
#endif
/** /**
* @param time_us Timestamp (microseconds since UNIX epoch or microseconds since system boot) * @param time_us Timestamp (microseconds since UNIX epoch or microseconds since system boot)
...@@ -2846,6 +2859,7 @@ void UAS::enableHilXPlane(bool enable) ...@@ -2846,6 +2859,7 @@ void UAS::enableHilXPlane(bool enable)
* @param yacc Y acceleration (mg) * @param yacc Y acceleration (mg)
* @param zacc Z acceleration (mg) * @param zacc Z acceleration (mg)
*/ */
#ifndef __mobile__
void UAS::sendHilGroundTruth(quint64 time_us, float roll, float pitch, float yaw, float rollspeed, void UAS::sendHilGroundTruth(quint64 time_us, float roll, float pitch, float yaw, float rollspeed,
float pitchspeed, float yawspeed, double lat, double lon, double alt, float pitchspeed, float yawspeed, double lat, double lon, double alt,
float vx, float vy, float vz, float ind_airspeed, float true_airspeed, float xacc, float yacc, float zacc) float vx, float vy, float vz, float ind_airspeed, float true_airspeed, float xacc, float yacc, float zacc)
...@@ -2875,6 +2889,7 @@ void UAS::sendHilGroundTruth(quint64 time_us, float roll, float pitch, float yaw ...@@ -2875,6 +2889,7 @@ void UAS::sendHilGroundTruth(quint64 time_us, float roll, float pitch, float yaw
emit valueChanged(uasId, "IAS sim", "m/s", ind_airspeed, getUnixTime()); emit valueChanged(uasId, "IAS sim", "m/s", ind_airspeed, getUnixTime());
emit valueChanged(uasId, "TAS sim", "m/s", true_airspeed, getUnixTime()); emit valueChanged(uasId, "TAS sim", "m/s", true_airspeed, getUnixTime());
} }
#endif
/** /**
* @param time_us Timestamp (microseconds since UNIX epoch or microseconds since system boot) * @param time_us Timestamp (microseconds since UNIX epoch or microseconds since system boot)
...@@ -2894,6 +2909,7 @@ void UAS::sendHilGroundTruth(quint64 time_us, float roll, float pitch, float yaw ...@@ -2894,6 +2909,7 @@ void UAS::sendHilGroundTruth(quint64 time_us, float roll, float pitch, float yaw
* @param yacc Y acceleration (mg) * @param yacc Y acceleration (mg)
* @param zacc Z acceleration (mg) * @param zacc Z acceleration (mg)
*/ */
#ifndef __mobile__
void UAS::sendHilState(quint64 time_us, float roll, float pitch, float yaw, float rollspeed, void UAS::sendHilState(quint64 time_us, float roll, float pitch, float yaw, float rollspeed,
float pitchspeed, float yawspeed, double lat, double lon, double alt, float pitchspeed, float yawspeed, double lat, double lon, double alt,
float vx, float vy, float vz, float ind_airspeed, float true_airspeed, float xacc, float yacc, float zacc) float vx, float vy, float vz, float ind_airspeed, float true_airspeed, float xacc, float yacc, float zacc)
...@@ -2930,11 +2946,13 @@ void UAS::sendHilState(quint64 time_us, float roll, float pitch, float yaw, floa ...@@ -2930,11 +2946,13 @@ void UAS::sendHilState(quint64 time_us, float roll, float pitch, float yaw, floa
qDebug() << __FILE__ << __LINE__ << "HIL is onboard not enabled, trying to enable."; qDebug() << __FILE__ << __LINE__ << "HIL is onboard not enabled, trying to enable.";
} }
} }
#endif
/* /*
* @param abs_pressure Absolute Pressure (hPa) * @param abs_pressure Absolute Pressure (hPa)
* @param diff_pressure Differential Pressure (hPa) * @param diff_pressure Differential Pressure (hPa)
*/ */
#ifndef __mobile__
void UAS::sendHilSensors(quint64 time_us, float xacc, float yacc, float zacc, float rollspeed, float pitchspeed, float yawspeed, void UAS::sendHilSensors(quint64 time_us, float xacc, float yacc, float zacc, float rollspeed, float pitchspeed, float yawspeed,
float xmag, float ymag, float zmag, float abs_pressure, float diff_pressure, float pressure_alt, float temperature, quint32 fields_changed) float xmag, float ymag, float zmag, float abs_pressure, float diff_pressure, float pressure_alt, float temperature, quint32 fields_changed)
{ {
...@@ -2955,7 +2973,9 @@ void UAS::sendHilSensors(quint64 time_us, float xacc, float yacc, float zacc, fl ...@@ -2955,7 +2973,9 @@ void UAS::sendHilSensors(quint64 time_us, float xacc, float yacc, float zacc, fl
qDebug() << __FILE__ << __LINE__ << "HIL is onboard not enabled, trying to enable."; qDebug() << __FILE__ << __LINE__ << "HIL is onboard not enabled, trying to enable.";
} }
} }
#endif
#ifndef __mobile__
void UAS::sendHilOpticalFlow(quint64 time_us, qint16 flow_x, qint16 flow_y, float flow_comp_m_x, void UAS::sendHilOpticalFlow(quint64 time_us, qint16 flow_x, qint16 flow_y, float flow_comp_m_x,
float flow_comp_m_y, quint8 quality, float ground_distance) float flow_comp_m_y, quint8 quality, float ground_distance)
{ {
...@@ -2988,7 +3008,9 @@ void UAS::sendHilOpticalFlow(quint64 time_us, qint16 flow_x, qint16 flow_y, floa ...@@ -2988,7 +3008,9 @@ void UAS::sendHilOpticalFlow(quint64 time_us, qint16 flow_x, qint16 flow_y, floa
} }
} }
#endif
#ifndef __mobile__
void UAS::sendHilGps(quint64 time_us, double lat, double lon, double alt, int fix_type, float eph, float epv, float vel, float vn, float ve, float vd, float cog, int satellites) void UAS::sendHilGps(quint64 time_us, double lat, double lon, double alt, int fix_type, float eph, float epv, float vel, float vn, float ve, float vd, float cog, int satellites)
{ {
// Only send at 10 Hz max rate // Only send at 10 Hz max rate
...@@ -3017,11 +3039,12 @@ void UAS::sendHilGps(quint64 time_us, double lat, double lon, double alt, int fi ...@@ -3017,11 +3039,12 @@ void UAS::sendHilGps(quint64 time_us, double lat, double lon, double alt, int fi
qDebug() << __FILE__ << __LINE__ << "HIL is onboard not enabled, trying to enable."; qDebug() << __FILE__ << __LINE__ << "HIL is onboard not enabled, trying to enable.";
} }
} }
#endif
/** /**
* Connect flight gear link. * Connect flight gear link.
**/ **/
#ifndef __mobile__
void UAS::startHil() void UAS::startHil()
{ {
if (hilEnabled) return; if (hilEnabled) return;
...@@ -3032,10 +3055,12 @@ void UAS::startHil() ...@@ -3032,10 +3055,12 @@ void UAS::startHil()
// Connect HIL simulation link // Connect HIL simulation link
simulation->connectSimulation(); simulation->connectSimulation();
} }
#endif
/** /**
* disable flight gear link. * disable flight gear link.
*/ */
#ifndef __mobile__
void UAS::stopHil() void UAS::stopHil()
{ {
if (simulation && simulation->isConnected()) { if (simulation && simulation->isConnected()) {
...@@ -3046,6 +3071,7 @@ void UAS::stopHil() ...@@ -3046,6 +3071,7 @@ void UAS::stopHil()
hilEnabled = false; hilEnabled = false;
sensorHil = false; sensorHil = false;
} }
#endif
void UAS::shutdown() void UAS::shutdown()
{ {
......
...@@ -36,12 +36,14 @@ This file is part of the QGROUNDCONTROL project ...@@ -36,12 +36,14 @@ This file is part of the QGROUNDCONTROL project
#include <MAVLinkProtocol.h> #include <MAVLinkProtocol.h>
#include <QVector3D> #include <QVector3D>
#include "QGCMAVLink.h" #include "QGCMAVLink.h"
#include "FileManager.h"
#ifndef __mobile__
#include "JoystickInput.h"
#include "QGCHilLink.h" #include "QGCHilLink.h"
#include "QGCFlightGearLink.h" #include "QGCFlightGearLink.h"
#include "QGCJSBSimLink.h" #include "QGCJSBSimLink.h"
#include "QGCXPlaneLink.h" #include "QGCXPlaneLink.h"
#include "FileManager.h" #endif
#include "JoystickInput.h"
Q_DECLARE_LOGGING_CATEGORY(UASLog) Q_DECLARE_LOGGING_CATEGORY(UASLog)
...@@ -463,7 +465,9 @@ protected: //COMMENTS FOR TEST UNIT ...@@ -463,7 +465,9 @@ protected: //COMMENTS FOR TEST UNIT
bool receivedMode; ///< True if mode was retrieved from current conenction to UAS bool receivedMode; ///< True if mode was retrieved from current conenction to UAS
/// SIMULATION /// SIMULATION
#ifndef __mobile__
QGCHilLink* simulation; ///< Hardware in the loop simulation link QGCHilLink* simulation; ///< Hardware in the loop simulation link
#endif
public: public:
/** @brief Set the current battery type */ /** @brief Set the current battery type */
...@@ -493,10 +497,11 @@ public: ...@@ -493,10 +497,11 @@ public:
} }
/** @brief Get the HIL simulation */ /** @brief Get the HIL simulation */
#ifndef __mobile__
QGCHilLink* getHILSimulation() const { QGCHilLink* getHILSimulation() const {
return simulation; return simulation;
} }
#endif
int getSystemType(); int getSystemType();
bool isAirplane(); bool isAirplane();
...@@ -703,6 +708,7 @@ public slots: ...@@ -703,6 +708,7 @@ public slots:
void go(); void go();
/** @brief Enable / disable HIL */ /** @brief Enable / disable HIL */
#ifndef __mobile__
void enableHilFlightGear(bool enable, QString options, bool sensorHil, QObject * configuration); void enableHilFlightGear(bool enable, QString options, bool sensorHil, QObject * configuration);
void enableHilJSBSim(bool enable, QString options); void enableHilJSBSim(bool enable, QString options);
void enableHilXPlane(bool enable); void enableHilXPlane(bool enable);
...@@ -744,7 +750,7 @@ public slots: ...@@ -744,7 +750,7 @@ public slots:
/** @brief Stops the UAV's Hardware-in-the-Loop simulation status **/ /** @brief Stops the UAV's Hardware-in-the-Loop simulation status **/
void stopHil(); void stopHil();
#endif
/** @brief Stops the robot system. If it is an MAV, the robot starts the emergency landing procedure **/ /** @brief Stops the robot system. If it is an MAV, the robot starts the emergency landing procedure **/
void emergencySTOP(); void emergencySTOP();
...@@ -781,10 +787,14 @@ public slots: ...@@ -781,10 +787,14 @@ public slots:
void toggleAutonomy(); void toggleAutonomy();
/** @brief Set the values for the manual control of the vehicle */ /** @brief Set the values for the manual control of the vehicle */
#ifndef __mobile__
void setExternalControlSetpoint(float roll, float pitch, float yaw, float thrust, qint8 xHat, qint8 yHat, quint16 buttons, quint8); void setExternalControlSetpoint(float roll, float pitch, float yaw, float thrust, qint8 xHat, qint8 yHat, quint16 buttons, quint8);
#endif
/** @brief Set the values for the 6dof manual control of the vehicle */ /** @brief Set the values for the 6dof manual control of the vehicle */
#ifndef __mobile__
void setManual6DOFControlCommands(double x, double y, double z, double roll, double pitch, double yaw); void setManual6DOFControlCommands(double x, double y, double z, double roll, double pitch, double yaw);
#endif
/** @brief Add a link associated with this robot */ /** @brief Add a link associated with this robot */
void addLink(LinkInterface* link); void addLink(LinkInterface* link);
......
...@@ -353,6 +353,7 @@ public slots: ...@@ -353,6 +353,7 @@ public slots:
virtual QString getBatterySpecs() = 0; virtual QString getBatterySpecs() = 0;
/** @brief Send the full HIL state to the MAV */ /** @brief Send the full HIL state to the MAV */
#ifndef __mobile__
virtual void sendHilState(quint64 time_us, float roll, float pitch, float yaw, float rollspeed, virtual void sendHilState(quint64 time_us, float roll, float pitch, float yaw, float rollspeed,
float pitchspeed, float yawspeed, double lat, double lon, double alt, float pitchspeed, float yawspeed, double lat, double lon, double alt,
float vx, float vy, float vz, float ind_airspeed, float true_airspeed, float xacc, float yacc, float zacc) = 0; float vx, float vy, float vz, float ind_airspeed, float true_airspeed, float xacc, float yacc, float zacc) = 0;
...@@ -367,6 +368,7 @@ public slots: ...@@ -367,6 +368,7 @@ public slots:
/** @brief Send Optical Flow sensor message for HIL, (arguments and units accoding to mavlink documentation*/ /** @brief Send Optical Flow sensor message for HIL, (arguments and units accoding to mavlink documentation*/
virtual void sendHilOpticalFlow(quint64 time_us, qint16 flow_x, qint16 flow_y, float flow_comp_m_x, virtual void sendHilOpticalFlow(quint64 time_us, qint16 flow_x, qint16 flow_y, float flow_comp_m_x,
float flow_comp_m_y, quint8 quality, float ground_distance) = 0; float flow_comp_m_y, quint8 quality, float ground_distance) = 0;
#endif
/** @brief Send command to map a RC channel to a parameter */ /** @brief Send command to map a RC channel to a parameter */
virtual void sendMapRCToParam(QString param_id, float scale, float value0, quint8 param_rc_channel_index, float valueMin, float valueMax) = 0; virtual void sendMapRCToParam(QString param_id, float scale, float value0, quint8 param_rc_channel_index, float valueMin, float valueMax) = 0;
......
...@@ -33,18 +33,22 @@ This file is part of the QGROUNDCONTROL project ...@@ -33,18 +33,22 @@ This file is part of the QGROUNDCONTROL project
#include <QTimer> #include <QTimer>
#include <QHostInfo> #include <QHostInfo>
#include <QSplashScreen> #include <QSplashScreen>
#ifndef __mobile__
#include <QGCHilLink.h> #include <QGCHilLink.h>
#include <QGCHilConfiguration.h> #include <QGCHilConfiguration.h>
#include <QGCHilFlightGearConfiguration.h> #include <QGCHilFlightGearConfiguration.h>
#endif
#include <QQuickView> #include <QQuickView>
#include <QDesktopWidget> #include <QDesktopWidget>
#include "QGC.h" #include "QGC.h"
#ifndef __ios__
#include "SerialLink.h" #include "SerialLink.h"
#endif
#include "MAVLinkProtocol.h" #include "MAVLinkProtocol.h"
#include "QGCWaypointListMulti.h" #include "QGCWaypointListMulti.h"
#include "MainWindow.h" #include "MainWindow.h"
#ifndef __android__ #ifndef __mobile__
#include "JoystickWidget.h" #include "JoystickWidget.h"
#endif #endif
#include "GAudioOutput.h" #include "GAudioOutput.h"
...@@ -88,6 +92,9 @@ This file is part of the QGROUNDCONTROL project ...@@ -88,6 +92,9 @@ This file is part of the QGROUNDCONTROL project
#if defined(Q_OS_OSX) #if defined(Q_OS_OSX)
double MainWindow::_pixelFactor = 1.0; double MainWindow::_pixelFactor = 1.0;
double MainWindow::_fontFactor = 1.0; double MainWindow::_fontFactor = 1.0;
#elif defined(__ios__)
double MainWindow::_pixelFactor = 1.0;
double MainWindow::_fontFactor = 1.0;
#elif defined(Q_OS_WIN) #elif defined(Q_OS_WIN)
double MainWindow::_pixelFactor = 0.86; double MainWindow::_pixelFactor = 0.86;
double MainWindow::_fontFactor = 0.63; double MainWindow::_fontFactor = 0.63;
...@@ -217,7 +224,7 @@ MainWindow::MainWindow(QSplashScreen* splashScreen) ...@@ -217,7 +224,7 @@ MainWindow::MainWindow(QSplashScreen* splashScreen)
connectCommonActions(); connectCommonActions();
// Connect user interface devices // Connect user interface devices
emit initStatusChanged(tr("Initializing joystick interface"), Qt::AlignLeft | Qt::AlignBottom, QColor(62, 93, 141)); emit initStatusChanged(tr("Initializing joystick interface"), Qt::AlignLeft | Qt::AlignBottom, QColor(62, 93, 141));
#ifndef __android__ #ifndef __mobile__
joystick = new JoystickInput(); joystick = new JoystickInput();
#endif #endif
#ifdef QGC_MOUSE_ENABLED_WIN #ifdef QGC_MOUSE_ENABLED_WIN
...@@ -248,7 +255,7 @@ MainWindow::MainWindow(QSplashScreen* splashScreen) ...@@ -248,7 +255,7 @@ MainWindow::MainWindow(QSplashScreen* splashScreen)
emit initStatusChanged(tr("Restoring last view state"), Qt::AlignLeft | Qt::AlignBottom, QColor(62, 93, 141)); emit initStatusChanged(tr("Restoring last view state"), Qt::AlignLeft | Qt::AlignBottom, QColor(62, 93, 141));
// Restore the window setup // Restore the window setup
_loadCurrentViewState(); _loadCurrentViewState();
#ifndef __android__ #ifndef __mobile__
// Restore the window position and size // Restore the window position and size
emit initStatusChanged(tr("Restoring last window size"), Qt::AlignLeft | Qt::AlignBottom, QColor(62, 93, 141)); emit initStatusChanged(tr("Restoring last window size"), Qt::AlignLeft | Qt::AlignBottom, QColor(62, 93, 141));
...@@ -317,7 +324,7 @@ MainWindow::MainWindow(QSplashScreen* splashScreen) ...@@ -317,7 +324,7 @@ MainWindow::MainWindow(QSplashScreen* splashScreen)
if (!qgcApp()->runningUnitTests()) { if (!qgcApp()->runningUnitTests()) {
_ui.actionStatusBar->setChecked(_showStatusBar); _ui.actionStatusBar->setChecked(_showStatusBar);
showStatusBarCallback(_showStatusBar); showStatusBarCallback(_showStatusBar);
#ifdef __android__ #ifdef __mobile__
menuBar()->hide(); menuBar()->hide();
#endif #endif
show(); show();
...@@ -341,7 +348,7 @@ MainWindow::MainWindow(QSplashScreen* splashScreen) ...@@ -341,7 +348,7 @@ MainWindow::MainWindow(QSplashScreen* splashScreen)
MainWindow::~MainWindow() MainWindow::~MainWindow()
{ {
#ifndef __android__ #ifndef __mobile__
if (joystick) if (joystick)
{ {
joystick->shutdown(); joystick->shutdown();
...@@ -585,6 +592,7 @@ void MainWindow::_createInnerDockWidget(const QString& widgetName) ...@@ -585,6 +592,7 @@ void MainWindow::_createInnerDockWidget(const QString& widgetName)
} }
} }
#ifndef __mobile__
void MainWindow::_showHILConfigurationWidgets(void) void MainWindow::_showHILConfigurationWidgets(void)
{ {
UASInterface* uas = UASManager::instance()->getActiveUAS(); UASInterface* uas = UASManager::instance()->getActiveUAS();
...@@ -624,6 +632,7 @@ void MainWindow::_showHILConfigurationWidgets(void) ...@@ -624,6 +632,7 @@ void MainWindow::_showHILConfigurationWidgets(void)
} }
} }
} }
#endif
void MainWindow::fullScreenActionItemCallback(bool) void MainWindow::fullScreenActionItemCallback(bool)
{ {
...@@ -852,7 +861,7 @@ void MainWindow::showRoadMap() ...@@ -852,7 +861,7 @@ void MainWindow::showRoadMap()
void MainWindow::showSettings() void MainWindow::showSettings()
{ {
#ifndef __android__ #ifndef __mobile__
SettingsDialog settings(joystick, this); SettingsDialog settings(joystick, this);
#else #else
SettingsDialog settings(this); SettingsDialog settings(this);
...@@ -883,7 +892,9 @@ void MainWindow::UASCreated(UASInterface* uas) ...@@ -883,7 +892,9 @@ void MainWindow::UASCreated(UASInterface* uas)
connect(uas, SIGNAL(misconfigurationDetected(UASInterface*)), this, SLOT(handleMisconfiguration(UASInterface*))); connect(uas, SIGNAL(misconfigurationDetected(UASInterface*)), this, SLOT(handleMisconfiguration(UASInterface*)));
// HIL // HIL
#ifndef __mobile__
_showHILConfigurationWidgets(); _showHILConfigurationWidgets();
#endif
if (!linechartWidget) if (!linechartWidget)
{ {
...@@ -1004,7 +1015,9 @@ void MainWindow::_loadCurrentViewState(void) ...@@ -1004,7 +1015,9 @@ void MainWindow::_loadCurrentViewState(void)
// HIL dock widget are dynamic and don't take part in the saved window state, so this // HIL dock widget are dynamic and don't take part in the saved window state, so this
// need to happen after we restore state // need to happen after we restore state
#ifndef __mobile__
_showHILConfigurationWidgets(); _showHILConfigurationWidgets();
#endif
// There is a bug in Qt where a Canvas element inside a QQuickWidget does not // There is a bug in Qt where a Canvas element inside a QQuickWidget does not
// receive update requests. Here we emit a signal for them to get repainted. // receive update requests. Here we emit a signal for them to get repainted.
...@@ -1138,7 +1151,7 @@ void MainWindow::hideSplashScreen(void) ...@@ -1138,7 +1151,7 @@ void MainWindow::hideSplashScreen(void)
void MainWindow::manageLinks() void MainWindow::manageLinks()
{ {
#ifndef __android__ #ifndef __mobile__
SettingsDialog settings(joystick, this, SettingsDialog::ShowCommLinks); SettingsDialog settings(joystick, this, SettingsDialog::ShowCommLinks);
#else #else
SettingsDialog settings(this, SettingsDialog::ShowCommLinks); SettingsDialog settings(this, SettingsDialog::ShowCommLinks);
......
...@@ -47,7 +47,7 @@ This file is part of the QGROUNDCONTROL project ...@@ -47,7 +47,7 @@ This file is part of the QGROUNDCONTROL project
#include "WaypointList.h" #include "WaypointList.h"
#include "CameraView.h" #include "CameraView.h"
#include "UASListWidget.h" #include "UASListWidget.h"
#ifndef __android__ #ifndef __mobile__
#include "input/JoystickInput.h" #include "input/JoystickInput.h"
#endif #endif
#if (defined QGC_MOUSE_ENABLED_WIN) | (defined QGC_MOUSE_ENABLED_LINUX) #if (defined QGC_MOUSE_ENABLED_WIN) | (defined QGC_MOUSE_ENABLED_LINUX)
...@@ -65,7 +65,6 @@ This file is part of the QGROUNDCONTROL project ...@@ -65,7 +65,6 @@ This file is part of the QGROUNDCONTROL project
#include "QGCMAVLinkLogPlayer.h" #include "QGCMAVLinkLogPlayer.h"
#include "MAVLinkDecoder.h" #include "MAVLinkDecoder.h"
#include "QGCUASFileViewMulti.h" #include "QGCUASFileViewMulti.h"
#include "QGCFlightGearLink.h"
class QGCMapTool; class QGCMapTool;
class QGCMAVLinkMessageSender; class QGCMAVLinkMessageSender;
...@@ -263,7 +262,7 @@ protected: ...@@ -263,7 +262,7 @@ protected:
QPointer<QGCUASFileViewMulti> fileWidget; QPointer<QGCUASFileViewMulti> fileWidget;
#ifndef __android__ #ifndef __mobile__
JoystickInput* joystick; ///< The joystick manager for QGC JoystickInput* joystick; ///< The joystick manager for QGC
#endif #endif
...@@ -290,7 +289,6 @@ protected: ...@@ -290,7 +289,6 @@ protected:
LogCompressor* comp; LogCompressor* comp;
QTimer* videoTimer; QTimer* videoTimer;
QGCFlightGearLink* fgLink;
QTimer windowNameUpdateTimer; QTimer windowNameUpdateTimer;
private slots: private slots:
...@@ -353,7 +351,9 @@ private: ...@@ -353,7 +351,9 @@ private:
void _hideAllHilDockWidgets(void); void _hideAllHilDockWidgets(void);
void _hideAllDockWidgets(void); void _hideAllDockWidgets(void);
void _showDockWidget(const QString &name, bool show); void _showDockWidget(const QString &name, bool show);
#ifndef __mobile__
void _showHILConfigurationWidgets(void); void _showHILConfigurationWidgets(void);
#endif
bool _autoReconnect; bool _autoReconnect;
bool _lowPowerMode; ///< If enabled, QGC reduces the update rates of all widgets bool _lowPowerMode; ///< If enabled, QGC reduces the update rates of all widgets
......
...@@ -30,8 +30,10 @@ This file is part of the QGROUNDCONTROL project ...@@ -30,8 +30,10 @@ This file is part of the QGROUNDCONTROL project
#include <QPushButton> #include <QPushButton>
#ifndef __ios__
#include "SerialLink.h" #include "SerialLink.h"
#include "SerialConfigurationWindow.h" #include "SerialConfigurationWindow.h"
#endif
#include "QGCUDPLinkConfiguration.h" #include "QGCUDPLinkConfiguration.h"
#include "QGCTCPLinkConfiguration.h" #include "QGCTCPLinkConfiguration.h"
#include "QGCCommConfiguration.h" #include "QGCCommConfiguration.h"
...@@ -45,7 +47,9 @@ QGCCommConfiguration::QGCCommConfiguration(QWidget *parent, LinkConfiguration *c ...@@ -45,7 +47,9 @@ QGCCommConfiguration::QGCCommConfiguration(QWidget *parent, LinkConfiguration *c
// Add link types // Add link types
_config = config; _config = config;
_ui->typeCombo->addItem(tr("Select Type"), LinkConfiguration::TypeLast); _ui->typeCombo->addItem(tr("Select Type"), LinkConfiguration::TypeLast);
#ifndef __ios__
_ui->typeCombo->addItem(tr("Serial"), LinkConfiguration::TypeSerial); _ui->typeCombo->addItem(tr("Serial"), LinkConfiguration::TypeSerial);
#endif
_ui->typeCombo->addItem(tr("UDP"), LinkConfiguration::TypeUdp); _ui->typeCombo->addItem(tr("UDP"), LinkConfiguration::TypeUdp);
_ui->typeCombo->addItem(tr("TCP"), LinkConfiguration::TypeTcp); _ui->typeCombo->addItem(tr("TCP"), LinkConfiguration::TypeTcp);
#ifdef QT_DEBUG #ifdef QT_DEBUG
...@@ -113,6 +117,7 @@ void QGCCommConfiguration::_loadTypeConfigWidget(int type) ...@@ -113,6 +117,7 @@ void QGCCommConfiguration::_loadTypeConfigWidget(int type)
{ {
Q_ASSERT(_config != NULL); Q_ASSERT(_config != NULL);
switch(type) { switch(type) {
#ifndef __ios__
case LinkConfiguration::TypeSerial: { case LinkConfiguration::TypeSerial: {
QWidget* conf = new SerialConfigurationWindow((SerialConfiguration*)_config, this); QWidget* conf = new SerialConfigurationWindow((SerialConfiguration*)_config, this);
_ui->linkScrollArea->setWidget(conf); _ui->linkScrollArea->setWidget(conf);
...@@ -120,6 +125,7 @@ void QGCCommConfiguration::_loadTypeConfigWidget(int type) ...@@ -120,6 +125,7 @@ void QGCCommConfiguration::_loadTypeConfigWidget(int type)
_ui->typeCombo->setCurrentIndex(_ui->typeCombo->findData(LinkConfiguration::TypeSerial)); _ui->typeCombo->setCurrentIndex(_ui->typeCombo->findData(LinkConfiguration::TypeSerial));
} }
break; break;
#endif
case LinkConfiguration::TypeUdp: { case LinkConfiguration::TypeUdp: {
QWidget* conf = new QGCUDPLinkConfiguration((UDPConfiguration*)_config, this); QWidget* conf = new QGCUDPLinkConfiguration((UDPConfiguration*)_config, this);
_ui->linkScrollArea->setWidget(conf); _ui->linkScrollArea->setWidget(conf);
......
...@@ -29,11 +29,13 @@ This file is part of the QGROUNDCONTROL project ...@@ -29,11 +29,13 @@ This file is part of the QGROUNDCONTROL project
*/ */
#include <QTemporaryFile> #include <QTemporaryFile>
#ifndef __mobile__
#include <QPrintDialog> #include <QPrintDialog>
#include <QPrinter>
#endif
#include <QProgressDialog> #include <QProgressDialog>
#include <QHBoxLayout> #include <QHBoxLayout>
#include <QSvgGenerator> #include <QSvgGenerator>
#include <QPrinter>
#include <QStandardPaths> #include <QStandardPaths>
#include <QDebug> #include <QDebug>
...@@ -161,6 +163,7 @@ void QGCDataPlot2D::savePlot() ...@@ -161,6 +163,7 @@ void QGCDataPlot2D::savePlot()
void QGCDataPlot2D::print() void QGCDataPlot2D::print()
{ {
#ifndef __mobile__
QPrinter printer(QPrinter::HighResolution); QPrinter printer(QPrinter::HighResolution);
// printer.setOutputFormat(QPrinter::PdfFormat); // printer.setOutputFormat(QPrinter::PdfFormat);
// //QPrinter printer(QPrinter::HighResolution); // //QPrinter printer(QPrinter::HighResolution);
...@@ -196,10 +199,14 @@ void QGCDataPlot2D::print() ...@@ -196,10 +199,14 @@ void QGCDataPlot2D::print()
plot->setStyleSheet("QWidget { background-color: #050508; color: #DDDDDF; background-clip: border; font-size: 11pt;}"); plot->setStyleSheet("QWidget { background-color: #050508; color: #DDDDDF; background-clip: border; font-size: 11pt;}");
//plot->setCanvasBackground(QColor(5, 5, 8)); //plot->setCanvasBackground(QColor(5, 5, 8));
} }
#endif
} }
void QGCDataPlot2D::exportPDF(QString fileName) void QGCDataPlot2D::exportPDF(QString fileName)
{ {
#ifdef __mobile__
Q_UNUSED(fileName)
#else
QPrinter printer; QPrinter printer;
printer.setOutputFormat(QPrinter::PdfFormat); printer.setOutputFormat(QPrinter::PdfFormat);
printer.setOutputFileName(fileName); printer.setOutputFileName(fileName);
...@@ -235,10 +242,14 @@ void QGCDataPlot2D::exportPDF(QString fileName) ...@@ -235,10 +242,14 @@ void QGCDataPlot2D::exportPDF(QString fileName)
//plot->print(printer); //plot->print(printer);
plot->setStyleSheet("QWidget { background-color: #050508; color: #DDDDDF; background-clip: border; font-size: 11pt;}"); plot->setStyleSheet("QWidget { background-color: #050508; color: #DDDDDF; background-clip: border; font-size: 11pt;}");
//plot->setCanvasBackground(QColor(5, 5, 8)); //plot->setCanvasBackground(QColor(5, 5, 8));
#endif
} }
void QGCDataPlot2D::exportSVG(QString fileName) void QGCDataPlot2D::exportSVG(QString fileName)
{ {
#ifdef __mobile__
Q_UNUSED(fileName)
#else
if ( !fileName.isEmpty() ) { if ( !fileName.isEmpty() ) {
plot->setStyleSheet("QWidget { background-color: #FFFFFF; color: #000000; background-clip: border; font-size: 10pt;}"); plot->setStyleSheet("QWidget { background-color: #FFFFFF; color: #000000; background-clip: border; font-size: 10pt;}");
//plot->setCanvasBackground(Qt::white); //plot->setCanvasBackground(Qt::white);
...@@ -257,6 +268,7 @@ void QGCDataPlot2D::exportSVG(QString fileName) ...@@ -257,6 +268,7 @@ void QGCDataPlot2D::exportSVG(QString fileName)
//plot->print(generator); //plot->print(generator);
plot->setStyleSheet("QWidget { background-color: #050508; color: #DDDDDF; background-clip: border; font-size: 11pt;}"); plot->setStyleSheet("QWidget { background-color: #050508; color: #DDDDDF; background-clip: border; font-size: 11pt;}");
} }
#endif
} }
/** /**
......
...@@ -135,6 +135,7 @@ void QGCLinkConfiguration::_fixUnnamed(LinkConfiguration* config) ...@@ -135,6 +135,7 @@ void QGCLinkConfiguration::_fixUnnamed(LinkConfiguration* config)
//-- Check for "Unnamed" //-- Check for "Unnamed"
if (config->name() == tr("Unnamed")) { if (config->name() == tr("Unnamed")) {
switch(config->type()) { switch(config->type()) {
#ifndef __ios__
case LinkConfiguration::TypeSerial: { case LinkConfiguration::TypeSerial: {
QString tname = dynamic_cast<SerialConfiguration*>(config)->portName(); QString tname = dynamic_cast<SerialConfiguration*>(config)->portName();
#ifdef Q_OS_WIN32 #ifdef Q_OS_WIN32
...@@ -146,6 +147,7 @@ void QGCLinkConfiguration::_fixUnnamed(LinkConfiguration* config) ...@@ -146,6 +147,7 @@ void QGCLinkConfiguration::_fixUnnamed(LinkConfiguration* config)
config->setName(QString("Serial Device on %1").arg(tname)); config->setName(QString("Serial Device on %1").arg(tname));
break; break;
} }
#endif
case LinkConfiguration::TypeUdp: case LinkConfiguration::TypeUdp:
config->setName( config->setName(
QString("UDP Link on Port %1").arg(dynamic_cast<UDPConfiguration*>(config)->localPort())); QString("UDP Link on Port %1").arg(dynamic_cast<UDPConfiguration*>(config)->localPort()));
......
...@@ -2,7 +2,9 @@ ...@@ -2,7 +2,9 @@
#include <QtEndian> #include <QtEndian>
#include "MainWindow.h" #include "MainWindow.h"
#ifndef __ios__
#include "SerialLink.h" #include "SerialLink.h"
#endif
#include "QGCMAVLinkLogPlayer.h" #include "QGCMAVLinkLogPlayer.h"
#include "QGC.h" #include "QGC.h"
#include "ui_QGCMAVLinkLogPlayer.h" #include "ui_QGCMAVLinkLogPlayer.h"
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
#include "MainWindow.h" #include "MainWindow.h"
#include "ui_SettingsDialog.h" #include "ui_SettingsDialog.h"
#ifndef __android__ #ifndef __mobile__
#include "JoystickWidget.h" #include "JoystickWidget.h"
#endif #endif
#include "LinkManager.h" #include "LinkManager.h"
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
#include "QGCMessageBox.h" #include "QGCMessageBox.h"
#include "MainToolBar.h" #include "MainToolBar.h"
#ifndef __android__ #ifndef __mobile__
SettingsDialog::SettingsDialog(JoystickInput *joystick, QWidget *parent, int showTab, Qt::WindowFlags flags) : SettingsDialog::SettingsDialog(JoystickInput *joystick, QWidget *parent, int showTab, Qt::WindowFlags flags) :
#else #else
SettingsDialog::SettingsDialog(QWidget *parent, int showTab, Qt::WindowFlags flags) : SettingsDialog::SettingsDialog(QWidget *parent, int showTab, Qt::WindowFlags flags) :
...@@ -58,14 +58,14 @@ _ui(new Ui::SettingsDialog) ...@@ -58,14 +58,14 @@ _ui(new Ui::SettingsDialog)
move(position.topLeft()); move(position.topLeft());
QGCLinkConfiguration* pLinkConf = new QGCLinkConfiguration(this); QGCLinkConfiguration* pLinkConf = new QGCLinkConfiguration(this);
#ifndef __android__ #ifndef __mobile__
JoystickWidget* pJoystickConf = new JoystickWidget(joystick, this); JoystickWidget* pJoystickConf = new JoystickWidget(joystick, this);
#endif #endif
MAVLinkSettingsWidget* pMavsettings = new MAVLinkSettingsWidget(MAVLinkProtocol::instance(), this); MAVLinkSettingsWidget* pMavsettings = new MAVLinkSettingsWidget(MAVLinkProtocol::instance(), this);
// Add the link settings pane // Add the link settings pane
_ui->tabWidget->addTab(pLinkConf, "Comm Links"); _ui->tabWidget->addTab(pLinkConf, "Comm Links");
#ifndef __android__ #ifndef __mobile__
// Add the joystick settings pane // Add the joystick settings pane
_ui->tabWidget->addTab(pJoystickConf, "Controllers"); _ui->tabWidget->addTab(pJoystickConf, "Controllers");
#endif #endif
...@@ -113,7 +113,7 @@ _ui(new Ui::SettingsDialog) ...@@ -113,7 +113,7 @@ _ui(new Ui::SettingsDialog)
case ShowCommLinks: case ShowCommLinks:
_ui->tabWidget->setCurrentWidget(pLinkConf); _ui->tabWidget->setCurrentWidget(pLinkConf);
break; break;
#ifndef __android__ #ifndef __mobile__
case ShowControllers: case ShowControllers:
_ui->tabWidget->setCurrentWidget(pJoystickConf); _ui->tabWidget->setCurrentWidget(pJoystickConf);
break; break;
......
...@@ -45,7 +45,7 @@ public: ...@@ -45,7 +45,7 @@ public:
ShowMavlink ShowMavlink
}; };
#ifdef __android__ #ifdef __mobile__
SettingsDialog(QWidget *parent = 0, int showTab = ShowDefault, Qt::WindowFlags flags = Qt::Sheet); SettingsDialog(QWidget *parent = 0, int showTab = ShowDefault, Qt::WindowFlags flags = Qt::Sheet);
#else #else
SettingsDialog(JoystickInput *joystick, QWidget *parent = 0, int showTab = ShowDefault, Qt::WindowFlags flags = Qt::Sheet); SettingsDialog(JoystickInput *joystick, QWidget *parent = 0, int showTab = ShowDefault, Qt::WindowFlags flags = Qt::Sheet);
......
...@@ -56,7 +56,7 @@ void CurveData::append(double *x, double *y, int count) ...@@ -56,7 +56,7 @@ void CurveData::append(double *x, double *y, int count)
d_y.resize(newSize); d_y.resize(newSize);
} }
for ( register int i = 0; i < count; i++ ) { for ( int i = 0; i < count; i++ ) {
d_x[d_count + i] = x[i]; d_x[d_count + i] = x[i];
d_y[d_count + i] = y[i]; d_y[d_count + i] = y[i];
} }
......
...@@ -40,7 +40,10 @@ This file is part of the PIXHAWK project ...@@ -40,7 +40,10 @@ This file is part of the PIXHAWK project
#include "UASWaypointManager.h" #include "UASWaypointManager.h"
#include "MainWindow.h" #include "MainWindow.h"
#include "ui_UASView.h" #include "ui_UASView.h"
#ifndef __mobile__
#include <QGCHilFlightGearConfiguration.h> #include <QGCHilFlightGearConfiguration.h>
#endif
UASView::UASView(UASInterface* uas, QWidget *parent) : UASView::UASView(UASInterface* uas, QWidget *parent) :
QWidget(parent), QWidget(parent),
......
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