mirror of
https://github.com/firewalkwithm3/Sensor-Watch.git
synced 2024-11-22 19:20:30 +08:00
timer face: show slot number in normal mode
This commit is contained in:
parent
267cdaa222
commit
45e4bc31c4
|
@ -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);
|
||||
|
|
|
@ -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.
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue