File tree Expand file tree Collapse file tree 2 files changed +18
-12
lines changed Expand file tree Collapse file tree 2 files changed +18
-12
lines changed Original file line number Diff line number Diff line change @@ -789,25 +789,31 @@ static uint8_t CFLIE_initialize_rx_tx_addr()
789789 rx_tx_addr[0 ] =
790790 rx_tx_addr[1 ] =
791791 rx_tx_addr[2 ] =
792- rx_tx_addr[3 ] =
793- rx_tx_addr[4 ] = 0xE7 ; // CFlie uses fixed address
794-
792+ rx_tx_addr[3 ] = 0xE7 ;
793+
794+ unsigned x10 = (RX_num / 10U ) % 10 ;
795+ unsigned x1 = RX_num - x10*10 ;
796+
795797 switch (sub_protocol) {
796798 case CFLIE_2Mbps:
797799 data_rate = NRF24L01_BR_2M;
798- rf_ch_num = option;
800+ rf_ch_num = option; // "RF channel" in the transmitter <0, 125>
801+ rx_tx_addr[4 ] = x10*16 + x1; // "Receiver" in the transmitter <0, 63>
799802 break ;
800803 case CFLIE_1Mbps:
801804 data_rate = NRF24L01_BR_1M;
802- rf_ch_num = option;
805+ rf_ch_num = option; // "RF channel" in the transmitter <0, 125>
806+ rx_tx_addr[4 ] = x10*16 + x1; // "Receiver" in the transmitter <0, 63>
803807 break ;
804808 case CFLIE_250kbps:
805809 data_rate = NRF24L01_BR_250K;
806- rf_ch_num = option;
810+ rf_ch_num = option; // "RF channel" in the transmitter <0, 125>
811+ rx_tx_addr[4 ] = x10*16 + x1; // "Receiver" in the transmitter <0, 63>
807812 break ;
808813 default :
809814 data_rate = NRF24L01_BR_2M;
810815 rf_ch_num = 80 ;
816+ rx_tx_addr[4 ] = 0xE7 ; // CFlie uses fixed address
811817 }
812818
813819 return CFLIE_INIT_SEARCH;
Original file line number Diff line number Diff line change 230230#define ESKY150_NRF24L01_INO
231231#define FQ777_NRF24L01_INO
232232#define FX_NRF24L01_INO
233- #define FY326_NRF24L01_INO
234- #define GW008_NRF24L01_INO
235- #define HISKY_NRF24L01_INO
233+ // #define FY326_NRF24L01_INO
234+ // #define GW008_NRF24L01_INO
235+ // #define HISKY_NRF24L01_INO
236236#define HONTAI_NRF24L01_INO
237237#define H8_3D_NRF24L01_INO
238238#define JJRC345_NRF24L01_INO
@@ -576,10 +576,10 @@ const PPM_Parameters PPM_prot[14*NBR_BANKS]= {
576576 CABELL_SET_FAIL_SAFE
577577 CABELL_UNBIND
578578 PROTO_CFLIE
579- CFLIE_AUTO
580- CFLIE_2Mbps
579+ CFLIE_AUTO
580+ CFLIE_2Mbps
581581 CFLIE_1Mbps
582- CFLIE_250kbps
582+ CFLIE_250kbps
583583 PROTO_CG023
584584 CG023
585585 YD829
You can’t perform that action at this time.
0 commit comments