Fix date/time rotation without seconds

This commit is contained in:
Theo Arends 2024-11-20 14:49:15 +01:00
parent ae7cba2f13
commit fe658424b8
1 changed files with 2 additions and 0 deletions

View File

@ -605,6 +605,8 @@ void IoTTimerShowTime(void) {
snprintf_P(buffer, sizeof(buffer), PSTR("%2d:%02d"), hour, min);
if (Tm1640->clock_seconds) {
snprintf_P(buffer, sizeof(buffer), PSTR("%s:%02d"), buffer, sec);
} else {
snprintf_P(buffer, sizeof(buffer), PSTR("%s "), buffer); // Erase seconds in case toggling between date/time
}
IoTTimerDrawStringAt(0, 0, buffer);