@@ -58,7 +58,8 @@ void setup() {
58
58
if (now < compiled) {
59
59
Serial.println (" RTC is older than compile time! (Updating DateTime)" );
60
60
Rtc.SetDateTime (compiled);
61
- display.showTextScroll (" RTC is older than compile time! (Updating DateTime)" );
61
+ display.showText (" RTC is older than compile time! (Updating DateTime)" );
62
+ delay (1000 );
62
63
} else if (now > compiled) {
63
64
Serial.println (" RTC is newer than compile time. (this is expected)" );
64
65
} else if (now == compiled) {
@@ -94,6 +95,9 @@ void populateTimeString(const RtcDateTime& dt) {
94
95
if (hour > 12 ) {
95
96
hour -= 12 ;
96
97
}
98
+ if (hour == 0 ) {
99
+ hour = 12 ;
100
+ }
97
101
snprintf_P (dateTimeString,
98
102
countof (dateTimeString),
99
103
PSTR (" %02u:%02u %s" ),
@@ -141,12 +145,12 @@ void populateTimeString2(const RtcDateTime& dt) {
141
145
// I should math the shit out of this
142
146
while (len < BUFFER_SIZE && numSpace < NUM_DIGITS) {
143
147
numSpace++;
144
- len+= 2 ;
148
+ len += 2 ;
145
149
}
146
150
// Serial.print("oldlen: "); Serial.println(strlen(temp));
147
151
// Serial.print("newlen: "); Serial.println(len);
148
152
// Serial.print("numspace: "); Serial.println(numSpace);
149
- // Clear the final destination; copy the temporary string into the right
153
+ // Clear the final destination; copy the temporary string into the right
150
154
// spot, then fix the end-of-string marker.
151
155
memset (dateTimeString, ' ' , BUFFER_SIZE);
152
156
strcpy (&dateTimeString[numSpace], temp);
0 commit comments