ropg / ezTime

ezTime — pronounced "Easy Time" — is a very easy to use Arduino time and date library that provides NTP network time lookups, extensive timezone support, formatted time and date strings, user events, millisecond precision and more.
MIT License
327 stars 92 forks source link

Library ignores if EERPROM is already being used #146

Open AussieMakerGeek opened 2 years ago

AussieMakerGeek commented 2 years ago

Hi - This one took me ages to figure why my existing code that uses the EEPROM broke as soon as I enabled the cache on ezTime.

Looking at line 878 of ezTime.cpp I see that once it has written to the EEPROM, it issues an eeprom.end() command when using ESP32.

Perhaps document this as well as maybe adding the option to disable this (Why end it anyway?).

I'm a bit fresh to the ESP32 and this code was migrated from Arduino Uno from some time ago so I have not messed with the NVS stuff yet - it's probably a better way to go but once the values in my device are set, they will stay for a long time.

Thanks for the great work.