From 5148449066ce87b0093f99c38e64c1d477a240ed Mon Sep 17 00:00:00 2001 From: pascallanger Date: Thu, 17 Nov 2022 20:08:56 +0100 Subject: [PATCH] FS2A: Turning on/off the LNA during bind. --- Multiprotocol/AFHDS2A_a7105.ino | 13 ++++++++++--- Multiprotocol/Multiprotocol.h | 2 +- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/Multiprotocol/AFHDS2A_a7105.ino b/Multiprotocol/AFHDS2A_a7105.ino index 19cd544..239d44f 100644 --- a/Multiprotocol/AFHDS2A_a7105.ino +++ b/Multiprotocol/AFHDS2A_a7105.ino @@ -292,10 +292,17 @@ uint16_t AFHDS2A_callback() case AFHDS2A_BIND2: case AFHDS2A_BIND3: AFHDS2A_build_bind_packet(); + data_rx=A7105_ReadReg(A7105_00_MODE); // Check if something has been received... A7105_WriteData(AFHDS2A_TXPACKET_SIZE, packet_count%2 ? 0x0d : 0x8c); - if(!(A7105_ReadReg(A7105_00_MODE) & (1<<5))) // removed FECF check due to issues with fs-x6b -> & (1<<5 | 1<<6) - { // CRCF Ok + if(!(A7105_ReadReg(A7105_00_MODE) & (1<<5)) && !(data_rx & 1)) // removed FECF check due to issues with fs-x6b -> & (1<<5 | 1<<6) + { // RX+CRCF Ok A7105_ReadData(AFHDS2A_RXPACKET_SIZE); + #if 0 + debug("RX"); + for(uint8_t i=0; i