AP_Airspeed: fixed saving of airspeed ratios

This commit is contained in:
Andrew Tridgell 2013-08-31 10:26:27 +10:00
parent 1c7bdc40ec
commit 1328316bfc
1 changed files with 1 additions and 1 deletions

View File

@ -132,7 +132,7 @@ void AP_Airspeed::update_calibration(const Vector3f &vground)
ratio = constrain_float(ratio, 0.5f, 1.0f);
_ratio.set(1/sq(ratio));
if (_counter > 60) {
if (_last_saved_ratio < 1.05f*_ratio ||
if (_last_saved_ratio > 1.05f*_ratio ||
_last_saved_ratio < 0.95f*_ratio) {
_ratio.save();
_last_saved_ratio = _ratio;