fix(bw): cannot edit colors for customizable switch LEDs (#7106)

This commit is contained in:
philmoz
2026-02-18 18:56:39 +10:00
committed by GitHub
parent 2e609d8223
commit 26dae70d5a
@@ -78,9 +78,9 @@ uint8_t getRGBColorIndex(uint32_t color)
{ {
for (uint8_t i = 0; i < (sizeof(colorTable) / sizeof(colorTable[0])); i++) { for (uint8_t i = 0; i < (sizeof(colorTable) / sizeof(colorTable[0])); i++) {
if (color == colorTable[i]) if (color == colorTable[i])
return(i); return(i + 1);
} }
return 5; // Custom value set with Companion return 0; // Custom value set with Companion
} }
#elif defined(FUNCTION_SWITCHES) #elif defined(FUNCTION_SWITCHES)
__weak void fsLedOff(uint8_t index) __weak void fsLedOff(uint8_t index)