Compare commits

...

8 Commits

Author SHA1 Message Date
hueso
52786f8449 Merge branch 'moonrise' into HEAD
Some checks failed
Build / build (sensorwatch_blue, classic) (push) Has been cancelled
Build / build (sensorwatch_blue, custom) (push) Has been cancelled
Build / build (sensorwatch_green, classic) (push) Has been cancelled
Build / build (sensorwatch_green, custom) (push) Has been cancelled
Build / build (sensorwatch_pro, classic) (push) Has been cancelled
Build / build (sensorwatch_pro, custom) (push) Has been cancelled
Build / build (sensorwatch_red, classic) (push) Has been cancelled
Build / build (sensorwatch_red, custom) (push) Has been cancelled
Build / build-simulator (sensorwatch_blue, classic) (push) Has been cancelled
Build / build-simulator (sensorwatch_blue, custom) (push) Has been cancelled
Build / build-simulator (sensorwatch_green, classic) (push) Has been cancelled
Build / build-simulator (sensorwatch_green, custom) (push) Has been cancelled
Build / build-simulator (sensorwatch_pro, classic) (push) Has been cancelled
Build / build-simulator (sensorwatch_pro, custom) (push) Has been cancelled
Build / build-simulator (sensorwatch_red, classic) (push) Has been cancelled
Build / build-simulator (sensorwatch_red, custom) (push) Has been cancelled
GitHub Pages / gh-pages (push) Has been cancelled
2025-12-16 11:55:23 -03:00
hueso
b996ae61bd Merge branch 'español' into HEAD 2025-12-16 11:55:09 -03:00
hueso
1174d80c98 add light to settings face
Some checks failed
Build / build (sensorwatch_blue, classic) (push) Has been cancelled
Build / build (sensorwatch_blue, custom) (push) Has been cancelled
Build / build (sensorwatch_green, classic) (push) Has been cancelled
Build / build (sensorwatch_green, custom) (push) Has been cancelled
Build / build (sensorwatch_pro, classic) (push) Has been cancelled
Build / build (sensorwatch_pro, custom) (push) Has been cancelled
Build / build (sensorwatch_red, classic) (push) Has been cancelled
Build / build (sensorwatch_red, custom) (push) Has been cancelled
Build / build-simulator (sensorwatch_blue, classic) (push) Has been cancelled
Build / build-simulator (sensorwatch_blue, custom) (push) Has been cancelled
Build / build-simulator (sensorwatch_green, classic) (push) Has been cancelled
Build / build-simulator (sensorwatch_green, custom) (push) Has been cancelled
Build / build-simulator (sensorwatch_pro, classic) (push) Has been cancelled
Build / build-simulator (sensorwatch_pro, custom) (push) Has been cancelled
Build / build-simulator (sensorwatch_red, classic) (push) Has been cancelled
Build / build-simulator (sensorwatch_red, custom) (push) Has been cancelled
2025-12-16 11:51:32 -03:00
hueso
7757489ce7 fix LED turning off on face changes 2025-12-16 11:51:32 -03:00
hueso
4d530ab29f close_enough_face: swap bell/alarm to match stock firmware 2025-12-16 11:51:32 -03:00
hueso
4453a9f3da ignore indicators for short beep alarms 2025-12-16 11:51:32 -03:00
hueso
4c8d04030c Fixed buffer overflows in sunrise_sunset_face 2025-12-16 11:51:32 -03:00
hueso
9be79d8435 spanish translations
Some checks failed
Build / build (sensorwatch_blue, classic) (push) Has been cancelled
Build / build (sensorwatch_blue, custom) (push) Has been cancelled
Build / build (sensorwatch_green, classic) (push) Has been cancelled
Build / build (sensorwatch_green, custom) (push) Has been cancelled
Build / build (sensorwatch_pro, classic) (push) Has been cancelled
Build / build (sensorwatch_pro, custom) (push) Has been cancelled
Build / build (sensorwatch_red, classic) (push) Has been cancelled
Build / build (sensorwatch_red, custom) (push) Has been cancelled
Build / build-simulator (sensorwatch_blue, classic) (push) Has been cancelled
Build / build-simulator (sensorwatch_blue, custom) (push) Has been cancelled
Build / build-simulator (sensorwatch_green, classic) (push) Has been cancelled
Build / build-simulator (sensorwatch_green, custom) (push) Has been cancelled
Build / build-simulator (sensorwatch_pro, classic) (push) Has been cancelled
Build / build-simulator (sensorwatch_pro, custom) (push) Has been cancelled
Build / build-simulator (sensorwatch_red, classic) (push) Has been cancelled
Build / build-simulator (sensorwatch_red, custom) (push) Has been cancelled
2025-12-16 11:29:14 -03:00
7 changed files with 23 additions and 29 deletions

View File

@ -40,20 +40,20 @@ static const char *words[12] = {
" ",
" 5",
"10",
"15",
"CU",
"20",
"25",
"30",
"35",
"Me",
"ME",
"mE",
"40",
"45",
"50",
"55",
};
static const char *past_word = " P";
static const char *to_word = " 2";
static const char *oclock_word = "OC";
static const char *past_word = " y";
static const char *to_word = " -";
static const char *oclock_word = "EP";
// sets when in the five minute period we switch
// from "X past HH" to "X to HH+1"
@ -87,7 +87,7 @@ void close_enough_face_activate(void *context) {
clock_stop_tick_tock_animation();
clock_indicate(WATCH_INDICATOR_BELL, movement_alarm_enabled());
clock_indicate(WATCH_INDICATOR_SIGNAL, movement_alarm_enabled());
clock_indicate(WATCH_INDICATOR_24H, !!movement_clock_mode_24h());
// this ensures that none of the five_minute_periods will match, so we always rerender when the face activates
@ -196,7 +196,7 @@ bool close_enough_face_loop(movement_event_t event, void *context) {
int words_length = sizeof(words) / sizeof(words[0]);
strncpy(
first_word,
third_word,
show_next_hour ?
words[words_length - 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,
3
);
sprintf(third_word, "%2d", close_enough_hour);
sprintf(first_word, "%2d", close_enough_hour);
}
watch_display_text_with_fallback(

View File

@ -169,7 +169,7 @@ static void _alarm_update_alarm_enabled(alarm_state_t *state) {
uint16_t now_minutes_of_day;
uint16_t alarm_minutes_of_day;
for (uint8_t i = 0; i < ALARM_ALARMS; i++) {
if (state->alarm[i].enabled) {
if (state->alarm[i].enabled && state->alarm[i].beeps != 0) {
// figure out if alarm is to go off in the next 24 h
if (state->alarm[i].day == ALARM_DAY_EACH_DAY || state->alarm[i].day == ALARM_DAY_ONE_TIME) {
active_alarms = true;
@ -263,7 +263,6 @@ void advanced_alarm_face_resign(void *context) {
alarm_state_t *state = (alarm_state_t *)context;
state->is_setting = false;
_alarm_update_alarm_enabled(state);
watch_set_led_off();
state->alarm_quick_ticks = false;
_wait_ticks = -1;
movement_request_tick_frequency(1);

View File

@ -331,6 +331,5 @@ bool simon_face_loop(movement_event_t event,
void simon_face_resign(void *context) {
(void)context;
watch_set_led_off();
watch_set_buzzer_off();
}

View File

@ -108,7 +108,7 @@ static void _sunrise_sunset_face_update(sunrise_sunset_state_t *state) {
watch_clear_indicator(WATCH_INDICATOR_24H);
if (result == 1) watch_display_text_with_fallback(WATCH_POSITION_TOP_LEFT, "SET", "SE");
else watch_display_text_with_fallback(WATCH_POSITION_TOP_LEFT, "RIS", "rI");
sprintf(buf, "%2d", scratch_time.unit.day);
snprintf(buf, sizeof(buf), "%2d", scratch_time.unit.day);
watch_display_text(WATCH_POSITION_TOP_RIGHT, buf);
watch_display_text(WATCH_POSITION_BOTTOM, "None ");
return;
@ -149,9 +149,9 @@ static void _sunrise_sunset_face_update(sunrise_sunset_state_t *state) {
else watch_clear_indicator(WATCH_INDICATOR_PM);
}
watch_display_text_with_fallback(WATCH_POSITION_TOP_LEFT, "RIS", "rI");
sprintf(buf, "%2d", scratch_time.unit.day);
snprintf(buf, sizeof(buf), "%2d", scratch_time.unit.day);
watch_display_text(WATCH_POSITION_TOP_RIGHT, buf);
sprintf(buf, "%2d%02d%2s", scratch_time.unit.hour, scratch_time.unit.minute,longLatPresets[state->longLatToUse].name);
snprintf(buf, sizeof(buf), "%2d%02d%2s", scratch_time.unit.hour, scratch_time.unit.minute,longLatPresets[state->longLatToUse].name);
watch_display_text(WATCH_POSITION_BOTTOM, buf);
return;
} else {
@ -188,9 +188,9 @@ static void _sunrise_sunset_face_update(sunrise_sunset_state_t *state) {
else watch_clear_indicator(WATCH_INDICATOR_PM);
}
watch_display_text_with_fallback(WATCH_POSITION_TOP_LEFT, "SET", "SE");
sprintf(buf, "%2d", scratch_time.unit.day);
snprintf(buf, sizeof(buf), "%2d", scratch_time.unit.day);
watch_display_text(WATCH_POSITION_TOP_RIGHT, buf);
sprintf(buf, "%2d%02d%2s", scratch_time.unit.hour, scratch_time.unit.minute,longLatPresets[state->longLatToUse].name);
snprintf(buf, sizeof(buf), "%2d%02d%2s", scratch_time.unit.hour, scratch_time.unit.minute,longLatPresets[state->longLatToUse].name);
watch_display_text(WATCH_POSITION_BOTTOM, buf);
return;
} else {
@ -274,7 +274,7 @@ static void _sunrise_sunset_face_update_settings_display(movement_event_t event,
if (state->active_digit == 4) watch_display_character(' ', 9);
}
} else {
sprintf(buf, "%c %04d", state->working_latitude.sign ? '-' : '+', abs(_sunrise_sunset_face_latlon_from_struct(state->working_latitude)));
snprintf(buf, sizeof(buf), "%c %04d", state->working_latitude.sign ? '-' : '+', abs(_sunrise_sunset_face_latlon_from_struct(state->working_latitude)));
if (event.subsecond % 2) buf[state->active_digit] = ' ';
watch_display_text(WATCH_POSITION_BOTTOM, buf);
}
@ -301,7 +301,7 @@ static void _sunrise_sunset_face_update_settings_display(movement_event_t event,
if (state->active_digit == 4) watch_display_character(' ', 9);
}
} else {
sprintf(buf, "%c%05d", state->working_longitude.sign ? '-' : '+', abs(_sunrise_sunset_face_latlon_from_struct(state->working_longitude)));
snprintf(buf, sizeof(buf), "%c%05d", state->working_longitude.sign ? '-' : '+', abs(_sunrise_sunset_face_latlon_from_struct(state->working_longitude)));
if (event.subsecond % 2) buf[state->active_digit] = ' ';
watch_display_text(WATCH_POSITION_BOTTOM, buf);
}

View File

@ -187,6 +187,5 @@ bool set_time_face_loop(movement_event_t event, void *context) {
void set_time_face_resign(void *context) {
(void) context;
watch_set_led_off();
movement_store_settings();
}

View File

@ -311,6 +311,9 @@ bool settings_face_loop(movement_event_t event, void *context) {
settings_state_t *state = (settings_state_t *)context;
switch (event.event_type) {
case EVENT_LIGHT_LONG_PRESS:
movement_illuminate_led();
break;
case EVENT_LIGHT_BUTTON_DOWN:
state->current_page = (state->current_page + 1) % state->num_settings;
// fall through
@ -319,10 +322,6 @@ bool settings_face_loop(movement_event_t event, void *context) {
watch_clear_display();
state->settings_screens[state->current_page].display(event.subsecond);
break;
case EVENT_MODE_BUTTON_UP:
movement_force_led_off();
movement_move_to_next_face();
return false;
case EVENT_ALARM_BUTTON_UP:
state->settings_screens[state->current_page].advance();
break;
@ -341,13 +340,11 @@ bool settings_face_loop(movement_event_t event, void *context) {
color.blue | color.blue << 4);
return false;
} else {
movement_force_led_off();
return true;
}
}
void settings_face_resign(void *context) {
(void) context;
movement_force_led_off();
movement_store_settings();
}

View File

@ -28,12 +28,12 @@
#include "zones.h"
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];
}
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];
}