Add T16 support
Added support for: - T16 radio - internal multi-protocol module. - flashing internal and external multi-protocol modules. Many thx to: - goebish, for the hardware support. - qba667, for the original patches for the internal multi-protocol support (UI and serial com).
This commit is contained in:
committed by
Raphael Coeffic
parent
4a618f1317
commit
6b12010473
@@ -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