SBUS/CPPM: restore normal telemetry on student link lost

Once the setup is done check the "Disable telemetry" box to make sure that there is no interference between the internal module and Multi telemetry.
This commit is contained in:
Pascal Langer 2021-03-04 09:52:54 +01:00
parent 593f3b87f1
commit 4dacac29c6

View File

@ -839,15 +839,20 @@ bool Update_All()
{ // Protocol requests telemetry to be disabled { // Protocol requests telemetry to be disabled
if( protocol == PROTO_FRSKY_RX || protocol == PROTO_AFHDS2A_RX || protocol == PROTO_BAYANG_RX || protocol == PROTO_DSM_RX ) if( protocol == PROTO_FRSKY_RX || protocol == PROTO_AFHDS2A_RX || protocol == PROTO_BAYANG_RX || protocol == PROTO_DSM_RX )
{ // RX protocol { // RX protocol
#ifdef SEND_SBUS_SERIAL if(RX_LQI == 0)
if(telemetry_link & 1) telemetry_link = 0x00; // restore normal telemetry on connection loss
Send_SBUS_USART1(); else
#endif {
#ifdef SEND_CPPM #ifdef SEND_SBUS_SERIAL
if(telemetry_link & 2) if(telemetry_link & 1)
Send_CCPM_USART1(); Send_SBUS_USART1();
#endif #endif
telemetry_link = 0x80; // update done #ifdef SEND_CPPM
if(telemetry_link & 2)
Send_CCPM_USART1();
#endif
telemetry_link = 0x80; // update done
}
} }
} }
else else