feat(color): show switch colors for customisable switches on diagnostic page (#6124)

This commit is contained in:
philmoz
2025-04-28 21:37:07 +10:00
committed by GitHub
parent 522474cf62
commit 5a7a50f2cc
7 changed files with 82 additions and 24 deletions
+9 -4
View File
@@ -65,10 +65,15 @@ uint8_t ledMapping[] = {12, 14, 16, 18, 20, 22};
void fsLedRGB(uint8_t index, uint32_t color)
{
rgbSetLedColor(ledMapping[index], GET_RED(color), \
GET_GREEN(color),GET_BLUE(color));
rgbSetLedColor(ledMapping[index]+1, GET_RED(color), \
GET_GREEN(color),GET_BLUE(color));
rgbSetLedColor(ledMapping[index], GET_RED(color), \
GET_GREEN(color),GET_BLUE(color));
rgbSetLedColor(ledMapping[index]+1, GET_RED(color), \
GET_GREEN(color),GET_BLUE(color));
}
uint32_t fsGetLedRGB(uint8_t index)
{
return rgbGetLedColor(ledMapping[index]);
}
uint8_t getRGBColorIndex(uint32_t color)