AP_Avoidance: Add missing const in member functions

Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
This commit is contained in:
Patrick José Pereira 2021-02-01 13:26:26 -03:00 committed by Andrew Tridgell
parent 7e01935893
commit f6937babfa
2 changed files with 2 additions and 2 deletions

View File

@ -609,7 +609,7 @@ void AP_Avoidance::handle_msg(const mavlink_message_t &msg)
}
// get unit vector away from the nearest obstacle
bool AP_Avoidance::get_vector_perpendicular(const AP_Avoidance::Obstacle *obstacle, Vector3f &vec_neu)
bool AP_Avoidance::get_vector_perpendicular(const AP_Avoidance::Obstacle *obstacle, Vector3f &vec_neu) const
{
if (obstacle == nullptr) {
// why where we called?!

View File

@ -140,7 +140,7 @@ protected:
bool get_destination_perpendicular(const AP_Avoidance::Obstacle *obstacle, Vector3f &newdest_neu, const float wp_speed_xy, const float wp_speed_z, const uint8_t _minimum_avoid_height);
// get unit vector away from the nearest obstacle
bool get_vector_perpendicular(const AP_Avoidance::Obstacle *obstacle, Vector3f &vec_neu);
bool get_vector_perpendicular(const AP_Avoidance::Obstacle *obstacle, Vector3f &vec_neu) const;
// helper functions to calculate destination to get us away from obstacle
// Note: v1 is NED