mirror of
https://github.com/pascallanger/DIY-Multiprotocol-TX-Module.git
synced 2025-02-04 18:48:11 +00:00
Core: PPM not setting ID properly for some protocols
This commit is contained in:
parent
b4215afe82
commit
fa8d4f511f
@ -329,7 +329,6 @@ void setup()
|
||||
cur_protocol[1] = protocol;
|
||||
sub_protocol = PPM_prot[mode_select].sub_proto;
|
||||
RX_num = PPM_prot[mode_select].rx_num;
|
||||
MProtocol_id = RX_num + MProtocol_id_master;
|
||||
option = PPM_prot[mode_select].option;
|
||||
if(PPM_prot[mode_select].power) POWER_FLAG_on;
|
||||
if(PPM_prot[mode_select].autobind) AUTOBIND_FLAG_on;
|
||||
@ -631,7 +630,12 @@ static void protocol_init()
|
||||
TX_MAIN_PAUSE_off;
|
||||
#endif
|
||||
|
||||
//Set global ID and rx_tx_addr
|
||||
MProtocol_id = RX_num + MProtocol_id_master;
|
||||
set_rx_tx_addr(MProtocol_id);
|
||||
|
||||
blink=millis();
|
||||
|
||||
if(IS_BIND_BUTTON_FLAG_on)
|
||||
AUTOBIND_FLAG_on;
|
||||
if(IS_AUTOBIND_FLAG_on)
|
||||
@ -891,8 +895,6 @@ void update_serial_data()
|
||||
protocol=(rx_ok_buff[0]==0x55?0:32) + (rx_ok_buff[1]&0x1F); //protocol no (0-63) bits 4-6 of buff[1] and bit 0 of buf[0]
|
||||
sub_protocol=(rx_ok_buff[2]>>4)& 0x07; //subprotocol no (0-7) bits 4-6
|
||||
RX_num=rx_ok_buff[2]& 0x0F; // rx_num bits 0---3
|
||||
MProtocol_id=MProtocol_id_master+RX_num;//personalized RX bind + rx num
|
||||
set_rx_tx_addr(MProtocol_id); //set rx_tx_addr
|
||||
}
|
||||
else
|
||||
if( ((rx_ok_buff[1]&0x80)!=0) && ((cur_protocol[1]&0x80)==0) ) // Bind flag has been set
|
||||
|
Loading…
x
Reference in New Issue
Block a user