Skip to content
Snippets Groups Projects
Commit d11c6af9 authored by Daniel Agar's avatar Daniel Agar Committed by Lorenz Meier
Browse files

FlightTaskAuto don't pass position setpoint by value

parent 12dd9b47
No related branches found
No related tags found
No related merge requests found
......@@ -300,7 +300,7 @@ void FlightTaskAuto::_updateAvoidanceWaypoints()
_desired_waypoint.waypoints[vehicle_trajectory_waypoint_s::POINT_2].point_valid = true;
}
bool FlightTaskAuto::_isFinite(const position_setpoint_s sp)
bool FlightTaskAuto::_isFinite(const position_setpoint_s &sp)
{
return (PX4_ISFINITE(sp.lat) && PX4_ISFINITE(sp.lon) && PX4_ISFINITE(sp.alt));
}
......
......@@ -123,7 +123,7 @@ private:
hrt_abstime _time_stamp_reference = 0; /**< time stamp when last reference update occured. */
bool _evaluateTriplets(); /**< Checks and sets triplets. */
bool _isFinite(const position_setpoint_s sp); /**< Checks if all waypoint triplets are finite. */
bool _isFinite(const position_setpoint_s &sp); /**< Checks if all waypoint triplets are finite. */
bool _evaluateGlobalReference(); /**< Check is global reference is available. */
float _getVelocityFromAngle(const float angle); /**< Computes the speed at target depending on angle. */
State _getCurrentState(); /**< Computes the current vehicle state based on the vehicle position and navigator triplets. */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment