Add debug flag configurable in SpejsNode::init

master
informatic 2018-06-28 15:35:32 +02:00
parent 52c834bbba
commit cd4b46f090
2 changed files with 3 additions and 3 deletions

View File

@ -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);

View File

@ -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);