APMrover2: move airspeed update to library
This commit is contained in:
parent
4bec75dd44
commit
cdbffb4ecc
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user