FlightTaskAuto don't pass position setpoint by value

This commit is contained in:
Daniel Agar
2018-08-30 11:51:01 -04:00
committed by Lorenz Meier
parent 12dd9b475e
commit d11c6af923
2 changed files with 2 additions and 2 deletions
@@ -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. */