From ef4546a2e6efc4280da759f9cc7182dbc2464028 Mon Sep 17 00:00:00 2001 From: norbert-walter Date: Fri, 6 Feb 2026 15:20:43 +0100 Subject: [PATCH] Fix for PageClock --- lib/obp60task/PageClock.cpp | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/lib/obp60task/PageClock.cpp b/lib/obp60task/PageClock.cpp index fa5bb42..ae52d75 100644 --- a/lib/obp60task/PageClock.cpp +++ b/lib/obp60task/PageClock.cpp @@ -184,12 +184,18 @@ public: incrementSelected(); return 0; } + if (key == 3 && timerRunning) { // No action if timer running + return 0; + } // - (K4): decrement selected field (only if timer not running) if (key == 4 && !timerRunning) { decrementSelected(); return 0; } + if (key == 4 && timerRunning) { // No action if timer running + return 0; + } // RUN (K5): start/stop timer if (key == 5) { @@ -366,10 +372,10 @@ public: struct tm rtcCopy = commonData->data.rtcTime; time_t nowEpoch = mktime(&rtcCopy); time_t remaining = timerEndEpoch - nowEpoch; - if(remaining <= 5){ - // Short buzzer alarm (100% power) + if(remaining <= 5 && remaining != 0){ + // Short pre buzzer alarm (100% power) setBuzzerPower(100); - buzzer(TONE4, 75); + buzzer(TONE2, 75); setBuzzerPower(config->getInt(config->buzzerPower)); } if (remaining <= 0) { @@ -378,7 +384,7 @@ public: commonData->keydata[4].label = "START"; // Buzzer alarm (100% power) setBuzzerPower(100); - buzzer(TONE4, 800); + buzzer(TONE2, 800); setBuzzerPower(config->getInt(config->buzzerPower)); // When countdown is finished, restore the initial start time @@ -492,20 +498,21 @@ public: int16_t x = (static_cast(getdisplay().width()) - static_cast(wb)) / 2; int16_t y = 150 + hb / 2; - getdisplay().setCursor(x, y); + //getdisplay().setCursor(x, y); + getdisplay().setCursor(47, y); getdisplay().print(timeStr); // Display actual time // Small indicators: timezone and source getdisplay().setFont(&Ubuntu_Bold8pt8b); - getdisplay().setCursor(x, 110); + getdisplay().setCursor(47, 110); if (source == 'G') { getdisplay().print("GPS"); } else { getdisplay().print("RTC"); } - getdisplay().setCursor(x + 40, 110); + getdisplay().setCursor(47 + 40, 110); if (holdvalues == false) { getdisplay().print(tz == 'L' ? "LOT" : "UTC"); } else {