mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-08-02 10:16:11 +00:00
fix: auto-reset _lock_seq_used after 5s in case Back release event is missed
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
e763e3ae9d
commit
b2c7e249a6
@@ -1237,6 +1237,9 @@ void UITask::loop() {
|
|||||||
} else if (ev == BUTTON_EVENT_LONG_PRESS) {
|
} else if (ev == BUTTON_EVENT_LONG_PRESS) {
|
||||||
c = handleLongPress(KEY_RIGHT);
|
c = handleLongPress(KEY_RIGHT);
|
||||||
}
|
}
|
||||||
|
if (_lock_seq_used && millis() - _lock_seq_ms > 5000) {
|
||||||
|
_lock_seq_used = false; // safety reset if Back release event was missed
|
||||||
|
}
|
||||||
ev = back_btn.check();
|
ev = back_btn.check();
|
||||||
if (ev == BUTTON_EVENT_CLICK) {
|
if (ev == BUTTON_EVENT_CLICK) {
|
||||||
if (_lock_seq_count > 0 || _lock_seq_used) {
|
if (_lock_seq_count > 0 || _lock_seq_used) {
|
||||||
|
|||||||
Reference in New Issue
Block a user