File tree Expand file tree Collapse file tree 1 file changed +8
-9
lines changed
Expand file tree Collapse file tree 1 file changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -672,19 +672,18 @@ void DisplayUI::draw(bool force) {
672672
673673 updatePrefix ();
674674
675- if (currentTime - clockTime >= 1000 ) {
676675#ifdef RTC_DS3231
677- bool h12;
678- bool PM_time;
679- clockHour = clock.getHour (h12, PM_time);
680- clockMinute = clock.getMinute ();
681- clockSecond = clock.getSecond ();
676+ bool h12;
677+ bool PM_time;
678+ clockHour = clock.getHour (h12, PM_time);
679+ clockMinute = clock.getMinute ();
680+ clockSecond = clock.getSecond ();
682681#else // ifdef RTC_DS3231
683- ++clockSecond;
684- #endif // ifdef RTC_DS3231
685- setTime (clockHour, clockMinute, clockSecond);
682+ if (currentTime - clockTime >= 1000 ) {
683+ setTime (clockHour, clockMinute, ++clockSecond);
686684 clockTime += 1000 ;
687685 }
686+ #endif // ifdef RTC_DS3231
688687
689688 switch (mode) {
690689 case DISPLAY_MODE::BUTTON_TEST:
You can’t perform that action at this time.
0 commit comments