diff --git a/Tools/ArdupilotMegaPlanner/Controls/MessageBox.cs b/Tools/ArdupilotMegaPlanner/Controls/MessageBox.cs index 8d08925fe1..a399796751 100644 --- a/Tools/ArdupilotMegaPlanner/Controls/MessageBox.cs +++ b/Tools/ArdupilotMegaPlanner/Controls/MessageBox.cs @@ -7,7 +7,6 @@ using ArdupilotMega; namespace System.Windows.Forms { -#pragma warning disable 414, 3021 public static class MessageBox { const int FORM_Y_MARGIN = 10; diff --git a/Tools/ArdupilotMegaPlanner/MainV2.cs b/Tools/ArdupilotMegaPlanner/MainV2.cs index 63bf33780c..f7cb7c990e 100644 --- a/Tools/ArdupilotMegaPlanner/MainV2.cs +++ b/Tools/ArdupilotMegaPlanner/MainV2.cs @@ -1552,10 +1552,10 @@ namespace ArdupilotMega } } - if (fi.Length != response.ContentLength && response.Headers[HttpResponseHeader.ETag] != CurrentEtag) - { - log.Debug("New file Check: " + fi.Length + " vs " + response.ContentLength + " " + response.Headers[HttpResponseHeader.ETag] + " vs " + CurrentEtag); + log.Info("New file Check: " + fi.Length + " vs " + response.ContentLength + " " + response.Headers[HttpResponseHeader.ETag] + " vs " + CurrentEtag); + if (fi.Length != response.ContentLength || response.Headers[HttpResponseHeader.ETag] != CurrentEtag) + { using (var sw = new StreamWriter(path + ".etag")) { sw.WriteLine(response.Headers[HttpResponseHeader.ETag]); @@ -1683,7 +1683,7 @@ namespace ArdupilotMega // Create a request using a URL that can receive a post. request = WebRequest.Create(baseurl + file); - Console.Write(baseurl + file + " "); + log.Info(baseurl + file + " "); // Set the Method property of the request to POST. request.Method = "HEAD"; @@ -1719,10 +1719,10 @@ namespace ArdupilotMega } } - if (fi.Length != response.ContentLength && response.Headers[HttpResponseHeader.ETag] != CurrentEtag) - { - log.Debug("New file Check: " + fi.Length + " vs " + response.ContentLength + " " + response.Headers[HttpResponseHeader.ETag] + " vs " + CurrentEtag); + log.Debug("New file Check: " + fi.Length + " vs " + response.ContentLength + " " + response.Headers[HttpResponseHeader.ETag] + " vs " + CurrentEtag); + if (fi.Length != response.ContentLength || response.Headers[HttpResponseHeader.ETag] != CurrentEtag) + { using (StreamWriter sw = new StreamWriter(path + ".etag")) { sw.WriteLine(response.Headers[HttpResponseHeader.ETag]); diff --git a/Tools/ArdupilotMegaPlanner/Setup/Setup.Designer.cs b/Tools/ArdupilotMegaPlanner/Setup/Setup.Designer.cs index 968142c6c3..fef84a1f1b 100644 --- a/Tools/ArdupilotMegaPlanner/Setup/Setup.Designer.cs +++ b/Tools/ArdupilotMegaPlanner/Setup/Setup.Designer.cs @@ -128,8 +128,8 @@ this.groupBox3 = new System.Windows.Forms.GroupBox(); this.label46 = new System.Windows.Forms.Label(); this.label45 = new System.Windows.Forms.Label(); - this.GYR_ENABLE_ = new System.Windows.Forms.CheckBox(); - this.GYR_GAIN_ = new System.Windows.Forms.TextBox(); + this.GYR_ENABLE = new System.Windows.Forms.CheckBox(); + this.GYR_GAIN = new System.Windows.Forms.TextBox(); this.label44 = new System.Windows.Forms.Label(); this.label43 = new System.Windows.Forms.Label(); this.label42 = new System.Windows.Forms.Label(); @@ -141,9 +141,9 @@ this.groupBox1 = new System.Windows.Forms.GroupBox(); this.label41 = new System.Windows.Forms.Label(); this.label21 = new System.Windows.Forms.Label(); - this.COL_MIN_ = new System.Windows.Forms.TextBox(); - this.COL_MID_ = new System.Windows.Forms.TextBox(); - this.COL_MAX_ = new System.Windows.Forms.TextBox(); + this.COL_MIN = new System.Windows.Forms.TextBox(); + this.COL_MID = new System.Windows.Forms.TextBox(); + this.COL_MAX = new System.Windows.Forms.TextBox(); this.BUT_0collective = new ArdupilotMega.MyButton(); this.HS4_TRIM = new System.Windows.Forms.NumericUpDown(); this.HS3_TRIM = new System.Windows.Forms.NumericUpDown(); @@ -154,18 +154,18 @@ this.label37 = new System.Windows.Forms.Label(); this.label36 = new System.Windows.Forms.Label(); this.label26 = new System.Windows.Forms.Label(); - this.PIT_MAX_ = new System.Windows.Forms.TextBox(); + this.PIT_MAX = new System.Windows.Forms.TextBox(); this.label25 = new System.Windows.Forms.Label(); - this.ROL_MAX_ = new System.Windows.Forms.TextBox(); + this.ROL_MAX = new System.Windows.Forms.TextBox(); this.label23 = new System.Windows.Forms.Label(); this.label22 = new System.Windows.Forms.Label(); this.HS4_REV = new System.Windows.Forms.CheckBox(); this.label20 = new System.Windows.Forms.Label(); this.label19 = new System.Windows.Forms.Label(); this.label18 = new System.Windows.Forms.Label(); - this.SV3_POS_ = new System.Windows.Forms.TextBox(); - this.SV2_POS_ = new System.Windows.Forms.TextBox(); - this.SV1_POS_ = new System.Windows.Forms.TextBox(); + this.SV3_POS = new System.Windows.Forms.TextBox(); + this.SV2_POS = new System.Windows.Forms.TextBox(); + this.SV1_POS = new System.Windows.Forms.TextBox(); this.HS3_REV = new System.Windows.Forms.CheckBox(); this.HS2_REV = new System.Windows.Forms.CheckBox(); this.HS1_REV = new System.Windows.Forms.CheckBox(); @@ -176,6 +176,9 @@ this.tabReset = new System.Windows.Forms.TabPage(); this.BUT_reset = new ArdupilotMega.MyButton(); this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); + this.CCPM = new System.Windows.Forms.RadioButton(); + this.groupBox5 = new System.Windows.Forms.GroupBox(); + this.H1_ENABLE = new System.Windows.Forms.RadioButton(); this.tabControl1.SuspendLayout(); this.tabRadioIn.SuspendLayout(); this.groupBoxElevons.SuspendLayout(); @@ -201,6 +204,7 @@ ((System.ComponentModel.ISupportInitialize)(this.HS2_TRIM)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.HS1_TRIM)).BeginInit(); this.tabReset.SuspendLayout(); + this.groupBox5.SuspendLayout(); this.SuspendLayout(); // // tabControl1 @@ -972,6 +976,7 @@ // // tabHeli // + this.tabHeli.Controls.Add(this.groupBox5); this.tabHeli.Controls.Add(this.BUT_HS4save); this.tabHeli.Controls.Add(this.BUT_swash_manual); this.tabHeli.Controls.Add(this.groupBox3); @@ -989,18 +994,18 @@ this.tabHeli.Controls.Add(this.label37); this.tabHeli.Controls.Add(this.label36); this.tabHeli.Controls.Add(this.label26); - this.tabHeli.Controls.Add(this.PIT_MAX_); + this.tabHeli.Controls.Add(this.PIT_MAX); this.tabHeli.Controls.Add(this.label25); - this.tabHeli.Controls.Add(this.ROL_MAX_); + this.tabHeli.Controls.Add(this.ROL_MAX); this.tabHeli.Controls.Add(this.label23); this.tabHeli.Controls.Add(this.label22); this.tabHeli.Controls.Add(this.HS4_REV); this.tabHeli.Controls.Add(this.label20); this.tabHeli.Controls.Add(this.label19); this.tabHeli.Controls.Add(this.label18); - this.tabHeli.Controls.Add(this.SV3_POS_); - this.tabHeli.Controls.Add(this.SV2_POS_); - this.tabHeli.Controls.Add(this.SV1_POS_); + this.tabHeli.Controls.Add(this.SV3_POS); + this.tabHeli.Controls.Add(this.SV2_POS); + this.tabHeli.Controls.Add(this.SV1_POS); this.tabHeli.Controls.Add(this.HS3_REV); this.tabHeli.Controls.Add(this.HS2_REV); this.tabHeli.Controls.Add(this.HS1_REV); @@ -1031,8 +1036,8 @@ // this.groupBox3.Controls.Add(this.label46); this.groupBox3.Controls.Add(this.label45); - this.groupBox3.Controls.Add(this.GYR_ENABLE_); - this.groupBox3.Controls.Add(this.GYR_GAIN_); + this.groupBox3.Controls.Add(this.GYR_ENABLE); + this.groupBox3.Controls.Add(this.GYR_GAIN); resources.ApplyResources(this.groupBox3, "groupBox3"); this.groupBox3.Name = "groupBox3"; this.groupBox3.TabStop = false; @@ -1047,18 +1052,18 @@ resources.ApplyResources(this.label45, "label45"); this.label45.Name = "label45"; // - // GYR_ENABLE_ + // GYR_ENABLE // - resources.ApplyResources(this.GYR_ENABLE_, "GYR_ENABLE_"); - this.GYR_ENABLE_.Name = "GYR_ENABLE_"; - this.GYR_ENABLE_.UseVisualStyleBackColor = true; - this.GYR_ENABLE_.CheckedChanged += new System.EventHandler(this.GYR_ENABLE__CheckedChanged); + resources.ApplyResources(this.GYR_ENABLE, "GYR_ENABLE"); + this.GYR_ENABLE.Name = "GYR_ENABLE"; + this.GYR_ENABLE.UseVisualStyleBackColor = true; + this.GYR_ENABLE.CheckedChanged += new System.EventHandler(this.GYR_ENABLE__CheckedChanged); // - // GYR_GAIN_ + // GYR_GAIN // - resources.ApplyResources(this.GYR_GAIN_, "GYR_GAIN_"); - this.GYR_GAIN_.Name = "GYR_GAIN_"; - this.GYR_GAIN_.Validating += new System.ComponentModel.CancelEventHandler(this.GYR_GAIN__Validating); + resources.ApplyResources(this.GYR_GAIN, "GYR_GAIN"); + this.GYR_GAIN.Name = "GYR_GAIN"; + this.GYR_GAIN.Validating += new System.ComponentModel.CancelEventHandler(this.GYR_GAIN__Validating); // // label44 // @@ -1115,9 +1120,9 @@ // this.groupBox1.Controls.Add(this.label41); this.groupBox1.Controls.Add(this.label21); - this.groupBox1.Controls.Add(this.COL_MIN_); - this.groupBox1.Controls.Add(this.COL_MID_); - this.groupBox1.Controls.Add(this.COL_MAX_); + this.groupBox1.Controls.Add(this.COL_MIN); + this.groupBox1.Controls.Add(this.COL_MID); + this.groupBox1.Controls.Add(this.COL_MAX); this.groupBox1.Controls.Add(this.BUT_0collective); resources.ApplyResources(this.groupBox1, "groupBox1"); this.groupBox1.Name = "groupBox1"; @@ -1133,27 +1138,27 @@ resources.ApplyResources(this.label21, "label21"); this.label21.Name = "label21"; // - // COL_MIN_ + // COL_MIN // - resources.ApplyResources(this.COL_MIN_, "COL_MIN_"); - this.COL_MIN_.Name = "COL_MIN_"; - this.COL_MIN_.Enter += new System.EventHandler(this.COL_MIN__Enter); - this.COL_MIN_.Leave += new System.EventHandler(this.COL_MIN__Leave); - this.COL_MIN_.Validating += new System.ComponentModel.CancelEventHandler(this.PWM_Validating); + resources.ApplyResources(this.COL_MIN, "COL_MIN"); + this.COL_MIN.Name = "COL_MIN"; + this.COL_MIN.Enter += new System.EventHandler(this.COL_MIN__Enter); + this.COL_MIN.Leave += new System.EventHandler(this.COL_MIN__Leave); + this.COL_MIN.Validating += new System.ComponentModel.CancelEventHandler(this.PWM_Validating); // - // COL_MID_ + // COL_MID // - resources.ApplyResources(this.COL_MID_, "COL_MID_"); - this.COL_MID_.Name = "COL_MID_"; - this.COL_MID_.Validating += new System.ComponentModel.CancelEventHandler(this.PWM_Validating); + resources.ApplyResources(this.COL_MID, "COL_MID"); + this.COL_MID.Name = "COL_MID"; + this.COL_MID.Validating += new System.ComponentModel.CancelEventHandler(this.PWM_Validating); // - // COL_MAX_ + // COL_MAX // - resources.ApplyResources(this.COL_MAX_, "COL_MAX_"); - this.COL_MAX_.Name = "COL_MAX_"; - this.COL_MAX_.Enter += new System.EventHandler(this.COL_MAX__Enter); - this.COL_MAX_.Leave += new System.EventHandler(this.COL_MAX__Leave); - this.COL_MAX_.Validating += new System.ComponentModel.CancelEventHandler(this.PWM_Validating); + resources.ApplyResources(this.COL_MAX, "COL_MAX"); + this.COL_MAX.Name = "COL_MAX"; + this.COL_MAX.Enter += new System.EventHandler(this.COL_MAX__Enter); + this.COL_MAX.Leave += new System.EventHandler(this.COL_MAX__Leave); + this.COL_MAX.Validating += new System.ComponentModel.CancelEventHandler(this.PWM_Validating); // // BUT_0collective // @@ -1271,22 +1276,22 @@ resources.ApplyResources(this.label26, "label26"); this.label26.Name = "label26"; // - // PIT_MAX_ + // PIT_MAX // - resources.ApplyResources(this.PIT_MAX_, "PIT_MAX_"); - this.PIT_MAX_.Name = "PIT_MAX_"; - this.PIT_MAX_.Validating += new System.ComponentModel.CancelEventHandler(this.PIT_MAX__Validating); + resources.ApplyResources(this.PIT_MAX, "PIT_MAX"); + this.PIT_MAX.Name = "PIT_MAX"; + this.PIT_MAX.Validating += new System.ComponentModel.CancelEventHandler(this.PIT_MAX__Validating); // // label25 // resources.ApplyResources(this.label25, "label25"); this.label25.Name = "label25"; // - // ROL_MAX_ + // ROL_MAX // - resources.ApplyResources(this.ROL_MAX_, "ROL_MAX_"); - this.ROL_MAX_.Name = "ROL_MAX_"; - this.ROL_MAX_.Validating += new System.ComponentModel.CancelEventHandler(this.ROL_MAX__Validating); + resources.ApplyResources(this.ROL_MAX, "ROL_MAX"); + this.ROL_MAX.Name = "ROL_MAX"; + this.ROL_MAX.Validating += new System.ComponentModel.CancelEventHandler(this.ROL_MAX__Validating); // // label23 // @@ -1320,23 +1325,23 @@ resources.ApplyResources(this.label18, "label18"); this.label18.Name = "label18"; // - // SV3_POS_ + // SV3_POS // - resources.ApplyResources(this.SV3_POS_, "SV3_POS_"); - this.SV3_POS_.Name = "SV3_POS_"; - this.SV3_POS_.Validating += new System.ComponentModel.CancelEventHandler(this.TXT_srvpos3_Validating); + resources.ApplyResources(this.SV3_POS, "SV3_POS"); + this.SV3_POS.Name = "SV3_POS"; + this.SV3_POS.Validating += new System.ComponentModel.CancelEventHandler(this.TXT_srvpos3_Validating); // - // SV2_POS_ + // SV2_POS // - resources.ApplyResources(this.SV2_POS_, "SV2_POS_"); - this.SV2_POS_.Name = "SV2_POS_"; - this.SV2_POS_.Validating += new System.ComponentModel.CancelEventHandler(this.TXT_srvpos2_Validating); + resources.ApplyResources(this.SV2_POS, "SV2_POS"); + this.SV2_POS.Name = "SV2_POS"; + this.SV2_POS.Validating += new System.ComponentModel.CancelEventHandler(this.TXT_srvpos2_Validating); // - // SV1_POS_ + // SV1_POS // - resources.ApplyResources(this.SV1_POS_, "SV1_POS_"); - this.SV1_POS_.Name = "SV1_POS_"; - this.SV1_POS_.Validating += new System.ComponentModel.CancelEventHandler(this.TXT_srvpos1_Validating); + resources.ApplyResources(this.SV1_POS, "SV1_POS"); + this.SV1_POS.Name = "SV1_POS"; + this.SV1_POS.Validating += new System.ComponentModel.CancelEventHandler(this.TXT_srvpos1_Validating); // // HS3_REV // @@ -1554,6 +1559,29 @@ this.BUT_reset.UseVisualStyleBackColor = true; this.BUT_reset.Click += new System.EventHandler(this.BUT_reset_Click); // + // CCPM + // + resources.ApplyResources(this.CCPM, "CCPM"); + this.CCPM.Name = "CCPM"; + this.CCPM.TabStop = true; + this.CCPM.UseVisualStyleBackColor = true; + // + // groupBox5 + // + this.groupBox5.Controls.Add(this.H1_ENABLE); + this.groupBox5.Controls.Add(this.CCPM); + resources.ApplyResources(this.groupBox5, "groupBox5"); + this.groupBox5.Name = "groupBox5"; + this.groupBox5.TabStop = false; + // + // H1_ENABLE + // + resources.ApplyResources(this.H1_ENABLE, "H1_ENABLE"); + this.H1_ENABLE.Name = "H1_ENABLE"; + this.H1_ENABLE.TabStop = true; + this.H1_ENABLE.UseVisualStyleBackColor = true; + this.H1_ENABLE.CheckedChanged += new System.EventHandler(this.H1_ENABLE_CheckedChanged); + // // Setup // resources.ApplyResources(this, "$this"); @@ -1599,6 +1627,8 @@ ((System.ComponentModel.ISupportInitialize)(this.HS2_TRIM)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.HS1_TRIM)).EndInit(); this.tabReset.ResumeLayout(false); + this.groupBox5.ResumeLayout(false); + this.groupBox5.PerformLayout(); this.ResumeLayout(false); } @@ -1666,9 +1696,9 @@ private System.Windows.Forms.Label label20; private System.Windows.Forms.Label label19; private System.Windows.Forms.Label label18; - private System.Windows.Forms.TextBox SV3_POS_; - private System.Windows.Forms.TextBox SV2_POS_; - private System.Windows.Forms.TextBox SV1_POS_; + private System.Windows.Forms.TextBox SV3_POS; + private System.Windows.Forms.TextBox SV2_POS; + private System.Windows.Forms.TextBox SV1_POS; private System.Windows.Forms.CheckBox HS4_REV; private System.Windows.Forms.Label label22; private System.Windows.Forms.Label label23; @@ -1676,11 +1706,11 @@ private VerticalProgressBar2 HS3; private MyButton BUT_0collective; private System.Windows.Forms.Label label25; - private System.Windows.Forms.TextBox ROL_MAX_; + private System.Windows.Forms.TextBox ROL_MAX; private System.Windows.Forms.Label label26; - private System.Windows.Forms.TextBox PIT_MAX_; - private System.Windows.Forms.TextBox GYR_GAIN_; - private System.Windows.Forms.CheckBox GYR_ENABLE_; + private System.Windows.Forms.TextBox PIT_MAX; + private System.Windows.Forms.TextBox GYR_GAIN; + private System.Windows.Forms.CheckBox GYR_ENABLE; private System.Windows.Forms.Label label28; private MyButton BUT_levelac2; private System.Windows.Forms.ToolTip toolTip1; @@ -1722,9 +1752,9 @@ private System.Windows.Forms.NumericUpDown HS4_TRIM; private System.Windows.Forms.GroupBox groupBox1; private MyButton BUT_swash_manual; - private System.Windows.Forms.TextBox COL_MIN_; - private System.Windows.Forms.TextBox COL_MID_; - private System.Windows.Forms.TextBox COL_MAX_; + private System.Windows.Forms.TextBox COL_MIN; + private System.Windows.Forms.TextBox COL_MID; + private System.Windows.Forms.TextBox COL_MAX; private System.Windows.Forms.Label label41; private System.Windows.Forms.Label label21; private MyButton BUT_HS4save; @@ -1751,6 +1781,9 @@ private System.Windows.Forms.ComboBox CMB_batmonsensortype; private System.Windows.Forms.Label label47; private System.Windows.Forms.GroupBox groupBox4; + private System.Windows.Forms.GroupBox groupBox5; + private System.Windows.Forms.RadioButton H1_ENABLE; + private System.Windows.Forms.RadioButton CCPM; } } \ No newline at end of file diff --git a/Tools/ArdupilotMegaPlanner/Setup/Setup.cs b/Tools/ArdupilotMegaPlanner/Setup/Setup.cs index 57a374d2c2..fa9c3992eb 100644 --- a/Tools/ArdupilotMegaPlanner/Setup/Setup.cs +++ b/Tools/ArdupilotMegaPlanner/Setup/Setup.cs @@ -58,8 +58,29 @@ namespace ArdupilotMega.Setup if (MainV2.cs.firmware == MainV2.Firmwares.ArduPlane) // APM { - pwm = MainV2.cs.ch8in; - LBL_flightmodepwm.Text = "8: " + MainV2.cs.ch8in.ToString(); + if (MainV2.comPort.param.ContainsKey("FLTMODE_CH")) + { + switch ((int)(float)MainV2.comPort.param["FLTMODE_CH"]) + { + case 5: + pwm = MainV2.cs.ch5in; + break; + case 6: + pwm = MainV2.cs.ch6in; + break; + case 7: + pwm = MainV2.cs.ch7in; + break; + case 8: + pwm = MainV2.cs.ch8in; + break; + default: + + break; + } + + LBL_flightmodepwm.Text = MainV2.comPort.param["FLTMODE_CH"].ToString() + ": " + pwm.ToString(); + } } if (MainV2.cs.firmware == MainV2.Firmwares.ArduCopter2) // ac2 @@ -105,8 +126,8 @@ namespace ArdupilotMega.Setup { try { - HS3.minline = int.Parse(COL_MIN_.Text); - HS3.maxline = int.Parse(COL_MAX_.Text); + HS3.minline = int.Parse(COL_MIN.Text); + HS3.maxline = int.Parse(COL_MAX.Text); HS4.maxline = int.Parse(HS4_MIN.Text); HS4.minline = int.Parse(HS4_MAX.Text); } @@ -1068,7 +1089,7 @@ namespace ArdupilotMega.Setup MainV2.comPort.setParam("COL_MID_", MainV2.cs.ch3in); - COL_MID_.Text = MainV2.comPort.param["COL_MID_"].ToString(); + COL_MID.Text = MainV2.comPort.param["COL_MID_"].ToString(); } catch { MessageBox.Show("Set COL_MID_ failed"); } } @@ -1269,26 +1290,26 @@ namespace ArdupilotMega.Setup { if (MainV2.comPort.param["HSV_MAN"].ToString() == "1") { - MainV2.comPort.setParam("COL_MIN_", int.Parse(COL_MIN_.Text)); - MainV2.comPort.setParam("COL_MAX_", int.Parse(COL_MAX_.Text)); + MainV2.comPort.setParam("COL_MIN_", int.Parse(COL_MIN.Text)); + MainV2.comPort.setParam("COL_MAX_", int.Parse(COL_MAX.Text)); MainV2.comPort.setParam("HSV_MAN", 0); // randy request - last BUT_swash_manual.Text = "Manual"; - COL_MAX_.Enabled = false; - COL_MID_.Enabled = false; - COL_MIN_.Enabled = false; + COL_MAX.Enabled = false; + COL_MID.Enabled = false; + COL_MIN.Enabled = false; BUT_0collective.Enabled = false; } else { - COL_MAX_.Text = "1500"; - COL_MIN_.Text = "1500"; + COL_MAX.Text = "1500"; + COL_MIN.Text = "1500"; MainV2.comPort.setParam("HSV_MAN", 1); // randy request BUT_swash_manual.Text = "Save"; - COL_MAX_.Enabled = true; - COL_MID_.Enabled = true; - COL_MIN_.Enabled = true; + COL_MAX.Enabled = true; + COL_MID.Enabled = true; + COL_MIN.Enabled = true; BUT_0collective.Enabled = true; } } @@ -1345,10 +1366,10 @@ namespace ArdupilotMega.Setup { try { - if (int.Parse(COL_MIN_.Text) > HS3.minline) - COL_MIN_.Text = HS3.minline.ToString(); - if (int.Parse(COL_MAX_.Text) < HS3.maxline) - COL_MAX_.Text = HS3.maxline.ToString(); + if (int.Parse(COL_MIN.Text) > HS3.minline) + COL_MIN.Text = HS3.minline.ToString(); + if (int.Parse(COL_MAX.Text) < HS3.maxline) + COL_MAX.Text = HS3.maxline.ToString(); } catch { } } @@ -1595,5 +1616,23 @@ namespace ArdupilotMega.Setup TXT_inputvoltage.Enabled = true; } } + + private void H1_ENABLE_CheckedChanged(object sender, EventArgs e) + { + if (startup) + return; + try + { + if (MainV2.comPort.param["H1_ENABLE"] == null) + { + MessageBox.Show("Not Available on " + MainV2.cs.firmware.ToString()); + } + else + { + MainV2.comPort.setParam("H1_ENABLE", ((RadioButton)sender).Checked == true ? 1 : 0); + } + } + catch { MessageBox.Show("Set H1_ENABLE Failed"); } + } } } \ No newline at end of file diff --git a/Tools/ArdupilotMegaPlanner/Setup/Setup.resx b/Tools/ArdupilotMegaPlanner/Setup/Setup.resx index 63fda6166a..6bda482d71 100644 --- a/Tools/ArdupilotMegaPlanner/Setup/Setup.resx +++ b/Tools/ArdupilotMegaPlanner/Setup/Setup.resx @@ -2629,11 +2629,92 @@ will work with hexa's etc 4 + + True + + + NoControl + + + 67, 19 + + + 39, 17 + + + 137 + + + H1 + + + H1_ENABLE + + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox5 + + + 0 + + + True + + + 6, 19 + + + 55, 17 + + + 136 + + + CCPM + + + CCPM + + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox5 + + + 1 + + + 253, 6 + + + 120, 43 + + + 137 + + + Swash Type + + + groupBox5 + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabHeli + + + 0 + NoControl - 479, 131 + 479, 169 69, 23 @@ -2654,13 +2735,13 @@ will work with hexa's etc tabHeli - 0 + 1 NoControl - 298, 40 + 298, 78 69, 23 @@ -2681,7 +2762,7 @@ will work with hexa's etc tabHeli - 1 + 2 True @@ -2743,59 +2824,59 @@ will work with hexa's etc 1 - + True - + NoControl - + 57, 19 - + 15, 14 - + 118 - - GYR_ENABLE_ + + GYR_ENABLE - + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + groupBox3 - + 2 - + 41, 35 - + 47, 20 - + 119 - + 1000 - - GYR_GAIN_ + + GYR_GAIN - + System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + groupBox3 - + 3 - 433, 271 + 433, 309 101, 63 @@ -2816,7 +2897,7 @@ will work with hexa's etc tabHeli - 2 + 3 True @@ -2825,7 +2906,7 @@ will work with hexa's etc NoControl - 532, 225 + 532, 263 27, 13 @@ -2846,7 +2927,7 @@ will work with hexa's etc tabHeli - 3 + 4 True @@ -2855,7 +2936,7 @@ will work with hexa's etc NoControl - 499, 225 + 499, 263 27, 13 @@ -2876,7 +2957,7 @@ will work with hexa's etc tabHeli - 4 + 5 True @@ -2885,7 +2966,7 @@ will work with hexa's etc NoControl - 451, 245 + 451, 283 42, 13 @@ -2906,7 +2987,7 @@ will work with hexa's etc tabHeli - 5 + 6 True @@ -3023,7 +3104,7 @@ will work with hexa's etc 3 - 433, 143 + 433, 181 169, 78 @@ -3041,7 +3122,7 @@ will work with hexa's etc tabHeli - 6 + 7 True @@ -3103,85 +3184,85 @@ will work with hexa's etc 1 - + False - + 18, 173 - + 43, 20 - + 119 - + 1500 - - COL_MIN_ + + COL_MIN - + System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + groupBox1 - + 2 - + False - + 17, 117 - + 44, 20 - + 117 - + 1500 - - COL_MID_ + + COL_MID - + System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + groupBox1 - + 3 - + False - + 18, 45 - + 43, 20 - + 115 - + 1500 - - COL_MAX_ + + COL_MAX - + System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + groupBox1 - + 4 @@ -3215,7 +3296,7 @@ will work with hexa's etc 5 - 293, 52 + 293, 90 80, 209 @@ -3233,10 +3314,10 @@ will work with hexa's etc tabHeli - 7 + 8 - 535, 241 + 535, 279 44, 20 @@ -3254,10 +3335,10 @@ will work with hexa's etc tabHeli - 8 + 9 - 122, 271 + 122, 309 44, 20 @@ -3275,10 +3356,10 @@ will work with hexa's etc tabHeli - 9 + 10 - 122, 245 + 122, 283 44, 20 @@ -3296,10 +3377,10 @@ will work with hexa's etc tabHeli - 10 + 11 - 122, 219 + 122, 257 44, 20 @@ -3317,7 +3398,7 @@ will work with hexa's etc tabHeli - 11 + 12 True @@ -3326,7 +3407,7 @@ will work with hexa's etc NoControl - 127, 206 + 127, 244 27, 13 @@ -3347,7 +3428,7 @@ will work with hexa's etc tabHeli - 12 + 13 True @@ -3356,7 +3437,7 @@ will work with hexa's etc NoControl - 98, 206 + 98, 244 27, 13 @@ -3377,7 +3458,7 @@ will work with hexa's etc tabHeli - 13 + 14 True @@ -3386,7 +3467,7 @@ will work with hexa's etc NoControl - 50, 206 + 50, 244 44, 13 @@ -3407,7 +3488,7 @@ will work with hexa's etc tabHeli - 14 + 15 True @@ -3416,7 +3497,7 @@ will work with hexa's etc NoControl - 13, 206 + 13, 244 35, 13 @@ -3437,7 +3518,7 @@ will work with hexa's etc tabHeli - 15 + 16 True @@ -3446,7 +3527,7 @@ will work with hexa's etc NoControl - 256, 345 + 256, 360 54, 13 @@ -3467,31 +3548,31 @@ will work with hexa's etc tabHeli - 16 + 17 - - 310, 342 + + 310, 357 - + 47, 20 - + 116 - + 4500 - - PIT_MAX_ + + PIT_MAX - + System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + tabHeli - - 17 + + 18 True @@ -3500,7 +3581,7 @@ will work with hexa's etc NoControl - 256, 321 + 256, 336 48, 13 @@ -3521,31 +3602,31 @@ will work with hexa's etc tabHeli - 18 + 19 - - 310, 316 + + 310, 331 - + 47, 20 - + 114 - + 4500 - - ROL_MAX_ + + ROL_MAX - + System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + tabHeli - - 19 + + 20 True @@ -3554,7 +3635,7 @@ will work with hexa's etc NoControl - 476, 23 + 476, 61 75, 13 @@ -3575,7 +3656,7 @@ will work with hexa's etc tabHeli - 20 + 21 True @@ -3584,7 +3665,7 @@ will work with hexa's etc NoControl - 232, 23 + 232, 61 72, 13 @@ -3605,7 +3686,7 @@ will work with hexa's etc tabHeli - 21 + 22 True @@ -3614,7 +3695,7 @@ will work with hexa's etc NoControl - 502, 244 + 502, 282 15, 14 @@ -3632,7 +3713,7 @@ will work with hexa's etc tabHeli - 22 + 23 True @@ -3641,7 +3722,7 @@ will work with hexa's etc NoControl - 23, 274 + 23, 312 13, 13 @@ -3662,7 +3743,7 @@ will work with hexa's etc tabHeli - 23 + 24 True @@ -3671,7 +3752,7 @@ will work with hexa's etc NoControl - 23, 248 + 23, 286 13, 13 @@ -3692,7 +3773,7 @@ will work with hexa's etc tabHeli - 24 + 25 True @@ -3701,7 +3782,7 @@ will work with hexa's etc NoControl - 23, 222 + 23, 260 13, 13 @@ -3722,80 +3803,80 @@ will work with hexa's etc tabHeli - 25 - - - 53, 271 - - - 39, 20 - - - 94 - - - 180 - - - SV3_POS_ - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabHeli - - 26 - - 53, 245 + + 53, 309 - + 39, 20 - - 93 + + 94 - - 60 + + 180 - - SV2_POS_ + + SV3_POS - + System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + tabHeli - + 27 - - 53, 219 + + 53, 283 - + 39, 20 - - 92 + + 93 - - -60 + + 60 - - SV1_POS_ + + SV2_POS - + System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + tabHeli - + 28 + + 53, 257 + + + 39, 20 + + + 92 + + + -60 + + + SV1_POS + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabHeli + + + 29 + True @@ -3803,7 +3884,7 @@ will work with hexa's etc NoControl - 101, 274 + 101, 312 15, 14 @@ -3821,7 +3902,7 @@ will work with hexa's etc tabHeli - 29 + 30 True @@ -3830,7 +3911,7 @@ will work with hexa's etc NoControl - 101, 248 + 101, 286 15, 14 @@ -3848,7 +3929,7 @@ will work with hexa's etc tabHeli - 30 + 31 True @@ -3857,7 +3938,7 @@ will work with hexa's etc NoControl - 101, 225 + 101, 263 15, 14 @@ -3875,7 +3956,7 @@ will work with hexa's etc tabHeli - 31 + 32 True @@ -3884,7 +3965,7 @@ will work with hexa's etc NoControl - 38, 23 + 38, 61 109, 13 @@ -3905,10 +3986,10 @@ will work with hexa's etc tabHeli - 32 + 33 - 392, 50 + 392, 88 242, 42 @@ -3926,10 +4007,10 @@ will work with hexa's etc tabHeli - 33 + 34 - 235, 52 + 235, 90 42, 213 @@ -3947,7 +4028,7 @@ will work with hexa's etc tabHeli - 34 + 35 Zoom @@ -3956,7 +4037,7 @@ will work with hexa's etc Microsoft Sans Serif, 9pt - 16, 50 + 16, 88 0, 0, 0, 0 @@ -3977,7 +4058,7 @@ will work with hexa's etc tabHeli - 35 + 36 4, 22 diff --git a/Tools/ArdupilotMegaPlanner/bin/Release/ArdupilotMegaPlanner.pdb b/Tools/ArdupilotMegaPlanner/bin/Release/ArdupilotMegaPlanner.pdb index 2f372e4f1d..83ab9bf5e9 100644 Binary files a/Tools/ArdupilotMegaPlanner/bin/Release/ArdupilotMegaPlanner.pdb and b/Tools/ArdupilotMegaPlanner/bin/Release/ArdupilotMegaPlanner.pdb differ