]> git.earman.xyz Git - sensor-watch.git/commitdiff
set a valid date on boot
authorjoeycastillo <joeycastillo@utexas.edu>
Sat, 5 Oct 2024 11:34:11 +0000 (07:34 -0400)
committerjoeycastillo <joeycastillo@utexas.edu>
Sat, 5 Oct 2024 14:36:58 +0000 (10:36 -0400)
movement.c

index 5274a49e02635b35669d903d459c07b39cfc2570..8c160505e03a3dc842536bf5c5f49ffca8a17eab 100644 (file)
@@ -461,6 +461,8 @@ void app_init(void) {
     if (date_time.reg == 0) {
         // at first boot, set year to 2024
         date_time.unit.year = 2024 - WATCH_RTC_REFERENCE_YEAR;
+        date_time.unit.month = 1;
+        date_time.unit.day = 1;
         watch_rtc_set_date_time(date_time);
     }