Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
cafc8cee
Unverified
Commit
cafc8cee
authored
Dec 09, 2018
by
Gus Grubba
Committed by
GitHub
Dec 09, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #7077 from mavlink/skipSerial
Skip serial related code if serial links are disabled.
parents
2c6f5625
5be07f48
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
18 additions
and
4 deletions
+18
-4
qgroundcontrol.pro
qgroundcontrol.pro
+4
-4
QGCApplication.cc
src/QGCApplication.cc
+2
-0
LinkManager.cc
src/comm/LinkManager.cc
+6
-0
LinkManager.h
src/comm/LinkManager.h
+2
-0
main.cc
src/main.cc
+4
-0
No files found.
qgroundcontrol.pro
View file @
cafc8cee
...
...
@@ -922,13 +922,13 @@ HEADERS+= \
src
/
Vehicle
/
Vehicle
.
h
\
src
/
VehicleSetup
/
VehicleComponent
.
h
\
!
MobileBuild
{
!
MobileBuild
{
!
NoSerialBuild
{
HEADERS
+=
\
src
/
VehicleSetup
/
Bootloader
.
h
\
src
/
VehicleSetup
/
FirmwareImage
.
h
\
src
/
VehicleSetup
/
FirmwareUpgradeController
.
h
\
src
/
VehicleSetup
/
PX4FirmwareUpgradeThread
.
h
\
}
}
}
SOURCES
+=
\
src
/
AutoPilotPlugins
/
AutoPilotPlugin
.
cc
\
...
...
@@ -948,13 +948,13 @@ SOURCES += \
src
/
Vehicle
/
Vehicle
.
cc
\
src
/
VehicleSetup
/
VehicleComponent
.
cc
\
!
MobileBuild
{
!
MobileBuild
{
!
NoSerialBuild
{
SOURCES
+=
\
src
/
VehicleSetup
/
Bootloader
.
cc
\
src
/
VehicleSetup
/
FirmwareImage
.
cc
\
src
/
VehicleSetup
/
FirmwareUpgradeController
.
cc
\
src
/
VehicleSetup
/
PX4FirmwareUpgradeThread
.
cc
\
}
}
}
#
ArduPilot
FirmwarePlugin
...
...
src/QGCApplication.cc
View file @
cafc8cee
...
...
@@ -440,7 +440,9 @@ void QGCApplication::_initCommon(void)
#ifndef __mobile__
qmlRegisterType
<
ViewWidgetController
>
(
kQGCControllers
,
1
,
0
,
"ViewWidgetController"
);
qmlRegisterType
<
CustomCommandWidgetController
>
(
kQGCControllers
,
1
,
0
,
"CustomCommandWidgetController"
);
#ifndef NO_SERIAL_LINK
qmlRegisterType
<
FirmwareUpgradeController
>
(
kQGCControllers
,
1
,
0
,
"FirmwareUpgradeController"
);
#endif
qmlRegisterType
<
GeoTagController
>
(
kQGCControllers
,
1
,
0
,
"GeoTagController"
);
qmlRegisterType
<
MavlinkConsoleController
>
(
kQGCControllers
,
1
,
0
,
"MavlinkConsoleController"
);
#endif
...
...
src/comm/LinkManager.cc
View file @
cafc8cee
...
...
@@ -52,8 +52,10 @@ LinkManager::LinkManager(QGCApplication* app, QGCToolbox* toolbox)
,
_autoConnectSettings
(
NULL
)
,
_mavlinkProtocol
(
NULL
)
#ifndef __mobile__
#ifndef NO_SERIAL_LINK
,
_nmeaPort
(
NULL
)
#endif
#endif
{
qmlRegisterUncreatableType
<
LinkManager
>
(
"QGroundControl"
,
1
,
0
,
"LinkManager"
,
"Reference only"
);
qmlRegisterUncreatableType
<
LinkConfiguration
>
(
"QGroundControl"
,
1
,
0
,
"LinkConfiguration"
,
"Reference only"
);
...
...
@@ -69,8 +71,10 @@ LinkManager::LinkManager(QGCApplication* app, QGCToolbox* toolbox)
LinkManager
::~
LinkManager
()
{
#ifndef __mobile__
#ifndef NO_SERIAL_LINK
delete
_nmeaPort
;
#endif
#endif
}
void
LinkManager
::
setToolbox
(
QGCToolbox
*
toolbox
)
...
...
@@ -513,6 +517,7 @@ void LinkManager::_updateAutoConnectLinks(void)
QGCSerialPortInfo
::
BoardType_t
boardType
;
QString
boardName
;
#ifndef NO_SERIAL_LINK
#ifndef __mobile__
if
(
portInfo
.
systemLocation
().
trimmed
()
==
_autoConnectSettings
->
autoConnectNmeaPort
()
->
cookedValueString
())
{
if
(
portInfo
.
systemLocation
().
trimmed
()
!=
_nmeaDeviceName
)
{
...
...
@@ -538,6 +543,7 @@ void LinkManager::_updateAutoConnectLinks(void)
qCDebug
(
LinkManagerLog
)
<<
"Configuring nmea baudrate"
<<
_nmeaBaud
;
}
}
else
#endif
#endif
if
(
portInfo
.
getBoardInfo
(
boardType
,
boardName
))
{
if
(
portInfo
.
isBootloader
())
{
...
...
src/comm/LinkManager.h
View file @
cafc8cee
...
...
@@ -237,9 +237,11 @@ private:
// NMEA GPS device for GCS position
#ifndef __mobile__
#ifndef NO_SERIAL_LINK
QString
_nmeaDeviceName
;
QSerialPort
*
_nmeaPort
;
uint32_t
_nmeaBaud
;
#endif
#endif
};
src/main.cc
View file @
cafc8cee
...
...
@@ -56,8 +56,10 @@
#endif
#ifndef __mobile__
#ifndef NO_SERIAL_LINK
Q_DECLARE_METATYPE
(
QGCSerialPortInfo
)
#endif
#endif
#ifdef Q_OS_WIN
...
...
@@ -159,7 +161,9 @@ int main(int argc, char *argv[])
#endif
qRegisterMetaType
<
QAbstractSocket
::
SocketError
>
();
#ifndef __mobile__
#ifndef NO_SERIAL_LINK
qRegisterMetaType
<
QGCSerialPortInfo
>
();
#endif
#endif
// We statically link our own QtLocation plugin
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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