From cd4b46f090fe054aa3baf9b3b2660f48b7166664 Mon Sep 17 00:00:00 2001 From: Piotr Dobrowolski Date: Thu, 28 Jun 2018 15:35:32 +0200 Subject: [PATCH] Add debug flag configurable in SpejsNode::init --- spejsiot/SpejsNode.cpp | 4 ++-- spejsiot/SpejsNode.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/spejsiot/SpejsNode.cpp b/spejsiot/SpejsNode.cpp index b86ae18..bac82c0 100644 --- a/spejsiot/SpejsNode.cpp +++ b/spejsiot/SpejsNode.cpp @@ -6,7 +6,7 @@ #define CONFIG_FILE "config.json" -void SpejsNode::init() { +void SpejsNode::init(bool debug) { deviceID = WifiStation.getMAC().substring(6, 12); currentSlot = 0; @@ -15,7 +15,7 @@ void SpejsNode::init() { } Serial.begin(115200); - Serial.systemDebugOutput(false); // Debug output to serial + Serial.systemDebugOutput(debug); // Debug output to serial debugf("*** SpejsNode init, runnning on: %s, current rom: %d", deviceID.c_str(), currentSlot); diff --git a/spejsiot/SpejsNode.h b/spejsiot/SpejsNode.h index bd79f6c..7bbcd03 100644 --- a/spejsiot/SpejsNode.h +++ b/spejsiot/SpejsNode.h @@ -87,7 +87,7 @@ public: void onConnected(); void gotIP(IPAddress ip, IPAddress netmask, IPAddress gateway); - void init(); + void init(bool debug=false); bool notify(String key, String value); bool subscribe(String topic);