mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-22 08:38:36 -04:00
Plane: provide a temperature to baro from the airspeed sensor
This commit is contained in:
parent
d404cc6542
commit
ba312856ea
@ -37,12 +37,22 @@ static void read_airspeed(void)
|
||||
Log_Write_Airspeed();
|
||||
}
|
||||
calc_airspeed_errors();
|
||||
|
||||
// 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void zero_airspeed(void)
|
||||
{
|
||||
airspeed.calibrate();
|
||||
read_airspeed();
|
||||
// update barometric calibration with new airspeed supplied temperature
|
||||
barometer.update_calibration();
|
||||
gcs_send_text_P(SEVERITY_LOW,PSTR("zero airspeed calibrated"));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user