Remove beat 1 differentiation - all beats flash white 50ms
This commit is contained in:
+2
-8
@@ -46,19 +46,13 @@ void midi_task(void* parameter) {
|
|||||||
if (current_beat != last_beat) {
|
if (current_beat != last_beat) {
|
||||||
last_beat = current_beat;
|
last_beat = current_beat;
|
||||||
flash_start = now + flash_latency;
|
flash_start = now + flash_latency;
|
||||||
// Beat 1 = red on current_beat % beats_per_bar == 0, others = white
|
// All beats flash white
|
||||||
if (current_beat % beats_per_bar == 0) {
|
|
||||||
mux.set_led_color(6, 255, 0, 0);
|
|
||||||
} else {
|
|
||||||
mux.set_led_color(6, 255, 255, 255);
|
mux.set_led_color(6, 255, 255, 255);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (flash_start > 0 && now >= flash_start) {
|
if (flash_start > 0 && now >= flash_start) {
|
||||||
mux.show();
|
mux.show();
|
||||||
uint32_t hold = (last_beat % beats_per_bar == 0) ? 100 : 50;
|
if (now - flash_start >= 50) {
|
||||||
uint32_t elapsed = now - flash_start;
|
|
||||||
if (elapsed >= hold) {
|
|
||||||
mux.set_led_color(6, 20, 20, 20);
|
mux.set_led_color(6, 20, 20, 20);
|
||||||
mux.show();
|
mux.show();
|
||||||
flash_start = 0;
|
flash_start = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user