Support of FRM302 module. (#7533)

AFHDS3 support added
This commit is contained in:
Jakub
2020-06-22 16:44:35 +02:00
committed by GitHub
parent 6d29faa48b
commit 5bf197439a
55 changed files with 2435 additions and 164 deletions
+16 -1
View File
@@ -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)