add debug prints around button press to find crash location

This commit is contained in:
ash
2026-06-30 08:35:47 +00:00
parent 6038b3bf58
commit be8b0dc22d
2 changed files with 25 additions and 4 deletions
+6 -2
View File
@@ -134,12 +134,16 @@ void AppTask::process_switch_event(uint8_t switch_id, bool pressed) {
if (pad_mapping[i].physical_switch == switch_id) {
uint8_t channel = pad_mapping[i].midi_channel;
uint8_t cc_num = cc_map[i];
// Use palette index 127 (magenta) for visible feedback
uint8_t value = pressed ? 127 : 0;
if (pressed) {
usb_midi->send_cc(channel, cc_num, value);
if (ble_midi) ble_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.printf("[APP] Switch %d -> Ch%d CC%d Val%d (%s)\n",