- waypoints.erase(waypoints.begin());
- metrics_stale = true;
- signal_waypoint_reached.emit(&wp);
- signal_event.emit(Message("waypoint-reached", &wp));
+ if(waypoints.size()==1)
+ {
+ if(arrival==RESERVED_TO_END)
+ arrival = ADVANCED_TO_END;
+ }
+ else
+ {
+ waypoints.erase(waypoints.begin());
+ metrics_stale = true;
+ signal_waypoint_reached.emit(&wp);
+ signal_event.emit(Message("waypoint-reached", &wp));
+ }