Clean up LED driver + rename USB to JOC Midi

- Removed flash_sysex/flash_all/flash_one (conflicted with heartbeat)
- Simplified flash_activity: LED 0 white 50ms, restores properly
- Heartbeat only on LED 9 when no activity
- USB renamed: Manufacturer=JOC, Product=JOC Midi
This commit is contained in:
ash
2026-06-25 23:47:39 +00:00
parent 6ccd28362f
commit a281eaa46e
3 changed files with 5 additions and 25 deletions
+2 -16
View File
@@ -46,22 +46,8 @@ void AppTask::process_midi_event(const MidiEvent& event) {
Serial.printf("[APP] MIDI IN: Type=%d Ch=%d Data1=%d Data2=%d\n",
event.type, event.channel, event.data1, event.data2);
// Visual MIDI type indicator (works without serial on iPad)
if (event.type == MidiEvent::SYSEX) {
led_driver->flash_all(255, 255, 255, 200); // SysEx = ALL white
} else if (event.type == MidiEvent::NOTE_ON || event.type == MidiEvent::NOTE_OFF) {
led_driver->flash_one(0, 255, 0, 0, 100); // Note = LED 0 red
} else if (event.type == MidiEvent::CONTROL_CHANGE) {
led_driver->flash_one(1, 0, 255, 0, 100); // CC = LED 1 green
// Generic mode: Loopy Pro mirrors back on same CC with state value
// Visualize the velocity/CC value on LED 2-3
uint8_t val = event.data2;
if (val < 32) led_driver->flash_one(2, 255, 0, 0, 100); // 0-31 = red (recording?)
else if (val < 64) led_driver->flash_one(2, 255, 128, 0, 100); // 32-63 = amber (queued?)
else if (val < 96) led_driver->flash_one(2, 0, 255, 0, 100); // 64-95 = green (playing?)
else led_driver->flash_one(2, 0, 0, 255, 100); // 96-127 = blue (other?)
}
// Flash LED 0 white briefly on ANY MIDI input - visual activity indicator
led_driver->flash_activity();
if (event.type == MidiEvent::SYSEX) {
// Cin is encoded in channel for SYSEX packets