mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-06 17:18:54 +08:00
multicopter position controller use const references
This commit is contained in:
@@ -57,7 +57,7 @@ const vehicle_trajectory_waypoint_s FlightTasks::getAvoidanceWaypoint()
|
||||
}
|
||||
}
|
||||
|
||||
const vehicle_trajectory_waypoint_s FlightTasks::getEmptyAvoidanceWaypoint()
|
||||
const vehicle_trajectory_waypoint_s &FlightTasks::getEmptyAvoidanceWaypoint()
|
||||
{
|
||||
return FlightTask::empty_trajectory_waypoint;
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@ public:
|
||||
* Get empty avoidance desired waypoints
|
||||
* @return empty triplets in the mc_pos_control
|
||||
*/
|
||||
const vehicle_trajectory_waypoint_s getEmptyAvoidanceWaypoint();
|
||||
const vehicle_trajectory_waypoint_s &getEmptyAvoidanceWaypoint();
|
||||
|
||||
/**
|
||||
* Switch to the next task in the available list (for testing)
|
||||
|
||||
@@ -81,7 +81,7 @@ public:
|
||||
* To be called to adopt parameters from an arrived vehicle command
|
||||
* @return true if accepted, false if declined
|
||||
*/
|
||||
virtual bool applyCommandParameters(const vehicle_command_s &command) { return true; };
|
||||
virtual bool applyCommandParameters(const vehicle_command_s &command) { return true; }
|
||||
|
||||
/**
|
||||
* Call before activate() or update()
|
||||
@@ -106,13 +106,13 @@ public:
|
||||
* The constraints can vary with task.
|
||||
* @return constraints
|
||||
*/
|
||||
const vehicle_constraints_s getConstraints() {return _constraints;};
|
||||
const vehicle_constraints_s &getConstraints() { return _constraints; }
|
||||
|
||||
/**
|
||||
* Get avoidance desired waypoint
|
||||
* @return desired waypoints
|
||||
*/
|
||||
const vehicle_trajectory_waypoint_s getAvoidanceWaypoint() {return _desired_waypoint;};
|
||||
const vehicle_trajectory_waypoint_s &getAvoidanceWaypoint() { return _desired_waypoint; }
|
||||
|
||||
/**
|
||||
* Empty setpoint.
|
||||
|
||||
Reference in New Issue
Block a user