You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: usermods/RTC/usermod_rtc.h
+23-8Lines changed: 23 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -8,21 +8,25 @@
8
8
9
9
#defineRTC_DELTA2// only modify RTC time if delta exceeds this number of seconds
10
10
11
-
//Connect DS1307 to standard I2C pins (ESP32: GPIO 21 (SDA)/GPIO 22 (SCL))
11
+
//Connect DS1307 or DS3231 to standard I2C pins (ESP32: GPIO 21 (SDA)/GPIO 22 (SCL))
12
12
13
13
classRTCUsermod : publicUsermod {
14
14
private:
15
15
unsignedlong lastTime = 0;
16
-
booldisabled = false;
16
+
boolRTCfound = false;// WLEDMM to prevent errors after anabling the usermod (Wire.cpp:526] write(): NULL TX buffer pointer)
17
17
public:
18
18
19
+
RTCUsermod(constchar *name, bool enabled):Usermod(name, enabled) {} //WLEDMM: this shouldn't be necessary (passthrough of constructor), maybe because Usermod is an abstract class
0 commit comments