neu-rah / ArduinoMenu

Arduino generic menu/interactivity system
GNU Lesser General Public License v2.1
934 stars 189 forks source link

Issue with ESP32 Clickencodertft.ino #280

Closed timmcarson closed 4 years ago

timmcarson commented 4 years ago

I am trying to use the ESP32 Clickencodertft.ino example from #256

I am using PlatformIO running on vscode. when I try to compile I get errors surrounding the ClickEncoder library.

This is what the errors look like Capture

Any help is appreciated

Timm

neu-rah commented 4 years ago

Hi!

Thanks for reporting it.

reorder could be a warning or silenced and it would still work, that initialization is not order dependent. I will try to put it on proper order using vscode or activate the warning on atom+platformio....

meanwhile you might want to look at codeCtrl example (https://github.com/neu-rah/ArduinoMenu/issues/278#issuecomment-604662371) it allow you to use any input method and dont stay dependent of clickEncoder.

neu-rah commented 4 years ago

Please note that order error are from clickEncoder lib, not that is wrong, it should be a warning at most, but your vscode+platformio are adding an -Werror=order into the compiler options.

My atom+ platformio are also doing the same for esp32. I was able to compile by disabling it as an error and also added some warning suppress for a quiet compile (optional)

added this line to platformio.ini

build_flags = -Wno-comment -Wno-reorder -Wno-strict-aliasing -Wno-builtin-macro-redefined -Wno-switch
build_unflags = -Werror=reorder
timmcarson commented 4 years ago

Adding the lines to the platformio.ini file did the trick it compiles now.

Thanks for the quick response

neu-rah commented 4 years ago

https://github.com/espressif/arduino-esp32/issues/3854