Thomas Buck hace 7 meses
padre
commit
c1bfc51419
Se han modificado 2 ficheros con 3 adiciones y 2 borrados
  1. 1
    0
      src/main.c
  2. 2
    2
      src/sequence.c

+ 1
- 0
src/main.c Ver fichero

@@ -129,6 +129,7 @@ static void animate_boot_combos(void) {
129 129
             uint32_t now = to_ms_since_boot(get_absolute_time());
130 130
             if ((now - last) >= 250) {
131 131
                 state = !state;
132
+                last = now;
132 133
                 led_set(0, state);
133 134
             }
134 135
         }

+ 2
- 2
src/sequence.c Ver fichero

@@ -41,7 +41,7 @@ static enum channels sequence[MAX_BEATS] = {0};
41 41
 void sequence_init(void) {
42 42
     us_per_beat = 0;
43 43
     beats = MAX_BEATS;
44
-    last_t = to_ms_since_boot(get_absolute_time());
44
+    last_t = to_us_since_boot(get_absolute_time());
45 45
     last_i = 0;
46 46
     max_banks_currently = (beats + (NUM_BTNS - 1)) / NUM_BTNS;
47 47
 
@@ -235,7 +235,7 @@ void sequence_run(void) {
235 235
             }
236 236
         }
237 237
 
238
-        last_t = now;
238
+        last_t += us;
239 239
         last_i = i;
240 240
     }
241 241
 }

Loading…
Cancelar
Guardar