diff --git a/src/uas/UASWaypointManager.cc b/src/uas/UASWaypointManager.cc index 9172d17c3435440af9fb6e117ee01d525f0aa12c..4bdaf6bbeb9ce430dae9619c44bb54a5b8705ae2 100644 --- a/src/uas/UASWaypointManager.cc +++ b/src/uas/UASWaypointManager.cc @@ -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(); }