FrSky S.PORT upstream (#3426)

FrSky S.PORT upstream
This commit is contained in:
Bertrand Songis
2016-04-29 18:44:25 +02:00
parent 56f59196ea
commit bd87028fd5
8 changed files with 303 additions and 45 deletions
@@ -144,6 +144,16 @@ extern "C" void TELEMETRY_USART_IRQHandler(void)
}
else {
telemetryFifo.push(data);
#if defined(LUA)
if (telemetryProtocol == PROTOCOL_FRSKY_SPORT) {
static uint8_t prevdata;
if (prevdata == 0x7E && data == luaOutputTelemetryPacket.physicalId) {
sportSendLuaPacket(luaOutputTelemetryPacket);
luaOutputTelemetryPacket.physicalId = 0x7E;
}
prevdata = data;
}
#endif
}
status = TELEMETRY_USART->SR;
}