mirror of
https://github.com/pascallanger/DIY-Multiprotocol-TX-Module.git
synced 2025-02-04 20:38:14 +00:00
Fix DSM invalid protocol when binding
This commit is contained in:
parent
8f789607e4
commit
7f3c80c2a9
@ -19,7 +19,7 @@
|
|||||||
#define VERSION_MAJOR 1
|
#define VERSION_MAJOR 1
|
||||||
#define VERSION_MINOR 3
|
#define VERSION_MINOR 3
|
||||||
#define VERSION_REVISION 0
|
#define VERSION_REVISION 0
|
||||||
#define VERSION_PATCH_LEVEL 54
|
#define VERSION_PATCH_LEVEL 55
|
||||||
|
|
||||||
//******************
|
//******************
|
||||||
// Protocols
|
// Protocols
|
||||||
|
@ -144,6 +144,7 @@ static void multi_send_status()
|
|||||||
if((sub_protocol&0x07) && multi_protocols_index != 0xFF)
|
if((sub_protocol&0x07) && multi_protocols_index != 0xFF)
|
||||||
{
|
{
|
||||||
uint8_t nbr=multi_protocols[multi_protocols_index].nbrSubProto;
|
uint8_t nbr=multi_protocols[multi_protocols_index].nbrSubProto;
|
||||||
|
if(protocol==PROTO_DSM) nbr++; //Auto sub_protocol
|
||||||
if((sub_protocol&0x07)>=nbr)
|
if((sub_protocol&0x07)>=nbr)
|
||||||
flags &= ~0x04; //Invalid sub protocol
|
flags &= ~0x04; //Invalid sub protocol
|
||||||
}
|
}
|
||||||
@ -163,7 +164,7 @@ static void multi_send_status()
|
|||||||
flags |= 0x80;
|
flags |= 0x80;
|
||||||
}
|
}
|
||||||
Serial_write(flags);
|
Serial_write(flags);
|
||||||
|
|
||||||
// Version number example: 1.1.6.1
|
// Version number example: 1.1.6.1
|
||||||
Serial_write(VERSION_MAJOR);
|
Serial_write(VERSION_MAJOR);
|
||||||
Serial_write(VERSION_MINOR);
|
Serial_write(VERSION_MINOR);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user