Skip to content

Commit

Permalink
Set WifiManager debug level.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
h2zero committed Jul 10, 2021
1 parent 2ae8f0c commit 21a3eea
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions main/User_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,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
Expand Down
2 changes: 2 additions & 0 deletions main/main.ino
Original file line number Diff line number Diff line change
Expand Up @@ -1082,6 +1082,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
Expand Down

0 comments on commit 21a3eea

Please sign in to comment.