]> git.earman.xyz Git - sensor-watch.git/commitdiff
timer face: show slot number in normal mode
authorTheOnePerson <a.nebinger@web.de>
Fri, 10 Mar 2023 21:17:15 +0000 (22:17 +0100)
committerTheOnePerson <a.nebinger@web.de>
Fri, 10 Mar 2023 21:17:15 +0000 (22:17 +0100)
movement/watch_faces/complication/timer_face.c
movement/watch_faces/complication/timer_face.h

index 96fedc8bf73514c1ac9c679e081610a6e5c00dee..4b0b70b1db959a237f46c471ae10729cf00f50bb 100644 (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');
                 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);
index 69ab74a6c1804379a1d1febeaa7bdedac06005ff..293f652421c28aded3e17d352ed38398b7f8aecd 100644 (file)
@@ -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.
  *