mirror of https://github.com/ArduPilot/ardupilot
ArduPlane: move airspeed update to library
This commit is contained in:
parent
cdbffb4ecc
commit
802ae94e2c
|
@ -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…
Reference in New Issue