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:
parent
9cab607d0a
commit
aca1651488
@ -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
|
if (gcs().vehicle_initialised()) { // send ap status only once vehicle has been initialised
|
||||||
send_uint32(DIY_FIRST_ID+1, calc_ap_status());
|
send_uint32(DIY_FIRST_ID+1, calc_ap_status());
|
||||||
_passthrough.ap_status_timer = AP_HAL::millis();
|
_passthrough.ap_status_timer = AP_HAL::millis();
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
if ((now - _passthrough.batt_timer) >= 1000) {
|
if ((now - _passthrough.batt_timer) >= 1000) {
|
||||||
send_uint32(DIY_FIRST_ID+3, calc_batt(0));
|
send_uint32(DIY_FIRST_ID+3, calc_batt(0));
|
||||||
|
Loading…
Reference in New Issue
Block a user