From 39da3e6d6c61cfda4a02e4ad2904034a97c256f3 Mon Sep 17 00:00:00 2001 From: Shawn A Date: Fri, 23 Feb 2018 23:49:23 -0600 Subject: [PATCH] simplify debug --- WiFiManager.cpp | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/WiFiManager.cpp b/WiFiManager.cpp index c74e31c..5709eab 100644 --- a/WiFiManager.cpp +++ b/WiFiManager.cpp @@ -1794,15 +1794,7 @@ bool WiFiManager::getWiFiIsSaved(){ template void WiFiManager::DEBUG_WM(Generic text) { - if (_debug) { - if(_debugLevel > 2){ - _debugPort.print("MEM: "); - _debugPort.println((String)ESP.getFreeHeap()); - } - _debugPort.print("*WM: "); - _debugPort.print(text); - _debugPort.print("\n"); - } + DEBUG_WM(text,""); } template @@ -1814,8 +1806,10 @@ void WiFiManager::DEBUG_WM(Generic text,Genericb textb) { } _debugPort.print("*WM: "); _debugPort.print(text); - _debugPort.print(" "); - _debugPort.print(textb); + if(textb){ + _debugPort.print(" "); + _debugPort.print(textb); + } _debugPort.print("\n"); } }