mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
FlightTaskAuto: always update type
This commit is contained in:
parent
7f68417d19
commit
b20bd076a0
@ -90,9 +90,11 @@ bool FlightTaskAuto::_evaluateTriplets()
|
||||
/* Best we can do is to just set all waypoints to current state */
|
||||
_prev_prev_wp = _prev_wp = _target = _next_wp = _position;
|
||||
_yaw_wp = _yaw;
|
||||
_type = WaypointType::position;
|
||||
return false;
|
||||
}
|
||||
|
||||
_type = (WaypointType)_sub_triplet_setpoint->get().current.type;
|
||||
/* Always update cruise speed since that can change without waypoint changes */
|
||||
_mc_cruise_speed = _sub_triplet_setpoint->get().current.cruising_speed;
|
||||
|
||||
@ -141,8 +143,6 @@ bool FlightTaskAuto::_evaluateTriplets()
|
||||
|
||||
}
|
||||
|
||||
_type = (WaypointType)_sub_triplet_setpoint->get().current.type;
|
||||
|
||||
_prev_prev_wp = _prev_wp; // previous -1 is set to previous
|
||||
|
||||
if (_isFinite(_sub_triplet_setpoint->get().previous) && _sub_triplet_setpoint->get().previous.valid) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user