mirror of
https://github.com/pascallanger/DIY-Multiprotocol-TX-Module.git
synced 2025-02-04 21:58:10 +00:00
Move optionDisp to Data[19]
This commit is contained in:
parent
40afd67fc6
commit
a8cad1e70a
@ -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 18
|
#define VERSION_PATCH_LEVEL 19
|
||||||
|
|
||||||
//******************
|
//******************
|
||||||
// Protocols
|
// Protocols
|
||||||
@ -900,9 +900,7 @@ Serial: 100000 Baud 8e2 _ xxxx xxxx p --
|
|||||||
[10] Next valid protocol number, can be used to skip invalid protocols
|
[10] Next valid protocol number, can be used to skip invalid protocols
|
||||||
[11] Prev valid protocol number, can be used to skip invalid protocols
|
[11] Prev valid protocol number, can be used to skip invalid protocols
|
||||||
[12..18] Protocol name [7], not null terminated if prototcol len == 7
|
[12..18] Protocol name [7], not null terminated if prototcol len == 7
|
||||||
[19] Number of sub protocols
|
[19>>4] Option text to be displayed:
|
||||||
[20..27] Sub protocol name [8], not null terminated if sub prototcol len == 8
|
|
||||||
[28] Option text to be displayed:
|
|
||||||
OPTION_NONE 0
|
OPTION_NONE 0
|
||||||
OPTION_OPTION 1
|
OPTION_OPTION 1
|
||||||
OPTION_RFTUNE 2
|
OPTION_RFTUNE 2
|
||||||
@ -910,6 +908,8 @@ Serial: 100000 Baud 8e2 _ xxxx xxxx p --
|
|||||||
OPTION_FIXEDID 4
|
OPTION_FIXEDID 4
|
||||||
OPTION_TELEM 5
|
OPTION_TELEM 5
|
||||||
OPTION_SRVFREQ 6
|
OPTION_SRVFREQ 6
|
||||||
|
[19&0x0F] Number of sub protocols
|
||||||
|
[20..27] Sub protocol name [8], not null terminated if sub prototcol len == 8
|
||||||
|
|
||||||
more information can be added by specifing a longer length of the type, the TX will just ignore these bytes
|
more information can be added by specifing a longer length of the type, the TX will just ignore these bytes
|
||||||
|
|
||||||
|
@ -694,8 +694,8 @@ uint8_t Update_All()
|
|||||||
TelemetryUpdate();
|
TelemetryUpdate();
|
||||||
#endif
|
#endif
|
||||||
#ifdef ENABLE_BIND_CH
|
#ifdef ENABLE_BIND_CH
|
||||||
if(IS_AUTOBIND_FLAG_on && IS_BIND_CH_PREV_off && Channel_data[BIND_CH-1]>CHANNEL_MAX_COMMAND && Channel_data[THROTTLE]<(CHANNEL_MIN_100+50))
|
if(IS_AUTOBIND_FLAG_on && IS_BIND_CH_PREV_off && Channel_data[BIND_CH-1]>CHANNEL_MAX_COMMAND)
|
||||||
{ // Autobind is on and BIND_CH went up and Throttle is low
|
{ // Autobind is on and BIND_CH went up
|
||||||
CHANGE_PROTOCOL_FLAG_on; //reload protocol
|
CHANGE_PROTOCOL_FLAG_on; //reload protocol
|
||||||
BIND_IN_PROGRESS; //enable bind
|
BIND_IN_PROGRESS; //enable bind
|
||||||
BIND_CH_PREV_on;
|
BIND_CH_PREV_on;
|
||||||
|
@ -203,7 +203,7 @@ static void multi_send_status()
|
|||||||
for(uint8_t i=0;i<7;i++)
|
for(uint8_t i=0;i<7;i++)
|
||||||
Serial_write(multi_protocols[multi_protocols_index].ProtoString[i]); // protocol name
|
Serial_write(multi_protocols[multi_protocols_index].ProtoString[i]); // protocol name
|
||||||
// Sub-protocol
|
// Sub-protocol
|
||||||
uint8_t nbr=multi_protocols[multi_protocols_index].nbrSubProto;
|
uint8_t nbr=multi_protocols[multi_protocols_index].nbrSubProto | (multi_protocols[multi_protocols_index].optionType<<4); // add option display type
|
||||||
Serial_write(nbr); // number of sub protocols
|
Serial_write(nbr); // number of sub protocols
|
||||||
uint8_t j=0;
|
uint8_t j=0;
|
||||||
if(nbr && (sub_protocol&0x07)<nbr)
|
if(nbr && (sub_protocol&0x07)<nbr)
|
||||||
@ -215,8 +215,6 @@ static void multi_send_status()
|
|||||||
}
|
}
|
||||||
for(;j<8;j++)
|
for(;j<8;j++)
|
||||||
Serial_write(0x00);
|
Serial_write(0x00);
|
||||||
// Option type
|
|
||||||
Serial_write(multi_protocols[multi_protocols_index].optionType); // option display type
|
|
||||||
// Channels function
|
// Channels function
|
||||||
//TODO
|
//TODO
|
||||||
}
|
}
|
||||||
|
@ -54,7 +54,7 @@
|
|||||||
/*** AUTO BIND ***/ // Also referred as "Bind on powerup"
|
/*** AUTO BIND ***/ // Also referred as "Bind on powerup"
|
||||||
/*****************/
|
/*****************/
|
||||||
//Bind from channel enables you to bind when a specified channel is going from low to high. This feature is only active
|
//Bind from channel enables you to bind when a specified channel is going from low to high. This feature is only active
|
||||||
// if you specify AUTOBIND in PPM mode or set AutoBind to YES for serial mode. It also requires that the throttle channel is low.
|
// if you specify AUTOBIND in PPM mode or set AutoBind to YES for serial mode.
|
||||||
//Comment to globaly disable the bind feature from a channel.
|
//Comment to globaly disable the bind feature from a channel.
|
||||||
#define ENABLE_BIND_CH
|
#define ENABLE_BIND_CH
|
||||||
//Set the channel number used for bind. Default is 16.
|
//Set the channel number used for bind. Default is 16.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user