From 8dba98709858a0eaf787533b718a0766c4c043ee Mon Sep 17 00:00:00 2001 From: DriftKingTW Date: Tue, 6 Feb 2024 06:27:48 +0800 Subject: [PATCH] feat: update config buttons --- src/main.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index af1651a..d22e35d 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1086,13 +1086,17 @@ void readConfigButtons() { } delay(10); if (longPressCounter > 100) { - switchBootMode(); + isCaffeinated = !isCaffeinated; + while (digitalRead(CFG_BTN_PIN_2) == ACTIVE) { + delay(10); + } + return; } longPressCounter++; } - isUsbMode = !isUsbMode; - usbKeyboard.releaseAll(); - bleKeyboard.releaseAll(); + if (!isScreenSleeping) { + isScreenDisabled = !isScreenDisabled; + } } else if (digitalRead(CFG_BTN_PIN_0) == ACTIVE) { resetIdle(); while (digitalRead(CFG_BTN_PIN_0) == ACTIVE) {