AP_RCTelemetry: get airspeed sensor from singleton not AHRS object

This commit is contained in:
Peter Barker 2020-07-27 13:28:20 +10:00 committed by Tom Pittenger
parent 47f0ab7f90
commit 7bf7402561

View File

@ -435,7 +435,7 @@ void AP_Spektrum_Telem::calc_airspeed()
AP_AHRS &ahrs = AP::ahrs();
WITH_SEMAPHORE(ahrs.get_semaphore());
const AP_Airspeed *airspeed = ahrs.get_airspeed();
const AP_Airspeed *airspeed = AP::airspeed();
float speed = 0.0f;
if (airspeed && airspeed->healthy()) {
speed = roundf(airspeed->get_airspeed() * 3.6);
@ -619,4 +619,4 @@ namespace AP {
}
};
#endif
#endif