mirror of
https://github.com/HendrikRauh/dmx-interface.git
synced 2025-07-09 23:25:45 +00:00
Revert "Merge branch 'main' into 30-add-dmx-in-capability"
This reverts commitb93ae3d682
, reversing changes made tof3ef3aa9b9
.
This commit is contained in:
parent
b93ae3d682
commit
176a12a9b3
5 changed files with 6 additions and 53 deletions
|
@ -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);
|
||||
}
|
|
@ -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);
|
Loading…
Add table
Add a link
Reference in a new issue