FrSky RX: sub protocol to erase clone IDs

This commit is contained in:
Pascal Langer 2021-02-03 16:57:14 +01:00
parent 3973b42f81
commit 43d969f962
6 changed files with 46 additions and 18 deletions

View File

@ -79,6 +79,7 @@
65,3,FrSkyR9,R9_968_8CH,0,CH5,CH6,CH7,CH8
55,0,FrSkyRX,RX,0,CH5,CH6,CH7,CH8,CH9,CH10,CH11,CH12,CH13,CH14,CH15,CH16
55,1,FrSkyRX,CloneTX,0
55,2,FrSkyRX,EraseTX,0
58,0,FX816,P38,1
20,0,FY326,FY326,1,Flip,RTH,HLess,Expert,Calib
20,1,FY326,FY319,1,Flip,RTH,HLess,Expert,Calib

View File

@ -357,6 +357,19 @@ static void __attribute__((unused)) frsky_rx_data()
}
uint16_t initFrSky_Rx()
{
if(sub_protocol == FRSKY_ERASE)
{
if(IS_BIND_IN_PROGRESS)
{// Clear all cloned addresses
uint16_t addr[]={ FRSKYD_CLONE_EEPROM_OFFSET+1, FRSKYX_CLONE_EEPROM_OFFSET+1, FRSKYX2_CLONE_EEPROM_OFFSET+1 };
for(uint8_t i=0; i<3;i++)
for(uint8_t j=0; j<3;j++)
eeprom_write_byte((EE_ADDR)(addr[i]+j), 0xFF);
packet_count = 100;
}
}
else
{
frsky_rx_chanskip = 1;
hopping_frequency_no = 0;
@ -373,6 +386,7 @@ uint16_t initFrSky_Rx()
}
else
frsky_rx_data();
}
return 1000;
}
@ -382,6 +396,15 @@ uint16_t FrSky_Rx_callback()
static int8_t tune_low, tune_high;
uint8_t len, ch;
if(sub_protocol == FRSKY_ERASE)
{
if(packet_count)
packet_count--;
else
BIND_DONE;
return 10000; // Nothing to do...
}
if(IS_BIND_DONE && phase != FRSKY_RX_DATA) return initFrSky_Rx(); // Abort bind
if ((prev_option != option) && (phase >= FRSKY_RX_DATA))

View File

@ -52,7 +52,7 @@
52,ZSX,280
53,Height,5ch,8ch
54,Scanner
55,Frsky_RX,RX,CloneTX
55,Frsky_RX,RX,CloneTX,EraseTX
56,AFHDS2A_RX
57,HoTT,Sync,No_Sync
58,FX816,P38

View File

@ -143,7 +143,7 @@ const char STR_SUBTYPE_XK[] = "\x04""X450""X420";
const char STR_SUBTYPE_FRSKYR9[] = "\x07""915MHz\0""868MHz\0""915 8ch""868 8ch""FCC\0 ""--\0 ""FCC 8ch""-- 8ch\0";
const char STR_SUBTYPE_ESKY[] = "\x03""Std""ET4";
const char STR_SUBTYPE_PROPEL[] = "\x04""74-Z";
const char STR_SUBTYPE_FRSKY_RX[] = "\x07""RX\0 ""CloneTX";
const char STR_SUBTYPE_FRSKY_RX[] = "\x07""RX\0 ""CloneTX""EraseTX";
const char STR_SUBTYPE_FRSKYL[] = "\x08""LR12\0 ""LR12 6ch";
const char STR_SUBTYPE_WFLY[] = "\x05""WFR0x";
const char STR_SUBTYPE_WFLY2[] = "\x05""RF20x";
@ -251,7 +251,7 @@ const mm_protocol_definition multi_protocols[] = {
#endif
//OpenTX 2.3.x issue: DO NOT CHANGE ORDER below
#if defined(FRSKY_RX_CC2500_INO)
{PROTO_FRSKY_RX, STR_FRSKY_RX, 2, STR_SUBTYPE_FRSKY_RX, OPTION_RFTUNE },
{PROTO_FRSKY_RX, STR_FRSKY_RX, 3, STR_SUBTYPE_FRSKY_RX, OPTION_RFTUNE },
#endif
#if defined(FRSKYD_CC2500_INO)
{PROTO_FRSKYD, STR_FRSKYD, 2, STR_SUBTYPE_FRSKYD, OPTION_RFTUNE },

View File

@ -19,7 +19,7 @@
#define VERSION_MAJOR 1
#define VERSION_MINOR 3
#define VERSION_REVISION 2
#define VERSION_PATCH_LEVEL 24
#define VERSION_PATCH_LEVEL 25
//******************
// Protocols
@ -373,6 +373,7 @@ enum FRSKY_RX
{
FRSKY_RX = 0,
FRSKY_CLONE = 1,
FRSKY_ERASE = 2,
};
enum FRSKYL

View File

@ -560,6 +560,11 @@ Notes:
- For FrSkyD, only the RX number used during bind is cloned -> you can't use RX num anymore
- For FrSkyX and FrSkyX2, RX number has to be adjusted on each model to match the original TX model
### Sub_protocol EraseTX - *2*
This subprotocol erases ALL the clone IDs which have been recorded.
To erase ALL the clone information, select the sub_protocol EraseTX and execute a bind.
## HITEC - *39*
Models: OPTIMA, MINIMA and MICRO receivers.
@ -1379,8 +1384,6 @@ A|E|T|R|FLIP||||HEADLESS
### Sub_protocol A180 - *5*
Model: XK A180
**Only 1 ID available**
CH1|CH2|CH3|CH4|CH5
---|---|---|---|---
A|E|T|R|3D6G