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
89ad9836
Commit
89ad9836
authored
Jan 08, 2017
by
Don Gagne
Browse files
Keep first link fallback when NO_SERIAL_LINK
parent
badcdb6b
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/Vehicle/Vehicle.cc
View file @
89ad9836
...
...
@@ -979,9 +979,9 @@ void Vehicle::_sendMessageOnLink(LinkInterface* link, mavlink_message_t message)
void
Vehicle
::
_updatePriorityLink
(
void
)
{
#ifndef NO_SERIAL_LINK
LinkInterface
*
newPriorityLink
=
NULL
;
#ifndef NO_SERIAL_LINK
// Note that this routine specificallty does not clear _priorityLink when there are no links remaining.
// By doing this we hold a reference on the last link as the Vehicle shuts down. Thus preventing shutdown
// ordering NULL pointer crashes where priorityLink() is still called during shutdown sequence.
...
...
@@ -1004,6 +1004,7 @@ void Vehicle::_updatePriorityLink(void)
}
}
}
#endif
if
(
!
newPriorityLink
&&
!
_priorityLink
.
data
()
&&
_links
.
count
())
{
newPriorityLink
=
_links
[
0
];
...
...
@@ -1012,7 +1013,6 @@ void Vehicle::_updatePriorityLink(void)
if
(
newPriorityLink
)
{
_priorityLink
=
qgcApp
()
->
toolbox
()
->
linkManager
()
->
sharedLinkInterfacePointerForLink
(
newPriorityLink
);
}
#endif
}
void
Vehicle
::
setLatitude
(
double
latitude
)
...
...
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