mirror of https://github.com/arendst/Tasmota.git
Fix date/time rotation without seconds
This commit is contained in:
parent
ae7cba2f13
commit
fe658424b8
|
@ -605,6 +605,8 @@ void IoTTimerShowTime(void) {
|
||||||
snprintf_P(buffer, sizeof(buffer), PSTR("%2d:%02d"), hour, min);
|
snprintf_P(buffer, sizeof(buffer), PSTR("%2d:%02d"), hour, min);
|
||||||
if (Tm1640->clock_seconds) {
|
if (Tm1640->clock_seconds) {
|
||||||
snprintf_P(buffer, sizeof(buffer), PSTR("%s:%02d"), buffer, sec);
|
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);
|
IoTTimerDrawStringAt(0, 0, buffer);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue