Merge branch 'master' into development

This commit is contained in:
Verkehrsrot 2023-04-28 17:26:31 +02:00 committed by GitHub
commit edf29e03c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 7 deletions

View File

@ -78,8 +78,8 @@ lib_deps_sensors =
lib_deps_basic =
greyrook/libpax @ ^1.1.0
https://github.com/SukkoPera/Arduino-Rokkit-Hash.git
bblanchon/ArduinoJson @ ^6.21.0
makuna/RTC @ ^2.3.6
bblanchon/ArduinoJson @ ^6.21.2
makuna/RTC @ ^2.3.7
mathertel/OneButton @ ^2.0.3
lewisxhe/XPowersLib @ ^0.1.5
256dpi/MQTT @ ^2.5.1

View File

@ -456,7 +456,7 @@ void setup() {
#endif // HAS_BUTTON
// only if we have a timesource we do timesync
#if ((HAS_LORA_TIME) || (HAS_GPS) || (HAS_RTC))
#if ((HAS_LORA_TIME) || (HAS_GPS) || defined HAS_RTC)
time_init();
strcat_P(features, " TIME");
#endif // timesync

View File

@ -8,7 +8,7 @@ RtcDS3231<TwoWire> Rtc(Wire); // RTC hardware i2c interface
// initialize RTC
uint8_t rtc_init(void) {
Wire.begin(HAS_RTC);
Rtc.Begin(MY_DISPLAY_SDA, MY_DISPLAY_SCL);
Rtc.Begin(HAS_RTC);
// configure RTC chip
Rtc.Enable32kHzPin(false);
@ -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

View File

@ -82,7 +82,7 @@ void calibrateTime(void) {
return;
#endif
#if ((HAS_GPS) || (HAS_RTC))
#if ((HAS_GPS) || defined HAS_RTC)
time_t t = 0;
uint16_t t_msec = 0;