Remove beat 1 differentiation - all beats flash white 50ms

This commit is contained in:
ash
2026-07-03 08:36:14 +00:00
parent 868c5eda82
commit 88fee54f96
+2 -8
View File
@@ -46,19 +46,13 @@ void midi_task(void* parameter) {
if (current_beat != last_beat) {
last_beat = current_beat;
flash_start = now + flash_latency;
// Beat 1 = red on current_beat % beats_per_bar == 0, others = white
if (current_beat % beats_per_bar == 0) {
mux.set_led_color(6, 255, 0, 0);
} else {
// All beats flash white
mux.set_led_color(6, 255, 255, 255);
}
}
if (flash_start > 0 && now >= flash_start) {
mux.show();
uint32_t hold = (last_beat % beats_per_bar == 0) ? 100 : 50;
uint32_t elapsed = now - flash_start;
if (elapsed >= hold) {
if (now - flash_start >= 50) {
mux.set_led_color(6, 20, 20, 20);
mux.show();
flash_start = 0;