AP_Frsky_Telem: fix ap_status_timer handling

method should return only after ap_status_timer has elapsed and vehicle is initialized
otherwise we waste a chance to send a packet
This commit is contained in:
yaapu 2019-03-21 15:54:39 +01:00 committed by Peter Barker
parent 9cab607d0a
commit aca1651488
1 changed files with 1 additions and 1 deletions

View File

@ -118,8 +118,8 @@ void AP_Frsky_Telem::send_SPort_Passthrough(void)
if (gcs().vehicle_initialised()) { // send ap status only once vehicle has been initialised
send_uint32(DIY_FIRST_ID+1, calc_ap_status());
_passthrough.ap_status_timer = AP_HAL::millis();
return;
}
return;
}
if ((now - _passthrough.batt_timer) >= 1000) {
send_uint32(DIY_FIRST_ID+3, calc_batt(0));