From 4b135049a55c6ac40cebc1a0a7b5cf0dbddb89e5 Mon Sep 17 00:00:00 2001 From: h2zero <32826625+h2zero@users.noreply.github.com> Date: Sat, 10 Jul 2021 16:42:06 -0600 Subject: [PATCH] Set WifiManager debug level. (#1014) This allows for setting the WiFimanager debug level for more or less verbosity using the WM_DEBUG_LEVEL macro. Valid values are: DEBUG_ERROR = 0, DEBUG_NOTIFY = 1, // default DEBUG_VERBOSE = 2, DEBUG_DEV = 3, DEBUG_MAX = 4 --- main/User_config.h | 3 +++ main/main.ino | 2 ++ 2 files changed, 5 insertions(+) diff --git a/main/User_config.h b/main/User_config.h index f51dafa..b888d7d 100644 --- a/main/User_config.h +++ b/main/User_config.h @@ -106,6 +106,9 @@ const byte mac[] = {0xDE, 0xED, 0xBA, 0xFE, 0x54, 0x95}; //W5100 ethernet shield #ifndef WifiManager_TimeOut # define WifiManager_TimeOut 5 #endif +#ifndef WM_DEBUG_LEVEL +# define WM_DEBUG_LEVEL 1 // valid values are: DEBUG_ERROR = 0, DEBUG_NOTIFY = 1, DEBUG_VERBOSE = 2, DEBUG_DEV = 3, DEBUG_MAX = 4 +#endif /*-------------DEFINE YOUR ADVANCED NETWORK PARAMETERS BELOW----------------*/ //#define MDNS_SD //uncomment if you want to use mdns for discovering automatically your ip server, please note that MDNS with ESP32 can cause the BLE to not work diff --git a/main/main.ino b/main/main.ino index 9891cdf..450238b 100644 --- a/main/main.ino +++ b/main/main.ino @@ -1100,6 +1100,8 @@ void setup_wifimanager(bool reset_settings) { } } + wifiManager.setDebugOutput(WM_DEBUG_LEVEL); + // The extra parameters to be configured (can be either global or just in the setup) // After connecting, parameter.getValue() will get you the configured value // id/name placeholder/prompt default length