feat: iFlight Commando 14 support (#7494)
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com> Co-authored-by: Peter Feerick <5500713+pfeerick@users.noreply.github.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
Peter Feerick
parent
44b98d5bfd
commit
640fc189e7
@@ -7,7 +7,7 @@ set(SRC ${SRC}
|
||||
hal/usb_driver.cpp
|
||||
)
|
||||
|
||||
if(FUNCTION_SWITCHES)
|
||||
if(FUNCTION_SWITCHES OR RGB_LEDS)
|
||||
set(SRC ${SRC}
|
||||
hal/rgbleds.cpp
|
||||
)
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
#include "definitions.h"
|
||||
#include "dataconstants.h"
|
||||
|
||||
#if defined(FUNCTION_SWITCHES)
|
||||
#if defined(FUNCTION_SWITCHES_RGB_LEDS)
|
||||
static bool hasLedOverride[NUM_FUNCTIONS_SWITCHES] = { false };
|
||||
static RGBLedColor ledOverride[NUM_FUNCTIONS_SWITCHES];
|
||||
@@ -99,6 +100,7 @@ bool getFSLedState(uint8_t index) {
|
||||
return fsLedState(index);
|
||||
}
|
||||
#endif
|
||||
#endif // FUNCTION_SWITCHES
|
||||
|
||||
void turnOffRGBLeds()
|
||||
{
|
||||
|
||||
@@ -25,10 +25,13 @@
|
||||
// "Off", "White", "Red", "Green", "Yellow", "Orange", "Blue", "Pink"
|
||||
constexpr uint32_t colorTable[] = {0x000000, 0xFFFFFF, 0xFF0000, 0x00FF00, 0xFFFF00, 0xFF4000, 0x0000FF, 0xFF00FF};
|
||||
|
||||
#if defined(FUNCTION_SWITCHES)
|
||||
void setFSEditOverride(int index, uint32_t color);
|
||||
void setFSLedOverride(uint8_t index, bool state, uint8_t r, uint8_t g, uint8_t b);
|
||||
void setFSLedOFF(uint8_t index);
|
||||
void setFSLedON(uint8_t index);
|
||||
bool getFSLedState(uint8_t index);
|
||||
uint32_t getFSLedRGBColor(uint8_t index);
|
||||
#endif
|
||||
|
||||
void turnOffRGBLeds();
|
||||
|
||||
Reference in New Issue
Block a user