feat(cpn): add customisable switch colors to Companion YAML file handling (#5796)

This commit is contained in:
philmoz
2025-01-19 11:23:46 +10:00
committed by GitHub
parent e41680bf87
commit cce416b8df
4 changed files with 42 additions and 0 deletions
+11
View File
@@ -104,6 +104,15 @@ class USBJoystickChData {
void clear() { memset(reinterpret_cast<void *>(this), 0, sizeof(USBJoystickChData)); }
};
class RGBLedColor {
public:
RGBLedColor() { clear(); }
int r;
int g;
int b;
void clear() { memset(reinterpret_cast<void *>(this), 0, sizeof(RGBLedColor)); }
};
class ModelData {
Q_DECLARE_TR_FUNCTIONS(ModelData)
@@ -232,6 +241,8 @@ class ModelData {
unsigned int functionSwitchStartConfig;
unsigned int functionSwitchLogicalState;
char functionSwitchNames[CPN_MAX_SWITCHES_FUNCTION][HARDWARE_NAME_LEN + 1];
RGBLedColor functionSwitchLedONColor[CPN_MAX_SWITCHES_FUNCTION];
RGBLedColor functionSwitchLedOFFColor[CPN_MAX_SWITCHES_FUNCTION];
// Custom USB joytsick mapping
unsigned int usbJoystickExtMode;