add debug prints before switch read and in process_switch_event; skip MIDI sends
This commit is contained in:
+8
-10
@@ -37,7 +37,9 @@ void AppTask::begin() {
|
|||||||
|
|
||||||
void AppTask::update() {
|
void AppTask::update() {
|
||||||
for (uint8_t i = 0; i < NUM_PADS; i++) {
|
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);
|
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]) {
|
if (is_pressed && !last_switch_state[i]) {
|
||||||
Serial.printf("[APP] Switch %d pressed\n", 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 cc_num = cc_map[i];
|
||||||
uint8_t value = pressed ? 127 : 0;
|
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) {
|
if (pressed) {
|
||||||
usb_midi->send_cc(channel, cc_num, value);
|
Serial.println("[APP DEBUG] would send USB MIDI");
|
||||||
Serial.println("[APP DEBUG] after usb send");
|
Serial.println("[APP DEBUG] would send BLE MIDI");
|
||||||
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",
|
|
||||||
switch_id, channel, cc_num, value,
|
|
||||||
pressed ? "PRESS" : "RELEASE");
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user