MartinNohr / MagicImageWand

Paints Images in the Air with LEDs
Apache License 2.0
20 stars 7 forks source link

compilations errors ( ESP32 CORE issues / 'ledcAttach' was not declared in this scope) #75

Open NashMerwolf opened 1 month ago

NashMerwolf commented 1 month ago

Hi, trying to update my project to your TTGO version . there was alot of problems while compiling with lines :

86 //ledcSetup(ledChannel, freq, resolution);

89 //ledcAttachPin(tftEnable, ledChannel); that i commented to check back problems.

i hit on this problem concerning ESP32 library :

In file included from C:\Users\xxxxxx\Downloads\MagicImageWand-main\MagicImageWand\MagicImageWand.h:37, from C:\Users\xxxxxx\Downloads\MagicImageWand-main\MagicImageWand\MagicImageWand.ino:8: C:\Users\xxxxxx\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.4\libraries\WebServer\src/WebServer.h:211:32: error: 'FS' was not declared in this scope; did you mean 'fs::FS'? 211 typedef std::function<String(FS &fs, const String &fName)> ETagFunction; ^~ fs::FS In file included from c:\Users\xxxxxx\Documents\Arduino\libraries\TFT_eSPI/Processors/TFT_eSPI_ESP32.h:67, from c:\Users\xxxxxx\Documents\Arduino\libraries\TFT_eSPI/TFT_eSPI.h:48, from C:\Users\xxxxxx\Downloads\MagicImageWand-main\MagicImageWand\MagicImageWand.ino:7: C:\Users\xxxxxx\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.4\libraries\FS\src/FS.h:87:7: note: 'fs::FS' declared here 87 class FS { ^~ C:\Users\xxxxxx\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.4\libraries\WebServer\src/WebServer.h:211:32: error: 'FS' was not declared in this scope; did you mean 'fs::FS'? 211 typedef std::function<String(FS &fs, const String &fName)> ETagFunction; ^~ fs::FS C:\Users\xxxxxx\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.4\libraries\FS\src/FS.h:87:7: note: 'fs::FS' declared here 87 class FS { ^~ C:\Users\xxxxxx\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.4\libraries\WebServer\src/WebServer.h:211:60: error: template argument 1 is invalid 211 typedef std::function<String(FS &fs, const String &fName)> ETagFunction; ^ C:\Users\xxxxxx\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.4\libraries\WebServer\src/WebServer.h:211:16: error: '' in namespace 'std' does not name a type 211 typedef std::function<String(FS &fs, const String &fName)> ETagFunction; ^~~~~~~~~~~~~ C:\Users\xxxxxx\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.4\libraries\WebServer\src/WebServer.h:212:32: error: 'ETagFunction' has not been declared 212 void enableETag(bool enable, ETagFunction fn = nullptr); ^~~~ C:\Users\xxxxxx\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.4\libraries\WebServer\src/WebServer.h:229:3: error: 'ETagFunction' does not name a type; did you mean 'OP_Function'? 229 ETagFunction _eTagFunction = nullptr; ^~~~ OP_Function C:\Users\xxxxxx\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.4\libraries\WebServer\src/WebServer.h:212:50: error: could not convert 'nullptr' from 'std::nullptr_t' to 'int' 212 void enableETag(bool enable, ETagFunction fn = nullptr); ^~~
std::nullptr_t

exit status 1

Compilation error: exit status 1

any idea ? best regards

NashMerwolf commented 1 month ago

Figured out that it was ESP32 core 3.0.4 wasnt supported. i tried with 2.0.14v and compiled well with lines #89 - 88 - 86 commented//

Work too with 2.0.17 but not 3.0.0