Browse Source

ArduPlane: move airspeed update to library

master
DOMINATOR\Eugene 6 years ago committed by Andrew Tridgell
parent
commit
802ae94e2c
  1. 14
      ArduPlane/sensors.cpp

14
ArduPlane/sensors.cpp

@ -65,19 +65,7 @@ void Plane::accel_cal_update() { @@ -65,19 +65,7 @@ void Plane::accel_cal_update() {
*/
void Plane::read_airspeed(void)
{
if (airspeed.enabled()) {
airspeed.read();
if (should_log(MASK_LOG_IMU)) {
DataFlash.Log_Write_Airspeed(airspeed);
}
// supply a new temperature to the barometer from the digital
// airspeed sensor if we can
float temperature;
if (airspeed.get_temperature(temperature)) {
barometer.set_external_temperature(temperature);
}
}
airspeed.update(should_log(MASK_LOG_IMU));
// we calculate airspeed errors (and thus target_airspeed_cm) even
// when airspeed is disabled as TECS may be using synthetic

Loading…
Cancel
Save