Add debug flag configurable in SpejsNode::init
parent
52c834bbba
commit
cd4b46f090
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
#define CONFIG_FILE "config.json"
|
#define CONFIG_FILE "config.json"
|
||||||
|
|
||||||
void SpejsNode::init() {
|
void SpejsNode::init(bool debug) {
|
||||||
deviceID = WifiStation.getMAC().substring(6, 12);
|
deviceID = WifiStation.getMAC().substring(6, 12);
|
||||||
|
|
||||||
currentSlot = 0;
|
currentSlot = 0;
|
||||||
|
@ -15,7 +15,7 @@ void SpejsNode::init() {
|
||||||
}
|
}
|
||||||
|
|
||||||
Serial.begin(115200);
|
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);
|
debugf("*** SpejsNode init, runnning on: %s, current rom: %d", deviceID.c_str(), currentSlot);
|
||||||
|
|
||||||
|
|
|
@ -87,7 +87,7 @@ public:
|
||||||
void onConnected();
|
void onConnected();
|
||||||
void gotIP(IPAddress ip, IPAddress netmask, IPAddress gateway);
|
void gotIP(IPAddress ip, IPAddress netmask, IPAddress gateway);
|
||||||
|
|
||||||
void init();
|
void init(bool debug=false);
|
||||||
|
|
||||||
bool notify(String key, String value);
|
bool notify(String key, String value);
|
||||||
bool subscribe(String topic);
|
bool subscribe(String topic);
|
||||||
|
|
Loading…
Reference in New Issue