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
+4 -1
View File
@@ -24,12 +24,15 @@
#include "opentx.h"
#include "diskio.h"
#include "timers_driver.h"
#include "cli.h"
#include <ctype.h>
#include <malloc.h>
#include <new>
#include <stdarg.h>
#include "cli.h"
#if defined(INTMODULE_USART)
#include "intmodule_serial_driver.h"
@@ -20,6 +20,7 @@
*/
#include "opentx.h"
#include "timers_driver.h"
extern uint8_t g_moduleIdx;
@@ -20,6 +20,7 @@
*/
#include "opentx.h"
#include "timers_driver.h"
extern uint8_t g_moduleIdx;
@@ -158,4 +159,4 @@ void menuRadioSpectrumAnalyser(event_t event)
int offset = reusableBuffer.spectrumAnalyser.track - (reusableBuffer.spectrumAnalyser.freq - reusableBuffer.spectrumAnalyser.span / 2);
int x = offset / reusableBuffer.spectrumAnalyser.step;
lcdDrawVerticalLine(x, 10+FH+1, LCD_H, SOLID);
}
}
+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;
+1
View File
@@ -23,6 +23,7 @@
#include "io/frsky_firmware_update.h"
#include "hal/adc_driver.h"
#include "aux_serial_driver.h"
#include "timers_driver.h"
#if defined(LIBOPENUI)
#include "libopenui.h"
+1
View File
@@ -26,6 +26,7 @@
#include "libopenui/src/libopenui_file.h"
#include "mixer_scheduler.h"
#include "heartbeat_driver.h"
#include "timers_driver.h"
#if defined(INTMODULE_USART)
#include "intmodule_serial_driver.h"
+1
View File
@@ -20,6 +20,7 @@
*/
#include "opentx.h"
#include "timers_driver.h"
#if defined(MULTIMODULE)
#include "pulses/multi.h"
@@ -132,13 +132,6 @@ void delay_ms(uint32_t count);
}
#endif
#if !defined(BOOT)
void watchdogSuspend(uint32_t timeout);
#define WATCHDOG_SUSPEND(x) watchdogSuspend(x)
#else
#define WATCHDOG_SUSPEND(...)
#endif
#define INIT_KEYS_PINS(GPIO) \
GPIO_InitStructure.GPIO_Pin = KEYS_ ## GPIO ## _PINS; \
GPIO_Init(GPIO, &GPIO_InitStructure)
@@ -35,4 +35,6 @@ void stop1msTimer();
static inline uint16_t getTmr2MHz() { return TIMER_2MHz_TIMER->CNT; }
void watchdogSuspend(uint32_t timeout);
#endif
@@ -30,6 +30,7 @@ extern "C" {
#include "usbd_desc.h"
#include "usbd_usr.h"
#include "usbd_hid_core.h"
#include "usbd_cdc_core.h"
}
#include "board.h"
@@ -28,6 +28,13 @@
#include <string.h>
#if !defined(BOOT)
#include "timers_driver.h"
#define WATCHDOG_SUSPEND(x) watchdogSuspend(x)
#else
#define WATCHDOG_SUSPEND(...)
#endif
#if defined(__cplusplus) && !defined(SIMU)
extern "C" {
#endif
+2
View File
@@ -32,6 +32,8 @@
#include "sdcard.h"
#include "debug.h"
#include <string.h>
#if defined(AUX_SERIAL) || defined(AUX2_SERIAL)
#include "aux_serial_driver.h"
#endif