Browse Source

AP_AHRS: fixed functions that need to be virtual

functions overridden in a child class need to be marked virtual, or
you get the parent class function
master
Andrew Tridgell 12 years ago
parent
commit
896fd52aa1
  1. 8
      libraries/AP_AHRS/AP_AHRS.h

8
libraries/AP_AHRS/AP_AHRS.h

@ -119,7 +119,7 @@ public: @@ -119,7 +119,7 @@ public:
// dead-reckoning. Return true if a position is available,
// otherwise false. This only updates the lat and lng fields
// of the Location
bool get_position(struct Location *loc) {
virtual bool get_position(struct Location *loc) {
if (!_gps || _gps->status() <= GPS::NO_FIX) {
return false;
}
@ -129,16 +129,16 @@ public: @@ -129,16 +129,16 @@ public:
}
// return a wind estimation vector, in m/s
Vector3f wind_estimate(void) {
virtual Vector3f wind_estimate(void) {
return Vector3f(0,0,0);
}
// return an airspeed estimate if available. return true
// if we have an estimate
bool airspeed_estimate(float *airspeed_ret);
virtual bool airspeed_estimate(float *airspeed_ret);
// return true if we will use compass for yaw
bool use_compass(void) { return _compass && _compass->use_for_yaw(); }
virtual bool use_compass(void) { return _compass && _compass->use_for_yaw(); }
// return true if yaw has been initialised
bool yaw_initialised(void) {

Loading…
Cancel
Save