Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
fe015311
Commit
fe015311
authored
Apr 22, 2015
by
dogmaphobic
Browse files
First stab at iOS builds
parent
87b5ffaa
Changes
37
Hide whitespace changes
Inline
Side-by-side
QGCApplication.pro
View file @
fe015311
...
...
@@ -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
}
}
!
Android
Build
{
!
Mobile
Build
{
#
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
\
!
Android
Build
{
!
iOS
Build
{
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
\
!
Android
Build
{
!
iOS
Build
{
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
!
Android
Build
{
!
Mobile
Build
{
INCLUDEPATH
+=
\
src
/
qgcunittest
...
...
@@ -536,7 +555,7 @@ SOURCES += \
src
/
qgcunittest
/
PX4RCCalibrationTest
.
cc
\
}
#
DebugBuild
|
WindowsDebugAndRelease
}
#
Android
Build
}
#
Mobile
Build
#
#
AutoPilot
Plugin
Support
...
...
@@ -569,7 +588,7 @@ HEADERS+= \
src
/
VehicleSetup
/
SetupView
.
h
\
src
/
VehicleSetup
/
VehicleComponent
.
h
\
!
Android
Build
{
!
Mobile
Build
{
HEADERS
+=
\
src
/
VehicleSetup
/
FirmwareUpgradeController
.
h
\
src
/
VehicleSetup
/
PX4Bootloader
.
h
\
...
...
@@ -599,7 +618,7 @@ SOURCES += \
src
/
VehicleSetup
/
SetupView
.
cc
\
src
/
VehicleSetup
/
VehicleComponent
.
cc
\
!
Android
Build
{
!
Mobile
Build
{
SOURCES
+=
\
src
/
VehicleSetup
/
FirmwareUpgradeController
.
cc
\
src
/
VehicleSetup
/
PX4Bootloader
.
cc
\
...
...
QGCCommon.pri
View file @
fe015311
...
...
@@ -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
...
...
QGCLocationPlugin.pro
View file @
fe015311
...
...
@@ -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
QGCSetup.pri
View file @
fe015311
...
...
@@ -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 {
!
Android
Build {
!
Mobile
Build {
# 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
}
...
...
ios/iOS-Info.plist
0 → 100644
View file @
fe015311
<?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>
libs/eigen/Eigen/src/Core/products/SelfadjointMatrixVector.h
View file @
fe015311
...
...
@@ -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
);
...
...
libs/opmapcontrol/opmapcontrol_external.pri
View file @
fe015311
...
...
@@ -5,107 +5,109 @@
# HACK! BIG TIME!
DEFINES += EXTERNAL_USE
OPMAPCONTROL_DIR = libs/opmapcontrol
DEPENDPATH += $$OPMAPCONTROL/core $$OPMAPCONTROL_DIR/src/internals $$OPMAPCONTROL_DIR/src/mapwidget $$OPMAPCONTROL_DIR/src/internals/projections
INCLUDEPATH += $$OPMAPCONTROL_DIR/src/core $$OPMAPCONTROL_DIR/src/internals $$OPMAPCONTROL_DIR/src/internals/projections $$OPMAPCONTROL_DIR/src/mapwidget
DEPENDPATH += $$PWD/src/core $$PWD/src/internals $$PWD/src/mapwidget $$PWD/src/internals/projections
INCLUDEPATH += $$PWD/src/core $$PWD/src/internals $$PWD/src/internals/projections $$PWD/src/mapwidget
# Input
HEADERS += $$OPMAPCONTROL_DIR/opmapcontrol.h \
$$OPMAPCONTROL_DIR/src/core/accessmode.h \
$$OPMAPCONTROL_DIR/src/core/alllayersoftype.h \
$$OPMAPCONTROL_DIR/src/core/cache.h \
$$OPMAPCONTROL_DIR/src/core/cacheitemqueue.h \
$$OPMAPCONTROL_DIR/src/core/debugheader.h \
$$OPMAPCONTROL_DIR/src/core/diagnostics.h \
$$OPMAPCONTROL_DIR/src/core/geodecoderstatus.h \
$$OPMAPCONTROL_DIR/src/core/kibertilecache.h \
$$OPMAPCONTROL_DIR/src/core/languagetype.h \
$$OPMAPCONTROL_DIR/src/core/maptype.h \
$$OPMAPCONTROL_DIR/src/core/memorycache.h \
$$OPMAPCONTROL_DIR/src/core/opmaps.h \
$$OPMAPCONTROL_DIR/src/core/placemark.h \
$$OPMAPCONTROL_DIR/src/core/point.h \
$$OPMAPCONTROL_DIR/src/core/providerstrings.h \
$$OPMAPCONTROL_DIR/src/core/pureimage.h \
$$OPMAPCONTROL_DIR/src/core/pureimagecache.h \
$$OPMAPCONTROL_DIR/src/core/rawtile.h \
$$OPMAPCONTROL_DIR/src/core/size.h \
$$OPMAPCONTROL_DIR/src/core/tilecachequeue.h \
$$OPMAPCONTROL_DIR/src/core/urlfactory.h \
$$OPMAPCONTROL_DIR/src/internals/copyrightstrings.h \
$$OPMAPCONTROL_DIR/src/internals/core.h \
$$OPMAPCONTROL_DIR/src/internals/debugheader.h \
$$OPMAPCONTROL_DIR/src/internals/loadtask.h \
$$OPMAPCONTROL_DIR/src/internals/mousewheelzoomtype.h \
$$OPMAPCONTROL_DIR/src/internals/pointlatlng.h \
$$OPMAPCONTROL_DIR/src/internals/pureprojection.h \
$$OPMAPCONTROL_DIR/src/internals/rectangle.h \
$$OPMAPCONTROL_DIR/src/internals/rectlatlng.h \
$$OPMAPCONTROL_DIR/src/internals/sizelatlng.h \
$$OPMAPCONTROL_DIR/src/internals/tile.h \
$$OPMAPCONTROL_DIR/src/internals/tilematrix.h \
$$OPMAPCONTROL_DIR/src/mapwidget/configuration.h \
$$OPMAPCONTROL_DIR/src/mapwidget/gpsitem.h \
$$OPMAPCONTROL_DIR/src/mapwidget/homeitem.h \
$$OPMAPCONTROL_DIR/src/mapwidget/mapgraphicitem.h \
$$OPMAPCONTROL_DIR/src/mapwidget/mapripform.h \
$$OPMAPCONTROL_DIR/src/mapwidget/mapripper.h \
$$OPMAPCONTROL_DIR/src/mapwidget/opmapwidget.h \
$$OPMAPCONTROL_DIR/src/mapwidget/trailitem.h \
$$OPMAPCONTROL_DIR/src/mapwidget/traillineitem.h \
$$OPMAPCONTROL_DIR/src/mapwidget/uavitem.h \
$$OPMAPCONTROL_DIR/src/mapwidget/uavmapfollowtype.h \
$$OPMAPCONTROL_DIR/src/mapwidget/uavtrailtype.h \
$$OPMAPCONTROL_DIR/src/mapwidget/waypointitem.h \
$$OPMAPCONTROL_DIR/src/internals/projections/lks94projection.h \
$$OPMAPCONTROL_DIR/src/internals/projections/mercatorprojection.h \
$$OPMAPCONTROL_DIR/src/internals/projections/mercatorprojectionyandex.h \
$$OPMAPCONTROL_DIR/src/internals/projections/platecarreeprojection.h \
$$OPMAPCONTROL_DIR/src/internals/projections/platecarreeprojectionpergo.h \
$$OPMAPCONTROL_DIR/src/mapwidget/waypointlineitem.h
FORMS += $$OPMAPCONTROL_DIR/src/mapwidget/mapripform.ui
SOURCES += $$OPMAPCONTROL_DIR/src/core/alllayersoftype.cpp \
$$OPMAPCONTROL_DIR/src/core/cache.cpp \
$$OPMAPCONTROL_DIR/src/core/cacheitemqueue.cpp \
$$OPMAPCONTROL_DIR/src/core/diagnostics.cpp \
$$OPMAPCONTROL_DIR/src/core/kibertilecache.cpp \
$$OPMAPCONTROL_DIR/src/core/languagetype.cpp \
$$OPMAPCONTROL_DIR/src/core/memorycache.cpp \
$$OPMAPCONTROL_DIR/src/core/opmaps.cpp \
$$OPMAPCONTROL_DIR/src/core/placemark.cpp \
$$OPMAPCONTROL_DIR/src/core/point.cpp \
$$OPMAPCONTROL_DIR/src/core/providerstrings.cpp \
$$OPMAPCONTROL_DIR/src/core/pureimage.cpp \
$$OPMAPCONTROL_DIR/src/core/pureimagecache.cpp \
$$OPMAPCONTROL_DIR/src/core/rawtile.cpp \
$$OPMAPCONTROL_DIR/src/core/size.cpp \
$$OPMAPCONTROL_DIR/src/core/tilecachequeue.cpp \
$$OPMAPCONTROL_DIR/src/core/urlfactory.cpp \
$$OPMAPCONTROL_DIR/src/internals/core.cpp \
$$OPMAPCONTROL_DIR/src/internals/loadtask.cpp \
$$OPMAPCONTROL_DIR/src/internals/MouseWheelZoomType.cpp \
$$OPMAPCONTROL_DIR/src/internals/pointlatlng.cpp \
$$OPMAPCONTROL_DIR/src/internals/pureprojection.cpp \
$$OPMAPCONTROL_DIR/src/internals/rectangle.cpp \
$$OPMAPCONTROL_DIR/src/internals/rectlatlng.cpp \
$$OPMAPCONTROL_DIR/src/internals/sizelatlng.cpp \
$$OPMAPCONTROL_DIR/src/internals/tile.cpp \
$$OPMAPCONTROL_DIR/src/internals/tilematrix.cpp \
$$OPMAPCONTROL_DIR/src/mapwidget/configuration.cpp \
$$OPMAPCONTROL_DIR/src/mapwidget/gpsitem.cpp \
$$OPMAPCONTROL_DIR/src/mapwidget/homeitem.cpp \
$$OPMAPCONTROL_DIR/src/mapwidget/mapgraphicitem.cpp \
$$OPMAPCONTROL_DIR/src/mapwidget/mapripform.cpp \
$$OPMAPCONTROL_DIR/src/mapwidget/mapripper.cpp \
$$OPMAPCONTROL_DIR/src/mapwidget/opmapwidget.cpp \
$$OPMAPCONTROL_DIR/src/mapwidget/trailitem.cpp \
$$OPMAPCONTROL_DIR/src/mapwidget/traillineitem.cpp \
$$OPMAPCONTROL_DIR/src/mapwidget/uavitem.cpp \
$$OPMAPCONTROL_DIR/src/mapwidget/waypointitem.cpp \
$$OPMAPCONTROL_DIR/src/internals/projections/lks94projection.cpp \
$$OPMAPCONTROL_DIR/src/internals/projections/mercatorprojection.cpp \
$$OPMAPCONTROL_DIR/src/internals/projections/mercatorprojectionyandex.cpp \
$$OPMAPCONTROL_DIR/src/internals/projections/platecarreeprojection.cpp \
$$OPMAPCONTROL_DIR/src/internals/projections/platecarreeprojectionpergo.cpp \
$$OPMAPCONTROL_DIR/src/mapwidget/waypointlineitem.cpp
RESOURCES += $$OPMAPCONTROL_DIR/src/mapwidget/mapresources.qrc
HEADERS += $$PWD/opmapcontrol.h \
$$PWD/src/core/accessmode.h \
$$PWD/src/core/alllayersoftype.h \
$$PWD/src/core/cache.h \
$$PWD/src/core/cacheitemqueue.h \
$$PWD/src/core/debugheader.h \
$$PWD/src/core/diagnostics.h \
$$PWD/src/core/geodecoderstatus.h \
$$PWD/src/core/kibertilecache.h \
$$PWD/src/core/languagetype.h \
$$PWD/src/core/maptype.h \
$$PWD/src/core/memorycache.h \
$$PWD/src/core/opmaps.h \
$$PWD/src/core/placemark.h \
$$PWD/src/core/point.h \
$$PWD/src/core/providerstrings.h \
$$PWD/src/core/pureimage.h \
$$PWD/src/core/pureimagecache.h \
$$PWD/src/core/rawtile.h \
$$PWD/src/core/size.h \
$$PWD/src/core/tilecachequeue.h \
$$PWD/src/core/urlfactory.h \
$$PWD/src/internals/copyrightstrings.h \
$$PWD/src/internals/core.h \
$$PWD/src/internals/debugheader.h \
$$PWD/src/internals/loadtask.h \
$$PWD/src/internals/mousewheelzoomtype.h \
$$PWD/src/internals/pointlatlng.h \
$$PWD/src/internals/pureprojection.h \
$$PWD/src/internals/rectangle.h \
$$PWD/src/internals/rectlatlng.h \
$$PWD/src/internals/sizelatlng.h \
$$PWD/src/internals/tile.h \
$$PWD/src/internals/tilematrix.h \
$$PWD/src/mapwidget/configuration.h \
$$PWD/src/mapwidget/gpsitem.h \
$$PWD/src/mapwidget/homeitem.h \
$$PWD/src/mapwidget/mapgraphicitem.h \
$$PWD/src/mapwidget/mapripform.h \
$$PWD/src/mapwidget/mapripper.h \
$$PWD/src/mapwidget/opmapwidget.h \
$$PWD/src/mapwidget/trailitem.h \
$$PWD/src/mapwidget/traillineitem.h \
$$PWD/src/mapwidget/uavitem.h \
$$PWD/src/mapwidget/uavmapfollowtype.h \
$$PWD/src/mapwidget/uavtrailtype.h \
$$PWD/src/mapwidget/waypointitem.h \
$$PWD/src/internals/projections/lks94projection.h \
$$PWD/src/internals/projections/mercatorprojection.h \
$$PWD/src/internals/projections/mercatorprojectionyandex.h \
$$PWD/src/internals/projections/platecarreeprojection.h \
$$PWD/src/internals/projections/platecarreeprojectionpergo.h \
$$PWD/src/mapwidget/waypointlineitem.h
FORMS += $$PWD/src/mapwidget/mapripform.ui
SOURCES += $$PWD/src/core/alllayersoftype.cpp \
$$PWD/src/core/cache.cpp \
$$PWD/src/core/cacheitemqueue.cpp \
$$PWD/src/core/diagnostics.cpp \
$$PWD/src/core/kibertilecache.cpp \
$$PWD/src/core/languagetype.cpp \
$$PWD/src/core/memorycache.cpp \
$$PWD/src/core/opmaps.cpp \
$$PWD/src/core/placemark.cpp \
$$PWD/src/core/point.cpp \
$$PWD/src/core/providerstrings.cpp \
$$PWD/src/core/pureimage.cpp \
$$PWD/src/core/pureimagecache.cpp \
$$PWD/src/core/rawtile.cpp \
$$PWD/src/core/size.cpp \
$$PWD/src/core/tilecachequeue.cpp \
$$PWD/src/core/urlfactory.cpp \
$$PWD/src/internals/core.cpp \
$$PWD/src/internals/loadtask.cpp \
$$PWD/src/internals/MouseWheelZoomType.cpp \
$$PWD/src/internals/pointlatlng.cpp \
$$PWD/src/internals/pureprojection.cpp \
$$PWD/src/internals/rectangle.cpp \
$$PWD/src/internals/rectlatlng.cpp \
$$PWD/src/internals/sizelatlng.cpp \
$$PWD/src/internals/tile.cpp \
$$PWD/src/internals/tilematrix.cpp \
$$PWD/src/mapwidget/configuration.cpp \
$$PWD/src/mapwidget/gpsitem.cpp \
$$PWD/src/mapwidget/homeitem.cpp \
$$PWD/src/mapwidget/mapgraphicitem.cpp \
$$PWD/src/mapwidget/mapripform.cpp \
$$PWD/src/mapwidget/mapripper.cpp \
$$PWD/src/mapwidget/opmapwidget.cpp \
$$PWD/src/mapwidget/trailitem.cpp \
$$PWD/src/mapwidget/traillineitem.cpp \
$$PWD/src/mapwidget/uavitem.cpp \
$$PWD/src/mapwidget/waypointitem.cpp \
$$PWD/src/internals/projections/lks94projection.cpp \
$$PWD/src/internals/projections/mercatorprojection.cpp \
$$PWD/src/internals/projections/mercatorprojectionyandex.cpp \
$$PWD/src/internals/projections/platecarreeprojection.cpp \
$$PWD/src/internals/projections/platecarreeprojectionpergo.cpp \
$$PWD/src/mapwidget/waypointlineitem.cpp
RESOURCES += $$PWD/src/mapwidget/mapresources.qrc
src/QGCApplication.cc
View file @
fe015311
...
...
@@ -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
}
src/QGCFileDialog.cc
View file @
fe015311
...
...
@@ -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
...
...
src/QGCMessageBox.h
View file @
fe015311
...
...
@@ -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
);
...
...
src/QmlControls/MavManager.cc
View file @
fe015311
...
...
@@ -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"
...
...
src/QmlControls/ScreenTools.h
View file @
fe015311
...
...
@@ -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
;
}
...
...
src/QtLocationPlugin/qgeocodingmanagerengineqgc.cpp
View file @
fe015311
...
...
@@ -48,6 +48,7 @@
#include
<QtCore/QUrl>
#include
<QtCore/QUrlQuery>
#include
<QtCore/QLocale>
#include
<QDebug>
#include
<QtNetwork/QNetworkAccessManager>
#include
<QtNetwork/QNetworkRequest>
#include
<QtPositioning/QGeoCoordinate>
...
...
src/VehicleSetup/PX4Bootloader.cc
View file @
fe015311
...
...
@@ -28,11 +28,7 @@
#include
"PX4Bootloader.h"
#include
<QFile>
#ifdef __android__
#include
"qserialportinfo.h"
#else
#include
<QSerialPortInfo>
#endif
#include
<QDebug>
#include
<QTime>
...
...
src/VehicleSetup/PX4FirmwareUpgradeThread.cc
View file @
fe015311
...
...
@@ -29,11 +29,7 @@
#include
"PX4Bootloader.h"
#include
<QTimer>
#ifdef __android__
#include
"qserialportinfo.h"
#else
#include
<QSerialPortInfo>
#endif
#include
<QDebug>
PX4FirmwareUpgradeThreadWorker
::
PX4FirmwareUpgradeThreadWorker
(
QObject
*
parent
)
:
...
...
src/VehicleSetup/SetupView.cc
View file @
fe015311
/*=====================================================================
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
}
src/comm/LinkConfiguration.cc
View file @
fe015311
...
...
@@ -28,7 +28,9 @@ This file is part of the QGROUNDCONTROL project
*/
#include
"LinkConfiguration.h"
#ifndef __ios__
#include
"SerialLink.h"
#endif
#include
"UDPLink.h"
#include
"TCPLink.h"
...
...
@@ -82,9 +84,11 @@ LinkConfiguration* LinkConfiguration::createSettings(int type, const QString& na
{
LinkConfiguration
*
config
=
NULL
;
switch
(
type
)
{
#ifndef __ios__
case
LinkConfiguration
::
TypeSerial
:
config
=
new
SerialConfiguration
(
name
);
break
;
#endif
case
LinkConfiguration
::
TypeUdp
:
config
=
new
UDPConfiguration
(
name
);
break
;
...
...
@@ -108,9 +112,11 @@ LinkConfiguration* LinkConfiguration::duplicateSettings(LinkConfiguration* sourc
{
LinkConfiguration
*
dupe
=
NULL
;
switch
(
source
->
type
())
{
#ifndef __ios__
case
TypeSerial
:
dupe
=
new
SerialConfiguration
(
dynamic_cast
<
SerialConfiguration
*>
(
source
));
break
;
#endif
case
TypeUdp
:
dupe
=
new
UDPConfiguration
(
dynamic_cast
<
UDPConfiguration
*>
(
source
));
break
;
...
...
src/comm/LinkConfiguration.h
View file @
fe015311
...
...
@@ -39,7 +39,9 @@ public:
/// The link types supported by QGC
enum
{
#ifndef __ios__
TypeSerial
,
///< Serial Link
#endif
TypeUdp
,
///< UDP Link
TypeTcp
,
///< TCP Link
// TODO Below is not yet implemented
...
...
src/comm/LinkManager.cc
View file @
fe015311
...
...
@@ -32,11 +32,14 @@ This file is part of the QGROUNDCONTROL project
#include
<QList>
#include
<QApplication>
#include
<QDebug>
#ifndef __ios__
#ifdef __android__
#include
"qserialportinfo.h"
#else
#include
<QSerialPortInfo>
#endif
#endif
#include
"LinkManager.h"
#include
"MainWindow.h"
...
...
@@ -59,8 +62,10 @@ LinkManager::LinkManager(QObject* parent)
,
_mavlinkChannelsUsedBitMask
(
0
)
,
_nullSharedLink
(
NULL
)
{
#ifndef __ios__
connect
(
&
_portListTimer
,
&
QTimer
::
timeout
,
this
,
&
LinkManager
::
_updateConfigurationList
);
_portListTimer
.
start
(
1000
);
#endif
}
LinkManager
::~
LinkManager
()
...
...
@@ -79,9 +84,11 @@ LinkInterface* LinkManager::createConnectedLink(LinkConfiguration* config)
Q_ASSERT
(
config
);
LinkInterface
*
pLink
=
NULL
;
switch
(
config
->
type
())
{
#ifndef __ios__
case
LinkConfiguration
::
TypeSerial
:
pLink
=
new
SerialLink
(
dynamic_cast
<
SerialConfiguration
*>
(
config
));
break
;
#endif
case
LinkConfiguration
::
TypeUdp
:
pLink
=
new
UDPLink
(
dynamic_cast
<
UDPConfiguration
*>
(
config
));
break
;
...
...
@@ -370,10 +377,12 @@ void LinkManager::loadLinkConfigurationList()
}
LinkConfiguration
*
pLink
=
NULL
;
switch
(
type
)
{
#ifndef __ios__
case
LinkConfiguration
::
TypeSerial
:
pLink
=
(
LinkConfiguration
*
)
new
SerialConfiguration
(
name
);
pLink
->
setPreferred
(
preferred
);
break
;
#endif
case
LinkConfiguration
::
TypeUdp
:
pLink
=
(
LinkConfiguration
*
)
new
UDPConfiguration
(
name
);
pLink
->
setPreferred
(
preferred
);
...
...
@@ -422,6 +431,7 @@ void LinkManager::loadLinkConfigurationList()
_configurationsLoaded
=
true
;
}
#ifndef __ios__
SerialConfiguration
*
LinkManager
::
_findSerialConfiguration
(
const
QString
&
portName
)
{
QString
searchPort
=
portName
.
trimmed
();
...
...
@@ -436,7 +446,9 @@ SerialConfiguration* LinkManager::_findSerialConfiguration(const QString& portNa
}
return
NULL
;
}
#endif
#ifndef __ios__
void
LinkManager
::
_updateConfigurationList
(
void
)
{
if
(
_configUpdateSuspended
||
!
_configurationsLoaded
)
{
...
...
@@ -526,6 +538,7 @@ void LinkManager::_updateConfigurationList(void)
saveLinkConfigurationList
();
}
}
#endif
bool
LinkManager
::
containsLink
(
LinkInterface
*
link
)
{
...
...
src/comm/LinkManager.h
View file @
fe015311
...
...
@@ -35,7 +35,9 @@ This file is part of the PIXHAWK project
#include
"LinkInterface.h"
// Links
#ifndef __ios__
#include
"SerialLink.h"
#endif
#include
"UDPLink.h"
#include
"TCPLink.h"
...
...
@@ -94,8 +96,9 @@ public:
const
QList
<
LinkInterface
*>
getLinks
();
// Returns list of all serial links
#ifndef __ios__
const
QList
<
SerialLink
*>
getSerialLinks
();
#endif
/// Sets the flag to suspend the all new connections
/// @param reason User visible reason to suspend connections
void
setConnectionsSuspended
(
QString
reason
);
...
...
@@ -156,8 +159,9 @@ private:
bool
_connectionsSuspendedMsg
(
void
);
void
_updateConfigurationList
(
void
);
#ifndef __ios__
SerialConfiguration
*
_findSerialConfiguration
(
const
QString
&
portName
);
#endif
QList
<
LinkConfiguration
*>
_linkConfigurations
;
///< List of configured links
/// List of available links kept as QSharedPointers. We use QSharedPointer since
...
...
@@ -171,8 +175,9 @@ private:
bool
_configurationsLoaded
;
///< true: Link configurations have been loaded
bool
_connectionsSuspended
;
///< true: all new connections should not be allowed
QString
_connectionsSuspendedReason
;
///< User visible reason for suspension
#ifndef __ios__
QTimer
_portListTimer
;
#endif
uint32_t
_mavlinkChannelsUsedBitMask
;
SharedLinkInterface
_nullSharedLink
;
...
...
Prev
1
2
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment