diff --git a/src/lib/FlightTasks/tasks/Auto/FlightTaskAuto.cpp b/src/lib/FlightTasks/tasks/Auto/FlightTaskAuto.cpp index bc1a3048fe..054502e131 100644 --- a/src/lib/FlightTasks/tasks/Auto/FlightTaskAuto.cpp +++ b/src/lib/FlightTasks/tasks/Auto/FlightTaskAuto.cpp @@ -136,7 +136,7 @@ bool FlightTaskAuto::_evaluateTriplets() } else { tmp_target(0) = _lock_position_xy(0); tmp_target(1) = _lock_position_xy(1); - _lock_position_xy *= NAN; + _lock_position_xy.setAll(NAN); } } else { diff --git a/src/lib/FlightTasks/tasks/ManualPositionSmooth/FlightTaskManualPositionSmooth.cpp b/src/lib/FlightTasks/tasks/ManualPositionSmooth/FlightTaskManualPositionSmooth.cpp index 117ab43f14..9f807a1cf9 100644 --- a/src/lib/FlightTasks/tasks/ManualPositionSmooth/FlightTaskManualPositionSmooth.cpp +++ b/src/lib/FlightTasks/tasks/ManualPositionSmooth/FlightTaskManualPositionSmooth.cpp @@ -57,7 +57,7 @@ void FlightTaskManualPositionSmooth::_updateSetpoints() _velocity_setpoint(0) = vel_sp_xy(0); _velocity_setpoint(1) = vel_sp_xy(1); - /* Check for altitude lock.*/ + /* Check for xy position lock.*/ _updateXYlock(); /* Smooth velocity in z.*/ diff --git a/src/lib/FlightTasks/tasks/Offboard/FlightTaskOffboard.cpp b/src/lib/FlightTasks/tasks/Offboard/FlightTaskOffboard.cpp index 2952da8931..95732e255b 100644 --- a/src/lib/FlightTasks/tasks/Offboard/FlightTaskOffboard.cpp +++ b/src/lib/FlightTasks/tasks/Offboard/FlightTaskOffboard.cpp @@ -68,8 +68,8 @@ bool FlightTaskOffboard::activate() { bool ret = FlightTask::activate(); _position_setpoint = _position; - _velocity_setpoint *= 0.0f; - _position_lock *= NAN; + _velocity_setpoint.setZero(); + _position_lock.setAll(NAN); return ret; } @@ -117,7 +117,7 @@ bool FlightTaskOffboard::update() return true; } else { - _position_lock *= NAN; + _position_lock.setAll(NAN); } // Takeoff @@ -135,7 +135,7 @@ bool FlightTaskOffboard::update() return true; } else { - _position_lock *= NAN; + _position_lock.setAll(NAN); } // Land @@ -155,7 +155,7 @@ bool FlightTaskOffboard::update() return true; } else { - _position_lock *= NAN; + _position_lock.setAll(NAN); } // IDLE