mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-08-02 04:58:15 +08:00
FlightTasks: refactor NAN initializations, spacing
This commit is contained in:
@@ -65,7 +65,7 @@ bool FlightTaskAutoMapper::update()
|
||||
// vehicle exits idle.
|
||||
|
||||
if (_type_previous == WaypointType::idle) {
|
||||
_thrust_setpoint = Vector3f(NAN, NAN, NAN);
|
||||
_thrust_setpoint.setNaN();
|
||||
}
|
||||
|
||||
// during mission and reposition, raise the landing gears but only
|
||||
@@ -112,8 +112,8 @@ void FlightTaskAutoMapper::_reset()
|
||||
void FlightTaskAutoMapper::_generateIdleSetpoints()
|
||||
{
|
||||
// Send zero thrust setpoint
|
||||
_position_setpoint = Vector3f(NAN, NAN, NAN); // Don't require any position/velocity setpoints
|
||||
_velocity_setpoint = Vector3f(NAN, NAN, NAN);
|
||||
_position_setpoint.setNaN(); // Don't require any position/velocity setpoints
|
||||
_velocity_setpoint.setNaN();
|
||||
_thrust_setpoint.zero();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user