本文整理匯總了C#中MissionPlanner.MAVLinkInterface.GetParam方法的典型用法代碼示例。如果您正苦於以下問題:C# MAVLinkInterface.GetParam方法的具體用法?C# MAVLinkInterface.GetParam怎麽用?C# MAVLinkInterface.GetParam使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類MissionPlanner.MAVLinkInterface
的用法示例。
在下文中一共展示了MAVLinkInterface.GetParam方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: doConnect
public void doConnect(MAVLinkInterface comPort, string port, string baud)
{
bool skipconnectcheck = true;
comPort.BaseStream = new MissionPlanner.Comms.SerialPort();
comPort.BaseStream.PortName = port;
try
{
comPort.BaseStream.BaudRate = int.Parse(baud);
}
catch { };
// 記錄tlog文件
try
{
Directory.CreateDirectory("D://LogFiles");
//Directory.CreateDirectory(MainV2.LogDir);
comPort.logfile =
new BufferedStream(
File.Open(
"D://LogFiles" + Path.DirectorySeparatorChar +
DateTime.Now.ToString("yyyy-MM-dd HH-mm-ss") + ".tlog", FileMode.CreateNew,
FileAccess.ReadWrite, FileShare.None));
}
catch (Exception exp2)
{
log.Error(exp2);
CustomMessageBox.Show(Strings.Failclog);
} // soft fail
comPort.Open(false, skipconnectcheck);
// create a copy
int[] list = comPort.sysidseen.ToArray();
comPort.GetParam("MIS_TOTAL");
}
示例2: doConnect
public void doConnect(MAVLinkInterface comPort, string port, string baud)
{
bool skipconnectcheck = true;
comPort.BaseStream = new MissionPlanner.Comms.SerialPort();
comPort.BaseStream.PortName = port;
try
{
comPort.BaseStream.BaudRate = int.Parse(baud);
}
catch{};
comPort.Open(false, skipconnectcheck);
//this.BUT_Connect.Text = "斷開";
// create a copy
int[] list = comPort.sysidseen.ToArray();
comPort.GetParam("MIS_TOTAL");
// get all the params
//foreach (var sysid in list)
//{
// comPort.sysidcurrent = sysid;
// comPort.getParamList();
//}
}