fix(bw): customisable switch LED color text sometimes incorrect on GX12 (#5776)

This commit is contained in:
philmoz
2025-01-13 08:45:58 +10:00
committed by GitHub
parent d6f24d1ea5
commit 8d58ae3cf8
22 changed files with 49 additions and 30 deletions
+7 -3
View File
@@ -71,11 +71,15 @@ void fsLedRGB(uint8_t index, uint32_t color)
uint8_t getRGBColorIndex(uint32_t color)
{
for (uint8_t i = 0; i < (sizeof(colorTable) / sizeof(colorTable[0])); i++) {
for (uint8_t i = 0; i < DIM(colorTable); i++) {
if (color == colorTable[i])
return(i);
return(i + 1);
}
return 5; // Custom value set with Companion
for (uint8_t i = 0; i < DIM(colorTabl2); i++) {
if (color == colorTabl2[i])
return(i + 1);
}
return 0; // Custom value set with Companion
}
#elif defined(FUNCTION_SWITCHES)
void fsLedOff(uint8_t index)