AP_Frsky_Telem: add define AP_AIRSPEED_ENABLED

This commit is contained in:
Josh Henderson 2021-11-01 04:16:39 -04:00 committed by Andrew Tridgell
parent 9355fcd6b3
commit f219d56e9c
1 changed files with 2 additions and 0 deletions

View File

@ -130,10 +130,12 @@ MAV_RESULT AP_Frsky_MAVliteMsgHandler::handle_command_preflight_calibration_baro
AP::baro().update_calibration();
gcs().send_text(MAV_SEVERITY_INFO, "Barometer calibration complete");
#if AP_AIRSPEED_ENABLED
AP_Airspeed *airspeed = AP_Airspeed::get_singleton();
if (airspeed != nullptr) {
airspeed->calibrate(false);
}
#endif
return MAV_RESULT_ACCEPTED;
}