AP_Proximity: add override keyword where required

This commit is contained in:
Peter Barker 2018-11-07 22:01:30 +11:00 committed by Andrew Tridgell
parent 344d6b938c
commit e0ab431ebd
7 changed files with 23 additions and 23 deletions

View File

@ -16,11 +16,11 @@ public:
static bool detect(AP_SerialManager &serial_manager);
// update state
void update(void);
void update(void) override;
// get maximum and minimum distances (in meters) of sensor
float distance_max() const;
float distance_min() const;
float distance_max() const override;
float distance_min() const override;
private:

View File

@ -11,14 +11,14 @@ public:
AP_Proximity_MAV(AP_Proximity &_frontend, AP_Proximity::Proximity_State &_state);
// update state
void update(void);
void update(void) override;
// get maximum and minimum distances (in meters) of sensor
float distance_max() const { return _distance_max; }
float distance_min() const { return _distance_min; };
float distance_max() const override { return _distance_max; }
float distance_min() const override { return _distance_min; };
// get distance upwards in meters. returns true on success
bool get_upward_distance(float &distance) const;
bool get_upward_distance(float &distance) const override;
// handle mavlink DISTANCE_SENSOR messages
void handle_msg(mavlink_message_t *msg) override;

View File

@ -45,11 +45,11 @@ public:
static bool detect(AP_SerialManager &serial_manager);
// update state
void update(void);
void update(void) override;
// get maximum and minimum distances (in meters) of sensor
float distance_max() const;
float distance_min() const;
float distance_max() const override;
float distance_min() const override;
private:
enum rp_state {

View File

@ -13,14 +13,14 @@ public:
AP_Proximity_RangeFinder(AP_Proximity &_frontend, AP_Proximity::Proximity_State &_state);
// update state
void update(void);
void update(void) override;
// get maximum and minimum distances (in meters) of sensor
float distance_max() const { return _distance_max; }
float distance_min() const { return _distance_min; }
float distance_max() const override { return _distance_max; }
float distance_min() const override { return _distance_min; }
// get distance upwards in meters. returns true on success
bool get_upward_distance(float &distance) const;
bool get_upward_distance(float &distance) const override;
private:

View File

@ -17,11 +17,11 @@ public:
void update(void) override;
// get maximum and minimum distances (in meters) of sensor
float distance_max() const;
float distance_min() const;
float distance_max() const override;
float distance_min() const override;
// get distance upwards in meters. returns true on success
bool get_upward_distance(float &distance) const;
bool get_upward_distance(float &distance) const override;
private:
SITL::SITL *sitl;

View File

@ -16,11 +16,11 @@ public:
static bool detect(AP_SerialManager &serial_manager);
// update state
void update(void);
void update(void) override;
// get maximum and minimum distances (in meters) of sensor
float distance_max() const;
float distance_min() const;
float distance_max() const override;
float distance_min() const override;
private:

View File

@ -15,11 +15,11 @@ public:
static bool detect(AP_SerialManager &serial_manager);
// update state
void update(void);
void update(void) override;
// get maximum and minimum distances (in meters) of sensor
float distance_max() const;
float distance_min() const;
float distance_max() const override;
float distance_min() const override;
private: