improve API for text display

This commit is contained in:
joeycastillo
2024-09-19 08:42:07 -04:00
parent 8bbcacd747
commit 9274f532d2
4 changed files with 160 additions and 182 deletions

View File

@@ -120,15 +120,15 @@ bool simple_clock_face_loop(movement_event_t event, movement_settings_t *setting
if (date_time.unit.hour == 0) date_time.unit.hour = 12;
}
#endif
watch_display_top_left((char *) watch_utility_get_weekday(date_time));
watch_display_text(WATCH_POSITION_TOP_LEFT, (char *) 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);
watch_display_text(WATCH_POSITION_TOP_RIGHT, buf);
watch_display_text(WATCH_POSITION_HOURS, buf + 2);
watch_display_text(WATCH_POSITION_MINUTES, buf + 4);
if (event.event_type == EVENT_LOW_ENERGY_UPDATE) {
if (!watch_tick_animation_is_running()) watch_start_tick_animation(500);
} else {
watch_display_seconds(buf + 6);
watch_display_text(WATCH_POSITION_SECONDS, buf + 6);
}
}