mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-23 14:47:44 +08:00
FlightTaskAuto don't pass position setpoint by value
This commit is contained in:
committed by
Lorenz Meier
parent
12dd9b475e
commit
d11c6af923
@@ -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. */
|
||||
|
||||
Reference in New Issue
Block a user