mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-04-20 22:13:47 +00:00
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:
parent
4542e6c86a
commit
ce1b760b29
1 changed files with 2 additions and 2 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue