void getTelemPortWithRadio(ref ICommsSerial comPort)
{
// try telem1
comPort = new MAVLinkSerialPort(MainV2.comPort, (int)MAVLink.SERIAL_CONTROL_DEV.TELEM1);
comPort.ReadTimeout = 4000;
comPort.Open();
if (doConnect(comPort))
{
return;
}
comPort.Close();
// try telem2
comPort = new MAVLinkSerialPort(MainV2.comPort, (int)MAVLink.SERIAL_CONTROL_DEV.TELEM2);
comPort.ReadTimeout = 4000;
comPort.Open();
if (doConnect(comPort))
{
return;
}
comPort.Close();
}