AP_TECS: avoid a valgrind bug

This commit is contained in:
Andrew Tridgell 2014-07-07 13:36:30 +10:00
parent 8e5915ef7d
commit e24febec1b

View File

@ -243,7 +243,7 @@ void AP_TECS::_update_speed(void)
// airspeed is not being used and set speed rate to zero
if (!_ahrs.airspeed_sensor_enabled() || !_ahrs.airspeed_estimate(&_EAS)) {
// If no airspeed available use average of min and max
_EAS = 0.5f * (aparm.airspeed_min + aparm.airspeed_max);
_EAS = 0.5f * (aparm.airspeed_min.get() + (float)aparm.airspeed_max.get());
}
// Implement a second order complementary filter to obtain a