APMrover2: move airspeed update to library

This commit is contained in:
DOMINATOR\Eugene 2018-11-16 18:15:37 +02:00 committed by Andrew Tridgell
parent 4bec75dd44
commit cdbffb4ecc

View File

@ -246,19 +246,7 @@ void Rover::init_proximity(void)
*/
void Rover::read_airspeed(void)
{
if (g2.airspeed.enabled()) {
g2.airspeed.read();
if (should_log(MASK_LOG_IMU)) {
DataFlash.Log_Write_Airspeed(g2.airspeed);
}
// supply a new temperature to the barometer from the digital
// airspeed sensor if we can
float temperature;
if (g2.airspeed.get_temperature(temperature)) {
barometer.set_external_temperature(temperature);
}
}
g2.airspeed.update(should_log(MASK_LOG_IMU));
}
// update error mask of sensors and subsystems. The mask