add debug prints before switch read and in process_switch_event; skip MIDI sends

This commit is contained in:
ash
2026-06-30 08:54:00 +00:00
parent 3e92d6bb7c
commit 8833e08c0a
+8 -10
View File
@@ -37,7 +37,9 @@ void AppTask::begin() {
void AppTask::update() {
for (uint8_t i = 0; i < NUM_PADS; i++) {
Serial.printf("[APP DBG] reading switch %d\n", i);
bool is_pressed = switch_driver->is_pressed(i);
Serial.printf("[APP DBG] switch %d = %d\n", i, is_pressed);
if (is_pressed && !last_switch_state[i]) {
Serial.printf("[APP] Switch %d pressed\n", i);
@@ -136,19 +138,15 @@ void AppTask::process_switch_event(uint8_t switch_id, bool pressed) {
uint8_t cc_num = cc_map[i];
uint8_t value = pressed ? 127 : 0;
// DEBUG: just print, don't send anything
Serial.printf("[APP DEBUG] Switch %d pressed, would send Ch%d CC%d Val%d\n",
switch_id, channel, cc_num, value);
if (pressed) {
usb_midi->send_cc(channel, cc_num, value);
Serial.println("[APP DEBUG] after usb send");
if (ble_midi) {
Serial.println("[APP DEBUG] about to call ble send_cc");
ble_midi->send_cc(channel, cc_num, value);
Serial.println("[APP DEBUG] after ble send_cc");
}
Serial.println("[APP DEBUG] would send USB MIDI");
Serial.println("[APP DEBUG] would send BLE MIDI");
}
Serial.printf("[APP] Switch %d -> Ch%d CC%d Val%d (%s)\n",
switch_id, channel, cc_num, value,
pressed ? "PRESS" : "RELEASE");
break;
}
}