update RTC lib
This commit is contained in:
parent
1561d6e028
commit
3145f9750f
@ -79,7 +79,7 @@ lib_deps_basic =
|
||||
greyrook/libpax @ ^1.1.0
|
||||
https://github.com/SukkoPera/Arduino-Rokkit-Hash.git
|
||||
bblanchon/ArduinoJson @ ^6.20.1
|
||||
makuna/RTC @ ^2.3.6
|
||||
makuna/RTC @ ^2.3.7
|
||||
mathertel/OneButton @ ^2.0.3
|
||||
lewisxhe/XPowersLib @ ^0.1.5
|
||||
256dpi/MQTT @ ^2.5.1
|
||||
|
@ -22,7 +22,7 @@ uint8_t rtc_init(void) {
|
||||
#if (TIME_SYNC_COMPILEDATE)
|
||||
// initialize a blank RTC without battery backup with build time
|
||||
RtcDateTime tt = Rtc.GetDateTime();
|
||||
time_t t = tt.Epoch32Time(); // sec2000 -> epoch
|
||||
time_t t = tt.Unix32Time(); // sec2000 -> epoch
|
||||
|
||||
if (!Rtc.IsDateTimeValid() || !timeIsValid(t)) {
|
||||
ESP_LOGW(TAG, "RTC has no recent time, setting to compiletime");
|
||||
@ -53,7 +53,7 @@ time_t get_rtctime(uint16_t *msec) {
|
||||
*msec = 0;
|
||||
if (Rtc.IsDateTimeValid() && Rtc.GetIsRunning()) {
|
||||
RtcDateTime tt = Rtc.GetDateTime();
|
||||
t = tt.Epoch32Time(); // sec2000 -> epoch
|
||||
t = tt.Unix32Time(); // sec2000 -> epoch
|
||||
}
|
||||
|
||||
// if we have a RTC pulse, we calculate msec
|
||||
|
Loading…
Reference in New Issue
Block a user