chore(simulator): fix build of simulator libraries (#6142)

Co-authored-by: philmoz <phil.a.mitchell@gmail.com>
This commit is contained in:
Peter Feerick
2025-04-25 12:55:39 +10:00
committed by GitHub
co-authored by philmoz
parent 9c1afbec78
commit c04fb9fdd4
4 changed files with 24 additions and 16 deletions
-7
View File
@@ -30,13 +30,6 @@ set(BOOTLOADER_SRC ${BOOTLOADER_SRC}
${CMAKE_CURRENT_SOURCE_DIR}/hal/key_driver.cpp
)
if(FUNCTION_SWITCHES_WITH_RGB)
set(SRC ${SRC}
hal/rgbleds.cpp
)
endif()
if (NOT NATIVE_BUILD)
set(SRC ${SRC}
hal/storage.cpp
-9
View File
@@ -23,20 +23,11 @@
#include "hal/rgbleds.h"
#include "definitions.h"
#if defined(SIMU)
#define __weak
#elif !defined(__weak)
#define __weak __attribute__((weak))
#endif
bool usbChargerLed() { return true; }
void ledRed() {}
void ledGreen() {}
void ledBlue() {}
void ledOff() {}
__weak void fsLedOn(uint8_t) {}
__weak void fsLedOff(uint8_t) {}
__weak void fsLedRGB(uint8_t, uint32_t) {}
bool fsLedState(uint8_t) { return false;}
void rgbSetLedColor(unsigned char, unsigned char, unsigned char, unsigned char) {}
void rgbLedColorApply() {}
@@ -88,6 +88,18 @@ void firmwareTraceCb(const char * text)
}
}
void fsLedRGB(uint8_t idx, uint32_t color)
{
}
void fsLedOn(uint8_t idx)
{
}
void fsLedOff(uint8_t idx)
{
}
// Serial port handling needs to know about OpenTxSimulator, so we we
// need to update what's in simpgmspace.cpp when we have a simulator
// to point at.
+12
View File
@@ -128,6 +128,18 @@ uint16_t simu_get_analog(uint8_t idx)
return 0;
}
void fsLedRGB(uint8_t idx, uint32_t color)
{
}
void fsLedOn(uint8_t idx)
{
}
void fsLedOff(uint8_t idx)
{
}
static char _stringResult[200];
const char * nchar2string(const char * string, int size)