Commit 428d6f1f authored by pixhawk's avatar pixhawk

Fixed a bug where it was possible to "write" a waypoint list without any...

Fixed a bug where it was possible to "write" a waypoint list without any "current" waypoint. Now the last waypoint is set as "current" in this case.
parent 999c2767
......@@ -737,8 +737,13 @@ void UASWaypointManager::writeWaypoints()
if (cur_s->getCurrent() && noCurrent)
noCurrent = false;
if (i == (current_count - 1) && noCurrent == true) //not a single waypoint was set as "current"
cur_d->current = true; // set the last waypoint as current. Or should it better be the first waypoint ?
}
//send the waypoint count to UAS (this starts the send transaction)
sendWaypointCount();
}
......
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