fix: Fix LED status object
This commit is contained in:
parent
3e54343da8
commit
d648551835
1 changed files with 7 additions and 1 deletions
|
@ -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;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue