From 68195be6d9aa85b761c7916f43eebd6a357e2708 Mon Sep 17 00:00:00 2001 From: janek Date: Mon, 9 Dec 2024 12:49:10 +0100 Subject: [PATCH] crossfireTelemetryPush allow up to full 64 bytes --- radio/src/telemetry/telemetry.cpp | 2 +- radio/src/telemetry/telemetry.h | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/radio/src/telemetry/telemetry.cpp b/radio/src/telemetry/telemetry.cpp index 0a00d4f7a6..e1a5eb1915 100644 --- a/radio/src/telemetry/telemetry.cpp +++ b/radio/src/telemetry/telemetry.cpp @@ -292,7 +292,7 @@ void logTelemetryWriteByte(uint8_t data) } #endif -uint8_t outputTelemetryBuffer[TELEMETRY_OUTPUT_FIFO_SIZE] __DMA; +uint8_t outputTelemetryBuffer[TELEMETRY_OUTPUT_BUFFER_SIZE] __DMA; uint8_t outputTelemetryBufferSize = 0; uint8_t outputTelemetryBufferTrigger = 0; diff --git a/radio/src/telemetry/telemetry.h b/radio/src/telemetry/telemetry.h index fdcc0a2f99..d15fa647dc 100644 --- a/radio/src/telemetry/telemetry.h +++ b/radio/src/telemetry/telemetry.h @@ -100,7 +100,7 @@ extern uint8_t telemetryState; #define TELEMETRY_SERIAL_DEFAULT 0 #define TELEMETRY_SERIAL_8E2 1 #define TELEMETRY_SERIAL_WITHOUT_DMA 2 -#define TELEMETRY_OUTPUT_FIFO_SIZE 20 +#define TELEMETRY_OUTPUT_BUFFER_SIZE 64 #define TELEMETRY_AVERAGE_COUNT 3 #if defined(CROSSFIRE) || defined(MULTIMODULE) || defined(AFHDS2A) @@ -112,7 +112,7 @@ extern uint8_t telemetryState; extern uint8_t telemetryRxBuffer[TELEMETRY_RX_PACKET_SIZE]; extern uint8_t telemetryRxBufferCount; -extern uint8_t outputTelemetryBuffer[TELEMETRY_OUTPUT_FIFO_SIZE] __DMA; +extern uint8_t outputTelemetryBuffer[TELEMETRY_OUTPUT_BUFFER_SIZE] __DMA; extern uint8_t outputTelemetryBufferSize; extern uint8_t outputTelemetryBufferTrigger; extern uint8_t telemetryProtocol; @@ -193,7 +193,6 @@ PACK(struct CellValue #define IS_DISTANCE_UNIT(unit) ((unit) == UNIT_METERS || (unit) == UNIT_FEET) #define IS_SPEED_UNIT(unit) ((unit) >= UNIT_KTS && (unit) <= UNIT_MPH) -#define IS_FRSKY_D_PROTOCOL() (telemetryProtocol == PROTOCOL_TELEMETRY_FRSKY_D) #if defined (MULTIMODULE) #define IS_D16_MULTI() ((g_model.moduleData[EXTERNAL_MODULE].getMultiProtocol(false) == MM_RF_PROTO_FRSKY) && (g_model.moduleData[EXTERNAL_MODULE].subType == MM_RF_FRSKY_SUBTYPE_D16 || g_model.moduleData[EXTERNAL_MODULE].subType == MM_RF_FRSKY_SUBTYPE_D16_8CH)) #define IS_FRSKY_SPORT_PROTOCOL() (telemetryProtocol == PROTOCOL_TELEMETRY_FRSKY_SPORT || (telemetryProtocol == PROTOCOL_TELEMETRY_MULTIMODULE && IS_D16_MULTI()))