cyberman54 / ESP32-Paxcounter

Wifi & BLE driven passenger flow metering with cheap ESP32 boards
https://cyberman54.github.io/ESP32-Paxcounter/
Other
1.69k stars 397 forks source link

#define HAS_RTC MY_DISPLAY_SDA, MY_DISPLAY_SCL // SDA, SCL does not work for #if (... #956

Closed TomRottler closed 1 year ago

TomRottler commented 1 year ago

We are using an external RTC, connected to the LILYGO® LoRa 1.6. Therefor we've created our own HAL with #define HAS_RTC MY_DISPLAY_SDA, MY_DISPLAY_SCL, as used for other pre-defined devices.

Now we faced the problem that this define does not work properly in some cases e.g. in timekeeper.cpp:

if ((HAS_GPS) || (HAS_RTC))

We did a workaround in rtctime.cpp @ rtc_init: Wire.begin(MY_DISPLAY_SDA, MY_DISPLAY_SCL);

The following line was already fixed to the GPIO, in this case this should make sense. Additionally we changed the HAS_RTC to a single value in our HAL.

Can you confirm this?

Thanks TOM

cyberman54 commented 1 year ago

fixed. Please confirm, thanks.

TomRottler commented 1 year ago

it works. Thanks.