AP_Baro: notify GCS of calibration

This commit is contained in:
Peter Barker 2015-10-07 09:08:15 +11:00 committed by Andrew Tridgell
parent 5f9b1c5f4e
commit 1b13315092
1 changed files with 2 additions and 2 deletions

View File

@ -164,10 +164,10 @@ void AP_Baro::update_calibration()
{
for (uint8_t i=0; i<_num_sensors; i++) {
if (healthy(i)) {
sensors[i].ground_pressure.set(get_pressure(i));
sensors[i].ground_pressure.set_and_notify(get_pressure(i));
}
float last_temperature = sensors[i].ground_temperature;
sensors[i].ground_temperature.set(get_calibration_temperature(i));
sensors[i].ground_temperature.set_and_notify(get_calibration_temperature(i));
if (fabsf(last_temperature - sensors[i].ground_temperature) > 3) {
// reset _EAS2TAS to force it to recalculate. This happens
// when a digital airspeed sensor comes online