Allow short press for X3

This commit is contained in:
jpirnay
2026-05-10 21:44:11 +02:00
parent c9c9bf0f93
commit 12bd9c46d7
+6 -1
View File
@@ -229,7 +229,12 @@ void setup() {
// We only want to skip the hold verification (allowing a short press to wake) if the short
// press or double press actually have an action assigned, or if the clock screensaver is active.
// Otherwise, short presses from sleep should be ignored entirely and return to sleep.
bool allowShortPress = (SETTINGS.useClock != 0) || (SETTINGS.btnShortPower != CrossPointSettings::BTN_DEFAULT) ||
//
// X3 always cuts all power during sleep (battery-latch MOSFET, keepClockAlive=false), so any
// wakeup is a full cold boot. By the time verifyPowerButtonWakeup runs the button may already
// be released — hardware design guarantees the press was intentional, so skip hold-verification.
bool allowShortPress = gpio.deviceIsX3() || (SETTINGS.useClock != 0) ||
(SETTINGS.btnShortPower != CrossPointSettings::BTN_DEFAULT) ||
(SETTINGS.btnDoublePower != CrossPointSettings::BTN_DEFAULT);
gpio.verifyPowerButtonWakeup(CrossPointSettings::getPowerButtonDuration(), allowShortPress);