diff --git a/src/AppLayer.cpp b/src/AppLayer.cpp index 30115c4..a8e6a36 100644 --- a/src/AppLayer.cpp +++ b/src/AppLayer.cpp @@ -181,11 +181,11 @@ void AppLayer::getPayloadStage1(uint8_t port, LoraEncoder &encoder) #ifdef RAINDATA_EN // Check if time is valid - if (*rtcLastClockSync > 0) + if (*_rtcLastClockSync > 0) { // Get local date and time struct tm timeinfo; - time_t tnow = rtc->getLocalEpoch(); + time_t tnow = _rtc->getLocalEpoch(); localtime_r(&tnow, &timeinfo); // Find weather sensor and determine rain gauge overflow limit @@ -212,10 +212,10 @@ void AppLayer::getPayloadStage1(uint8_t port, LoraEncoder &encoder) #ifdef LIGHTNINGSENSOR_EN // Check if time is valid - if (*rtcLastClockSync > 0) + if (*_rtcLastClockSync > 0) { // Get local date and time - time_t tnow = rtc->getLocalEpoch(); + time_t tnow = _rtc->getLocalEpoch(); // Find lightning sensor int ls = weatherSensor.findType(SENSOR_TYPE_LIGHTNING); diff --git a/src/AppLayer.h b/src/AppLayer.h index fe761e7..f4f3558 100644 --- a/src/AppLayer.h +++ b/src/AppLayer.h @@ -76,8 +76,8 @@ class AppLayer { private: - ESP32Time *rtc; - time_t *rtcLastClockSync; + ESP32Time *_rtc; + time_t *_rtcLastClockSync; /// Preferences (stored in flash memory) Preferences appPrefs; @@ -132,8 +132,8 @@ class AppLayer AppLayer(ESP32Time *rtc, time_t *clocksync) #endif { - rtc = rtc; - rtcLastClockSync = clocksync; + _rtc = rtc; + _rtcLastClockSync = clocksync; #if defined(MITHERMOMETER_EN) || defined(THEENGSDECODER_EN) knownBLEAddressesDef = KNOWN_BLE_ADDRESSES;