mirror of
https://github.com/pascallanger/DIY-Multiprotocol-TX-Module.git
synced 2025-02-04 18:58:13 +00:00
Bayang DHD D4 sub protocol
This commit is contained in:
parent
a58d7a4d79
commit
511f77f5e7
@ -80,6 +80,12 @@ static void __attribute__((unused)) BAYANG_send_packet(uint8_t bind)
|
||||
packet[10] = 0x30;
|
||||
packet[11] = 0x01;
|
||||
break;
|
||||
case DHD_D4:
|
||||
packet[10] = 0xC8;
|
||||
packet[11] = 0x99;
|
||||
packet[12] = 0x17;
|
||||
packet[13] = 0xED;
|
||||
break;
|
||||
default:
|
||||
packet[10] = rx_tx_addr[0]; // txid[0]
|
||||
packet[11] = rx_tx_addr[1]; // txid[1]
|
||||
@ -106,7 +112,10 @@ static void __attribute__((unused)) BAYANG_send_packet(uint8_t bind)
|
||||
packet[1] = convert_channel_8b(CH14);
|
||||
}
|
||||
else
|
||||
packet[1] = 0xFA; // normal mode is 0xf7, expert 0xfa
|
||||
if(sub_protocol!=DHD_D4)
|
||||
packet[1] = 0xFA; // normal mode is 0xf7, expert 0xfa
|
||||
else
|
||||
packet[1] = 0xF4;
|
||||
|
||||
//Flags packet[2]
|
||||
packet[2] = 0x00;
|
||||
@ -164,6 +173,10 @@ static void __attribute__((unused)) BAYANG_send_packet(uint8_t bind)
|
||||
packet[12] = 0xE0;
|
||||
packet[13] = 0x2E;
|
||||
break;
|
||||
case DHD_D4:
|
||||
packet[12] = 0x37;
|
||||
packet[13] = 0xED;
|
||||
break;
|
||||
default:
|
||||
packet[12] = rx_tx_addr[2]; // txid[2]
|
||||
if (option & BAYANG_OPTION_FLAG_ANALOGAUX)
|
||||
@ -325,7 +338,10 @@ uint16_t BAYANG_callback()
|
||||
static void __attribute__((unused)) BAYANG_initialize_txid()
|
||||
{
|
||||
//Could be using txid[0..2] but using rx_tx_addr everywhere instead...
|
||||
hopping_frequency[0]=0;
|
||||
if(sub_protocol==DHD_D4)
|
||||
hopping_frequency[0]=(rx_tx_addr[2]&0x07)|0x01;
|
||||
else
|
||||
hopping_frequency[0]=0;
|
||||
hopping_frequency[1]=(rx_tx_addr[3]&0x1F)+0x10;
|
||||
hopping_frequency[2]=hopping_frequency[1]+0x20;
|
||||
hopping_frequency[3]=hopping_frequency[2]+0x20;
|
||||
|
@ -11,7 +11,7 @@
|
||||
11,SLT,SLT_V1,SLT_V2,Q100,Q200,MR100
|
||||
12,CX10,GREEN,BLUE,DM007,---,J3015_1,J3015_2,MK33041
|
||||
13,CG023,CG023,YD829
|
||||
14,Bayang,Bayang,H8S3D,X16_AH,IRDRONE
|
||||
14,Bayang,Bayang,H8S3D,X16_AH,IRDRONE,DHD_D4
|
||||
15,FrskyX,CH_16,CH_8,EU_16,EU_8
|
||||
16,ESky
|
||||
17,MT99xx,MT,H7,YZ,LS,FY805
|
||||
|
@ -19,7 +19,7 @@
|
||||
#define VERSION_MAJOR 1
|
||||
#define VERSION_MINOR 2
|
||||
#define VERSION_REVISION 1
|
||||
#define VERSION_PATCH_LEVEL 40
|
||||
#define VERSION_PATCH_LEVEL 41
|
||||
|
||||
//******************
|
||||
// Protocols
|
||||
@ -166,6 +166,7 @@ enum BAYANG
|
||||
H8S3D = 1,
|
||||
X16_AH = 2,
|
||||
IRDRONE = 3,
|
||||
DHD_D4 = 4,
|
||||
};
|
||||
enum MT99XX
|
||||
{
|
||||
@ -665,6 +666,7 @@ Serial: 100000 Baud 8e2 _ xxxx xxxx p --
|
||||
H8S3D 1
|
||||
X16_AH 2
|
||||
IRDRONE 3
|
||||
DHD_D4 4
|
||||
sub_protocol==MT99XX
|
||||
MT99 0
|
||||
H7 1
|
||||
|
@ -141,7 +141,7 @@ static uint16_t XN297Dump_callback()
|
||||
{
|
||||
NRF24L01_ReadPayload(packet,XN297DUMP_MAX_PACKET_LEN);
|
||||
debug_time("RX: ");
|
||||
debug("us %d ", option);
|
||||
debug("us C=%d ", hopping_frequency_no);
|
||||
if(XN297Dump_process_packet())
|
||||
{ // valid crc found
|
||||
debug("A=");
|
||||
|
@ -465,6 +465,7 @@ const PPM_Parameters PPM_prot[14*NBR_BANKS]= {
|
||||
H8S3D
|
||||
X16_AH
|
||||
IRDRONE
|
||||
DHD_D4
|
||||
PROTO_BUGS
|
||||
NONE
|
||||
PROTO_BUGSMINI
|
||||
|
Loading…
x
Reference in New Issue
Block a user