Add visual MIDI activity indicator (flashes pad 0 on any MIDI receive)

This commit is contained in:
2026-06-24 06:03:27 +00:00
parent 296611ce52
commit 37c6e66584
+12
View File
@@ -43,6 +43,18 @@ void AppTask::update() {
} }
void AppTask::process_midi_event(const MidiEvent& event) { void AppTask::process_midi_event(const MidiEvent& event) {
// Visual indicator: blink LED 0 on ANY MIDI receive
if (led_driver && event.type != MidiEvent::SYSTEM) {
static uint32_t last_blink = 0;
uint32_t now = millis();
if (now - last_blink > 100) {
last_blink = now;
led_driver->set_led_state(36, 1, 127); // Brief flash on pad 0
vTaskDelay(pdMS_TO_TICKS(10));
led_driver->set_led_state(36, 1, 0);
}
}
Serial.printf("[APP] MIDI IN: Type=%d Ch=%d Data1=%d Data2=%d\n", Serial.printf("[APP] MIDI IN: Type=%d Ch=%d Data1=%d Data2=%d\n",
event.type, event.channel, event.data1, event.data2); event.type, event.channel, event.data1, event.data2);