From 1561d6e028ecf5b0f13ea33ccf2a28330537fa15 Mon Sep 17 00:00:00 2001 From: cyberman54 Date: Mon, 17 Apr 2023 21:30:27 +0200 Subject: [PATCH] fix issue #956 --- src/main.cpp | 2 +- src/rtctime.cpp | 2 +- src/timekeeper.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 3d6783fe..32116f2d 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -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 diff --git a/src/rtctime.cpp b/src/rtctime.cpp index 1e853898..97f735f3 100644 --- a/src/rtctime.cpp +++ b/src/rtctime.cpp @@ -8,7 +8,7 @@ RtcDS3231 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); diff --git a/src/timekeeper.cpp b/src/timekeeper.cpp index 4412990d..1ff26e40 100644 --- a/src/timekeeper.cpp +++ b/src/timekeeper.cpp @@ -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;