From b9964e0ac12c81522c1f798858b5a0f5d418b597 Mon Sep 17 00:00:00 2001 From: Patrick Balsiger Date: Mon, 3 Sep 2018 02:14:14 +0200 Subject: [PATCH] stuff --- src/JsonStruct.h | 4 +--- src/base/MeshSprocket.h | 14 -------------- 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/src/JsonStruct.h b/src/JsonStruct.h index 5a77a7d..3488152 100644 --- a/src/JsonStruct.h +++ b/src/JsonStruct.h @@ -52,7 +52,6 @@ struct JsonStruct { }; void fromFile(const char* path) { - Serial.println("read json"); File configFile = SPIFFS.open(path, "r"); String cfgFileStr = configFile.readString(); @@ -68,11 +67,10 @@ struct JsonStruct { valid = verifyJsonObject(json); if(configFile) { - Serial.println("map json object"); fromJsonObject(json); } if(!valid){ - Serial.println("read json failed"); + Serial.println("ERROR: read failed for " + String(path)); } configFile.close(); } diff --git a/src/base/MeshSprocket.h b/src/base/MeshSprocket.h index 55fb9d0..908ac15 100644 --- a/src/base/MeshSprocket.h +++ b/src/base/MeshSprocket.h @@ -22,28 +22,14 @@ class MeshSprocket : public Sprocket { } - virtual void onChangedConnections(){}; - virtual void onNewConnection(){}; - Sprocket* activate(Scheduler* scheduler, Network* network) { Sprocket::activate(scheduler, network); net = static_cast(network); net->onReceive(bind(&MeshSprocket::dispatch,this, _1, _2)); - net->mesh.onNewConnection(bind(&MeshSprocket::newConnection,this, _1)); - net->mesh.onChangedConnections(bind(&MeshSprocket::connectionChanged,this)); return this; } using Sprocket::activate; - virtual void newConnection(uint32_t nodeId){ - PRINT_MSG(Serial, "MeshSprocket", "connected to %u", nodeId); - onNewConnection(); - } - virtual void connectionChanged(){ - PRINT_MSG(Serial, "MeshSprocket", "connection changed"); - onChangedConnections(); - } - virtual void onMessage(uint32_t from, String &msg) { Serial.printf("MeshSprocket onMessage: received from %u msg=%s\n", from, msg.c_str()); };