Skip to content

Commit

Permalink
Proto list: fix flags
Browse files Browse the repository at this point in the history
  • Loading branch information
pascallanger committed Sep 9, 2021
1 parent 1319784 commit 88343b7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions Multiprotocol/Multi_Protos.ino
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ uint16_t PROTOLIST_callback()
{
if(option != prev_option)
{//Only send once
/* Type 0x11 Protocol list export via telemetry. Used by the protocol PROTO_PROTOLIST=0, the list entry is given by the option field.
/* Type 0x11 Protocol list export via telemetry. Used by the protocol PROTO_PROTOLIST=0, the list entry is given by the Option field.
length: variable
data[0] = protocol number, 0xFF is an invalid list entry (Option value too large), Option == 0xFF -> number of protocols in the list
data[1..n] = protocol name null terminated
Expand Down Expand Up @@ -517,10 +517,10 @@ uint16_t PROTOLIST_callback()
//Flags
uint8_t flags=0;
#ifdef FAILSAFE_ENABLE
if(multi_protocols[multi_protocols_index].failSafe)
if(multi_protocols[option].failSafe)
flags |= 0x01; //Failsafe supported
#endif
if(multi_protocols[multi_protocols_index].chMap)
if(multi_protocols[option].chMap)
flags |= 0x02; //Disable_ch_mapping supported
Serial_write( flags | (multi_protocols[option].optionType<<4)); // flags && option type
//Number of sub protocols
Expand Down
2 changes: 1 addition & 1 deletion Multiprotocol/Multiprotocol.h
Original file line number Diff line number Diff line change
Expand Up @@ -1292,7 +1292,7 @@ Serial: 100000 Baud 8e2 _ xxxx xxxx p --
length: 22
data[0..21] = Config data
Type 0x11 Protocol list export via telemetry. Used by the protocol PROTO_PROTOLIST=0, the list entry is given by the option field.
Type 0x11 Protocol list export via telemetry. Used by the protocol PROTO_PROTOLIST=0, the list entry is given by the Option field.
length: variable
data[0] = protocol number, 0xFF is an invalid list entry (Option value too large), Option == 0xFF -> number of protocols in the list
data[1..n] = protocol name null terminated
Expand Down

0 comments on commit 88343b7

Please sign in to comment.