mirror of
https://gitlab.com/zwirbel/illucat.git
synced 2025-12-17 02:06:39 +01:00
fooo
This commit is contained in:
@@ -4,8 +4,6 @@
|
|||||||
#include <painlessMesh.h>
|
#include <painlessMesh.h>
|
||||||
#include <base/MeshSprocket.h>
|
#include <base/MeshSprocket.h>
|
||||||
#include <MeshNet.h>
|
#include <MeshNet.h>
|
||||||
#include <DNSServer.h>
|
|
||||||
|
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "NeoPattern.cpp"
|
#include "NeoPattern.cpp"
|
||||||
@@ -23,8 +21,6 @@
|
|||||||
using namespace std;
|
using namespace std;
|
||||||
using namespace std::placeholders;
|
using namespace std::placeholders;
|
||||||
|
|
||||||
const byte DNS_PORT = 53;
|
|
||||||
|
|
||||||
class IlluCat : public MeshSprocket {
|
class IlluCat : public MeshSprocket {
|
||||||
public:
|
public:
|
||||||
NeoPattern* pixels;
|
NeoPattern* pixels;
|
||||||
@@ -32,7 +28,6 @@ class IlluCat : public MeshSprocket {
|
|||||||
NeoPatternDto state;
|
NeoPatternDto state;
|
||||||
AsyncWebServer* server;
|
AsyncWebServer* server;
|
||||||
AsyncWebSocket* ws;
|
AsyncWebSocket* ws;
|
||||||
DNSServer* dnsServer;
|
|
||||||
|
|
||||||
NeoPixelConfig pixelConfig;
|
NeoPixelConfig pixelConfig;
|
||||||
SprocketConfig sprocketConfig;
|
SprocketConfig sprocketConfig;
|
||||||
@@ -77,7 +72,6 @@ class IlluCat : public MeshSprocket {
|
|||||||
pixels = new NeoPattern(pixelConfig.length, pixelConfig.pin, NEO_GRB + NEO_KHZ800);
|
pixels = new NeoPattern(pixelConfig.length, pixelConfig.pin, NEO_GRB + NEO_KHZ800);
|
||||||
server = new AsyncWebServer(80);
|
server = new AsyncWebServer(80);
|
||||||
ws = new AsyncWebSocket("/pixel");
|
ws = new AsyncWebSocket("/pixel");
|
||||||
dnsServer = new DNSServer();
|
|
||||||
|
|
||||||
// add plugins
|
// add plugins
|
||||||
addPlugin(new OtaTcpPlugin(otaConfig));
|
addPlugin(new OtaTcpPlugin(otaConfig));
|
||||||
@@ -86,10 +80,6 @@ class IlluCat : public MeshSprocket {
|
|||||||
addPlugin(new PixelPlugin(pixelConfig, pixels));
|
addPlugin(new PixelPlugin(pixelConfig, pixels));
|
||||||
defaultAnimation();
|
defaultAnimation();
|
||||||
|
|
||||||
// configure DNS
|
|
||||||
// plugin?
|
|
||||||
dnsServer->setErrorReplyCode(DNSReplyCode::NoError);
|
|
||||||
dnsServer->start(DNS_PORT, "*", WiFi.softAPIP());
|
|
||||||
String softApPrt = "SoftAP IP: " + WiFi.softAPIP().toString();
|
String softApPrt = "SoftAP IP: " + WiFi.softAPIP().toString();
|
||||||
PRINT_MSG(Serial, SPROCKET_TYPE, softApPrt.c_str());
|
PRINT_MSG(Serial, SPROCKET_TYPE, softApPrt.c_str());
|
||||||
|
|
||||||
@@ -142,7 +132,6 @@ class IlluCat : public MeshSprocket {
|
|||||||
|
|
||||||
void loop(){
|
void loop(){
|
||||||
MeshSprocket::loop();
|
MeshSprocket::loop();
|
||||||
dnsServer->processNextRequest();
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user