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