mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-28 10:46:33 +08:00
FlightTaskAuto: update waypoints on every iteration when in offtrack state
This commit is contained in:
committed by
Daniel Agar
parent
2bc4a5a44b
commit
bfc59f6d88
@@ -297,7 +297,7 @@ bool FlightTaskAuto::_evaluateTriplets()
|
|||||||
State previous_state = _current_state;
|
State previous_state = _current_state;
|
||||||
_current_state = _getCurrentState();
|
_current_state = _getCurrentState();
|
||||||
|
|
||||||
if (triplet_update || (_current_state != previous_state)) {
|
if (triplet_update || (_current_state != previous_state) || _current_state == State::offtrack) {
|
||||||
_updateInternalWaypoints();
|
_updateInternalWaypoints();
|
||||||
_mission_gear = _sub_triplet_setpoint.get().current.landing_gear;
|
_mission_gear = _sub_triplet_setpoint.get().current.landing_gear;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user