fix: Fix LED status object

This commit is contained in:
Djuri 2025-05-02 22:28:46 +02:00
parent 3e54343da8
commit d648551835
Signed by: djuri
GPG key ID: 61B9B2DDE5AA3AC1

View file

@ -298,7 +298,13 @@ JsonDocument getLedStatusObject()
uint blue = pixColor & 0xFF; uint blue = pixColor & 0xFF;
char hexColor[8]; char hexColor[8];
snprintf(hexColor, sizeof(hexColor), "#%02X%02X%02X", red, green, blue); snprintf(hexColor, sizeof(hexColor), "#%02X%02X%02X", red, green, blue);
colors.add(hexColor); // colors.add(hexColor);
JsonObject object = colors.add<JsonObject>();
object["red"] = red;
object["green"] = green;
object["blue"] = blue;
object["hex"] = hexColor;
} }
return root; return root;