Skip to content

Commit 88343b7

Browse files
committed
Proto list: fix flags
1 parent 1319784 commit 88343b7

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Multiprotocol/Multi_Protos.ino

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ uint16_t PROTOLIST_callback()
476476
{
477477
if(option != prev_option)
478478
{//Only send once
479-
/* Type 0x11 Protocol list export via telemetry. Used by the protocol PROTO_PROTOLIST=0, the list entry is given by the option field.
479+
/* Type 0x11 Protocol list export via telemetry. Used by the protocol PROTO_PROTOLIST=0, the list entry is given by the Option field.
480480
length: variable
481481
data[0] = protocol number, 0xFF is an invalid list entry (Option value too large), Option == 0xFF -> number of protocols in the list
482482
data[1..n] = protocol name null terminated
@@ -517,10 +517,10 @@ uint16_t PROTOLIST_callback()
517517
//Flags
518518
uint8_t flags=0;
519519
#ifdef FAILSAFE_ENABLE
520-
if(multi_protocols[multi_protocols_index].failSafe)
520+
if(multi_protocols[option].failSafe)
521521
flags |= 0x01; //Failsafe supported
522522
#endif
523-
if(multi_protocols[multi_protocols_index].chMap)
523+
if(multi_protocols[option].chMap)
524524
flags |= 0x02; //Disable_ch_mapping supported
525525
Serial_write( flags | (multi_protocols[option].optionType<<4)); // flags && option type
526526
//Number of sub protocols

Multiprotocol/Multiprotocol.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1292,7 +1292,7 @@ Serial: 100000 Baud 8e2 _ xxxx xxxx p --
12921292
length: 22
12931293
data[0..21] = Config data
12941294
1295-
Type 0x11 Protocol list export via telemetry. Used by the protocol PROTO_PROTOLIST=0, the list entry is given by the option field.
1295+
Type 0x11 Protocol list export via telemetry. Used by the protocol PROTO_PROTOLIST=0, the list entry is given by the Option field.
12961296
length: variable
12971297
data[0] = protocol number, 0xFF is an invalid list entry (Option value too large), Option == 0xFF -> number of protocols in the list
12981298
data[1..n] = protocol name null terminated

0 commit comments

Comments
 (0)