diff options
author | TheOnePerson <a.nebinger@web.de> | 2023-03-10 22:17:15 +0100 |
---|---|---|
committer | TheOnePerson <a.nebinger@web.de> | 2023-03-10 22:17:15 +0100 |
commit | 45e4bc31c4642baa9081f7f779b4d31e214e48d8 (patch) | |
tree | e120f78d8260ebb5929092f6f294ee9ca43de45d | |
parent | 267cdaa222a105fbbc0989c437c295970e45ea06 (diff) | |
download | Sensor-Watch-45e4bc31c4642baa9081f7f779b4d31e214e48d8.tar.gz Sensor-Watch-45e4bc31c4642baa9081f7f779b4d31e214e48d8.tar.bz2 Sensor-Watch-45e4bc31c4642baa9081f7f779b4d31e214e48d8.zip |
timer face: show slot number in normal mode
-rw-r--r-- | movement/watch_faces/complication/timer_face.c | 22 | ||||
-rw-r--r-- | movement/watch_faces/complication/timer_face.h | 1 |
2 files changed, 14 insertions, 9 deletions
diff --git a/movement/watch_faces/complication/timer_face.c b/movement/watch_faces/complication/timer_face.c index 96fedc8b..4b0b70b1 100644 --- a/movement/watch_faces/complication/timer_face.c +++ b/movement/watch_faces/complication/timer_face.c @@ -101,21 +101,25 @@ static void _draw(timer_state_t *state, uint8_t subsecond) { sprintf(buf, " LOOP%c", state->timers[state->current_timer].unit.repeat ? 'y' : 'n'); watch_clear_colon(); } else { - sprintf(buf, " %02u%02u%02u", state->timers[state->current_timer].unit.hours, state->timers[state->current_timer].unit.minutes, state->timers[state->current_timer].unit.seconds); + sprintf(buf, " %02u%02u%02u", state->timers[state->current_timer].unit.hours, + state->timers[state->current_timer].unit.minutes, + state->timers[state->current_timer].unit.seconds); watch_set_colon(); } - buf[0] = 49 + state->current_timer; - if (subsecond % 2) { - // blink the current settings value - if (state->settings_state == 0) buf[0] = ' '; - else if (state->settings_state == 1 || state->settings_state == 5) buf[6] = ' '; - else buf[(state->settings_state - 1) * 2 - 1] = buf[(state->settings_state - 1) * 2] = ' '; - } break; case waiting: - sprintf(buf, " %02u%02u%02u", state->timers[state->current_timer].unit.hours, state->timers[state->current_timer].unit.minutes, state->timers[state->current_timer].unit.seconds); + sprintf(buf, " %02u%02u%02u", state->timers[state->current_timer].unit.hours, + state->timers[state->current_timer].unit.minutes, + state->timers[state->current_timer].unit.seconds); break; } + buf[0] = 49 + state->current_timer; + if (state->mode == setting && subsecond % 2) { + // blink the current settings value + if (state->settings_state == 0) buf[0] = ' '; + else if (state->settings_state == 1 || state->settings_state == 5) buf[6] = ' '; + else buf[(state->settings_state - 1) * 2 - 1] = buf[(state->settings_state - 1) * 2] = ' '; + } watch_display_string(buf, 3); // set lap indicator when we have a looping timer if (state->timers[state->current_timer].unit.repeat) watch_set_indicator(WATCH_INDICATOR_LAP); diff --git a/movement/watch_faces/complication/timer_face.h b/movement/watch_faces/complication/timer_face.h index 69ab74a6..293f6524 100644 --- a/movement/watch_faces/complication/timer_face.h +++ b/movement/watch_faces/complication/timer_face.h @@ -39,6 +39,7 @@ * * How to use in NORMAL mode: * - Short-pressing the alarm button cycles through all pre-set timer lengths. + * Find the current timer slot number in the upper right-hand corner. * - Long-pressing the alarm button starts the timer. * - Long-pressing the light button initiates settings mode. * |