mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-21 02:02:23 +00:00
only run the ButtonThread if a button is pressed
This commit is contained in:
@@ -274,7 +274,12 @@ int32_t ButtonThread::runOnce()
|
||||
}
|
||||
}
|
||||
btnEvent = BUTTON_EVENT_NONE;
|
||||
return 50;
|
||||
|
||||
// only pull when the button is pressed, we get notified via IRQ on a new press
|
||||
if (!userButton.isIdle() || waitingForLongPress) {
|
||||
return 50;
|
||||
}
|
||||
return INT32_MAX;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user