當前位置: 首頁>>代碼示例>>C#>>正文


C# MAVLinkInterface.getParamList方法代碼示例

本文整理匯總了C#中MissionPlanner.MAVLinkInterface.getParamList方法的典型用法代碼示例。如果您正苦於以下問題:C# MAVLinkInterface.getParamList方法的具體用法?C# MAVLinkInterface.getParamList怎麽用?C# MAVLinkInterface.getParamList使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在MissionPlanner.MAVLinkInterface的用法示例。


在下文中一共展示了MAVLinkInterface.getParamList方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: doConnect


//.........這裏部分代碼省略.........
                // do the connect
                comPort.Open(false, skipconnectcheck);

                if (!comPort.BaseStream.IsOpen)
                {
                    log.Info("comport is closed. existing connect");
                    try
                    {
                        _connectionControl.IsConnected(false);
                        UpdateConnectIcon();
                        comPort.Close();
                    }
                    catch { }
                    return;
                }

                // 3dr radio is hidden as no hb packet is ever emitted
                if (comPort.sysidseen.Count > 1)
                {
                    // we have more than one mav
                    // user selection of sysid
                    MissionPlanner.Controls.SysidSelector id = new SysidSelector();

                    id.Show();
                }

                // create a copy
                int[] list = comPort.sysidseen.ToArray();

                // get all the params
                foreach (var sysid in list)
                {
                    comPort.sysidcurrent = sysid;
                    comPort.getParamList();
                }

                // set to first seen
                comPort.sysidcurrent = list[0];

                // detect firmware we are conected to.
                if (comPort.MAV.cs.firmware == Firmwares.ArduCopter2)
                {
                    _connectionControl.TOOL_APMFirmware.SelectedIndex = _connectionControl.TOOL_APMFirmware.Items.IndexOf(Firmwares.ArduCopter2);
                }
                else if (comPort.MAV.cs.firmware == Firmwares.Ateryx)
                {
                    _connectionControl.TOOL_APMFirmware.SelectedIndex = _connectionControl.TOOL_APMFirmware.Items.IndexOf(Firmwares.Ateryx);
                }
                else if (comPort.MAV.cs.firmware == Firmwares.ArduRover)
                {
                    _connectionControl.TOOL_APMFirmware.SelectedIndex = _connectionControl.TOOL_APMFirmware.Items.IndexOf(Firmwares.ArduRover);
                }
                else if (comPort.MAV.cs.firmware == Firmwares.ArduPlane)
                {
                    _connectionControl.TOOL_APMFirmware.SelectedIndex = _connectionControl.TOOL_APMFirmware.Items.IndexOf(Firmwares.ArduPlane);
                }

                // check for newer firmware
                var softwares = Firmware.LoadSoftwares();

                if (softwares.Count > 0)
                {
                    try
                    {
                        string[] fields1 = comPort.MAV.VersionString.Split(' ');
開發者ID:rrvenki,項目名稱:MissionPlanner,代碼行數:66,代碼來源:MainV2.cs


注:本文中的MissionPlanner.MAVLinkInterface.getParamList方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。