From 8833e08c0ac9549202b448b59dbaf57469bd7ce6 Mon Sep 17 00:00:00 2001 From: Ashley Strahle Date: Tue, 30 Jun 2026 08:54:00 +0000 Subject: [PATCH] add debug prints before switch read and in process_switch_event; skip MIDI sends --- src/app_task.cpp | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/src/app_task.cpp b/src/app_task.cpp index c54c6f6..47b692a 100644 --- a/src/app_task.cpp +++ b/src/app_task.cpp @@ -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; } }