Howto modify code to connect 2 pixhawk in same one Mission Planner Client?

hi all.
i recently develop a project of Groud Station software.
now i got a task to do this change…connect 2 pixhawk in same one Mission Planner Client in one computer.

i readed the code of MP, and take some change of code .
such as :

  1. two connectControl.

  2. two HUD display.

  3. some code of comport ,comport_2 ,some function, some buttion_click…and so on.

    now connection_1 to 1st pix4 , ok .HUD1&2 all same.
    connection_2 to 2nd pix4 , fail.
    connection_2 to 1st pix4 ok. hud1&hud2 all same.

pls give me some tips. thanks all.~~

you are asking to debug custom code. there is nothing i can do to really help you.

hi Mr.Oborne.

do you have some documents of development in MP ? or other about function, class, structure , architecture ....