Skip to content

Commit

Permalink
Fix rtc correction settings
Browse files Browse the repository at this point in the history
  • Loading branch information
WiseLord committed Apr 4, 2021
1 parent faafbdd commit 4f0a18a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/rtc.c
Expand Up @@ -188,6 +188,8 @@ static bool rtcIsAlarmDay(AlarmDay days, int8_t wday)

void rtcInit(void)
{
rtcCorr = settingsRead(PARAM_SYSTEM_RTC_CORR, 0);

switch (rtcPhase) {
case RTC_INIT_DISABLED:
// Power interface clock enable
Expand Down Expand Up @@ -233,7 +235,7 @@ void rtcInit(void)
break;
}

rtcSetCorrection(settingsRead(PARAM_SYSTEM_RTC_CORR, 0));
rtcSetCorrection(rtcCorr);

rtcPhase = RTC_INIT_READY;
}
Expand Down

0 comments on commit 4f0a18a

Please sign in to comment.