default year to 2023

This commit is contained in:
joeycastillo 2023-08-27 17:53:02 -04:00
parent 1cb5d00aaf
commit e4ad0e5567

View file

@ -66,10 +66,10 @@ int main(void) {
// Watch library code. Set initial parameters for the device and enable the RTC. // Watch library code. Set initial parameters for the device and enable the RTC.
_watch_init(); _watch_init();
// if date/time register is 0 (power on reset state), default year to 2022. // if date/time register is 0 (power on reset state), default year to 2023.
watch_date_time date_time = watch_rtc_get_date_time(); watch_date_time date_time = watch_rtc_get_date_time();
if (date_time.reg == 0) { if (date_time.reg == 0) {
date_time.unit.year = 2; date_time.unit.year = 3;
watch_rtc_set_date_time(date_time); watch_rtc_set_date_time(date_time);
} }