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) {
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user