enviro
enviro copied to clipboard
Fixed crash on cold RTC boot
Added checks before writing external RTC time to Pico's time to prevent error-crash when the enviro board is booted from a cold RTC.
Hi. Do you have more details of the crash you experienced? From a cold boot the RTC does have a time (though out by 2 years), so shouldn't cause a crash when being applied to the Pico's RTC.
When I unboxed my enviro urban, the dRTC kept trying to set the time on the Pico's RTC to something in 2001 and immediately crashes. This fix attempts to fetch NTP time if the dRTC is ridiculously off (as defined by an existing function; where the dRTC reports the year to be 2020)