Browse Source

AP_AHRS: make airspeed_estimate const

master
Andrew Tridgell 11 years ago
parent
commit
410d356979
  1. 2
      libraries/AP_AHRS/AP_AHRS.cpp
  2. 4
      libraries/AP_AHRS/AP_AHRS.h

2
libraries/AP_AHRS/AP_AHRS.cpp

@ -117,7 +117,7 @@ const AP_Param::GroupInfo AP_AHRS::var_info[] PROGMEM = { @@ -117,7 +117,7 @@ const AP_Param::GroupInfo AP_AHRS::var_info[] PROGMEM = {
};
// return airspeed estimate if available
bool AP_AHRS::airspeed_estimate(float *airspeed_ret)
bool AP_AHRS::airspeed_estimate(float *airspeed_ret) const
{
if (_airspeed && _airspeed->use()) {
*airspeed_ret = _airspeed->get_airspeed();

4
libraries/AP_AHRS/AP_AHRS.h

@ -173,11 +173,11 @@ public: @@ -173,11 +173,11 @@ public:
// return an airspeed estimate if available. return true
// if we have an estimate
virtual bool airspeed_estimate(float *airspeed_ret);
virtual bool airspeed_estimate(float *airspeed_ret) const;
// return a true airspeed estimate (navigation airspeed) if
// available. return true if we have an estimate
bool airspeed_estimate_true(float *airspeed_ret) {
bool airspeed_estimate_true(float *airspeed_ret) const {
if (!airspeed_estimate(airspeed_ret)) {
return false;
}

Loading…
Cancel
Save