Skip to content

Commit

Permalink
Fix direct calls to loggerClock::
Browse files Browse the repository at this point in the history
Signed-off-by: Sara Damiano <[email protected]>
  • Loading branch information
SRGDamia1 committed Oct 23, 2024
1 parent d2a592e commit 9d20734
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion examples/double_logger/double_logger.ino
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ void setup() {
// Connect to the network
if (modem.connectInternet()) {
// Synchronize the RTC
logger1min.setRTClock(modem.getNISTTime());
loggerClock::setRTClock(modem.getNISTTime(), 0, epochStart::unix_epoch);
modem.updateModemMetadata();
// Disconnect from the network
modem.disconnectInternet();
Expand Down
4 changes: 2 additions & 2 deletions examples/menu_a_la_carte/menu_a_la_carte.ino
Original file line number Diff line number Diff line change
Expand Up @@ -3534,8 +3534,8 @@ void loop() {
Logger::markedLocalUnixTime % 86400 == 43200) ||
!loggerClock::isRTCSane()) {
Serial.println(F("Running a daily clock sync..."));
dataLogger.setRTClock(modem.getNISTTime(),
epochStart::unix_epoch);
loggerClock::setRTClock(modem.getNISTTime(), 0,
epochStart::unix_epoch);
dataLogger.watchDogTimer.resetWatchDog();
modem.updateModemMetadata();
dataLogger.watchDogTimer.resetWatchDog();
Expand Down
3 changes: 1 addition & 2 deletions src/ClockSupport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -340,8 +340,7 @@ void loggerClock::begin() {
// This must happen here in the begin, not when setting the internal
// timezone variable because this requires communication with the RTC which
// can only happen during the run, not during compilation.
rtc.setTimeZoneQuarterHours(
(Logger::_loggerUTCOffset - Logger::_loggerRTCOffset) * 4);
rtc.setTimeZoneQuarterHours(loggerClock::_rtcUTCOffset * 4);
#elif defined(MS_USE_DS3231)
MS_DBG(F("Beginning DS3231 real time clock"));
rtc.begin();
Expand Down

0 comments on commit 9d20734

Please sign in to comment.