Merge branch 'main' into 51-button-actions

This commit is contained in:
RaffaelW 2025-04-14 22:40:41 +02:00
commit c7e8c4a9d1
9 changed files with 261 additions and 209 deletions

View file

@ -1,29 +0,0 @@
#include "channels.h"
void onGetChannels(AsyncWebServerRequest *request, DMXESPSerial dmx1, DMXESPSerial dmx2)
{
JsonDocument doc;
for (int channel = 1; channel <= DMXCHANNELS; channel++)
{
uint8_t value = dmx1.read(channel);
if (value != 0)
{
doc["dmx1"][String(channel)] = value;
}
}
for (int channel = 1; channel <= DMXCHANNELS; channel++)
{
uint8_t value = dmx2.read(channel);
if (value != 0)
{
doc["dmx2"][String(channel)] = value;
}
}
String jsonBuffer;
serializeJson(doc, jsonBuffer);
request->send(200, "application/json", jsonBuffer);
}

View file

@ -1,8 +0,0 @@
#include <Preferences.h>
#include <ArduinoJson.h>
#include <AsyncWebServer_ESP32_W5500.h>
#include "ESPDMX.h"
extern Preferences config;
void onGetChannels(AsyncWebServerRequest *request, DMXESPSerial dmx1, DMXESPSerial dmx2);

View file

@ -1,5 +1,4 @@
#include <AsyncWebServer_ESP32_W5500.h>
#include <ESPDMX.h>
#include <Preferences.h>
#ifndef CONFIG_h