AP_RCTelemetry: get airspeed sensor from singleton not AHRS object
This commit is contained in:
parent
47f0ab7f90
commit
7bf7402561
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user