FlightTasks: refactor NAN initializations, spacing

This commit is contained in:
Matthias Grob
2019-12-07 15:13:27 +01:00
parent ab4473319a
commit 1a5b06d0cf
7 changed files with 32 additions and 39 deletions

View File

@@ -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();
}