Added EventSource for webUI updates, completed more features

This commit is contained in:
Djuri 2023-11-08 15:27:22 +01:00
parent 91fd921e2e
commit 280764a2fa
16 changed files with 241 additions and 78 deletions

View file

@ -185,20 +185,30 @@ void blinkDelayTwoColor(int d, int times, uint32_t c1, uint32_t c2)
void clearLeds()
{
preferences.putBool("ledStatus", false);
pixels.clear();
pixels.show();
}
void setLights(int r, int g, int b)
{
setLights(pixels.Color(r, g, b));
}
void setLights(uint32_t color)
{
preferences.putUInt("ledColor", color);
preferences.putBool("ledStatus", true);
for (int i = 0; i < NEOPIXEL_COUNT; i++)
{
pixels.setPixelColor(i, pixels.Color(r, g, b));
pixels.setPixelColor(i, color);
}
pixels.show();
}
QueueHandle_t getLedTaskQueue()
{
return ledTaskQueue;