Merge with latest 2.3
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
*/
|
||||
|
||||
#include "opentx.h"
|
||||
#include "multi.h"
|
||||
|
||||
uint8_t telemetryStreaming = 0;
|
||||
uint8_t telemetryRxBuffer[TELEMETRY_RX_PACKET_SIZE]; // Receive buffer. 9 bytes (full packet), worst case 18 bytes with byte-stuffing (+1)
|
||||
@@ -45,15 +46,15 @@ void processTelemetryData(uint8_t data)
|
||||
|
||||
#if defined(MULTIMODULE)
|
||||
if (telemetryProtocol == PROTOCOL_TELEMETRY_SPEKTRUM) {
|
||||
processSpektrumTelemetryData(data);
|
||||
processSpektrumTelemetryData(EXTERNAL_MODULE, data, telemetryRxBuffer, telemetryRxBufferCount);
|
||||
return;
|
||||
}
|
||||
if (telemetryProtocol == PROTOCOL_TELEMETRY_FLYSKY_IBUS) {
|
||||
processFlySkyTelemetryData(data);
|
||||
processFlySkyTelemetryData(data, telemetryRxBuffer, telemetryRxBufferCount);
|
||||
return;
|
||||
}
|
||||
if (telemetryProtocol == PROTOCOL_TELEMETRY_MULTIMODULE) {
|
||||
processMultiTelemetryData(data);
|
||||
processMultiTelemetryData(data, EXTERNAL_MODULE);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
@@ -91,22 +92,29 @@ void telemetryWakeup()
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(INTMODULE_USART) || defined(EXTMODULE_USART)
|
||||
#if defined(INTERNAL_MODULE_PXX2) || defined(EXTMODULE_USART)
|
||||
uint8_t frame[PXX2_FRAME_MAXLENGTH];
|
||||
|
||||
#if defined(INTMODULE_USART)
|
||||
while (intmoduleFifo.getFrame(frame)) {
|
||||
processPXX2Frame(INTERNAL_MODULE, frame);
|
||||
}
|
||||
#if defined(INTERNAL_MODULE_PXX2)
|
||||
while (intmoduleFifo.getFrame(frame)) {
|
||||
processPXX2Frame(INTERNAL_MODULE, frame);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(EXTMODULE_USART)
|
||||
while (extmoduleFifo.getFrame(frame)) {
|
||||
processPXX2Frame(EXTERNAL_MODULE, frame);
|
||||
}
|
||||
while (extmoduleFifo.getFrame(frame)) {
|
||||
processPXX2Frame(EXTERNAL_MODULE, frame);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(INTERNAL_MODULE_MULTI)
|
||||
while(!intmoduleFifo.isEmpty()) {
|
||||
uint8_t b=0;
|
||||
intmoduleFifo.pop(b);
|
||||
processMultiTelemetryData(b, INTERNAL_MODULE);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(STM32)
|
||||
uint8_t data;
|
||||
if (telemetryGetByte(&data)) {
|
||||
|
||||
Reference in New Issue
Block a user