From 78421748ba2cde3d032077044fc8c876b08a1420 Mon Sep 17 00:00:00 2001 From: Pascal Langer Date: Sat, 4 Jul 2020 17:50:05 +0200 Subject: [PATCH] FrSky R9: fix sensors telem? --- Multiprotocol/FrSkyR9_sx1276.ino | 4 ++-- Multiprotocol/Multiprotocol.h | 2 +- Multiprotocol/Telemetry.ino | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Multiprotocol/FrSkyR9_sx1276.ino b/Multiprotocol/FrSkyR9_sx1276.ino index 864b604..5b9fd4d 100644 --- a/Multiprotocol/FrSkyR9_sx1276.ino +++ b/Multiprotocol/FrSkyR9_sx1276.ino @@ -65,7 +65,6 @@ static void __attribute__((unused)) FrSkyR9_build_packet() packet[20] |= FrSkyX_TX_Seq ; //TX=8 at startup if ( !(FrSkyX_TX_IN_Seq & 0xF8) ) FrSkyX_TX_Seq = ( FrSkyX_TX_Seq + 1 ) & 0x03 ; // Next iteration send next packet - packet[20] = 0x08; //FrSkyX_TX_Seq=8 at startup packet[21] = 0x00; // length? packet[22] = 0x00; // data1? packet[23] = 0x00; // data2? @@ -177,6 +176,7 @@ uint16_t FrSkyR9_callback() phase++; return 7400; case FRSKYR9_RX2: + telemetry_link=0; if( (SX1276_ReadReg(SX1276_12_REGIRQFLAGS)&0xF0) == (_BV(SX1276_REGIRQFLAGS_RXDONE) | _BV(SX1276_REGIRQFLAGS_VALIDHEADER)) ) { if(SX1276_ReadReg(SX1276_13_REGRXNBBYTES)==13) @@ -211,7 +211,7 @@ uint16_t FrSkyR9_callback() #endif packet_count=0; telemetry_lost=1; - telemetry_link=0; //Stop sending telemetry + telemetry_link=0; //Stop sending telemetry } CC2500_Strobe(CC2500_SFRX); //Flush the RXFIFO } diff --git a/Multiprotocol/Multiprotocol.h b/Multiprotocol/Multiprotocol.h index 8fd04f4..5a9a488 100644 --- a/Multiprotocol/Multiprotocol.h +++ b/Multiprotocol/Multiprotocol.h @@ -19,7 +19,7 @@ #define VERSION_MAJOR 1 #define VERSION_MINOR 3 #define VERSION_REVISION 1 -#define VERSION_PATCH_LEVEL 32 +#define VERSION_PATCH_LEVEL 33 //****************** // Protocols diff --git a/Multiprotocol/Telemetry.ino b/Multiprotocol/Telemetry.ino index 5f509dc..a56625f 100644 --- a/Multiprotocol/Telemetry.ino +++ b/Multiprotocol/Telemetry.ino @@ -463,7 +463,7 @@ bool frsky_process_telemetry(uint8_t *buffer,uint8_t len) p->payload[i] = buffer[i+7] ; } else - p->count = 0 ; // Discard + p->count = 0 ; // Discard p->valid = true ; FrSkyX_RX_Seq = ( FrSkyX_RX_Seq + 1 ) & 0x03 ; // Move to next sequence