From 815cf4fd9959fa567f689beb8c2c0b77dce64272 Mon Sep 17 00:00:00 2001 From: pascallanger Date: Fri, 1 Nov 2019 18:42:45 +0100 Subject: [PATCH] FrSky X telemetry quick fix --- Multiprotocol/FrSkyX_cc2500.ino | 4 ++++ Multiprotocol/Multiprotocol.h | 2 +- Multiprotocol/Telemetry.ino | 8 ++++++-- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/Multiprotocol/FrSkyX_cc2500.ino b/Multiprotocol/FrSkyX_cc2500.ino index 37fe92f..fac223e 100644 --- a/Multiprotocol/FrSkyX_cc2500.ino +++ b/Multiprotocol/FrSkyX_cc2500.ino @@ -304,6 +304,9 @@ uint16_t ReadFrSkyX() break; case FRSKY_DATA5: telemetry_set_input_sync(9000); + #if defined TELEMETRY + telemetry_link=1; //Send telemetry out anyway + #endif len = CC2500_ReadReg(CC2500_3B_RXBYTES | CC2500_READ_BURST) & 0x7F; if (len && (len<=(0x0E + 3))) //Telemetry frame is 17 { @@ -329,6 +332,7 @@ uint16_t ReadFrSkyX() packet_count=0; #if defined TELEMETRY telemetry_lost=1; + telemetry_link=0; //Stop sending telemetry #endif } CC2500_Strobe(CC2500_SFRX); //Flush the RXFIFO diff --git a/Multiprotocol/Multiprotocol.h b/Multiprotocol/Multiprotocol.h index f51a3b0..a26627b 100644 --- a/Multiprotocol/Multiprotocol.h +++ b/Multiprotocol/Multiprotocol.h @@ -19,7 +19,7 @@ #define VERSION_MAJOR 1 #define VERSION_MINOR 3 #define VERSION_REVISION 0 -#define VERSION_PATCH_LEVEL 28 +#define VERSION_PATCH_LEVEL 29 //****************** // Protocols diff --git a/Multiprotocol/Telemetry.ino b/Multiprotocol/Telemetry.ino index cec1f52..1813fe2 100644 --- a/Multiprotocol/Telemetry.ino +++ b/Multiprotocol/Telemetry.ino @@ -824,9 +824,13 @@ void TelemetryUpdate() t -= h ; if ( t < 32 ) { -// debugln("TEL_BUF_FULL"); + //debugln("TEL_BUF_FULL %d",t); return ; } +/* else + if(t!=96) + debugln("TEL_BUF %d",t); +*/ #endif #if defined(MULTI_TELEMETRY) || defined(MULTI_STATUS) uint32_t now = millis(); @@ -847,7 +851,7 @@ void TelemetryUpdate() #endif #endif #if defined SPORT_TELEMETRY - if (protocol==PROTO_FRSKYX + if (protocol==PROTO_FRSKYX && telemetry_link #ifdef TELEMETRY_FRSKYX_TO_FRSKYD && mode_select==MODE_SERIAL #endif