From f328cd05cd5aa758b414d8e6961e21a1f6370cab Mon Sep 17 00:00:00 2001 From: tablatronix <807787+tablatronix@users.noreply.github.com> Date: Tue, 10 Oct 2023 22:52:41 -0500 Subject: [PATCH] possible fixes for these Not entirely sure why esp8266 is not auto casting these --- WiFiManager.cpp | 6 +++--- .../Super/OnDemandConfigPortal/OnDemandConfigPortal.ino | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/WiFiManager.cpp b/WiFiManager.cpp index 04263bad..f4674d8f 100644 --- a/WiFiManager.cpp +++ b/WiFiManager.cpp @@ -2712,7 +2712,7 @@ void WiFiManager::setSaveConnect(bool connect) { void WiFiManager::setDebugOutput(boolean debug) { _debug = debug; if(_debug && _debugLevel == WM_DEBUG_DEV) debugPlatformInfo(); - if(_debug && _debugLevel >= WM_DEBUG_NOTIFY) DEBUG_WM((String)WM_VERSION_STR + " D:"+(String)_debugLevel); + if(_debug && _debugLevel >= WM_DEBUG_NOTIFY)DEBUG_WM((__FlashStringHelper *)WM_VERSION_STR," D:"+String(_debugLevel)); } void WiFiManager::setDebugOutput(boolean debug, String prefix) { @@ -3146,7 +3146,7 @@ void WiFiManager::setMenu(const char * menu[], uint8_t size){ _menuIds.clear(); for(size_t i = 0; i < size; i++){ for(size_t j = 0; j < _nummenutokens; j++){ - if((String)menu[i] == String(_menutokens[j])){ + if((String)menu[i] == (__FlashStringHelper *)(_menutokens[j])){ if((String)menu[i] == "param") _paramsInWifi = false; // param auto flag _menuIds.push_back(j); } @@ -3175,7 +3175,7 @@ void WiFiManager::setMenu(std::vector& menu){ _menuIds.clear(); for(auto menuitem : menu ){ for(size_t j = 0; j < _nummenutokens; j++){ - if((String)menuitem == String(_menutokens[j])){ + if((String)menuitem == (__FlashStringHelper *)(_menutokens[j])){ if((String)menuitem == "param") _paramsInWifi = false; // param auto flag _menuIds.push_back(j); } diff --git a/examples/Super/OnDemandConfigPortal/OnDemandConfigPortal.ino b/examples/Super/OnDemandConfigPortal/OnDemandConfigPortal.ino index af2276de..13391794 100644 --- a/examples/Super/OnDemandConfigPortal/OnDemandConfigPortal.ino +++ b/examples/Super/OnDemandConfigPortal/OnDemandConfigPortal.ino @@ -122,7 +122,7 @@ void setup() { // WiFi.setSortMethod(WIFI_CONNECT_AP_BY_SIGNAL); // wifi_sort_method_t sortMethod - WIFI_CONNECT_AP_BY_SIGNAL,WIFI_CONNECT_AP_BY_SECURITY // WiFi.setMinSecurity(WIFI_AUTH_WPA2_PSK); - wm.setDebugOutput(true, DEBUG_DEV); + wm.setDebugOutput(true, WM_DEBUG_DEV); wm.debugPlatformInfo(); //reset settings - for testing