TEST: disable BLE init to isolate button press crash

This commit is contained in:
ash
2026-06-30 12:12:50 +00:00
parent 8833e08c0a
commit e2db658037
4 changed files with 12 additions and 42 deletions
+5 -8
View File
@@ -37,9 +37,7 @@ 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);
@@ -138,15 +136,14 @@ 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) {
Serial.println("[APP DEBUG] would send USB MIDI");
Serial.println("[APP DEBUG] would send BLE MIDI");
usb_midi->send_cc(channel, cc_num, value);
if (ble_midi) ble_midi->send_cc(channel, cc_num, value);
}
Serial.printf("[APP] Switch %d -> Ch%d CC%d Val%d (%s)\n",
switch_id, channel, cc_num, value,
pressed ? "PRESS" : "RELEASE");
break;
}
}