Added ability to add presets to the sunrise and sunset face

This commit is contained in:
David Volovskiy
2024-07-20 14:35:37 -04:00
parent 226cda748c
commit a7c0fb7dfd
2 changed files with 44 additions and 5 deletions

View File

@@ -53,6 +53,7 @@ typedef struct {
uint8_t active_digit;
bool location_changed;
watch_date_time rise_set_expires;
uint8_t longLatToUse;
sunrise_sunset_lat_lon_settings_t working_latitude;
sunrise_sunset_lat_lon_settings_t working_longitude;
} sunrise_sunset_state_t;
@@ -70,4 +71,18 @@ void sunrise_sunset_face_resign(movement_settings_t *settings, void *context);
NULL, \
})
typedef struct {
char name[2];
int16_t latitude;
int16_t longitude;
} long_lat_presets_t;
static const long_lat_presets_t longLatPresets[] =
{
{ .name = " "}, // Default, the long and lat get replaced by what's set in the watch
// { .name = "Ny", .latitude = 4072, .longitude = -7401 }, // New York City, NY
// { .name = "LA", .latitude = 3405, .longitude = -11824 }, // New York City, NY
// { .name = "dE", .latitude = 4221, .longitude = -8305 }, // Detroit, MI
};
#endif // SUNRISE_SUNSET_FACE_H_