From 047ed7ae8545fac9db2c5f377f48f47df109850f Mon Sep 17 00:00:00 2001 From: Markus Ransberger Date: Fri, 29 Sep 2023 01:34:11 +0200 Subject: [PATCH] Fix for "zwanzig nach" x hours. --- src/matrix/render_functions.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/matrix/render_functions.cpp b/src/matrix/render_functions.cpp index 1a6ba29..934d571 100644 --- a/src/matrix/render_functions.cpp +++ b/src/matrix/render_functions.cpp @@ -164,11 +164,13 @@ String time_to_string(uint8_t hours, uint8_t minutes) message += "FUNF VOR "; } - // convert hours to 12h format - if (minutes >= 20) + // increment hour when 25 minutes of an hour have passed + if (minutes >= 25) { hours++; } + + // convert hours to 12h format if (hours > 12) // 24h -> 12h, except 12h { hours -= 12;