We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 20a866d commit 6c5e7ffCopy full SHA for 6c5e7ff
wordclock_esp8266.ino
@@ -520,9 +520,15 @@ void updateStateBehavior(uint8_t state){
520
filterFactor = DEFAULT_SMOOTHING_FACTOR;
521
behaviorUpdatePeriod = PERIOD_TIMEVISUUPDATE;
522
}
523
- int hours = ntp.getHours24();
524
- int minutes = ntp.getMinutes();
525
- showStringOnClock(timeToString(hours, minutes), maincolor_clock);
+ uint8_t hours = ntp.getHours24();
+ uint8_t minutes = ntp.getMinutes();
+ static uint8_t lastMinutes = 0;
526
+ static String timeAsString = "";
527
+ if(lastMinutes != minutes){
528
+ timeAsString = timeToString(hours, minutes);
529
+ lastMinutes = minutes;
530
+ }
531
+ showStringOnClock(timeAsString, maincolor_clock);
532
drawMinuteIndicator(minutes, maincolor_clock);
533
534
break;
0 commit comments