From 2b8ed25843f1d52b8bc19e3dbaceea170c1a8917 Mon Sep 17 00:00:00 2001 From: Pascal Langer Date: Sat, 21 Mar 2020 15:17:46 +0100 Subject: [PATCH] FrSkyD: Change hopping frequencies WARNING: all receivers must be rebound !!! --- Multiprotocol/FrSkyD_cc2500.ino | 13 ++++++++++++- Multiprotocol/Multiprotocol.h | 2 +- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/Multiprotocol/FrSkyD_cc2500.ino b/Multiprotocol/FrSkyD_cc2500.ino index 49a5aad..8de5296 100644 --- a/Multiprotocol/FrSkyD_cc2500.ino +++ b/Multiprotocol/FrSkyD_cc2500.ino @@ -21,6 +21,7 @@ static void __attribute__((unused)) frsky2way_init(uint8_t bind) { FRSKY_init_cc2500(FRSKYD_cc2500_conf); + CC2500_WriteReg(CC2500_1B_AGCCTRL2, bind ? 0x43 : 0x03); CC2500_WriteReg(CC2500_09_ADDR, bind ? 0x03 : rx_tx_addr[3]); CC2500_WriteReg(CC2500_07_PKTCTRL1, 0x05); CC2500_Strobe(CC2500_SIDLE); // Go to idle... @@ -95,7 +96,17 @@ static void __attribute__((unused)) frsky2way_data_frame() uint16_t initFrSky_2way() { - Frsky_init_hop(); + //FrskyD init hop + for(uint8_t i=0;i<50;i++) + { + uint8_t freq = (i * 0x1e) % 0xeb; + if(i == 3 || i == 23 || i == 47) + freq++; + if(i > 47) + freq=0; + hopping_frequency[i]=freq; + } + packet_count=0; if(IS_BIND_IN_PROGRESS) { diff --git a/Multiprotocol/Multiprotocol.h b/Multiprotocol/Multiprotocol.h index cab1554..1e5f789 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 74 +#define VERSION_PATCH_LEVEL 75 //****************** // Protocols