Never mind that, you have access to a few commands you can use to identify what USB device is assigned to which object, the easiest to test against are the Vendor and Product IDs so once you figure out what those are for your pedals you can easily identify which one is connected to which object.
Code:
uint16_t
idVendor();
idProduct();
Pointer to Null-terminated Strings
manufacturer();
product();
serialNumber();
Sticking to the Interface_16x16 example you can do something like:
Code:
uint8_t pedal1; //Store pedal1 location
uint8_t pedal2; //Store pedal2 location
for (uint8_t device = 0; device < 10; device++) {
if((midilist[device]->idVendor() == PEDAL1_VENDOR) && (midilist[device]->idProduct() == PEDAL1_PRODUCT)){ //Find pedal1 location
pedal1 = device;
}
else if((midilist[device]->idVendor() == PEDAL2_VENDOR) && (midilist[device]->idProduct() == PEDAL2_PRODUCT)){ //Find pedal2 location
pedal2 = device;
}
}
midilist[pedal1]->sendControlChange(7, 127, 1); //Send to pedal1 location
midilist[pedal2]->sendControlChange(7, 64, 1); //Send to pedal2 location
I haven't tested this, but this should give you an idea of how to find which pedal is where so you know you are sending and receiving MIDI from the correct device.