add stuff

This commit is contained in:
2018-09-19 00:27:33 +02:00
parent 64e9a33971
commit 1319fb045c
4 changed files with 16 additions and 4 deletions

View File

@@ -87,11 +87,13 @@ class IlluCat : public MeshSprocket {
addPlugin(new PixelPlugin(pixelConfig, pixels));
// TODO plugin?
dnsServer->setErrorReplyCode(DNSReplyCode::NoError);
dnsServer->start(DNS_PORT, "*", WiFi.softAPIP());
Serial.println(WiFi.softAPIP());
defaultAnimation();
// TODO plugin
// setup web stuff
server->serveStatic("/pixelConfig.json", SPIFFS, "pixelConfig.json");
server->on("/pixel/pattern", HTTP_POST, bind(&IlluCat::patternWebRequestHandler, this, _1));
@@ -123,6 +125,7 @@ class IlluCat : public MeshSprocket {
}
void dispatch( uint32_t from, String &msg ) {
Serial.println(msg);
currentMessage.fromJsonString(msg);
if(currentMessage.valid){
currentMessage.from = from;