diff --git a/Tools/ArdupilotMegaPlanner/Comms/CommsSerialPort.cs b/Tools/ArdupilotMegaPlanner/Comms/CommsSerialPort.cs index 2dfe9d0385..c296de937f 100644 --- a/Tools/ArdupilotMegaPlanner/Comms/CommsSerialPort.cs +++ b/Tools/ArdupilotMegaPlanner/Comms/CommsSerialPort.cs @@ -11,6 +11,8 @@ namespace ArdupilotMega.Comms { public class SerialPort : System.IO.Ports.SerialPort,ICommsSerial { + static bool serialportproblem = false; + public new void Open() { // 500ms write timeout - win32 api default @@ -68,18 +70,30 @@ namespace ArdupilotMega.Comms internal static string GetNiceName(string port) { + if (serialportproblem) + return ""; + + DateTime start = DateTime.Now; try { ObjectQuery query = new ObjectQuery("SELECT * FROM Win32_SerialPort"); // Win32_USBControllerDevice ManagementObjectSearcher searcher = new ManagementObjectSearcher(query); foreach (ManagementObject obj2 in searcher.Get()) { - //DeviceID + //DeviceID if (obj2.Properties["DeviceID"].Value.ToString().ToUpper() == port.ToUpper()) + { + DateTime end = DateTime.Now; + + if ((end - start).TotalSeconds > 5) + serialportproblem = true; + return obj2.Properties["Name"].Value.ToString(); + } } } catch { } + return ""; } diff --git a/Tools/ArdupilotMegaPlanner/Driver/dpinst.xml b/Tools/ArdupilotMegaPlanner/Driver/dpinst.xml new file mode 100644 index 0000000000..6a72acdd75 --- /dev/null +++ b/Tools/ArdupilotMegaPlanner/Driver/dpinst.xml @@ -0,0 +1,12 @@ + + + + + + + + + * + + + diff --git a/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/ConfigFailSafe.Designer.cs b/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/ConfigFailSafe.Designer.cs index 09a44add69..1fad80b3f2 100644 --- a/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/ConfigFailSafe.Designer.cs +++ b/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/ConfigFailSafe.Designer.cs @@ -30,9 +30,22 @@ { this.components = new System.ComponentModel.Container(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ConfigFailSafe)); - this.currentStateBindingSource = new System.Windows.Forms.BindingSource(this.components); this.label2 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label(); + this.lbl_currentmode = new System.Windows.Forms.Label(); + this.currentStateBindingSource = new System.Windows.Forms.BindingSource(this.components); + this.LNK_wiki = new System.Windows.Forms.LinkLabel(); + this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); + this.mavlinkCheckBoxthr_fs = new ArdupilotMega.Controls.MavlinkCheckBox(); + this.mavlinkCheckBoxthr_fs_action = new ArdupilotMega.Controls.MavlinkCheckBox(); + this.mavlinkNumericUpDownthr_fs_value = new ArdupilotMega.Controls.MavlinkNumericUpDown(); + this.mavlinkCheckBoxlong_fs = new ArdupilotMega.Controls.MavlinkCheckBox(); + this.mavlinkCheckBoxgcs_fs = new ArdupilotMega.Controls.MavlinkCheckBox(); + this.mavlinkCheckBoxshort_fs = new ArdupilotMega.Controls.MavlinkCheckBox(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.label3 = new System.Windows.Forms.Label(); + this.lbl_armed = new System.Windows.Forms.Label(); + this.lbl_gpslock = new System.Windows.Forms.Label(); this.horizontalProgressBar9 = new ArdupilotMega.HorizontalProgressBar(); this.horizontalProgressBar10 = new ArdupilotMega.HorizontalProgressBar(); this.horizontalProgressBar11 = new ArdupilotMega.HorizontalProgressBar(); @@ -49,26 +62,11 @@ this.horizontalProgressBar3 = new ArdupilotMega.HorizontalProgressBar(); this.horizontalProgressBar2 = new ArdupilotMega.HorizontalProgressBar(); this.horizontalProgressBar1 = new ArdupilotMega.HorizontalProgressBar(); - this.lbl_currentmode = new System.Windows.Forms.Label(); - this.mavlinkCheckBoxthr_fs = new ArdupilotMega.Controls.MavlinkCheckBox(); - this.mavlinkNumericUpDownthr_fs_value = new ArdupilotMega.Controls.MavlinkNumericUpDown(); - this.LNK_wiki = new System.Windows.Forms.LinkLabel(); - this.mavlinkCheckBoxgcs_fs = new ArdupilotMega.Controls.MavlinkCheckBox(); - this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); - this.mavlinkCheckBoxshort_fs = new ArdupilotMega.Controls.MavlinkCheckBox(); - this.mavlinkCheckBoxlong_fs = new ArdupilotMega.Controls.MavlinkCheckBox(); - this.mavlinkCheckBoxthr_fs_action = new ArdupilotMega.Controls.MavlinkCheckBox(); - this.groupBox1 = new System.Windows.Forms.GroupBox(); - this.label3 = new System.Windows.Forms.Label(); ((System.ComponentModel.ISupportInitialize)(this.currentStateBindingSource)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.mavlinkNumericUpDownthr_fs_value)).BeginInit(); this.groupBox1.SuspendLayout(); this.SuspendLayout(); // - // currentStateBindingSource - // - this.currentStateBindingSource.DataSource = typeof(ArdupilotMega.CurrentState); - // // label2 // resources.ApplyResources(this.label2, "label2"); @@ -79,6 +77,128 @@ resources.ApplyResources(this.label1, "label1"); this.label1.Name = "label1"; // + // lbl_currentmode + // + this.lbl_currentmode.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.currentStateBindingSource, "mode", true)); + resources.ApplyResources(this.lbl_currentmode, "lbl_currentmode"); + this.lbl_currentmode.Name = "lbl_currentmode"; + // + // currentStateBindingSource + // + this.currentStateBindingSource.DataSource = typeof(ArdupilotMega.CurrentState); + // + // LNK_wiki + // + resources.ApplyResources(this.LNK_wiki, "LNK_wiki"); + this.LNK_wiki.LinkBehavior = System.Windows.Forms.LinkBehavior.HoverUnderline; + this.LNK_wiki.LinkColor = System.Drawing.Color.CornflowerBlue; + this.LNK_wiki.Name = "LNK_wiki"; + this.LNK_wiki.TabStop = true; + this.LNK_wiki.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.LNK_wiki_LinkClicked); + // + // toolTip1 + // + this.toolTip1.AutoPopDelay = 20000; + this.toolTip1.InitialDelay = 500; + this.toolTip1.ReshowDelay = 100; + // + // mavlinkCheckBoxthr_fs + // + resources.ApplyResources(this.mavlinkCheckBoxthr_fs, "mavlinkCheckBoxthr_fs"); + this.mavlinkCheckBoxthr_fs.Name = "mavlinkCheckBoxthr_fs"; + this.mavlinkCheckBoxthr_fs.OffValue = 0F; + this.mavlinkCheckBoxthr_fs.OnValue = 1F; + this.mavlinkCheckBoxthr_fs.param = null; + this.mavlinkCheckBoxthr_fs.ParamName = null; + this.toolTip1.SetToolTip(this.mavlinkCheckBoxthr_fs, resources.GetString("mavlinkCheckBoxthr_fs.ToolTip")); + this.mavlinkCheckBoxthr_fs.UseVisualStyleBackColor = true; + // + // mavlinkCheckBoxthr_fs_action + // + resources.ApplyResources(this.mavlinkCheckBoxthr_fs_action, "mavlinkCheckBoxthr_fs_action"); + this.mavlinkCheckBoxthr_fs_action.Name = "mavlinkCheckBoxthr_fs_action"; + this.mavlinkCheckBoxthr_fs_action.OffValue = 0F; + this.mavlinkCheckBoxthr_fs_action.OnValue = 1F; + this.mavlinkCheckBoxthr_fs_action.param = null; + this.mavlinkCheckBoxthr_fs_action.ParamName = null; + this.toolTip1.SetToolTip(this.mavlinkCheckBoxthr_fs_action, resources.GetString("mavlinkCheckBoxthr_fs_action.ToolTip")); + this.mavlinkCheckBoxthr_fs_action.UseVisualStyleBackColor = true; + // + // mavlinkNumericUpDownthr_fs_value + // + resources.ApplyResources(this.mavlinkNumericUpDownthr_fs_value, "mavlinkNumericUpDownthr_fs_value"); + this.mavlinkNumericUpDownthr_fs_value.Max = 1F; + this.mavlinkNumericUpDownthr_fs_value.Min = 0F; + this.mavlinkNumericUpDownthr_fs_value.Name = "mavlinkNumericUpDownthr_fs_value"; + this.mavlinkNumericUpDownthr_fs_value.param = null; + this.mavlinkNumericUpDownthr_fs_value.ParamName = null; + this.toolTip1.SetToolTip(this.mavlinkNumericUpDownthr_fs_value, resources.GetString("mavlinkNumericUpDownthr_fs_value.ToolTip")); + // + // mavlinkCheckBoxlong_fs + // + resources.ApplyResources(this.mavlinkCheckBoxlong_fs, "mavlinkCheckBoxlong_fs"); + this.mavlinkCheckBoxlong_fs.Name = "mavlinkCheckBoxlong_fs"; + this.mavlinkCheckBoxlong_fs.OffValue = 0F; + this.mavlinkCheckBoxlong_fs.OnValue = 1F; + this.mavlinkCheckBoxlong_fs.param = null; + this.mavlinkCheckBoxlong_fs.ParamName = null; + this.toolTip1.SetToolTip(this.mavlinkCheckBoxlong_fs, resources.GetString("mavlinkCheckBoxlong_fs.ToolTip")); + this.mavlinkCheckBoxlong_fs.UseVisualStyleBackColor = true; + // + // mavlinkCheckBoxgcs_fs + // + resources.ApplyResources(this.mavlinkCheckBoxgcs_fs, "mavlinkCheckBoxgcs_fs"); + this.mavlinkCheckBoxgcs_fs.Name = "mavlinkCheckBoxgcs_fs"; + this.mavlinkCheckBoxgcs_fs.OffValue = 0F; + this.mavlinkCheckBoxgcs_fs.OnValue = 1F; + this.mavlinkCheckBoxgcs_fs.param = null; + this.mavlinkCheckBoxgcs_fs.ParamName = null; + this.toolTip1.SetToolTip(this.mavlinkCheckBoxgcs_fs, resources.GetString("mavlinkCheckBoxgcs_fs.ToolTip")); + this.mavlinkCheckBoxgcs_fs.UseVisualStyleBackColor = true; + // + // mavlinkCheckBoxshort_fs + // + resources.ApplyResources(this.mavlinkCheckBoxshort_fs, "mavlinkCheckBoxshort_fs"); + this.mavlinkCheckBoxshort_fs.Name = "mavlinkCheckBoxshort_fs"; + this.mavlinkCheckBoxshort_fs.OffValue = 0F; + this.mavlinkCheckBoxshort_fs.OnValue = 1F; + this.mavlinkCheckBoxshort_fs.param = null; + this.mavlinkCheckBoxshort_fs.ParamName = null; + this.toolTip1.SetToolTip(this.mavlinkCheckBoxshort_fs, resources.GetString("mavlinkCheckBoxshort_fs.ToolTip")); + this.mavlinkCheckBoxshort_fs.UseVisualStyleBackColor = true; + // + // groupBox1 + // + this.groupBox1.Controls.Add(this.label3); + this.groupBox1.Controls.Add(this.mavlinkCheckBoxthr_fs); + this.groupBox1.Controls.Add(this.mavlinkCheckBoxthr_fs_action); + this.groupBox1.Controls.Add(this.mavlinkNumericUpDownthr_fs_value); + this.groupBox1.Controls.Add(this.mavlinkCheckBoxlong_fs); + this.groupBox1.Controls.Add(this.mavlinkCheckBoxgcs_fs); + this.groupBox1.Controls.Add(this.mavlinkCheckBoxshort_fs); + resources.ApplyResources(this.groupBox1, "groupBox1"); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.TabStop = false; + // + // label3 + // + resources.ApplyResources(this.label3, "label3"); + this.label3.Name = "label3"; + // + // lbl_armed + // + this.lbl_armed.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.currentStateBindingSource, "armed", true)); + resources.ApplyResources(this.lbl_armed, "lbl_armed"); + this.lbl_armed.Name = "lbl_armed"; + this.lbl_armed.Paint += new System.Windows.Forms.PaintEventHandler(this.lbl_armed_Paint); + // + // lbl_gpslock + // + this.lbl_gpslock.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.currentStateBindingSource, "gpsstatus", true)); + resources.ApplyResources(this.lbl_gpslock, "lbl_gpslock"); + this.lbl_gpslock.Name = "lbl_gpslock"; + this.lbl_gpslock.Paint += new System.Windows.Forms.PaintEventHandler(this.lbl_gpslock_Paint); + // // horizontalProgressBar9 // this.horizontalProgressBar9.DataBindings.Add(new System.Windows.Forms.Binding("Value", this.currentStateBindingSource, "ch8out", true)); @@ -303,114 +423,12 @@ this.horizontalProgressBar1.Step = 1; this.horizontalProgressBar1.Style = System.Windows.Forms.ProgressBarStyle.Continuous; // - // lbl_currentmode - // - this.lbl_currentmode.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.currentStateBindingSource, "mode", true)); - resources.ApplyResources(this.lbl_currentmode, "lbl_currentmode"); - this.lbl_currentmode.Name = "lbl_currentmode"; - // - // mavlinkCheckBoxthr_fs - // - resources.ApplyResources(this.mavlinkCheckBoxthr_fs, "mavlinkCheckBoxthr_fs"); - this.mavlinkCheckBoxthr_fs.Name = "mavlinkCheckBoxthr_fs"; - this.mavlinkCheckBoxthr_fs.OffValue = 0F; - this.mavlinkCheckBoxthr_fs.OnValue = 1F; - this.mavlinkCheckBoxthr_fs.param = null; - this.mavlinkCheckBoxthr_fs.ParamName = null; - this.toolTip1.SetToolTip(this.mavlinkCheckBoxthr_fs, resources.GetString("mavlinkCheckBoxthr_fs.ToolTip")); - this.mavlinkCheckBoxthr_fs.UseVisualStyleBackColor = true; - // - // mavlinkNumericUpDownthr_fs_value - // - resources.ApplyResources(this.mavlinkNumericUpDownthr_fs_value, "mavlinkNumericUpDownthr_fs_value"); - this.mavlinkNumericUpDownthr_fs_value.Max = 1F; - this.mavlinkNumericUpDownthr_fs_value.Min = 0F; - this.mavlinkNumericUpDownthr_fs_value.Name = "mavlinkNumericUpDownthr_fs_value"; - this.mavlinkNumericUpDownthr_fs_value.param = null; - this.mavlinkNumericUpDownthr_fs_value.ParamName = null; - this.toolTip1.SetToolTip(this.mavlinkNumericUpDownthr_fs_value, resources.GetString("mavlinkNumericUpDownthr_fs_value.ToolTip")); - // - // LNK_wiki - // - resources.ApplyResources(this.LNK_wiki, "LNK_wiki"); - this.LNK_wiki.LinkBehavior = System.Windows.Forms.LinkBehavior.HoverUnderline; - this.LNK_wiki.LinkColor = System.Drawing.Color.CornflowerBlue; - this.LNK_wiki.Name = "LNK_wiki"; - this.LNK_wiki.TabStop = true; - this.LNK_wiki.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.LNK_wiki_LinkClicked); - // - // mavlinkCheckBoxgcs_fs - // - resources.ApplyResources(this.mavlinkCheckBoxgcs_fs, "mavlinkCheckBoxgcs_fs"); - this.mavlinkCheckBoxgcs_fs.Name = "mavlinkCheckBoxgcs_fs"; - this.mavlinkCheckBoxgcs_fs.OffValue = 0F; - this.mavlinkCheckBoxgcs_fs.OnValue = 1F; - this.mavlinkCheckBoxgcs_fs.param = null; - this.mavlinkCheckBoxgcs_fs.ParamName = null; - this.toolTip1.SetToolTip(this.mavlinkCheckBoxgcs_fs, resources.GetString("mavlinkCheckBoxgcs_fs.ToolTip")); - this.mavlinkCheckBoxgcs_fs.UseVisualStyleBackColor = true; - // - // toolTip1 - // - this.toolTip1.AutoPopDelay = 20000; - this.toolTip1.InitialDelay = 500; - this.toolTip1.ReshowDelay = 100; - // - // mavlinkCheckBoxshort_fs - // - resources.ApplyResources(this.mavlinkCheckBoxshort_fs, "mavlinkCheckBoxshort_fs"); - this.mavlinkCheckBoxshort_fs.Name = "mavlinkCheckBoxshort_fs"; - this.mavlinkCheckBoxshort_fs.OffValue = 0F; - this.mavlinkCheckBoxshort_fs.OnValue = 1F; - this.mavlinkCheckBoxshort_fs.param = null; - this.mavlinkCheckBoxshort_fs.ParamName = null; - this.toolTip1.SetToolTip(this.mavlinkCheckBoxshort_fs, resources.GetString("mavlinkCheckBoxshort_fs.ToolTip")); - this.mavlinkCheckBoxshort_fs.UseVisualStyleBackColor = true; - // - // mavlinkCheckBoxlong_fs - // - resources.ApplyResources(this.mavlinkCheckBoxlong_fs, "mavlinkCheckBoxlong_fs"); - this.mavlinkCheckBoxlong_fs.Name = "mavlinkCheckBoxlong_fs"; - this.mavlinkCheckBoxlong_fs.OffValue = 0F; - this.mavlinkCheckBoxlong_fs.OnValue = 1F; - this.mavlinkCheckBoxlong_fs.param = null; - this.mavlinkCheckBoxlong_fs.ParamName = null; - this.toolTip1.SetToolTip(this.mavlinkCheckBoxlong_fs, resources.GetString("mavlinkCheckBoxlong_fs.ToolTip")); - this.mavlinkCheckBoxlong_fs.UseVisualStyleBackColor = true; - // - // mavlinkCheckBoxthr_fs_action - // - resources.ApplyResources(this.mavlinkCheckBoxthr_fs_action, "mavlinkCheckBoxthr_fs_action"); - this.mavlinkCheckBoxthr_fs_action.Name = "mavlinkCheckBoxthr_fs_action"; - this.mavlinkCheckBoxthr_fs_action.OffValue = 0F; - this.mavlinkCheckBoxthr_fs_action.OnValue = 1F; - this.mavlinkCheckBoxthr_fs_action.param = null; - this.mavlinkCheckBoxthr_fs_action.ParamName = null; - this.toolTip1.SetToolTip(this.mavlinkCheckBoxthr_fs_action, resources.GetString("mavlinkCheckBoxthr_fs_action.ToolTip")); - this.mavlinkCheckBoxthr_fs_action.UseVisualStyleBackColor = true; - // - // groupBox1 - // - this.groupBox1.Controls.Add(this.label3); - this.groupBox1.Controls.Add(this.mavlinkCheckBoxthr_fs); - this.groupBox1.Controls.Add(this.mavlinkCheckBoxthr_fs_action); - this.groupBox1.Controls.Add(this.mavlinkNumericUpDownthr_fs_value); - this.groupBox1.Controls.Add(this.mavlinkCheckBoxlong_fs); - this.groupBox1.Controls.Add(this.mavlinkCheckBoxgcs_fs); - this.groupBox1.Controls.Add(this.mavlinkCheckBoxshort_fs); - resources.ApplyResources(this.groupBox1, "groupBox1"); - this.groupBox1.Name = "groupBox1"; - this.groupBox1.TabStop = false; - // - // label3 - // - resources.ApplyResources(this.label3, "label3"); - this.label3.Name = "label3"; - // // ConfigFailSafe // resources.ApplyResources(this, "$this"); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.lbl_gpslock); + this.Controls.Add(this.lbl_armed); this.Controls.Add(this.groupBox1); this.Controls.Add(this.LNK_wiki); this.Controls.Add(this.lbl_currentmode); @@ -474,5 +492,7 @@ private Controls.MavlinkCheckBox mavlinkCheckBoxthr_fs_action; private System.Windows.Forms.GroupBox groupBox1; private System.Windows.Forms.Label label3; + private System.Windows.Forms.Label lbl_armed; + private System.Windows.Forms.Label lbl_gpslock; } } diff --git a/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/ConfigFailSafe.cs b/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/ConfigFailSafe.cs index 696f20277b..de798531ef 100644 --- a/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/ConfigFailSafe.cs +++ b/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/ConfigFailSafe.cs @@ -60,5 +60,47 @@ namespace ArdupilotMega.GCSViews.ConfigurationView { Process.Start(new ProcessStartInfo("http://code.google.com/p/ardupilot-mega/wiki/APM2xFailsafe")); } + + private void lbl_armed_Paint(object sender, PaintEventArgs e) + { + if (lbl_armed.Text == "True") + { + lbl_armed.Text = "Armed"; + } + else if (lbl_armed.Text == "False") + { + lbl_armed.Text = "Disarmed"; + } + } + + private void lbl_gpslock_Paint(object sender, PaintEventArgs e) + { + int _gpsfix = 0; + try + { + _gpsfix = int.Parse(lbl_gpslock.Text); + } + catch { return; } + string gps = ""; + + if (_gpsfix == 0) + { + gps = ("GPS: No GPS"); + } + else if (_gpsfix == 1) + { + gps = ("GPS: No Fix"); + } + else if (_gpsfix == 2) + { + gps = ("GPS: 3D Fix"); + } + else if (_gpsfix == 3) + { + gps = ("GPS: 3D Fix"); + } + + lbl_gpslock.Text = gps; + } } } diff --git a/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/ConfigFailSafe.resx b/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/ConfigFailSafe.resx index 023e0d1783..9d687ebe76 100644 --- a/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/ConfigFailSafe.resx +++ b/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/ConfigFailSafe.resx @@ -117,9 +117,6 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 17, 17 - True @@ -151,7 +148,7 @@ $this - 3 + 5 True @@ -181,392 +178,11 @@ $this - 4 - - - NoControl - - - 297, 406 - - - 170, 25 - - - 102 - - - horizontalProgressBar9 - - - ArdupilotMega.HorizontalProgressBar, ArdupilotMegaPlanner10, Version=1.1.4646.37607, Culture=neutral, PublicKeyToken=null - - - $this - - - 5 - - - NoControl - - - 297, 351 - - - 170, 25 - - - 101 - - - horizontalProgressBar10 - - - ArdupilotMega.HorizontalProgressBar, ArdupilotMegaPlanner10, Version=1.1.4646.37607, Culture=neutral, PublicKeyToken=null - - - $this - - 6 - - NoControl - - - 297, 296 - - - 170, 25 - - - 100 - - - horizontalProgressBar11 - - - ArdupilotMega.HorizontalProgressBar, ArdupilotMegaPlanner10, Version=1.1.4646.37607, Culture=neutral, PublicKeyToken=null - - - $this - - - 7 - - - NoControl - - - 297, 241 - - - 170, 25 - - - 99 - - - horizontalProgressBar12 - - - ArdupilotMega.HorizontalProgressBar, ArdupilotMegaPlanner10, Version=1.1.4646.37607, Culture=neutral, PublicKeyToken=null - - - $this - - - 8 - - - NoControl - - - 297, 186 - - - 170, 25 - - - 98 - - - horizontalProgressBar13 - - - ArdupilotMega.HorizontalProgressBar, ArdupilotMegaPlanner10, Version=1.1.4646.37607, Culture=neutral, PublicKeyToken=null - - - $this - - - 9 - - - NoControl - - - 297, 131 - - - 170, 25 - - - 97 - - - horizontalProgressBar14 - - - ArdupilotMega.HorizontalProgressBar, ArdupilotMegaPlanner10, Version=1.1.4646.37607, Culture=neutral, PublicKeyToken=null - - - $this - - - 10 - - - NoControl - - - 297, 21 - - - 170, 25 - - - 96 - - - horizontalProgressBar15 - - - ArdupilotMega.HorizontalProgressBar, ArdupilotMegaPlanner10, Version=1.1.4646.37607, Culture=neutral, PublicKeyToken=null - - - $this - - - 11 - - - NoControl - - - 297, 76 - - - 170, 25 - - - 95 - - - horizontalProgressBar16 - - - ArdupilotMega.HorizontalProgressBar, ArdupilotMegaPlanner10, Version=1.1.4646.37607, Culture=neutral, PublicKeyToken=null - - - $this - - - 12 - - - NoControl - - - 15, 406 - - - 170, 25 - - - 94 - - - horizontalProgressBar8 - - - ArdupilotMega.HorizontalProgressBar, ArdupilotMegaPlanner10, Version=1.1.4646.37607, Culture=neutral, PublicKeyToken=null - - - $this - - - 13 - - - NoControl - - - 15, 351 - - - 170, 25 - - - 93 - - - horizontalProgressBar7 - - - ArdupilotMega.HorizontalProgressBar, ArdupilotMegaPlanner10, Version=1.1.4646.37607, Culture=neutral, PublicKeyToken=null - - - $this - - - 14 - - - NoControl - - - 15, 296 - - - 170, 25 - - - 92 - - - horizontalProgressBar6 - - - ArdupilotMega.HorizontalProgressBar, ArdupilotMegaPlanner10, Version=1.1.4646.37607, Culture=neutral, PublicKeyToken=null - - - $this - - - 15 - - - NoControl - - - 15, 241 - - - 170, 25 - - - 91 - - - horizontalProgressBar5 - - - ArdupilotMega.HorizontalProgressBar, ArdupilotMegaPlanner10, Version=1.1.4646.37607, Culture=neutral, PublicKeyToken=null - - - $this - - - 16 - - - NoControl - - - 15, 186 - - - 170, 25 - - - 90 - - - horizontalProgressBar4 - - - ArdupilotMega.HorizontalProgressBar, ArdupilotMegaPlanner10, Version=1.1.4646.37607, Culture=neutral, PublicKeyToken=null - - - $this - - - 17 - - - NoControl - - - 15, 131 - - - 170, 25 - - - 89 - - - horizontalProgressBar3 - - - ArdupilotMega.HorizontalProgressBar, ArdupilotMegaPlanner10, Version=1.1.4646.37607, Culture=neutral, PublicKeyToken=null - - - $this - - - 18 - - - NoControl - - - 15, 21 - - - 170, 25 - - - 88 - - - horizontalProgressBar2 - - - ArdupilotMega.HorizontalProgressBar, ArdupilotMegaPlanner10, Version=1.1.4646.37607, Culture=neutral, PublicKeyToken=null - - - $this - - - 19 - - - NoControl - - - 15, 76 - - - 170, 25 - - - 87 - - - horizontalProgressBar1 - - - ArdupilotMega.HorizontalProgressBar, ArdupilotMegaPlanner10, Version=1.1.4646.37607, Culture=neutral, PublicKeyToken=null - - - $this - - - 20 - + + 17, 17 + Microsoft Sans Serif, 26.25pt @@ -598,70 +214,7 @@ $this - 2 - - - True - - - False - - - 6, 19 - - - 103, 17 - - - 141 - - - Throttle FailSafe - - - 214, 17 - - - Enable Failsafe on low throttle pwm - - - mavlinkCheckBoxthr_fs - - - ArdupilotMega.Controls.MavlinkCheckBox, ArdupilotMegaPlanner10, Version=1.1.4646.37607, Culture=neutral, PublicKeyToken=null - - - groupBox1 - - - 1 - - - False - - - 42, 42 - - - 103, 20 - - - 142 - - - Trigger Throttle Pwm - - - mavlinkNumericUpDownthr_fs_value - - - ArdupilotMega.Controls.MavlinkNumericUpDown, ArdupilotMegaPlanner10, Version=1.1.4646.37607, Culture=neutral, PublicKeyToken=null - - - groupBox1 - - - 3 + 4 Top, Right @@ -669,6 +222,9 @@ True + + NoControl + 657, 5 @@ -691,8 +247,147 @@ $this + 3 + + + 214, 17 + + + True + + + False + + + NoControl + + + 6, 19 + + + 103, 17 + + + 141 + + + Throttle FailSafe + + + Enable Failsafe on low throttle pwm + + + mavlinkCheckBoxthr_fs + + + ArdupilotMega.Controls.MavlinkCheckBox, ArdupilotMegaPlanner10, Version=1.1.4696.32711, Culture=neutral, PublicKeyToken=null + + + groupBox1 + + 1 + + True + + + False + + + NoControl + + + 6, 69 + + + 134, 17 + + + 147 + + + Throttle Failsafe Action + + + Arducopter Auto: Off, no Action, On, RTL +Arducopter Other: if have gps, RTL, Otherwise Land + + + mavlinkCheckBoxthr_fs_action + + + ArdupilotMega.Controls.MavlinkCheckBox, ArdupilotMegaPlanner10, Version=1.1.4696.32711, Culture=neutral, PublicKeyToken=null + + + groupBox1 + + + 2 + + + False + + + 42, 42 + + + 103, 20 + + + 142 + + + Trigger Throttle Pwm + + + mavlinkNumericUpDownthr_fs_value + + + ArdupilotMega.Controls.MavlinkNumericUpDown, ArdupilotMegaPlanner10, Version=1.1.4696.32711, Culture=neutral, PublicKeyToken=null + + + groupBox1 + + + 3 + + + True + + + False + + + NoControl + + + 6, 138 + + + 132, 17 + + + 146 + + + FailSafe Long (20 sec) + + + Off, no Action, On, RTL + + + mavlinkCheckBoxlong_fs + + + ArdupilotMega.Controls.MavlinkCheckBox, ArdupilotMegaPlanner10, Version=1.1.4696.32711, Culture=neutral, PublicKeyToken=null + + + groupBox1 + + + 4 + True @@ -721,7 +416,7 @@ mavlinkCheckBoxgcs_fs - ArdupilotMega.Controls.MavlinkCheckBox, ArdupilotMegaPlanner10, Version=1.1.4646.37607, Culture=neutral, PublicKeyToken=null + ArdupilotMega.Controls.MavlinkCheckBox, ArdupilotMegaPlanner10, Version=1.1.4696.32711, Culture=neutral, PublicKeyToken=null groupBox1 @@ -757,7 +452,7 @@ mavlinkCheckBoxshort_fs - ArdupilotMega.Controls.MavlinkCheckBox, ArdupilotMegaPlanner10, Version=1.1.4646.37607, Culture=neutral, PublicKeyToken=null + ArdupilotMega.Controls.MavlinkCheckBox, ArdupilotMegaPlanner10, Version=1.1.4696.32711, Culture=neutral, PublicKeyToken=null groupBox1 @@ -765,82 +460,12 @@ 6 - - True - - - False - - - NoControl - - - 6, 138 - - - 132, 17 - - - 146 - - - FailSafe Long (20 sec) - - - Off, no Action, On, RTL - - - mavlinkCheckBoxlong_fs - - - ArdupilotMega.Controls.MavlinkCheckBox, ArdupilotMegaPlanner10, Version=1.1.4646.37607, Culture=neutral, PublicKeyToken=null - - - groupBox1 - - - 4 - - - True - - - False - - - NoControl - - - 6, 69 - - - 134, 17 - - - 147 - - - Throttle Failsafe Action - - - Arducopter Auto: Off, no Action, On, RTL -Arducopter Other: if have gps, RTL, Otherwise Land - - - mavlinkCheckBoxthr_fs_action - - - ArdupilotMega.Controls.MavlinkCheckBox, ArdupilotMegaPlanner10, Version=1.1.4646.37607, Culture=neutral, PublicKeyToken=null - - - groupBox1 - - - 2 - True + + NoControl + 6, 48 @@ -866,7 +491,7 @@ Arducopter Other: if have gps, RTL, Otherwise Land 0 - 495, 76 + 495, 209 170, 167 @@ -887,8 +512,458 @@ Arducopter Other: if have gps, RTL, Otherwise Land $this + 2 + + + Microsoft Sans Serif, 26.25pt + + + NoControl + + + 473, 71 + + + 215, 50 + + + 149 + + + Dissarmed + + + MiddleCenter + + + lbl_armed + + + System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 1 + + + Microsoft Sans Serif, 26.25pt + + + NoControl + + + 473, 121 + + + 215, 50 + + + 150 + + + No Lock + + + MiddleCenter + + + lbl_gpslock + + + System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + 0 + + NoControl + + + 297, 406 + + + 170, 25 + + + 102 + + + horizontalProgressBar9 + + + ArdupilotMega.HorizontalProgressBar, ArdupilotMegaPlanner10, Version=1.1.4696.32711, Culture=neutral, PublicKeyToken=null + + + $this + + + 7 + + + NoControl + + + 297, 351 + + + 170, 25 + + + 101 + + + horizontalProgressBar10 + + + ArdupilotMega.HorizontalProgressBar, ArdupilotMegaPlanner10, Version=1.1.4696.32711, Culture=neutral, PublicKeyToken=null + + + $this + + + 8 + + + NoControl + + + 297, 296 + + + 170, 25 + + + 100 + + + horizontalProgressBar11 + + + ArdupilotMega.HorizontalProgressBar, ArdupilotMegaPlanner10, Version=1.1.4696.32711, Culture=neutral, PublicKeyToken=null + + + $this + + + 9 + + + NoControl + + + 297, 241 + + + 170, 25 + + + 99 + + + horizontalProgressBar12 + + + ArdupilotMega.HorizontalProgressBar, ArdupilotMegaPlanner10, Version=1.1.4696.32711, Culture=neutral, PublicKeyToken=null + + + $this + + + 10 + + + NoControl + + + 297, 186 + + + 170, 25 + + + 98 + + + horizontalProgressBar13 + + + ArdupilotMega.HorizontalProgressBar, ArdupilotMegaPlanner10, Version=1.1.4696.32711, Culture=neutral, PublicKeyToken=null + + + $this + + + 11 + + + NoControl + + + 297, 131 + + + 170, 25 + + + 97 + + + horizontalProgressBar14 + + + ArdupilotMega.HorizontalProgressBar, ArdupilotMegaPlanner10, Version=1.1.4696.32711, Culture=neutral, PublicKeyToken=null + + + $this + + + 12 + + + NoControl + + + 297, 21 + + + 170, 25 + + + 96 + + + horizontalProgressBar15 + + + ArdupilotMega.HorizontalProgressBar, ArdupilotMegaPlanner10, Version=1.1.4696.32711, Culture=neutral, PublicKeyToken=null + + + $this + + + 13 + + + NoControl + + + 297, 76 + + + 170, 25 + + + 95 + + + horizontalProgressBar16 + + + ArdupilotMega.HorizontalProgressBar, ArdupilotMegaPlanner10, Version=1.1.4696.32711, Culture=neutral, PublicKeyToken=null + + + $this + + + 14 + + + NoControl + + + 15, 406 + + + 170, 25 + + + 94 + + + horizontalProgressBar8 + + + ArdupilotMega.HorizontalProgressBar, ArdupilotMegaPlanner10, Version=1.1.4696.32711, Culture=neutral, PublicKeyToken=null + + + $this + + + 15 + + + NoControl + + + 15, 351 + + + 170, 25 + + + 93 + + + horizontalProgressBar7 + + + ArdupilotMega.HorizontalProgressBar, ArdupilotMegaPlanner10, Version=1.1.4696.32711, Culture=neutral, PublicKeyToken=null + + + $this + + + 16 + + + NoControl + + + 15, 296 + + + 170, 25 + + + 92 + + + horizontalProgressBar6 + + + ArdupilotMega.HorizontalProgressBar, ArdupilotMegaPlanner10, Version=1.1.4696.32711, Culture=neutral, PublicKeyToken=null + + + $this + + + 17 + + + NoControl + + + 15, 241 + + + 170, 25 + + + 91 + + + horizontalProgressBar5 + + + ArdupilotMega.HorizontalProgressBar, ArdupilotMegaPlanner10, Version=1.1.4696.32711, Culture=neutral, PublicKeyToken=null + + + $this + + + 18 + + + NoControl + + + 15, 186 + + + 170, 25 + + + 90 + + + horizontalProgressBar4 + + + ArdupilotMega.HorizontalProgressBar, ArdupilotMegaPlanner10, Version=1.1.4696.32711, Culture=neutral, PublicKeyToken=null + + + $this + + + 19 + + + NoControl + + + 15, 131 + + + 170, 25 + + + 89 + + + horizontalProgressBar3 + + + ArdupilotMega.HorizontalProgressBar, ArdupilotMegaPlanner10, Version=1.1.4696.32711, Culture=neutral, PublicKeyToken=null + + + $this + + + 20 + + + NoControl + + + 15, 21 + + + 170, 25 + + + 88 + + + horizontalProgressBar2 + + + ArdupilotMega.HorizontalProgressBar, ArdupilotMegaPlanner10, Version=1.1.4696.32711, Culture=neutral, PublicKeyToken=null + + + $this + + + 21 + + + NoControl + + + 15, 76 + + + 170, 25 + + + 87 + + + horizontalProgressBar1 + + + ArdupilotMega.HorizontalProgressBar, ArdupilotMegaPlanner10, Version=1.1.4696.32711, Culture=neutral, PublicKeyToken=null + + + $this + + + 22 + True diff --git a/Tools/ArdupilotMegaPlanner/GCSViews/FlightData.cs b/Tools/ArdupilotMegaPlanner/GCSViews/FlightData.cs index f3f3c9bfe0..add015f395 100644 --- a/Tools/ArdupilotMegaPlanner/GCSViews/FlightData.cs +++ b/Tools/ArdupilotMegaPlanner/GCSViews/FlightData.cs @@ -613,7 +613,7 @@ namespace ArdupilotMega.GCSViews try { - // Console.WriteLine(DateTime.Now.Millisecond); + //Console.WriteLine(DateTime.Now.Millisecond); updateBindingSource(); // Console.WriteLine(DateTime.Now.Millisecond + " done "); diff --git a/Tools/ArdupilotMegaPlanner/MavlinkLog.cs b/Tools/ArdupilotMegaPlanner/MavlinkLog.cs index 8c52639e37..beee2dc000 100644 --- a/Tools/ArdupilotMegaPlanner/MavlinkLog.cs +++ b/Tools/ArdupilotMegaPlanner/MavlinkLog.cs @@ -692,6 +692,9 @@ namespace ArdupilotMega byte[] packet = MavlinkInterface.readPacket(); + if (packet.Length > 5 && packet[3] == 0xff) + continue; + cs.datetime = MavlinkInterface.lastlogread; cs.UpdateCurrentSettings(null, true, MavlinkInterface); @@ -766,17 +769,34 @@ namespace ArdupilotMega { list.Add(time, (byte)field.GetValue(data)); } + else if (value.GetType() == typeof(sbyte)) + { + list.Add(time, (sbyte)field.GetValue(data)); + } else if (value.GetType() == typeof(Int32)) { list.Add(time, (Int32)field.GetValue(data)); } + else if (value.GetType() == typeof(UInt32)) + { + list.Add(time, (UInt32)field.GetValue(data)); + } else if (value.GetType() == typeof(ulong)) { list.Add(time, (ulong)field.GetValue(data)); } + else if (value.GetType() == typeof(long)) + { + list.Add(time, (long)field.GetValue(data)); + } + else if (value.GetType() == typeof(double)) + { + list.Add(time, (double)field.GetValue(data)); + } + else { - + Console.WriteLine("Unknown data type"); } } } diff --git a/Tools/ArdupilotMegaPlanner/Msi/installer.wxs b/Tools/ArdupilotMegaPlanner/Msi/installer.wxs index 110a74e1fc..eb0dd597af 100644 --- a/Tools/ArdupilotMegaPlanner/Msi/installer.wxs +++ b/Tools/ArdupilotMegaPlanner/Msi/installer.wxs @@ -31,7 +31,7 @@ - + @@ -108,11 +108,11 @@ - + - + @@ -123,20 +123,20 @@ - + - + - + @@ -150,7 +150,7 @@ - + @@ -162,13 +162,13 @@ - + - + @@ -179,7 +179,7 @@ - + @@ -190,31 +190,31 @@ - + - + - + - + - + @@ -223,31 +223,31 @@ - + - + - + - + - + diff --git a/Tools/ArdupilotMegaPlanner/Properties/AssemblyInfo.cs b/Tools/ArdupilotMegaPlanner/Properties/AssemblyInfo.cs index 481b5f900e..5683076bcb 100644 --- a/Tools/ArdupilotMegaPlanner/Properties/AssemblyInfo.cs +++ b/Tools/ArdupilotMegaPlanner/Properties/AssemblyInfo.cs @@ -34,5 +34,5 @@ using System.Resources; // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.1.*")] -[assembly: AssemblyFileVersion("1.2.18")] +[assembly: AssemblyFileVersion("1.2.19")] [assembly: NeutralResourcesLanguageAttribute("")]