Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
084dec63f5 | ||
|
|
95b582f8ac |
@ -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"
|
||||||
@ -189,14 +189,14 @@ bool close_enough_face_loop(movement_event_t event, void *context) {
|
|||||||
char second_word[3];
|
char second_word[3];
|
||||||
char third_word[3];
|
char third_word[3];
|
||||||
if (five_minute_period == 0) { // " HH OC",
|
if (five_minute_period == 0) { // " HH OC",
|
||||||
sprintf(first_word, " ");
|
sprintf(first_word, "%2d", close_enough_hour);
|
||||||
sprintf(second_word, "%2d", close_enough_hour);
|
sprintf(second_word, " ");
|
||||||
strncpy(third_word, oclock_word, 3);
|
strncpy(third_word, oclock_word, 3);
|
||||||
} else { // "MM P HH" or "MM 2 HH+1"
|
} else { // "MM P HH" or "MM 2 HH+1"
|
||||||
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(
|
||||||
|
|||||||
@ -72,11 +72,11 @@ static void _update(moon_phase_state_t *state, uint32_t offset) {
|
|||||||
switch (phase_index) {
|
switch (phase_index) {
|
||||||
case 0:
|
case 0:
|
||||||
case 8:
|
case 8:
|
||||||
watch_display_text_with_fallback(WATCH_POSITION_BOTTOM, "NE!J ", " Neu ");
|
watch_display_text_with_fallback(WATCH_POSITION_BOTTOM, "NE!J ", " NUEVA");
|
||||||
watch_display_text_with_fallback(WATCH_POSITION_TOP_LEFT, " ", " ");
|
watch_display_text_with_fallback(WATCH_POSITION_TOP_LEFT, " ", " ");
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
watch_display_text(WATCH_POSITION_BOTTOM, "CresNt");
|
watch_display_text(WATCH_POSITION_BOTTOM, "Crecie");
|
||||||
watch_display_text_with_fallback(WATCH_POSITION_TOP_LEFT, "WAX", " ");
|
watch_display_text_with_fallback(WATCH_POSITION_TOP_LEFT, "WAX", " ");
|
||||||
if (watch_get_lcd_type() == WATCH_LCD_TYPE_CLASSIC) {
|
if (watch_get_lcd_type() == WATCH_LCD_TYPE_CLASSIC) {
|
||||||
watch_set_pixel(2, 13);
|
watch_set_pixel(2, 13);
|
||||||
@ -85,7 +85,7 @@ static void _update(moon_phase_state_t *state, uint32_t offset) {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
watch_display_text_with_fallback(WATCH_POSITION_BOTTOM, "1stQtr", " 1st q");
|
watch_display_text_with_fallback(WATCH_POSITION_BOTTOM, "1stQtr", "4#Crec");
|
||||||
watch_display_text_with_fallback(WATCH_POSITION_TOP_LEFT, "WAX", " ");
|
watch_display_text_with_fallback(WATCH_POSITION_TOP_LEFT, "WAX", " ");
|
||||||
if (watch_get_lcd_type() == WATCH_LCD_TYPE_CLASSIC) {
|
if (watch_get_lcd_type() == WATCH_LCD_TYPE_CLASSIC) {
|
||||||
watch_set_pixel(2, 13);
|
watch_set_pixel(2, 13);
|
||||||
@ -95,7 +95,7 @@ static void _update(moon_phase_state_t *state, uint32_t offset) {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
watch_display_text_with_fallback(WATCH_POSITION_BOTTOM, "GbboUs", " Gibb ");
|
watch_display_text_with_fallback(WATCH_POSITION_BOTTOM, "GbboUs", " GibCr");
|
||||||
watch_display_text_with_fallback(WATCH_POSITION_TOP_LEFT, "WAX", " ");
|
watch_display_text_with_fallback(WATCH_POSITION_TOP_LEFT, "WAX", " ");
|
||||||
if (watch_get_lcd_type() == WATCH_LCD_TYPE_CLASSIC) {
|
if (watch_get_lcd_type() == WATCH_LCD_TYPE_CLASSIC) {
|
||||||
watch_set_pixel(2, 13);
|
watch_set_pixel(2, 13);
|
||||||
@ -106,7 +106,7 @@ static void _update(moon_phase_state_t *state, uint32_t offset) {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
watch_display_text_with_fallback(WATCH_POSITION_BOTTOM, "FULL ", " FULL ");
|
watch_display_text_with_fallback(WATCH_POSITION_BOTTOM, "FULL ", "LLENA ");
|
||||||
watch_display_text_with_fallback(WATCH_POSITION_TOP_LEFT, " ", " ");
|
watch_display_text_with_fallback(WATCH_POSITION_TOP_LEFT, " ", " ");
|
||||||
if (watch_get_lcd_type() == WATCH_LCD_TYPE_CLASSIC) {
|
if (watch_get_lcd_type() == WATCH_LCD_TYPE_CLASSIC) {
|
||||||
watch_set_pixel(2, 13);
|
watch_set_pixel(2, 13);
|
||||||
@ -120,7 +120,7 @@ static void _update(moon_phase_state_t *state, uint32_t offset) {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
watch_display_text_with_fallback(WATCH_POSITION_BOTTOM, "GbboUs", " Gibb ");
|
watch_display_text_with_fallback(WATCH_POSITION_BOTTOM, "GbboUs", " GibMe");
|
||||||
watch_display_text_with_fallback(WATCH_POSITION_TOP_LEFT, "WAN", " ");
|
watch_display_text_with_fallback(WATCH_POSITION_TOP_LEFT, "WAN", " ");
|
||||||
if (watch_get_lcd_type() == WATCH_LCD_TYPE_CLASSIC) {
|
if (watch_get_lcd_type() == WATCH_LCD_TYPE_CLASSIC) {
|
||||||
watch_set_pixel(1, 14);
|
watch_set_pixel(1, 14);
|
||||||
@ -131,7 +131,7 @@ static void _update(moon_phase_state_t *state, uint32_t offset) {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 6:
|
case 6:
|
||||||
watch_display_text_with_fallback(WATCH_POSITION_BOTTOM, "3rdQtr", " 3rd q");
|
watch_display_text_with_fallback(WATCH_POSITION_BOTTOM, "3rdQtr", "4#meng");
|
||||||
watch_display_text_with_fallback(WATCH_POSITION_TOP_LEFT, "WAN", " ");
|
watch_display_text_with_fallback(WATCH_POSITION_TOP_LEFT, "WAN", " ");
|
||||||
if (watch_get_lcd_type() == WATCH_LCD_TYPE_CLASSIC) {
|
if (watch_get_lcd_type() == WATCH_LCD_TYPE_CLASSIC) {
|
||||||
watch_set_pixel(1, 14);
|
watch_set_pixel(1, 14);
|
||||||
@ -141,7 +141,7 @@ static void _update(moon_phase_state_t *state, uint32_t offset) {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 7:
|
case 7:
|
||||||
watch_display_text(WATCH_POSITION_BOTTOM, "CresNt");
|
watch_display_text(WATCH_POSITION_BOTTOM, "MENGUA");
|
||||||
watch_display_text_with_fallback(WATCH_POSITION_TOP_LEFT, "WAN", " ");
|
watch_display_text_with_fallback(WATCH_POSITION_TOP_LEFT, "WAN", " ");
|
||||||
if (watch_get_lcd_type() == WATCH_LCD_TYPE_CLASSIC) {
|
if (watch_get_lcd_type() == WATCH_LCD_TYPE_CLASSIC) {
|
||||||
watch_set_pixel(0, 14);
|
watch_set_pixel(0, 14);
|
||||||
|
|||||||
@ -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];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user