movement: add world clock face

This commit is contained in:
Joey Castillo
2021-11-26 13:43:47 -05:00
parent 4a4ab81c6c
commit 002d368a25
6 changed files with 228 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
#ifndef WORLD_CLOCK_FACE_H_
#define WORLD_CLOCK_FACE_H_
#include "movement.h"
typedef struct {
uint8_t char_0;
uint8_t char_1;
uint8_t timezone_index;
} world_clock_settings_t;
typedef struct {
world_clock_settings_t settings;
uint8_t current_screen;
uint32_t previous_date_time;
} world_clock_state_t;
void world_clock_face_setup(movement_settings_t *settings, void ** context_ptr);
void world_clock_face_activate(movement_settings_t *settings, void *context);
bool world_clock_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
void world_clock_face_resign(movement_settings_t *settings, void *context);
uint8_t world_clock_face_get_weekday(uint16_t day, uint16_t month, uint16_t year);
static const watch_face_t world_clock_face = {
world_clock_face_setup,
world_clock_face_activate,
world_clock_face_loop,
world_clock_face_resign,
NULL
};
#endif // WORLD_CLOCK_FACE_H_