mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-24 00:33:56 -04:00
AP_Frsky_Telem: get airspeed sensor from singleton not AHRS object
This commit is contained in:
parent
55cb3e8ef0
commit
ee43663c7a
@ -516,7 +516,7 @@ uint32_t AP_Frsky_SPort_Passthrough::calc_velandyaw(void)
|
||||
AP_AHRS &_ahrs = AP::ahrs();
|
||||
WITH_SEMAPHORE(_ahrs.get_semaphore());
|
||||
// horizontal velocity in dm/s (use airspeed if available and enabled - even if not used - otherwise use groundspeed)
|
||||
const AP_Airspeed *aspeed = _ahrs.get_airspeed();
|
||||
const AP_Airspeed *aspeed = AP::airspeed();
|
||||
if (aspeed && aspeed->enabled()) {
|
||||
velandyaw |= prep_number(roundf(aspeed->get_airspeed() * 10), 2, 1)<<VELANDYAW_XYVEL_OFFSET;
|
||||
} else { // otherwise send groundspeed estimate from ahrs
|
||||
|
Loading…
Reference in New Issue
Block a user