igorantolic / ai-esp32-rotary-encoder

Easy implement rotary encoder to your application using microcontroler like ESP32
GNU General Public License v2.0
284 stars 70 forks source link

Arduino IDE 2.2 Standard example Esp32RotaryEncoderBasics.ino fails to compile with the board TTGO T1. #71

Closed rin67630 closed 7 months ago

rin67630 commented 11 months ago

Hi, I wonder, that a freshly installed Arduino IDE 2.2 fails to compile the standard example Esp32RotaryEncoderBasics.ino with the board TTGO T1.

I get error message

d:\Activities\3_Maker\libraries\Ai_Esp32_Rotary_Encoder\src\AiEsp32RotaryEncoder.cpp: In member function 'ButtonState AiEsp32RotaryEncoder::readButtonState()':
d:\Activities\3_Maker\libraries\Ai_Esp32_Rotary_Encoder\src\AiEsp32RotaryEncoder.cpp:279:14: error: unused variable '_buttonState' [-Werror=unused-variable]
  ButtonState _buttonState = buttonState;
              ^~~~~~~~~~~~
cc1plus.exe: some warnings being treated as errors

exit status 1

Compilation error: exit status 1

Is the library broken for ESP32 hardware?

Compiling it for ESP8266 gets warnings but finishes gracefully.

AyrtonRicardo commented 9 months ago

Inside your File > Preferences, select Compile Warnings = Default, this problem is caused by your Arduino IDE treating any warning as error.

igorantolic commented 7 months ago

Fixed in code