@griffin @tom it looks like discovery of multiple streams is improperly implemented in voxl-mavcam-manger.
the first issue I see is that each camera is being advertised as the same component ID
init_arr[i].context.compid = MAV_COMP_ID_CAMERA; // todo make this command line arg
according to the mavlink spec each cam should have a unique id. https://mavlink.io/en/services/camera.html#camera_identification I would image this should look some thing like this.
int cam_comp_ids[MAX_MAVCAM_INPUTS] = {MAV_COMP_ID_CAMERA, MAV_COMP_ID_CAMERA2, MAV_COMP_ID_CAMERA3, MAV_COMP_ID_CAMERA4, MAV_COMP_ID_CAMERA5, MAV_COMP_ID_CAMERA6};
for(int i=0; i<n_mavcam_inputs; i++){
...
init_arr[i].context.compid = cam_comp_ids[i];
however when testing this change I think I have run into a bigger problem which is that I think only the last context's threads are running. I am not sure why this is, but it seems like the maybe the different threads can't read from the same modal pipe that is providing the mavlink? I suspect that somehow the reading and writing to the modal pipe is not sufficiently isolated causing either overwriting the first's context's callbacks or preventing the first context's callbacks from running.
let me know what ya'll think