UI improvements

This commit is contained in:
Djuri 2023-11-13 14:01:20 +01:00
parent 8d8785df1d
commit 07144f6b6a
4 changed files with 85 additions and 56 deletions

View file

@ -245,14 +245,15 @@ void setLights(int r, int g, int b)
void setLights(uint32_t color)
{
preferences.putUInt("ledColor", color);
bool ledStatus = true;
if (color == pixels.Color(0, 0, 0))
{
ledStatus = false;
} else {
preferences.putUInt("ledColor", color);
}
preferences.putBool("ledStatus", false);
preferences.putBool("ledStatus", ledStatus);
for (int i = 0; i < NEOPIXEL_COUNT; i++)
{