Commit 2b5b2d2d authored by Don Gagne's avatar Don Gagne Committed by GitHub

Merge pull request #4408 from DonLakeFlyer/iOSPriorityLink

Allow fallback to first link even with no serial
parents f9786913 8333bc68
......@@ -979,9 +979,9 @@ void Vehicle::_sendMessageOnLink(LinkInterface* link, mavlink_message_t message)
void Vehicle::_updatePriorityLink(void)
LinkInterface* newPriorityLink = NULL;
// 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)
if (!newPriorityLink && ! && _links.count()) {
newPriorityLink = _links[0];
......@@ -1012,7 +1013,6 @@ void Vehicle::_updatePriorityLink(void)
if (newPriorityLink) {
_priorityLink = qgcApp()->toolbox()->linkManager()->sharedLinkInterfacePointerForLink(newPriorityLink);
void Vehicle::setLatitude(double latitude)
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