This commit is contained in:
2018-10-01 01:34:25 +02:00
parent 3959cb0b94
commit 83384a8a7b

View File

@@ -4,8 +4,6 @@
#include <painlessMesh.h>
#include <base/MeshSprocket.h>
#include <MeshNet.h>
#include <DNSServer.h>
#include "config.h"
#include "NeoPattern.cpp"
@@ -23,8 +21,6 @@
using namespace std;
using namespace std::placeholders;
const byte DNS_PORT = 53;
class IlluCat : public MeshSprocket {
public:
NeoPattern* pixels;
@@ -32,7 +28,6 @@ class IlluCat : public MeshSprocket {
NeoPatternDto state;
AsyncWebServer* server;
AsyncWebSocket* ws;
DNSServer* dnsServer;
NeoPixelConfig pixelConfig;
SprocketConfig sprocketConfig;
@@ -77,7 +72,6 @@ class IlluCat : public MeshSprocket {
pixels = new NeoPattern(pixelConfig.length, pixelConfig.pin, NEO_GRB + NEO_KHZ800);
server = new AsyncWebServer(80);
ws = new AsyncWebSocket("/pixel");
dnsServer = new DNSServer();
// add plugins
addPlugin(new OtaTcpPlugin(otaConfig));
@@ -86,10 +80,6 @@ class IlluCat : public MeshSprocket {
addPlugin(new PixelPlugin(pixelConfig, pixels));
defaultAnimation();
// configure DNS
// plugin?
dnsServer->setErrorReplyCode(DNSReplyCode::NoError);
dnsServer->start(DNS_PORT, "*", WiFi.softAPIP());
String softApPrt = "SoftAP IP: " + WiFi.softAPIP().toString();
PRINT_MSG(Serial, SPROCKET_TYPE, softApPrt.c_str());
@@ -142,7 +132,6 @@ class IlluCat : public MeshSprocket {
void loop(){
MeshSprocket::loop();
dnsServer->processNextRequest();
}
};