M-Link telemetry forwarded to OpenTX

This commit is contained in:
Pascal Langer
2021-02-10 12:31:37 +01:00
parent 7ee72976c4
commit ff829f1f7b
5 changed files with 58 additions and 6 deletions

View File

@@ -203,6 +203,17 @@ static void multi_send_status()
}
}
#ifdef MLINK_FW_TELEMETRY
void MLINK_frame()
{
multi_send_header(MULTI_TELEMETRY_MLINK, 10);
Serial_write(TX_RSSI); // RSSI
Serial_write(TX_LQI); // LQI
for (uint8_t i = 0; i < 8; i++) // followed by 8 bytes of telemetry data
Serial_write(packet_in[i]);
}
#endif
#ifdef DSM_TELEMETRY
void DSM_frame()
{
@@ -874,6 +885,14 @@ void TelemetryUpdate()
#endif // SPORT_TELEMETRY
#ifdef MULTI_TELEMETRY
#if defined MLINK_FW_TELEMETRY
if(telemetry_link && protocol == PROTO_MLINK)
{
MLINK_frame();
telemetry_link=0;
return;
}
#endif
#if defined DSM_TELEMETRY
if(telemetry_link && protocol == PROTO_DSM)
{ // DSM