timer face: show slot number in normal mode

This commit is contained in:
TheOnePerson 2023-03-10 22:17:15 +01:00
parent 267cdaa222
commit 45e4bc31c4
2 changed files with 14 additions and 9 deletions

View File

@ -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'); sprintf(buf, " LOOP%c", state->timers[state->current_timer].unit.repeat ? 'y' : 'n');
watch_clear_colon(); watch_clear_colon();
} else { } 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(); watch_set_colon();
} }
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);
break;
}
buf[0] = 49 + state->current_timer; buf[0] = 49 + state->current_timer;
if (subsecond % 2) { if (state->mode == setting && subsecond % 2) {
// blink the current settings value // blink the current settings value
if (state->settings_state == 0) buf[0] = ' '; if (state->settings_state == 0) buf[0] = ' ';
else if (state->settings_state == 1 || state->settings_state == 5) buf[6] = ' '; 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] = ' '; 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);
break;
}
watch_display_string(buf, 3); watch_display_string(buf, 3);
// set lap indicator when we have a looping timer // set lap indicator when we have a looping timer
if (state->timers[state->current_timer].unit.repeat) watch_set_indicator(WATCH_INDICATOR_LAP); if (state->timers[state->current_timer].unit.repeat) watch_set_indicator(WATCH_INDICATOR_LAP);

View File

@ -39,6 +39,7 @@
* *
* How to use in NORMAL mode: * How to use in NORMAL mode:
* - Short-pressing the alarm button cycles through all pre-set timer lengths. * - 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 alarm button starts the timer.
* - Long-pressing the light button initiates settings mode. * - Long-pressing the light button initiates settings mode.
* *