mirror of
https://github.com/firewalkwithm3/Sensor-Watch.git
synced 2024-11-22 11:10:29 +08:00
default year to 2023
This commit is contained in:
parent
1cb5d00aaf
commit
e4ad0e5567
|
@ -66,10 +66,10 @@ int main(void) {
|
|||
// Watch library code. Set initial parameters for the device and enable the RTC.
|
||||
_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();
|
||||
if (date_time.reg == 0) {
|
||||
date_time.unit.year = 2;
|
||||
date_time.unit.year = 3;
|
||||
watch_rtc_set_date_time(date_time);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue