fix(bw): customisable switch LED color text sometimes incorrect on GX12 (#5776)
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user