|
|
|
@ -516,7 +516,7 @@ uint32_t AP_Frsky_SPort_Passthrough::calc_velandyaw(void)
@@ -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
|
|
|
|
|