bring sunrise/sunset face into new movement

This commit is contained in:
joeycastillo 2024-09-29 23:13:59 -04:00
parent 0185b56972
commit 5b12491ebe
6 changed files with 11 additions and 6 deletions

View File

@ -35,6 +35,7 @@ INCLUDES += \
-I./utz \ -I./utz \
-I./filesystem \ -I./filesystem \
-I./shell \ -I./shell \
-I./movement/lib/sunriset \
-I./watch-library/shared/watch \ -I./watch-library/shared/watch \
-I./watch-library/hardware/watch \ -I./watch-library/hardware/watch \
-I./watch-faces/clock \ -I./watch-faces/clock \
@ -50,6 +51,7 @@ SRCS += \
./utz/zones.c \ ./utz/zones.c \
./shell/shell.c \ ./shell/shell.c \
./shell/shell_cmd_list.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_buzzer.c \
./watch-library/shared/watch/watch_common_display.c \ ./watch-library/shared/watch/watch_common_display.c \
./watch-library/shared/watch/watch_utility.c \ ./watch-library/shared/watch/watch_utility.c \

View File

@ -29,7 +29,7 @@
const watch_face_t watch_faces[] = { const watch_face_t watch_faces[] = {
clock_face, clock_face,
world_clock_face, sunrise_sunset_face,
beats_face, beats_face,
advanced_alarm_face, advanced_alarm_face,
countdown_face, countdown_face,

View File

@ -30,6 +30,7 @@
#include "advanced_alarm_face.h" #include "advanced_alarm_face.h"
#include "countdown_face.h" #include "countdown_face.h"
#include "fast_stopwatch_face.h" #include "fast_stopwatch_face.h"
#include "sunrise_sunset_face.h"
#include "set_time_face.h" #include "set_time_face.h"
#include "preferences_face.h" #include "preferences_face.h"
// New includes go above this line. // New includes go above this line.

View File

@ -5,5 +5,6 @@ SRCS += \
./watch-faces/complication/advanced_alarm_face.c \ ./watch-faces/complication/advanced_alarm_face.c \
./watch-faces/complication/countdown_face.c \ ./watch-faces/complication/countdown_face.c \
./watch-faces/complication/fast_stopwatch_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/set_time_face.c \
./watch-faces/settings/preferences_face.c \ ./watch-faces/settings/preferences_face.c \

View File

@ -57,7 +57,8 @@ static void _sunrise_sunset_face_update(sunrise_sunset_state_t *state) {
} }
if (movement_location.reg == 0) { 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; 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_PM);
watch_clear_indicator(WATCH_INDICATOR_24H); watch_clear_indicator(WATCH_INDICATOR_24H);
sprintf(buf, "%s%2d none ", (result == 1) ? "SE" : "rI", scratch_time.unit.day); 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; return;
} }
@ -118,7 +119,7 @@ static void _sunrise_sunset_face_update(sunrise_sunset_state_t *state) {
else watch_clear_indicator(WATCH_INDICATOR_PM); 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); 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; return;
} else { } else {
show_next_match = true; 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); 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); 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; return;
} else { } else {
show_next_match = true; show_next_match = true;
@ -217,7 +218,7 @@ static void _sunrise_sunset_face_update_settings_display(movement_event_t event,
if (event.subsecond % 2) { if (event.subsecond % 2) {
buf[state->active_digit + 4] = ' '; 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) { static void _sunrise_sunset_face_advance_digit(sunrise_sunset_state_t *state) {