]> git.earman.xyz Git - sensor-watch.git/commitdiff
remove deprecated watch_display_string
authorjoeycastillo <joeycastillo@utexas.edu>
Thu, 19 Sep 2024 03:21:36 +0000 (23:21 -0400)
committerjoeycastillo <joeycastillo@utexas.edu>
Thu, 19 Sep 2024 03:21:36 +0000 (23:21 -0400)
watch-faces/clock/simple_clock_face.c

index bcf3d8e454cafcc5d5e2d47b5e8240a0b0cb9a63..8a9f16643c3f4cdea7df2325257cb049d2c78cfa 100644 (file)
@@ -128,15 +128,17 @@ bool simple_clock_face_loop(movement_event_t event, movement_settings_t *setting
                     set_leading_zero = true;
                 }
 
-                pos = 0;
+                watch_display_top_left(watch_utility_get_weekday(date_time));
+                sprintf(buf, "%2d%2d%02d%02d", date_time.unit.day, date_time.unit.hour, date_time.unit.minute, date_time.unit.second);
+                watch_display_top_right(buf);
+                watch_display_hours(buf + 2);
+                watch_display_minutes(buf + 4);
                 if (event.event_type == EVENT_LOW_ENERGY_UPDATE) {
                     if (!watch_tick_animation_is_running()) watch_start_tick_animation(500);
-                    sprintf(buf, "%s%2d%2d%02d  ", watch_utility_get_weekday(date_time), date_time.unit.day, date_time.unit.hour, date_time.unit.minute);
                 } else {
-                    sprintf(buf, "%s%2d%2d%02d%02d", watch_utility_get_weekday(date_time), date_time.unit.day, date_time.unit.hour, date_time.unit.minute, date_time.unit.second);
+                    watch_display_seconds(buf + 6);
                 }
             }
-            watch_display_string(buf, pos);
 
             if (set_leading_zero)
                 watch_display_string("0", 4);