]> git.earman.xyz Git - sensor-watch.git/commitdiff
beats face displays 'beat' on custom LCD
authorjoeycastillo <joeycastillo@utexas.edu>
Sun, 29 Sep 2024 18:55:43 +0000 (14:55 -0400)
committerjoeycastillo <joeycastillo@utexas.edu>
Sun, 29 Sep 2024 19:24:43 +0000 (15:24 -0400)
watch-faces/clock/beats_face.c

index 39e5f6e4b32c5ff614b73ea1a3554b175b1cc187..e6c686104a5e7cc26e46e97fe930491a28c318ab 100644 (file)
@@ -66,17 +66,19 @@ bool beats_face_loop(movement_event_t event, void *context) {
                 state->next_subsecond_update = (event.subsecond + 1 + (BEAT_REFRESH_FREQUENCY * 2 / 3)) % BEAT_REFRESH_FREQUENCY;
                 state->last_centibeat_displayed = centibeats;
             }
-            sprintf(buf, "bt  %6lu", centibeats);
+            sprintf(buf, "%6lu", centibeats);
 
-            watch_display_text(WATCH_POSITION_FULL, buf);
+            watch_display_text_with_fallback(WATCH_POSITION_TOP, "beat", "bt");
+            watch_display_text(WATCH_POSITION_BOTTOM, buf);
             break;
         case EVENT_LOW_ENERGY_UPDATE:
             if (!watch_tick_animation_is_running()) watch_start_tick_animation(432);
             date_time = watch_rtc_get_date_time();
             centibeats = clock2beats(date_time.unit.hour, date_time.unit.minute, date_time.unit.second, event.subsecond, movement_get_current_timezone_offset());
-            sprintf(buf, "bt  %4lu  ", centibeats / 100);
+            sprintf(buf, "%4lu  ", centibeats / 100);
 
-            watch_display_text(WATCH_POSITION_FULL, buf);
+            watch_display_text_with_fallback(WATCH_POSITION_TOP, "beat", "bt");
+            watch_display_text(WATCH_POSITION_BOTTOM, buf);
             break;
         default:
             movement_default_loop_handler(event);