From fa646a483c93b472a64d97059c51b6221a1f0515 Mon Sep 17 00:00:00 2001 From: Jonas Diemer Date: Fri, 2 Jan 2026 12:56:22 +0100 Subject: [PATCH] Clarify comment. --- src/main.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index dcfbc9b9..5273d035 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -150,8 +150,9 @@ void verifyWakeupLongPress() { // Give the user up to 1000ms to start holding the power button, and must hold for SETTINGS.getPowerButtonDuration() const auto start = millis(); bool abort = false; - // Subtract the current time, millis() starts counting from the moment the device starts. - // This way, we remove the time we already took to reach here from the duration. + // Subtract the current time, because inputManager only starts counting the HeldTime from the first update() + // This way, we remove the time we already took to reach here from the duration, + // assuming the button was held until now from millis()==0 (i.e. device start time). const uint16_t calibration = start; const uint16_t calibratedPressDuration = (calibration < SETTINGS.getPowerButtonDuration()) ? SETTINGS.getPowerButtonDuration() - calibration : 1;