Compare commits
1 Commits
wyoscan
...
9be79d8435
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9be79d8435 |
@@ -25,6 +25,7 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "wyoscan_face.h"
|
#include "wyoscan_face.h"
|
||||||
|
#include "watch_private_display.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Slowly render the current time from left to right,
|
Slowly render the current time from left to right,
|
||||||
@@ -114,7 +115,7 @@ bool wyoscan_face_loop(movement_event_t event, void *context) {
|
|||||||
break;
|
break;
|
||||||
case EVENT_TICK:
|
case EVENT_TICK:
|
||||||
if (!state->animate) {
|
if (!state->animate) {
|
||||||
date_time = movement_get_local_date_time();
|
date_time = watch_rtc_get_date_time();
|
||||||
state->start = 0;
|
state->start = 0;
|
||||||
state->end = 0;
|
state->end = 0;
|
||||||
state->animation = 0;
|
state->animation = 0;
|
||||||
@@ -78,5 +78,4 @@
|
|||||||
#include "higher_lower_game_face.h"
|
#include "higher_lower_game_face.h"
|
||||||
#include "lander_face.h"
|
#include "lander_face.h"
|
||||||
#include "simon_face.h"
|
#include "simon_face.h"
|
||||||
#include "wyoscan_face.h"
|
|
||||||
// New includes go above this line.
|
// New includes go above this line.
|
||||||
|
|||||||
@@ -53,5 +53,4 @@ SRCS += \
|
|||||||
./watch-faces/complication/higher_lower_game_face.c \
|
./watch-faces/complication/higher_lower_game_face.c \
|
||||||
./watch-faces/complication/lander_face.c \
|
./watch-faces/complication/lander_face.c \
|
||||||
./watch-faces/complication/simon_face.c \
|
./watch-faces/complication/simon_face.c \
|
||||||
./watch-faces/clock/wyoscan_face.c \
|
|
||||||
# New watch faces go above this line.
|
# New watch faces go above this line.
|
||||||
|
|||||||
@@ -40,20 +40,20 @@ static const char *words[12] = {
|
|||||||
" ",
|
" ",
|
||||||
" 5",
|
" 5",
|
||||||
"10",
|
"10",
|
||||||
"15",
|
"CU",
|
||||||
"20",
|
"20",
|
||||||
"25",
|
"Me",
|
||||||
"30",
|
"ME",
|
||||||
"35",
|
"mE",
|
||||||
"40",
|
"40",
|
||||||
"45",
|
"45",
|
||||||
"50",
|
"50",
|
||||||
"55",
|
"55",
|
||||||
};
|
};
|
||||||
|
|
||||||
static const char *past_word = " P";
|
static const char *past_word = " y";
|
||||||
static const char *to_word = " 2";
|
static const char *to_word = " -";
|
||||||
static const char *oclock_word = "OC";
|
static const char *oclock_word = "EP";
|
||||||
|
|
||||||
// sets when in the five minute period we switch
|
// sets when in the five minute period we switch
|
||||||
// from "X past HH" to "X to HH+1"
|
// from "X past HH" to "X to HH+1"
|
||||||
@@ -196,7 +196,7 @@ bool close_enough_face_loop(movement_event_t event, void *context) {
|
|||||||
int words_length = sizeof(words) / sizeof(words[0]);
|
int words_length = sizeof(words) / sizeof(words[0]);
|
||||||
|
|
||||||
strncpy(
|
strncpy(
|
||||||
first_word,
|
third_word,
|
||||||
show_next_hour ?
|
show_next_hour ?
|
||||||
words[words_length - five_minute_period] :
|
words[words_length - five_minute_period] :
|
||||||
words[five_minute_period],
|
words[five_minute_period],
|
||||||
@@ -207,7 +207,7 @@ bool close_enough_face_loop(movement_event_t event, void *context) {
|
|||||||
show_next_hour ? to_word : past_word,
|
show_next_hour ? to_word : past_word,
|
||||||
3
|
3
|
||||||
);
|
);
|
||||||
sprintf(third_word, "%2d", close_enough_hour);
|
sprintf(first_word, "%2d", close_enough_hour);
|
||||||
}
|
}
|
||||||
|
|
||||||
watch_display_text_with_fallback(
|
watch_display_text_with_fallback(
|
||||||
|
|||||||
@@ -28,12 +28,12 @@
|
|||||||
#include "zones.h"
|
#include "zones.h"
|
||||||
|
|
||||||
const char * watch_utility_get_weekday(watch_date_time_t date_time) {
|
const char * watch_utility_get_weekday(watch_date_time_t date_time) {
|
||||||
static const char weekdays[7][3] = {"MO", "TU", "WE", "TH", "FR", "SA", "SU"};
|
static const char weekdays[7][3] = {"LU", "MA", "MI", "JU", "VI", "SA", "do"};
|
||||||
return weekdays[watch_utility_get_iso8601_weekday_number(date_time.unit.year + WATCH_RTC_REFERENCE_YEAR, date_time.unit.month, date_time.unit.day) - 1];
|
return weekdays[watch_utility_get_iso8601_weekday_number(date_time.unit.year + WATCH_RTC_REFERENCE_YEAR, date_time.unit.month, date_time.unit.day) - 1];
|
||||||
}
|
}
|
||||||
|
|
||||||
const char * watch_utility_get_long_weekday(watch_date_time_t date_time) {
|
const char * watch_utility_get_long_weekday(watch_date_time_t date_time) {
|
||||||
static const char weekdays[7][4] = {"MON", "TUE", "WED", "THU", "FRI", "SAT", "SUN"};
|
static const char weekdays[7][4] = {"LUN", "MAR", "MIE", "JUE", "VIE", "SAB", "DOM"};
|
||||||
return weekdays[watch_utility_get_iso8601_weekday_number(date_time.unit.year + WATCH_RTC_REFERENCE_YEAR, date_time.unit.month, date_time.unit.day) - 1];
|
return weekdays[watch_utility_get_iso8601_weekday_number(date_time.unit.year + WATCH_RTC_REFERENCE_YEAR, date_time.unit.month, date_time.unit.day) - 1];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user