fix: Address Inxsamox86 review feedback

- Add PIN_USER_BTN_ANA=7 globally to platformio.ini
- Remove abs() from millis() comparison (unsigned overflow)
- Add auto declaration to ev variable in PIN_USER_BTN_ANA block

Fixes compilation errors on ESP32-S3 with analog button support
This commit is contained in:
Piero Andreini 2026-04-05 13:30:15 +02:00
parent 4542e6c86a
commit ce1b760b29

View file

@ -740,8 +740,8 @@ void UITask::loop() {
}
#endif
#if defined(PIN_USER_BTN_ANA)
if ((long)(millis() - _analogue_pin_read_millis) > 10) {
int ev = analog_btn.check();
if (millis() - _analogue_pin_read_millis > 10) {
auto ev = analog_btn.check();
if (ev == BUTTON_EVENT_CLICK) {
c = checkDisplayOn(KEY_NEXT);
} else if (ev == BUTTON_EVENT_LONG_PRESS) {