Skip to content

Commit 062fc05

Browse files
author
Pascal Langer
committed
Fix FrSky RX protocol not ending bind when requested
1 parent 6d080d5 commit 062fc05

File tree

4 files changed

+19
-20
lines changed

4 files changed

+19
-20
lines changed

Multiprotocol/Multiprotocol.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
#define VERSION_MAJOR 1
2020
#define VERSION_MINOR 3
2121
#define VERSION_REVISION 1
22-
#define VERSION_PATCH_LEVEL 97
22+
#define VERSION_PATCH_LEVEL 98
2323

2424
//******************
2525
// Protocols

Multiprotocol/Multiprotocol.ino

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -750,6 +750,18 @@ void loop()
750750
}
751751
}
752752

753+
void End_Bind()
754+
{
755+
//Request protocol to terminate bind
756+
#if defined(FRSKYD_CC2500_INO) || defined(FRSKYL_CC2500_INO) || defined(FRSKYX_CC2500_INO) || defined(FRSKYV_CC2500_INO) || defined(AFHDS2A_A7105_INO) || defined(FRSKYR9_SX1276_INO) || defined(DSM_RX_CYRF6936_INO) || defined(AFHDS2A_RX_A7105_INO) || defined(FRSKY_RX_CC2500_INO)
757+
if(protocol==PROTO_FRSKYD || protocol==PROTO_FRSKYL || protocol==PROTO_FRSKYX || protocol==PROTO_FRSKYX2 || protocol==PROTO_FRSKYV || protocol==PROTO_AFHDS2A || protocol==PROTO_FRSKY_R9 || protocol==PROTO_DSM_RX || protocol==PROTO_AFHDS2A_RX || protocol==PROTO_FRSKY_RX)
758+
BIND_DONE;
759+
else
760+
#endif
761+
if(bind_counter>2)
762+
bind_counter=2;
763+
}
764+
753765
bool Update_All()
754766
{
755767
#ifdef ENABLE_SERIAL
@@ -840,14 +852,7 @@ bool Update_All()
840852
if(IS_AUTOBIND_FLAG_on && IS_BIND_CH_PREV_on && Channel_data[BIND_CH-1]<CHANNEL_MIN_COMMAND)
841853
{ // Autobind is on and BIND_CH went down
842854
BIND_CH_PREV_off;
843-
//Request protocol to terminate bind
844-
#if defined(FRSKYD_CC2500_INO) || defined(FRSKYL_CC2500_INO) || defined(FRSKYX_CC2500_INO) || defined(FRSKYV_CC2500_INO) || defined(AFHDS2A_A7105_INO) || defined(FRSKYR9_SX1276_INO)
845-
if(protocol==PROTO_FRSKYD || protocol==PROTO_FRSKYL || protocol==PROTO_FRSKYX || protocol==PROTO_FRSKYX2 || protocol==PROTO_FRSKYV || protocol==PROTO_AFHDS2A || protocol==PROTO_FRSKY_R9)
846-
BIND_DONE;
847-
else
848-
#endif
849-
if(bind_counter>2)
850-
bind_counter=2;
855+
End_Bind();
851856
}
852857
#endif //ENABLE_BIND_CH
853858
if(IS_CHANGE_PROTOCOL_FLAG_on)
@@ -1947,13 +1952,7 @@ void update_serial_data()
19471952
else
19481953
if( ((rx_ok_buff[1]&0x80)==0) && ((cur_protocol[1]&0x80)!=0) ) // Bind flag has been reset
19491954
{ // Request protocol to end bind
1950-
#if defined(FRSKYD_CC2500_INO) || defined(FRSKYL_CC2500_INO) || defined(FRSKYX_CC2500_INO) || defined(FRSKYV_CC2500_INO) || defined(AFHDS2A_A7105_INO) || defined(FRSKYR9_SX1276_INO) || defined(DSM_RX_CYRF6936_INO) || defined(AFHDS2A_RX_A7105_INO)
1951-
if(protocol==PROTO_FRSKYD || protocol==PROTO_FRSKYL || protocol==PROTO_FRSKYX || protocol==PROTO_FRSKYX2 || protocol==PROTO_FRSKYV || protocol==PROTO_AFHDS2A || protocol==PROTO_FRSKY_R9 || protocol==PROTO_DSM_RX || protocol==PROTO_AFHDS2A_RX)
1952-
BIND_DONE;
1953-
else
1954-
#endif
1955-
if(bind_counter>2)
1956-
bind_counter=2;
1955+
End_Bind();
19571956
}
19581957

19591958
//store current protocol values

Multiprotocol/_Config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@
229229
#define JJRC345_NRF24L01_INO
230230
#define KF606_NRF24L01_INO
231231
#define KN_NRF24L01_INO
232-
#define LOLI_NRF24L01_INO
232+
#define LOLI_NRF24L01_INO
233233
#define MJXQ_NRF24L01_INO
234234
#define MT99XX_NRF24L01_INO
235235
#define NCC1701_NRF24L01_INO

Protocols_Details.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -606,7 +606,7 @@ Telemetry supported:
606606
- A2 = battery voltage from only good telemetry packets
607607
- How to calculate accurately the OpenTX Ratio and Offset:
608608
Set the Ratio to 12.7 and Offset to 0, plug 2 batteries with extreme voltage values, write down the values Batt1=12.5V & Telem1=12.2V, Batt2=7V & Telem2=6.6V then calculate/set Ratio=12.7*[(12.5-7)/(12.2-6.6)]=12.47 => 12.5 and Offset=12.5-12.2*[(12.5-7)/(12.2-6.6)]=0.517 => 0.5
609-
- RX_RSSI = TQly = percentage of received telemetry packets (good and corrupted) received from the model which has nothing to do with how well the RX is receiving the TX
609+
- RX_RSSI = TQly = percentage of received telemetry packets (good and corrupted) from the model which has nothing to do with how well the RX is receiving the TX
610610

611611
Option for this protocol corresponds to the CC2500 fine frequency tuning. This value is different for each Module and **must** be accurate otherwise the link will not be stable.
612612
Check the [Frequency Tuning page](/docs/Frequency_Tuning.md) to determine it.
@@ -1286,11 +1286,11 @@ CH1|CH2|CH3|CH4|CH5
12861286
A||T||TRIM
12871287

12881288
## LOLI - *82*
1289-
LOLI receivers.
1289+
LOLI3 receivers: https://github.com/wooddoor/Loli3
12901290

12911291
Failsafe supported. Once failsafe values for the 8 channels have been configured in Custom mode, wait for the RX to learn them, then set Failsafe to Receiver.
12921292

1293-
Telemetry supported: RX RSSI, TX LQI (percentage of received packets), A1 and A2.
1293+
Telemetry supported: RX RSSI, TX LQI (percentage of received telemetry packets), A1 and A2.
12941294

12951295
Extended limits supported.
12961296

0 commit comments

Comments
 (0)