@@ -20,6 +20,7 @@
|
||||
|
||||
#include "opentx.h"
|
||||
#include "multi.h"
|
||||
#include "pulses/afhds3.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)
|
||||
@@ -59,6 +60,13 @@ void processTelemetryData(uint8_t data)
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(AFHDS3)
|
||||
if (telemetryProtocol == PROTOCOL_TELEMETRY_AFHDS3) {
|
||||
afhds3::processTelemetryData(EXTERNAL_MODULE, data, telemetryRxBuffer, telemetryRxBufferCount, TELEMETRY_RX_PACKET_SIZE);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
processFrskyTelemetryData(data);
|
||||
}
|
||||
|
||||
@@ -103,7 +111,7 @@ void telemetryWakeup()
|
||||
#endif
|
||||
|
||||
#if defined(EXTMODULE_USART)
|
||||
while (extmoduleFifo.getFrame(frame)) {
|
||||
while (isModulePxx2(EXTERNAL_MODULE) && extmoduleFifo.getFrame(frame)) {
|
||||
processPXX2Frame(EXTERNAL_MODULE, frame);
|
||||
}
|
||||
#endif
|
||||
@@ -294,6 +302,13 @@ void telemetryInit(uint8_t protocol)
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(AFHDS3) && !defined(SIMU)
|
||||
else if (protocol == PROTOCOL_TELEMETRY_AFHDS3) {
|
||||
telemetryPortInvertedInit(AFHDS3_BAUDRATE);
|
||||
telemetryPortSetDirectionInput();
|
||||
}
|
||||
#endif
|
||||
|
||||
else {
|
||||
telemetryPortInit(FRSKY_SPORT_BAUDRATE, TELEMETRY_SERIAL_WITHOUT_DMA);
|
||||
#if defined(LUA)
|
||||
|
||||
Reference in New Issue
Block a user