diff --git a/Makefile b/Makefile index 3e18df6e..6a76e69b 100644 --- a/Makefile +++ b/Makefile @@ -35,6 +35,7 @@ INCLUDES += \ -I./utz \ -I./filesystem \ -I./shell \ + -I./movement/lib/sunriset \ -I./watch-library/shared/watch \ -I./watch-library/hardware/watch \ -I./watch-faces/clock \ @@ -50,6 +51,7 @@ SRCS += \ ./utz/zones.c \ ./shell/shell.c \ ./shell/shell_cmd_list.c \ + ./movement/lib/sunriset/sunriset.c \ ./watch-library/shared/watch/watch_common_buzzer.c \ ./watch-library/shared/watch/watch_common_display.c \ ./watch-library/shared/watch/watch_utility.c \ diff --git a/movement_config.h b/movement_config.h index a6a96107..c54149ec 100644 --- a/movement_config.h +++ b/movement_config.h @@ -29,7 +29,7 @@ const watch_face_t watch_faces[] = { clock_face, - world_clock_face, + sunrise_sunset_face, beats_face, advanced_alarm_face, countdown_face, diff --git a/movement_faces.h b/movement_faces.h index a33645a3..09d682f3 100644 --- a/movement_faces.h +++ b/movement_faces.h @@ -30,6 +30,7 @@ #include "advanced_alarm_face.h" #include "countdown_face.h" #include "fast_stopwatch_face.h" +#include "sunrise_sunset_face.h" #include "set_time_face.h" #include "preferences_face.h" // New includes go above this line. diff --git a/watch-faces.mk b/watch-faces.mk index 7d562fa8..417e30d6 100644 --- a/watch-faces.mk +++ b/watch-faces.mk @@ -5,5 +5,6 @@ SRCS += \ ./watch-faces/complication/advanced_alarm_face.c \ ./watch-faces/complication/countdown_face.c \ ./watch-faces/complication/fast_stopwatch_face.c \ + ./watch-faces/complication/sunrise_sunset_face.c \ ./watch-faces/settings/set_time_face.c \ ./watch-faces/settings/preferences_face.c \ diff --git a/movement/watch_faces/complication/sunrise_sunset_face.c b/watch-faces/complication/sunrise_sunset_face.c similarity index 97% rename from movement/watch_faces/complication/sunrise_sunset_face.c rename to watch-faces/complication/sunrise_sunset_face.c index 87d82267..95cddfba 100644 --- a/movement/watch_faces/complication/sunrise_sunset_face.c +++ b/watch-faces/complication/sunrise_sunset_face.c @@ -57,7 +57,8 @@ static void _sunrise_sunset_face_update(sunrise_sunset_state_t *state) { } if (movement_location.reg == 0) { - watch_display_string("RI no Loc", 0); + watch_display_text_with_fallback(WATCH_POSITION_TOP, "Sunri", "rI"); + watch_display_text_with_fallback(WATCH_POSITION_BOTTOM, "No LOC", "No Loc"); return; } @@ -88,7 +89,7 @@ static void _sunrise_sunset_face_update(sunrise_sunset_state_t *state) { watch_clear_indicator(WATCH_INDICATOR_PM); watch_clear_indicator(WATCH_INDICATOR_24H); sprintf(buf, "%s%2d none ", (result == 1) ? "SE" : "rI", scratch_time.unit.day); - watch_display_string(buf, 0); + watch_display_text(WATCH_POSITION_FULL, buf); return; } @@ -118,7 +119,7 @@ static void _sunrise_sunset_face_update(sunrise_sunset_state_t *state) { else watch_clear_indicator(WATCH_INDICATOR_PM); } sprintf(buf, "rI%2d%2d%02d%s", scratch_time.unit.day, scratch_time.unit.hour, scratch_time.unit.minute,longLatPresets[state->longLatToUse].name); - watch_display_string(buf, 0); + watch_display_text(WATCH_POSITION_FULL, buf); return; } else { show_next_match = true; @@ -145,7 +146,7 @@ static void _sunrise_sunset_face_update(sunrise_sunset_state_t *state) { else watch_clear_indicator(WATCH_INDICATOR_PM); } sprintf(buf, "SE%2d%2d%02d%s", scratch_time.unit.day, scratch_time.unit.hour, scratch_time.unit.minute, longLatPresets[state->longLatToUse].name); - watch_display_string(buf, 0); + watch_display_text(WATCH_POSITION_FULL, buf); return; } else { show_next_match = true; @@ -217,7 +218,7 @@ static void _sunrise_sunset_face_update_settings_display(movement_event_t event, if (event.subsecond % 2) { buf[state->active_digit + 4] = ' '; } - watch_display_string(buf, 0); + watch_display_text(WATCH_POSITION_FULL, buf); } static void _sunrise_sunset_face_advance_digit(sunrise_sunset_state_t *state) { diff --git a/movement/watch_faces/complication/sunrise_sunset_face.h b/watch-faces/complication/sunrise_sunset_face.h similarity index 100% rename from movement/watch_faces/complication/sunrise_sunset_face.h rename to watch-faces/complication/sunrise_sunset_face.h