mirror of
https://github.com/pascallanger/DIY-Multiprotocol-TX-Module.git
synced 2025-07-02 02:37:52 +00:00
FrSky R9: adding CH1-8/CH9-16 and Telem ON/OFF (not that telem is supported yet)
This commit is contained in:
parent
db4aad04a7
commit
15395de579
@ -44,11 +44,14 @@ static void __attribute__((unused)) FrSkyR9_build_packet()
|
||||
|
||||
//Bind
|
||||
if(IS_BIND_IN_PROGRESS)
|
||||
{
|
||||
{// 915 0x01=CH1-8_TELEM_ON 0x41=CH1-8_TELEM_OFF 0xC1=CH9-16_TELEM_OFF 0x81=CH9-16_TELEM_ON
|
||||
packet[6] = 0x01; // bind indicator
|
||||
if(sub_protocol & 1)
|
||||
packet[6] = 0x61; // 868
|
||||
else
|
||||
packet[6] = 0x41; // 915
|
||||
packet[6] |= 0x20; // 868
|
||||
if(binding_idx&0x01)
|
||||
packet[6] |= 0x40; // telem OFF
|
||||
if(binding_idx&0x02)
|
||||
packet[6] |= 0x80; // ch9-16
|
||||
}
|
||||
|
||||
//SPort
|
||||
|
@ -367,7 +367,6 @@ uint16_t initFrSkyX()
|
||||
SportHead=SportTail=0; // empty data buffer
|
||||
#endif
|
||||
FrSkyX_RX_Seq = 0 ; // Seq 0 to start with
|
||||
binding_idx=0; // CH1-8 and Telem on
|
||||
return 10000;
|
||||
}
|
||||
#endif
|
||||
|
@ -19,7 +19,7 @@
|
||||
#define VERSION_MAJOR 1
|
||||
#define VERSION_MINOR 3
|
||||
#define VERSION_REVISION 1
|
||||
#define VERSION_PATCH_LEVEL 25
|
||||
#define VERSION_PATCH_LEVEL 26
|
||||
|
||||
//******************
|
||||
// Protocols
|
||||
|
@ -1063,7 +1063,8 @@ static void protocol_init()
|
||||
rx_rc_chan[ch] = 1024;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
binding_idx=0;
|
||||
|
||||
//Set global ID and rx_tx_addr
|
||||
MProtocol_id = RX_num + MProtocol_id_master;
|
||||
set_rx_tx_addr(MProtocol_id);
|
||||
@ -1878,8 +1879,8 @@ void update_serial_data()
|
||||
#endif
|
||||
if(rx_len>27)
|
||||
{ // Data available for the current protocol
|
||||
#if defined FRSKYX_CC2500_INO
|
||||
if((protocol==PROTO_FRSKYX || protocol==PROTO_FRSKYX2) && rx_len==28)
|
||||
#if defined(FRSKYX_CC2500_INO) and defined(FRSKYR9_SX1276_INO)
|
||||
if((protocol==PROTO_FRSKYX || protocol==PROTO_FRSKYX2 || protocol==PROTO_FRSKY_R9) && rx_len==28)
|
||||
{//Protocol waiting for 1 byte during bind
|
||||
binding_idx=rx_ok_buff[27];
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user