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
+1
View File
@@ -22,6 +22,7 @@
#include <stdio.h>
#include "opentx.h"
#include "bootloader_flash.h"
#include "timers_driver.h"
#if defined(LIBOPENUI)
#include "libopenui.h"
+1
View File
@@ -23,6 +23,7 @@
#include "opentx.h"
#include "frsky_firmware_update.h"
#include "debug.h"
#include "timers_driver.h"
#if defined(LIBOPENUI)
#include "libopenui.h"
+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;
+5
View File
@@ -57,6 +57,11 @@ class MultiRfProtocols
RfProto(int proto) : proto(proto) {}
bool parse(const uint8_t* data, uint8_t len);
// array of strings
void fillSubProtoList(const char** str, int n);
// fixed length strings concatenated
void fillSubProtoList(const char* str, int n, int len);
uint8_t getOption() const;