Move optionDisp to Data[19]

This commit is contained in:
pascallanger 2019-10-17 09:41:20 +02:00
parent 40afd67fc6
commit a8cad1e70a
4 changed files with 8 additions and 10 deletions

View File

@ -19,7 +19,7 @@
#define VERSION_MAJOR 1
#define VERSION_MINOR 3
#define VERSION_REVISION 0
#define VERSION_PATCH_LEVEL 18
#define VERSION_PATCH_LEVEL 19
//******************
// Protocols
@ -900,9 +900,7 @@ Serial: 100000 Baud 8e2 _ xxxx xxxx p --
[10] Next 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
[19] Number of sub protocols
[20..27] Sub protocol name [8], not null terminated if sub prototcol len == 8
[28] Option text to be displayed:
[19>>4] Option text to be displayed:
OPTION_NONE 0
OPTION_OPTION 1
OPTION_RFTUNE 2
@ -910,6 +908,8 @@ Serial: 100000 Baud 8e2 _ xxxx xxxx p --
OPTION_FIXEDID 4
OPTION_TELEM 5
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

View File

@ -694,8 +694,8 @@ uint8_t Update_All()
TelemetryUpdate();
#endif
#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))
{ // Autobind is on and BIND_CH went up and Throttle is low
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
CHANGE_PROTOCOL_FLAG_on; //reload protocol
BIND_IN_PROGRESS; //enable bind
BIND_CH_PREV_on;

View File

@ -203,7 +203,7 @@ static void multi_send_status()
for(uint8_t i=0;i<7;i++)
Serial_write(multi_protocols[multi_protocols_index].ProtoString[i]); // protocol name
// 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
uint8_t j=0;
if(nbr && (sub_protocol&0x07)<nbr)
@ -215,8 +215,6 @@ static void multi_send_status()
}
for(;j<8;j++)
Serial_write(0x00);
// Option type
Serial_write(multi_protocols[multi_protocols_index].optionType); // option display type
// Channels function
//TODO
}

View File

@ -54,7 +54,7 @@
/*** 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
// 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.
#define ENABLE_BIND_CH
//Set the channel number used for bind. Default is 16.