Skip to content

Commit

Permalink
Fix clock initialization missing
Browse files Browse the repository at this point in the history
  • Loading branch information
valentin8709 committed Aug 2, 2024
1 parent 2a5ca0e commit 516d4c6
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,19 @@ void load_eeprom() {
EEPROM.end();
}

/*********************************************************************
** Function: init_clock
** Clock initialisation for propper display in menu
*********************************************************************/
void init_clock() {
#if defined(STICK_C_PLUS) || defined(STICK_C_PLUS2)
RTC_TimeTypeDef _time;
cplus_RTC _rtc;
_rtc.begin();
_rtc.GetBm8563Time();
_rtc.GetTime(&_time);
#endif
}

/*********************************************************************
** Function: setup
Expand All @@ -227,6 +240,7 @@ void setup() {
begin_tft();
load_eeprom();
boot_screen();
init_clock();

if(!LittleFS.begin(true)) { LittleFS.format(), LittleFS.begin();}

Expand Down

0 comments on commit 516d4c6

Please sign in to comment.