Closed hmueller01 closed 1 year ago
HI @hmueller01
Thanks for the PR.
There is many compiler warnings/errors as follows, please clean them up.
I'm using
In file included from /home/kh/Arduino/khoih-prog_working/ESP_WiFiManager_Lite_GitHub/examples/ESP_WiFi/defines.h:139,
from /home/kh/Arduino/khoih-prog_working/ESP_WiFiManager_Lite_GitHub/examples/ESP_WiFi/ESP_WiFi.ino:13:
/home/kh/Arduino/libraries/ESP_WiFiManager_Lite-1.10.3/src/ESP_WiFiManager_Lite.h:125:8: warning: #warning Using ESP32 Core 1.0.6 or 2.0.0+ [-Wcpp]
#warning Using ESP32 Core 1.0.6 or 2.0.0+
^~~~~~~
In file included from /home/kh/Arduino/libraries/ESP_WiFiManager_Lite-1.10.3/src/ESP_WiFiManager_Lite.h:278,
from /home/kh/Arduino/khoih-prog_working/ESP_WiFiManager_Lite_GitHub/examples/ESP_WiFi/defines.h:139,
from /home/kh/Arduino/khoih-prog_working/ESP_WiFiManager_Lite_GitHub/examples/ESP_WiFi/ESP_WiFi.ino:13:
/home/kh/Arduino/libraries/ESP_MultiResetDetector-1.3.2/src/ESP_MultiResetDetector.h:110:10: warning: #warning Using ESP32 Core 1.0.6 or 2.0.0+ [-Wcpp]
#warning Using ESP32 Core 1.0.6 or 2.0.0+
^~~~~~~
In file included from /home/kh/Arduino/khoih-prog_working/ESP_WiFiManager_Lite_GitHub/examples/ESP_WiFi/defines.h:139,
from /home/kh/Arduino/khoih-prog_working/ESP_WiFiManager_Lite_GitHub/examples/ESP_WiFi/ESP_WiFi.ino:13:
/home/kh/Arduino/libraries/ESP_WiFiManager_Lite-1.10.3/src/ESP_WiFiManager_Lite.h: In member function 'void ESP_WiFiManager_Lite::createHTML(String&)':
/home/kh/Arduino/libraries/ESP_WiFiManager_Lite-1.10.3/src/ESP_WiFiManager_Lite.h:2662:86: error: conversion from 'const __FlashStringHelper*' to 'const StringSumHelper' is ambiguous
ListOfSSIDs += FPSTR(ESP_WM_LITE_OPTION_START) + String(WiFi.SSID(indices[i])) + FPSTR(ESP_WM_LITE_OPTION_END);
^
In file included from /home/kh/.arduino15/packages/esp32/hardware/esp32/2.0.6/cores/esp32/Arduino.h:166,
from sketch/ESP_WiFi.ino.cpp:1:
/home/kh/.arduino15/packages/esp32/hardware/esp32/2.0.6/cores/esp32/WString.h:393:9: note: candidate: 'StringSumHelper::StringSumHelper(long long unsigned int)' <near match>
StringSumHelper(unsigned long long num) :
^~~~~~~~~~~~~~~
/home/kh/.arduino15/packages/esp32/hardware/esp32/2.0.6/cores/esp32/WString.h:393:9: note: conversion of argument 1 would be ill-formed:
In file included from /home/kh/.arduino15/packages/esp32/hardware/esp32/2.0.6/cores/esp32/Arduino.h:166,
from sketch/ESP_WiFi.ino.cpp:1:
/home/kh/.arduino15/packages/esp32/hardware/esp32/2.0.6/cores/esp32/WString.h:39:30: error: invalid conversion from 'const __FlashStringHelper*' to 'long long unsigned int' [-fpermissive]
#define FPSTR(pstr_pointer) (reinterpret_cast<const __FlashStringHelper *>(pstr_pointer))
~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/kh/Arduino/libraries/ESP_WiFiManager_Lite-1.10.3/src/ESP_WiFiManager_Lite.h:2662:24: note: in expansion of macro 'FPSTR'
ListOfSSIDs += FPSTR(ESP_WM_LITE_OPTION_START) + String(WiFi.SSID(indices[i])) + FPSTR(ESP_WM_LITE_OPTION_END);
^~~~~
In file included from /home/kh/.arduino15/packages/esp32/hardware/esp32/2.0.6/cores/esp32/Arduino.h:166,
from sketch/ESP_WiFi.ino.cpp:1:
/home/kh/.arduino15/packages/esp32/hardware/esp32/2.0.6/cores/esp32/WString.h:390:9: note: candidate: 'StringSumHelper::StringSumHelper(long long int)' <near match>
StringSumHelper(long long num) :
^~~~~~~~~~~~~~~
/home/kh/.arduino15/packages/esp32/hardware/esp32/2.0.6/cores/esp32/WString.h:390:9: note: conversion of argument 1 would be ill-formed:
In file included from /home/kh/.arduino15/packages/esp32/hardware/esp32/2.0.6/cores/esp32/Arduino.h:166,
from sketch/ESP_WiFi.ino.cpp:1:
/home/kh/.arduino15/packages/esp32/hardware/esp32/2.0.6/cores/esp32/WString.h:39:30: error: invalid conversion from 'const __FlashStringHelper*' to 'long long int' [-fpermissive]
#define FPSTR(pstr_pointer) (reinterpret_cast<const __FlashStringHelper *>(pstr_pointer))
~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/kh/Arduino/libraries/ESP_WiFiManager_Lite-1.10.3/src/ESP_WiFiManager_Lite.h:2662:24: note: in expansion of macro 'FPSTR'
ListOfSSIDs += FPSTR(ESP_WM_LITE_OPTION_START) + String(WiFi.SSID(indices[i])) + FPSTR(ESP_WM_LITE_OPTION_END);
^~~~~
In file included from /home/kh/.arduino15/packages/esp32/hardware/esp32/2.0.6/cores/esp32/Arduino.h:166,
from sketch/ESP_WiFi.ino.cpp:1:
/home/kh/.arduino15/packages/esp32/hardware/esp32/2.0.6/cores/esp32/WString.h:381:9: note: candidate: 'StringSumHelper::StringSumHelper(long unsigned int)' <near match>
StringSumHelper(unsigned long num) :
^~~~~~~~~~~~~~~
/home/kh/.arduino15/packages/esp32/hardware/esp32/2.0.6/cores/esp32/WString.h:381:9: note: conversion of argument 1 would be ill-formed:
In file included from /home/kh/.arduino15/packages/esp32/hardware/esp32/2.0.6/cores/esp32/Arduino.h:166,
from sketch/ESP_WiFi.ino.cpp:1:
/home/kh/.arduino15/packages/esp32/hardware/esp32/2.0.6/cores/esp32/WString.h:39:30: error: invalid conversion from 'const __FlashStringHelper*' to 'long unsigned int' [-fpermissive]
#define FPSTR(pstr_pointer) (reinterpret_cast<const __FlashStringHelper *>(pstr_pointer))
~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/kh/Arduino/libraries/ESP_WiFiManager_Lite-1.10.3/src/ESP_WiFiManager_Lite.h:2662:24: note: in expansion of macro 'FPSTR'
ListOfSSIDs += FPSTR(ESP_WM_LITE_OPTION_START) + String(WiFi.SSID(indices[i])) + FPSTR(ESP_WM_LITE_OPTION_END);
^~~~~
In file included from /home/kh/.arduino15/packages/esp32/hardware/esp32/2.0.6/cores/esp32/Arduino.h:166,
from sketch/ESP_WiFi.ino.cpp:1:
/home/kh/.arduino15/packages/esp32/hardware/esp32/2.0.6/cores/esp32/WString.h:378:9: note: candidate: 'StringSumHelper::StringSumHelper(long int)' <near match>
StringSumHelper(long num) :
^~~~~~~~~~~~~~~
/home/kh/.arduino15/packages/esp32/hardware/esp32/2.0.6/cores/esp32/WString.h:378:9: note: conversion of argument 1 would be ill-formed:
In file included from /home/kh/.arduino15/packages/esp32/hardware/esp32/2.0.6/cores/esp32/Arduino.h:166,
from sketch/ESP_WiFi.ino.cpp:1:
/home/kh/.arduino15/packages/esp32/hardware/esp32/2.0.6/cores/esp32/WString.h:39:30: error: invalid conversion from 'const __FlashStringHelper*' to 'long int' [-fpermissive]
#define FPSTR(pstr_pointer) (reinterpret_cast<const __FlashStringHelper *>(pstr_pointer))
~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/kh/Arduino/libraries/ESP_WiFiManager_Lite-1.10.3/src/ESP_WiFiManager_Lite.h:2662:24: note: in expansion of macro 'FPSTR'
ListOfSSIDs += FPSTR(ESP_WM_LITE_OPTION_START) + String(WiFi.SSID(indices[i])) + FPSTR(ESP_WM_LITE_OPTION_END);
^~~~~
In file included from /home/kh/.arduino15/packages/esp32/hardware/esp32/2.0.6/cores/esp32/Arduino.h:166,
from sketch/ESP_WiFi.ino.cpp:1:
/home/kh/.arduino15/packages/esp32/hardware/esp32/2.0.6/cores/esp32/WString.h:375:9: note: candidate: 'StringSumHelper::StringSumHelper(unsigned int)' <near match>
StringSumHelper(unsigned int num) :
^~~~~~~~~~~~~~~
/home/kh/.arduino15/packages/esp32/hardware/esp32/2.0.6/cores/esp32/WString.h:375:9: note: conversion of argument 1 would be ill-formed:
In file included from /home/kh/.arduino15/packages/esp32/hardware/esp32/2.0.6/cores/esp32/Arduino.h:166,
from sketch/ESP_WiFi.ino.cpp:1:
/home/kh/.arduino15/packages/esp32/hardware/esp32/2.0.6/cores/esp32/WString.h:39:30: error: invalid conversion from 'const __FlashStringHelper*' to 'unsigned int' [-fpermissive]
#define FPSTR(pstr_pointer) (reinterpret_cast<const __FlashStringHelper *>(pstr_pointer))
~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/kh/Arduino/libraries/ESP_WiFiManager_Lite-1.10.3/src/ESP_WiFiManager_Lite.h:2662:24: note: in expansion of macro 'FPSTR'
ListOfSSIDs += FPSTR(ESP_WM_LITE_OPTION_START) + String(WiFi.SSID(indices[i])) + FPSTR(ESP_WM_LITE_OPTION_END);
^~~~~
In file included from /home/kh/.arduino15/packages/esp32/hardware/esp32/2.0.6/cores/esp32/Arduino.h:166,
from sketch/ESP_WiFi.ino.cpp:1:
/home/kh/.arduino15/packages/esp32/hardware/esp32/2.0.6/cores/esp32/WString.h:372:9: note: candidate: 'StringSumHelper::StringSumHelper(int)' <near match>
StringSumHelper(int num) :
^~~~~~~~~~~~~~~
/home/kh/.arduino15/packages/esp32/hardware/esp32/2.0.6/cores/esp32/WString.h:372:9: note: conversion of argument 1 would be ill-formed:
In file included from /home/kh/.arduino15/packages/esp32/hardware/esp32/2.0.6/cores/esp32/Arduino.h:166,
from sketch/ESP_WiFi.ino.cpp:1:
/home/kh/.arduino15/packages/esp32/hardware/esp32/2.0.6/cores/esp32/WString.h:39:30: error: invalid conversion from 'const __FlashStringHelper*' to 'int' [-fpermissive]
#define FPSTR(pstr_pointer) (reinterpret_cast<const __FlashStringHelper *>(pstr_pointer))
~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/kh/Arduino/libraries/ESP_WiFiManager_Lite-1.10.3/src/ESP_WiFiManager_Lite.h:2662:24: note: in expansion of macro 'FPSTR'
ListOfSSIDs += FPSTR(ESP_WM_LITE_OPTION_START) + String(WiFi.SSID(indices[i])) + FPSTR(ESP_WM_LITE_OPTION_END);
^~~~~
In file included from /home/kh/.arduino15/packages/esp32/hardware/esp32/2.0.6/cores/esp32/Arduino.h:166,
from sketch/ESP_WiFi.ino.cpp:1:
/home/kh/.arduino15/packages/esp32/hardware/esp32/2.0.6/cores/esp32/WString.h:369:9: note: candidate: 'StringSumHelper::StringSumHelper(unsigned char)' <near match>
StringSumHelper(unsigned char num) :
^~~~~~~~~~~~~~~
/home/kh/.arduino15/packages/esp32/hardware/esp32/2.0.6/cores/esp32/WString.h:369:9: note: conversion of argument 1 would be ill-formed:
In file included from /home/kh/.arduino15/packages/esp32/hardware/esp32/2.0.6/cores/esp32/Arduino.h:166,
from sketch/ESP_WiFi.ino.cpp:1:
/home/kh/.arduino15/packages/esp32/hardware/esp32/2.0.6/cores/esp32/WString.h:39:30: error: invalid conversion from 'const __FlashStringHelper*' to 'unsigned char' [-fpermissive]
#define FPSTR(pstr_pointer) (reinterpret_cast<const __FlashStringHelper *>(pstr_pointer))
~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/kh/Arduino/libraries/ESP_WiFiManager_Lite-1.10.3/src/ESP_WiFiManager_Lite.h:2662:24: note: in expansion of macro 'FPSTR'
ListOfSSIDs += FPSTR(ESP_WM_LITE_OPTION_START) + String(WiFi.SSID(indices[i])) + FPSTR(ESP_WM_LITE_OPTION_END);
^~~~~
In file included from /home/kh/.arduino15/packages/esp32/hardware/esp32/2.0.6/cores/esp32/Arduino.h:166,
from sketch/ESP_WiFi.ino.cpp:1:
/home/kh/.arduino15/packages/esp32/hardware/esp32/2.0.6/cores/esp32/WString.h:366:9: note: candidate: 'StringSumHelper::StringSumHelper(char)' <near match>
StringSumHelper(char c) :
^~~~~~~~~~~~~~~
/home/kh/.arduino15/packages/esp32/hardware/esp32/2.0.6/cores/esp32/WString.h:366:9: note: conversion of argument 1 would be ill-formed:
In file included from /home/kh/.arduino15/packages/esp32/hardware/esp32/2.0.6/cores/esp32/Arduino.h:166,
from sketch/ESP_WiFi.ino.cpp:1:
/home/kh/.arduino15/packages/esp32/hardware/esp32/2.0.6/cores/esp32/WString.h:39:30: error: invalid conversion from 'const __FlashStringHelper*' to 'char' [-fpermissive]
#define FPSTR(pstr_pointer) (reinterpret_cast<const __FlashStringHelper *>(pstr_pointer))
~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/kh/Arduino/libraries/ESP_WiFiManager_Lite-1.10.3/src/ESP_WiFiManager_Lite.h:2662:24: note: in expansion of macro 'FPSTR'
ListOfSSIDs += FPSTR(ESP_WM_LITE_OPTION_START) + String(WiFi.SSID(indices[i])) + FPSTR(ESP_WM_LITE_OPTION_END);
^~~~~
/home/kh/.arduino15/packages/esp32/hardware/esp32/2.0.6/cores/esp32/WString.h:186:34: note: initializing argument 1 of 'StringSumHelper& operator+(const StringSumHelper&, const String&)'
friend StringSumHelper & operator +(const StringSumHelper &lhs, const String &rhs);
^~~~~~~~
Multiple libraries were found for "WiFi.h"
Used: /home/kh/.arduino15/packages/esp32/hardware/esp32/2.0.6/libraries/WiFi
Not used: /home/kh/Downloads/Arduino/arduino-1.8.19/libraries/WiFi
Not used: /home/kh/Arduino/libraries/Seeed_Arduino_WiFi_v1-0-2
Not used: /home/kh/Arduino/libraries/WiFiNINA
Not used: /home/kh/Arduino/libraries/WiFiEspAT
Multiple libraries were found for "WebServer.h"
Used: /home/kh/.arduino15/packages/esp32/hardware/esp32/2.0.6/libraries/WebServer
Not used: /home/kh/Arduino/libraries/Seeed_Arduino_WiFi_v1-0-2
Multiple libraries were found for "DNSServer.h"
Used: /home/kh/.arduino15/packages/esp32/hardware/esp32/2.0.6/libraries/DNSServer
Not used: /home/kh/Arduino/libraries/Seeed_Arduino_WiFi_v1-0-2
exit status 1
Error compiling for board ESP32 Dev Module.
You can just change to
ListOfSSIDs += String(FPSTR(ESP_WM_LITE_OPTION_START)) + String(WiFi.SSID(indices[i])) + String(FPSTR(ESP_WM_LITE_OPTION_END));
from
ListOfSSIDs += FPSTR(ESP_WM_LITE_OPTION_START) + String(WiFi.SSID(indices[i])) + FPSTR(ESP_WM_LITE_OPTION_END);
HI @hmueller01
I modified the code as I think you're busy now. Merging now.
Thanks,
I compiled with ESP8266 environment and had no warning. I forgot to test with ESP32 and your examples. Sorry. Tx for fixing!
Thanks for your good works. Waiting for your PROGMEM PRs for the ESPAsync_WiFiManager_Lite library, and even many more.
Now I hope you could start experiencing the time-consuming and having to pay attention to all aspects when managing libraries, especially multi-function, multi-platform ones. You'll certainly do much better work in the future.
Hi @hmueller01
The new ESP_WiFiManager_Lite releases v1.10.4 has just been published. Your contribution is added to the longer-everyday list in Contributions and Thanks
Best Regards,
There was a little bit more to do than just uncomment the
/*PROGMEM*/
pragma. All PROGMEM vars must be 32-bit aligned to avoid exceptions. That's what FPSTR() does.