mirror of
https://github.com/HendrikRauh/dmx-interface.git
synced 2025-05-19 10:32:56 +00:00
Update main.cpp to use LittleFS
This commit is contained in:
parent
2305ff2cc0
commit
2667f36444
1 changed files with 4 additions and 4 deletions
|
@ -2,7 +2,7 @@
|
||||||
// #include <ArtnetEther.h>
|
// #include <ArtnetEther.h>
|
||||||
#include "ESPDMX.h"
|
#include "ESPDMX.h"
|
||||||
#include <ESPAsyncWebServer.h>
|
#include <ESPAsyncWebServer.h>
|
||||||
#include <SPIFFS.h>
|
#include <LittleFS.h>
|
||||||
#include "routes/config.h"
|
#include "routes/config.h"
|
||||||
|
|
||||||
DMXESPSerial dmx1;
|
DMXESPSerial dmx1;
|
||||||
|
@ -73,13 +73,13 @@ void setup()
|
||||||
// if Artnet packet comes, this function is called to every universe
|
// if Artnet packet comes, this function is called to every universe
|
||||||
artnet.subscribeArtDmx([&](const uint8_t *data, uint16_t size, const ArtDmxMetadata &metadata, const ArtNetRemoteInfo &remote) {});
|
artnet.subscribeArtDmx([&](const uint8_t *data, uint16_t size, const ArtDmxMetadata &metadata, const ArtNetRemoteInfo &remote) {});
|
||||||
|
|
||||||
if (!SPIFFS.begin(true))
|
if (!LittleFS.begin(true))
|
||||||
{
|
{
|
||||||
Serial.println("An Error has occurred while mounting SPIFFS");
|
Serial.println("An Error has occurred while mounting LittleFS");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
server.serveStatic("/", SPIFFS, "/").setDefaultFile("index.html");
|
server.serveStatic("/", LittleFS, "/").setDefaultFile("index.html");
|
||||||
|
|
||||||
server.on("/config", HTTP_GET, [](AsyncWebServerRequest *request)
|
server.on("/config", HTTP_GET, [](AsyncWebServerRequest *request)
|
||||||
{ onGetConfig(request); });
|
{ onGetConfig(request); });
|
||||||
|
|
Loading…
Add table
Reference in a new issue