mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-04-20 22:13:47 +00:00
usability fixes, fix t114 build src filter
This commit is contained in:
parent
0b97b23025
commit
db8e72791c
5 changed files with 18 additions and 11 deletions
|
|
@ -60,10 +60,10 @@ void Button::update() {
|
|||
_state = IDLE;
|
||||
}
|
||||
|
||||
// Handle long press
|
||||
// Handle long press while button is held
|
||||
if (_state == PRESSED && (now - _pressTime) > BUTTON_LONG_PRESS_TIME_MS) {
|
||||
triggerEvent(LONG_PRESS);
|
||||
_state = IDLE; // Prevent multiple long press events
|
||||
_state = IDLE; // Prevent multiple press events
|
||||
_clickCount = 0;
|
||||
}
|
||||
}
|
||||
|
|
@ -97,7 +97,7 @@ void Button::handleStateChange() {
|
|||
} else {
|
||||
// Long press already handled in update()
|
||||
_state = IDLE;
|
||||
_clickCount = 0; // Reset click count after long press
|
||||
_clickCount = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue