Horus fixes

This commit is contained in:
Raphael Coeffic
2022-06-11 15:38:08 +02:00
committed by Raphael Coeffic
parent cf06efea87
commit f6565c6826
15 changed files with 41 additions and 12 deletions
+12 -3
View File
@@ -74,9 +74,9 @@ bool MultiRfProtocols::RfProto::parse(const uint8_t* data, uint8_t len)
label = "Frsky";
flags = 0x20;
subProtoNr = def->maxSubtype + 1;
subProtoLen = def->subTypeString[0];
s = def->subTypeString + 1;
fillSubProtoList(def->subTypeString, def->maxSubtype + 1);
return true;
} else {
// proto label string
@@ -118,6 +118,15 @@ void MultiRfProtocols::RfProto::fillSubProtoList(const char* str, int n, int len
}
}
void MultiRfProtocols::RfProto::fillSubProtoList(const char** str, int n)
{
subProtos.reserve(n);
for (int i = 0; i < n; i++) {
subProtos.emplace_back(str[i]);
}
}
uint8_t MultiRfProtocols::RfProto::getOption() const
{
uint8_t opt = flags >> 4;