FlightTaskAuto: update waypoints on every iteration when in offtrack state

This commit is contained in:
Dusan Zivkovic
2020-06-08 17:47:32 +02:00
committed by Daniel Agar
parent 2bc4a5a44b
commit bfc59f6d88
@@ -297,7 +297,7 @@ bool FlightTaskAuto::_evaluateTriplets()
State previous_state = _current_state;
_current_state = _getCurrentState();
if (triplet_update || (_current_state != previous_state)) {
if (triplet_update || (_current_state != previous_state) || _current_state == State::offtrack) {
_updateInternalWaypoints();
_mission_gear = _sub_triplet_setpoint.get().current.landing_gear;
}