mirror of
https://github.com/pascallanger/DIY-Multiprotocol-TX-Module.git
synced 2025-12-30 17:23:15 +00:00
FrSkyX v2.1: initial support
Rewrite of the FrSkyX code to support both v1 and v2.1.0 with FCC and LBT. FrSky v1 accessible as usual FrSky v2.1.0 accessible through the protocol 64=FrSkyX2 with the same subprotocols as v1 The LBT feature is now fully implemented on the TX and turned on for both v1 LBT and v2.1.0 LBT. For v2.1.0, to access the bind functions Telem=on/off, CH1-8/9-16 and bidirectional SPort (SxR setup for example), you need to update OpenTX to the latest 2.3.8 nightly (not available yet).
This commit is contained in:
@@ -514,11 +514,6 @@ void setup()
|
||||
option = FORCE_FRSKYX_TUNING; // Use config-defined tuning value for FrSkyX
|
||||
else
|
||||
#endif
|
||||
#if defined(FORCE_FRSKYX2_TUNING) && defined(FRSKYX2_CC2500_INO)
|
||||
if(protocol==PROTO_FRSKYX2)
|
||||
option = FORCE_FRSKYX2_TUNING; // Use config-defined tuning value for FrSkyX2
|
||||
else
|
||||
#endif
|
||||
#if defined(FORCE_SFHSS_TUNING) && defined(SFHSS_CC2500_INO)
|
||||
if (protocol==PROTO_SFHSS)
|
||||
option = FORCE_SFHSS_TUNING; // Use config-defined tuning value for SFHSS
|
||||
@@ -759,7 +754,7 @@ bool Update_All()
|
||||
BIND_CH_PREV_off;
|
||||
//Request protocol to terminate bind
|
||||
#if defined(FRSKYD_CC2500_INO) || defined(FRSKYX_CC2500_INO) || defined(FRSKYV_CC2500_INO) || defined(AFHDS2A_A7105_INO)
|
||||
if(protocol==PROTO_FRSKYD || protocol==PROTO_FRSKYX || protocol==PROTO_FRSKYV || protocol==PROTO_AFHDS2A )
|
||||
if(protocol==PROTO_FRSKYD || protocol==PROTO_FRSKYX || protocol==PROTO_FRSKYX2 || protocol==PROTO_FRSKYV || protocol==PROTO_AFHDS2A )
|
||||
BIND_DONE;
|
||||
else
|
||||
#endif
|
||||
@@ -1127,20 +1122,13 @@ static void protocol_init()
|
||||
#endif
|
||||
#if defined(FRSKYX_CC2500_INO)
|
||||
case PROTO_FRSKYX:
|
||||
case PROTO_FRSKYX2:
|
||||
PE1_off; //antenna RF2
|
||||
PE2_on;
|
||||
next_callback = initFrSkyX();
|
||||
remote_callback = ReadFrSkyX;
|
||||
break;
|
||||
#endif
|
||||
#if defined(FRSKYX2_CC2500_INO)
|
||||
case PROTO_FRSKYX2:
|
||||
PE1_off; //antenna RF2
|
||||
PE2_on;
|
||||
next_callback = initFrSkyX2();
|
||||
remote_callback = ReadFrSkyX2;
|
||||
break;
|
||||
#endif
|
||||
#if defined(SFHSS_CC2500_INO)
|
||||
case PROTO_SFHSS:
|
||||
PE1_off; //antenna RF2
|
||||
@@ -1624,11 +1612,6 @@ void update_serial_data()
|
||||
option=FORCE_FRSKYX_TUNING; // Use config-defined tuning value for FrSkyX
|
||||
else
|
||||
#endif
|
||||
#if defined(FORCE_FRSKYX2_TUNING) && defined(FRSKYX2_CC2500_INO)
|
||||
if(protocol==PROTO_FRSKYX2)
|
||||
option=FORCE_FRSKYX2_TUNING; // Use config-defined tuning value for FrSkyX2
|
||||
else
|
||||
#endif
|
||||
#if defined(FORCE_SFHSS_TUNING) && defined(SFHSS_CC2500_INO)
|
||||
if (protocol==PROTO_SFHSS)
|
||||
option=FORCE_SFHSS_TUNING; // Use config-defined tuning value for SFHSS
|
||||
@@ -1732,7 +1715,7 @@ void update_serial_data()
|
||||
if( ((rx_ok_buff[1]&0x80)==0) && ((cur_protocol[1]&0x80)!=0) ) // Bind flag has been reset
|
||||
{ // Request protocol to end bind
|
||||
#if defined(FRSKYD_CC2500_INO) || defined(FRSKYX_CC2500_INO) || defined(FRSKYV_CC2500_INO) || defined(AFHDS2A_A7105_INO) || defined(FRSKYR9_SX1276_INO)
|
||||
if(protocol==PROTO_FRSKYD || protocol==PROTO_FRSKYX || protocol==PROTO_FRSKYV || protocol==PROTO_AFHDS2A || protocol==PROTO_FRSKY_R9 )
|
||||
if(protocol==PROTO_FRSKYD || protocol==PROTO_FRSKYX || protocol==PROTO_FRSKYX2 || protocol==PROTO_FRSKYV || protocol==PROTO_AFHDS2A || protocol==PROTO_FRSKY_R9 )
|
||||
BIND_DONE;
|
||||
else
|
||||
#endif
|
||||
@@ -1791,7 +1774,7 @@ void update_serial_data()
|
||||
#endif
|
||||
if(rx_len>27)
|
||||
{ // Data available for the current protocol
|
||||
#if defined FRSKYX_CC2500_INO || defined FRSKYX2_CC2500_INO
|
||||
#if defined FRSKYX_CC2500_INO
|
||||
if((protocol==PROTO_FRSKYX || protocol==PROTO_FRSKYX2) && rx_len==28)
|
||||
{//Protocol waiting for 1 byte during bind
|
||||
binding_idx=rx_ok_buff[27];
|
||||
|
||||
Reference in New Issue
Block a user