Mission Planner 1.2.24

failsafe: hide element not needed
ap_limits back - beta
add new accel setup - beta
fix planner config screen exception
fix quickview desc/units if never been configured
This commit is contained in:
Michael Oborne committed 2012-11-29 16:52:34 +08:00
1 parent 68aa5e4682
commit 547f154ba8
20 files changed
+1814 -2113

No files matched your search

@@ -46,6 +46,7 @@ namespace ArdupilotMega.Controls
if (paramlist.ContainsKey(paramname))
{
this.Enabled = true;
this.Visible = true;
if ((float)paramlist[paramname] == OnValue)
{
@@ -122,6 +122,7 @@ namespace ArdupilotMega
[DisplayText("Turn Radius (dist)")]
public float radius { get { if (groundspeed <= 1) return 0; return ((groundspeed * groundspeed)/(float)(9.8f*Math.Tan(roll * deg2rad))); } }
[DisplayText("RX Rssi")]
public float rxrssi { get; set; }
//radio
public float ch1in { get; set; }
@@ -231,6 +232,7 @@ namespace ArdupilotMega
PointLatLngAlt _trackerloc = new PointLatLngAlt();
internal PointLatLngAlt TrackerLocation { get { if (_trackerloc.Lng != 0) return _trackerloc; return HomeLocation; } set { _trackerloc = value; } }
[DisplayText("Distance to Mav (dist)")]
public float DistToMAV
{
get
@@ -30,7 +30,7 @@
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ConfigAP_Limits));
this.LNK_wiki = new System.Windows.Forms.LinkLabel();
this.LIM_ENABLED = new Controls.MavlinkCheckBox();
this.LIM_ENABLED = new System.Windows.Forms.CheckBox();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.textBox1 = new System.Windows.Forms.TextBox();
this.groupBox5 = new System.Windows.Forms.GroupBox();
@@ -43,7 +43,7 @@
this.LIM_CHANNEL = new System.Windows.Forms.NumericUpDown();
this.myLabel3 = new ArdupilotMega.Controls.MyLabel();
this.LIM_FNC_RAD = new System.Windows.Forms.NumericUpDown();
this.LIM_FNC_SMPL = new Controls.MavlinkCheckBox();
this.LIM_FNC_SMPL = new System.Windows.Forms.CheckBox();
this.groupBox3 = new System.Windows.Forms.GroupBox();
this.LIM_GPSLCK_ON = new System.Windows.Forms.CheckBox();
this.groupBox2 = new System.Windows.Forms.GroupBox();
@@ -281,7 +281,7 @@
#endregion
private System.Windows.Forms.LinkLabel LNK_wiki;
private Controls.MavlinkCheckBox LIM_ENABLED;
private System.Windows.Forms.CheckBox LIM_ENABLED;
private System.Windows.Forms.GroupBox groupBox1;
private Controls.MyLabel myLabel2;
private Controls.MyLabel myLabel1;
@@ -294,7 +294,7 @@
private System.Windows.Forms.GroupBox groupBox4;
private Controls.MyLabel myLabel3;
private System.Windows.Forms.NumericUpDown LIM_FNC_RAD;
private Controls.MavlinkCheckBox LIM_FNC_SMPL;
private System.Windows.Forms.CheckBox LIM_FNC_SMPL;
private Controls.MyLabel myLabel4;
private System.Windows.Forms.NumericUpDown LIM_CHANNEL;
private System.Windows.Forms.CheckBox LIM_REQUIRED;
@@ -98,6 +98,7 @@ namespace ArdupilotMega.GCSViews.ConfigurationView
else if (ctls[0].GetType() == typeof(NumericUpDown))
{
NumericUpDown nud = ((NumericUpDown)ctls[0]);
Console.WriteLine(nud.Name + " " + copy[key]);
nud.Value = (decimal)(float)copy[key];
nud.Enabled = true;
}
@@ -37,12 +37,14 @@ namespace ArdupilotMega.GCSViews.ConfigurationView
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.lbl_Accel_user = new System.Windows.Forms.Label();
this.BUT_calib_accell = new ArdupilotMega.Controls.MyButton();
this.lineSeparator2 = new ArdupilotMega.Controls.LineSeparator();
this.lineSeparator3 = new ArdupilotMega.Controls.LineSeparator();
this.pictureBoxPlus = new ArdupilotMega.Controls.PictureBoxWithPseudoOpacity();
this.pictureBoxX = new ArdupilotMega.Controls.PictureBoxWithPseudoOpacity();
this.BUT_levelac2 = new ArdupilotMega.Controls.MyButton();
this.label4 = new System.Windows.Forms.Label();
this.lineSeparator3 = new ArdupilotMega.Controls.LineSeparator();
this.lineSeparator2 = new ArdupilotMega.Controls.LineSeparator();
((System.ComponentModel.ISupportInitialize)(this.pictureBoxPlus)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBoxX)).BeginInit();
this.SuspendLayout();
@@ -85,6 +87,47 @@ namespace ArdupilotMega.GCSViews.ConfigurationView
resources.ApplyResources(this.label3, "label3");
this.label3.Name = "label3";
//
// label4
//
resources.ApplyResources(this.label4, "label4");
this.label4.Name = "label4";
//
// lbl_Accel_user
//
resources.ApplyResources(this.lbl_Accel_user, "lbl_Accel_user");
this.lbl_Accel_user.Name = "lbl_Accel_user";
//
// BUT_calib_accell
//
resources.ApplyResources(this.BUT_calib_accell, "BUT_calib_accell");
this.BUT_calib_accell.Name = "BUT_calib_accell";
this.BUT_calib_accell.UseVisualStyleBackColor = true;
this.BUT_calib_accell.Click += new System.EventHandler(this.BUT_calib_accell_Click);
//
// lineSeparator2
//
resources.ApplyResources(this.lineSeparator2, "lineSeparator2");
this.lineSeparator2.MaximumSize = new System.Drawing.Size(2000, 2);
this.lineSeparator2.MinimumSize = new System.Drawing.Size(0, 2);
this.lineSeparator2.Name = "lineSeparator2";
this.lineSeparator2.Opacity1 = 0.6F;
this.lineSeparator2.Opacity2 = 0.7F;
this.lineSeparator2.Opacity3 = 0.1F;
this.lineSeparator2.PrimaryColor = System.Drawing.Color.Black;
this.lineSeparator2.SecondaryColor = System.Drawing.Color.Gainsboro;
//
// lineSeparator3
//
resources.ApplyResources(this.lineSeparator3, "lineSeparator3");
this.lineSeparator3.MaximumSize = new System.Drawing.Size(2000, 2);
this.lineSeparator3.MinimumSize = new System.Drawing.Size(0, 2);
this.lineSeparator3.Name = "lineSeparator3";
this.lineSeparator3.Opacity1 = 0.6F;
this.lineSeparator3.Opacity2 = 0.7F;
this.lineSeparator3.Opacity3 = 0.1F;
this.lineSeparator3.PrimaryColor = System.Drawing.Color.Black;
this.lineSeparator3.SecondaryColor = System.Drawing.Color.Gainsboro;
//
// pictureBoxPlus
//
this.pictureBoxPlus.Cursor = System.Windows.Forms.Cursors.Hand;
@@ -110,39 +153,12 @@ namespace ArdupilotMega.GCSViews.ConfigurationView
this.BUT_levelac2.UseVisualStyleBackColor = true;
this.BUT_levelac2.Click += new System.EventHandler(this.BUT_levelac2_Click);
//
// label4
//
resources.ApplyResources(this.label4, "label4");
this.label4.Name = "label4";
//
// lineSeparator3
//
resources.ApplyResources(this.lineSeparator3, "lineSeparator3");
this.lineSeparator3.MaximumSize = new System.Drawing.Size(2000, 2);
this.lineSeparator3.MinimumSize = new System.Drawing.Size(0, 2);
this.lineSeparator3.Name = "lineSeparator3";
this.lineSeparator3.Opacity1 = 0.6F;
this.lineSeparator3.Opacity2 = 0.7F;
this.lineSeparator3.Opacity3 = 0.1F;
this.lineSeparator3.PrimaryColor = System.Drawing.Color.Black;
this.lineSeparator3.SecondaryColor = System.Drawing.Color.Gainsboro;
//
// lineSeparator2
//
resources.ApplyResources(this.lineSeparator2, "lineSeparator2");
this.lineSeparator2.MaximumSize = new System.Drawing.Size(2000, 2);
this.lineSeparator2.MinimumSize = new System.Drawing.Size(0, 2);
this.lineSeparator2.Name = "lineSeparator2";
this.lineSeparator2.Opacity1 = 0.6F;
this.lineSeparator2.Opacity2 = 0.7F;
this.lineSeparator2.Opacity3 = 0.1F;
this.lineSeparator2.PrimaryColor = System.Drawing.Color.Black;
this.lineSeparator2.SecondaryColor = System.Drawing.Color.Gainsboro;
//
// ConfigAccelerometerCalibrationQuad
//
resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.lbl_Accel_user);
this.Controls.Add(this.BUT_calib_accell);
this.Controls.Add(this.lineSeparator2);
this.Controls.Add(this.lineSeparator3);
this.Controls.Add(this.label4);
@@ -177,5 +193,7 @@ namespace ArdupilotMega.GCSViews.ConfigurationView
private System.Windows.Forms.Label label4;
private LineSeparator lineSeparator3;
private LineSeparator lineSeparator2;
private MyButton BUT_calib_accell;
private System.Windows.Forms.Label lbl_Accel_user;
}
}
@@ -24,7 +24,7 @@ namespace ArdupilotMega.GCSViews.ConfigurationView
try
{
Log.Info("Sending level command (mavlink 1.0)");
MainV2.comPort.doCommand(MAVLink.MAV_CMD.PREFLIGHT_CALIBRATION,1,0,0,0,1,0,0);
MainV2.comPort.doCommand(MAVLink.MAV_CMD.PREFLIGHT_CALIBRATION,1,0,0,0,0,0,0);
BUT_levelac2.Text = "Complete";
}
@@ -103,8 +103,9 @@ namespace ArdupilotMega.GCSViews.ConfigurationView
public void Deactivate()
{
radioButton_Plus.CheckedChanged -= RadioButtonPlusCheckedChanged;
MainV2.giveComport = false;
radioButton_Plus.CheckedChanged -= RadioButtonPlusCheckedChanged;
}
void RadioButtonPlusCheckedChanged(object sender, EventArgs e)
@@ -114,5 +115,63 @@ namespace ArdupilotMega.GCSViews.ConfigurationView
else
SetPlus();
}
private void BUT_calib_accell_Click(object sender, EventArgs e)
{
if (MainV2.giveComport == true)
{
MainV2.comPort.BaseStream.WriteLine("");
return;
}
try
{
Log.Info("Sending accel command (mavlink 1.0)");
MainV2.giveComport = true;
MainV2.comPort.doCommand(MAVLink.MAV_CMD.PREFLIGHT_CALIBRATION, 0, 0, 0, 0, 1, 0, 0);
//MainV2.giveComport = false;
System.Threading.ThreadPool.QueueUserWorkItem(readmessage,this);
BUT_calib_accell.Text = "Click When Done";
}
catch (Exception ex)
{
MainV2.giveComport = false;
Log.Error("Exception on level", ex);
CustomMessageBox.Show("Failed to level : ac2 2.0.37+ is required");
}
}
static void readmessage(object item)
{
ConfigAccelerometerCalibrationQuad local = (ConfigAccelerometerCalibrationQuad)item;
while (!(MainV2.cs.message.Contains("Calibration successful") || MainV2.cs.message.Contains("Calibration failed")))
{
System.Threading.Thread.Sleep(10);
// read the message
MainV2.comPort.readPacket();
// update cs with the message
MainV2.cs.UpdateCurrentSettings(null);
// update user display
local.UpdateUserMessage();
}
MainV2.giveComport = false;
local.Invoke((MethodInvoker)delegate()
{
local.BUT_calib_accell.Text = "Done";
});
}
public void UpdateUserMessage()
{
this.Invoke((MethodInvoker)delegate()
{
lbl_Accel_user.Text = MainV2.cs.message;
});
}
}
}
@@ -136,7 +136,7 @@
//
// CMB_batmonsensortype
//
this.CMB_batmonsensortype.DropDownWidth = 150;
this.CMB_batmonsensortype.DropDownWidth = 200;
this.CMB_batmonsensortype.FormattingEnabled = true;
this.CMB_batmonsensortype.Items.AddRange(new object[] {
resources.GetString("CMB_batmonsensortype.Items"),
@@ -172,6 +172,7 @@
//
// CMB_batmontype
//
this.CMB_batmontype.DropDownWidth = 200;
this.CMB_batmontype.FormattingEnabled = true;
this.CMB_batmontype.Items.AddRange(new object[] {
resources.GetString("CMB_batmontype.Items"),
@@ -197,6 +198,7 @@
//
// CMB_apmversion
//
this.CMB_apmversion.DropDownWidth = 200;
this.CMB_apmversion.FormattingEnabled = true;
this.CMB_apmversion.Items.AddRange(new object[] {
resources.GetString("CMB_apmversion.Items"),
@@ -616,7 +616,7 @@ Then subtract 0.3v from that value and enter it in field #1 at left.
<value>3: Battery Volts</value>
</data>
<data name="CMB_batmontype.Items2" xml:space="preserve">
<value>4: Volts &amp; Current</value>
<value>4: Voltage and Current</value>
</data>
<data name="CMB_batmontype.Location" type="System.Drawing.Point, System.Drawing">
<value>160, 41</value>
@@ -676,7 +676,7 @@ Then subtract 0.3v from that value and enter it in field #1 at left.
<value>1: APM2 - 2.5 non 3DR</value>
</data>
<data name="CMB_apmversion.Items2" xml:space="preserve">
<value>2: APM2.5 3DR IV</value>
<value>2: APM2.5 - 3DR Power Module</value>
</data>
<data name="CMB_apmversion.Location" type="System.Drawing.Point, System.Drawing">
<value>160, 95</value>
@@ -36,13 +36,14 @@
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.mavlinkCheckBoxthr_fs = new ArdupilotMega.Controls.MavlinkCheckBox();
this.mavlinkNumericUpDownthr_fs_value = new ArdupilotMega.Controls.MavlinkNumericUpDown();
this.mavlinkCheckBoxthr_fs_action = new ArdupilotMega.Controls.MavlinkCheckBox();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.PNL_thr_fs_value = new System.Windows.Forms.Panel();
this.label3 = new System.Windows.Forms.Label();
this.lbl_armed = new System.Windows.Forms.Label();
this.lbl_gpslock = new System.Windows.Forms.Label();
@@ -62,9 +63,11 @@
this.horizontalProgressBar3 = new ArdupilotMega.HorizontalProgressBar();
this.horizontalProgressBar2 = new ArdupilotMega.HorizontalProgressBar();
this.horizontalProgressBar1 = new ArdupilotMega.HorizontalProgressBar();
this.mavlinkCheckBoxfs_batt_enable = new ArdupilotMega.Controls.MavlinkCheckBox();
((System.ComponentModel.ISupportInitialize)(this.currentStateBindingSource)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.mavlinkNumericUpDownthr_fs_value)).BeginInit();
this.groupBox1.SuspendLayout();
this.PNL_thr_fs_value.SuspendLayout();
this.SuspendLayout();
//
// label2
@@ -103,38 +106,6 @@
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");
@@ -168,19 +139,58 @@
this.toolTip1.SetToolTip(this.mavlinkCheckBoxshort_fs, resources.GetString("mavlinkCheckBoxshort_fs.ToolTip"));
this.mavlinkCheckBoxshort_fs.UseVisualStyleBackColor = true;
//
// 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"));
//
// 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.mavlinkCheckBoxfs_batt_enable);
this.groupBox1.Controls.Add(this.mavlinkCheckBoxlong_fs);
this.groupBox1.Controls.Add(this.mavlinkCheckBoxgcs_fs);
this.groupBox1.Controls.Add(this.mavlinkCheckBoxshort_fs);
this.groupBox1.Controls.Add(this.mavlinkCheckBoxgcs_fs);
this.groupBox1.Controls.Add(this.mavlinkCheckBoxthr_fs_action);
this.groupBox1.Controls.Add(this.PNL_thr_fs_value);
this.groupBox1.Controls.Add(this.mavlinkCheckBoxthr_fs);
resources.ApplyResources(this.groupBox1, "groupBox1");
this.groupBox1.Name = "groupBox1";
this.groupBox1.TabStop = false;
//
// PNL_thr_fs_value
//
this.PNL_thr_fs_value.Controls.Add(this.mavlinkNumericUpDownthr_fs_value);
this.PNL_thr_fs_value.Controls.Add(this.label3);
resources.ApplyResources(this.PNL_thr_fs_value, "PNL_thr_fs_value");
this.PNL_thr_fs_value.Name = "PNL_thr_fs_value";
//
// label3
//
resources.ApplyResources(this.label3, "label3");
@@ -424,6 +434,16 @@
this.horizontalProgressBar1.Step = 1;
this.horizontalProgressBar1.Style = System.Windows.Forms.ProgressBarStyle.Continuous;
//
// mavlinkCheckBoxfs_batt_enable
//
resources.ApplyResources(this.mavlinkCheckBoxfs_batt_enable, "mavlinkCheckBoxfs_batt_enable");
this.mavlinkCheckBoxfs_batt_enable.Name = "mavlinkCheckBoxfs_batt_enable";
this.mavlinkCheckBoxfs_batt_enable.OffValue = 0F;
this.mavlinkCheckBoxfs_batt_enable.OnValue = 1F;
this.mavlinkCheckBoxfs_batt_enable.param = null;
this.mavlinkCheckBoxfs_batt_enable.ParamName = null;
this.mavlinkCheckBoxfs_batt_enable.UseVisualStyleBackColor = true;
//
// ConfigFailSafe
//
resources.ApplyResources(this, "$this");
@@ -456,6 +476,8 @@
((System.ComponentModel.ISupportInitialize)(this.mavlinkNumericUpDownthr_fs_value)).EndInit();
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.PNL_thr_fs_value.ResumeLayout(false);
this.PNL_thr_fs_value.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
@@ -495,5 +517,7 @@
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label lbl_armed;
private System.Windows.Forms.Label lbl_gpslock;
private System.Windows.Forms.Panel PNL_thr_fs_value;
private Controls.MavlinkCheckBox mavlinkCheckBoxfs_batt_enable;
}
}
@@ -42,6 +42,10 @@ namespace ArdupilotMega.GCSViews.ConfigurationView
public void Activate()
{
// arducopter
mavlinkCheckBoxfs_batt_enable.setup(1, 0, "FS_BATT_ENABLE", MainV2.comPort.param);
// plane
mavlinkCheckBoxthr_fs.setup(1, 0, "THR_FAILSAFE", MainV2.comPort.param, mavlinkNumericUpDownthr_fs_value);
mavlinkNumericUpDownthr_fs_value.setup(800, 1200, 1, 1, "THR_FS_VALUE", MainV2.comPort.param);
mavlinkCheckBoxthr_fs_action.setup(1, 0, "THR_FS_ACTION",MainV2.comPort.param);
File diff suppressed because it is too large. Load diff
@@ -518,7 +518,11 @@ namespace ArdupilotMega.GCSViews.ConfigurationView
{
if (currentUiCulture.IsChildOf(_languages[i]))
{
CMB_language.SelectedIndex = i;
try
{
CMB_language.SelectedIndex = i;
}
catch { }
break;
}
}
@@ -565,7 +569,11 @@ namespace ArdupilotMega.GCSViews.ConfigurationView
//set hud color state
string hudcolor = (string)MainV2.config["hudcolor"];
int index = CMB_osdcolor.Items.IndexOf(hudcolor ?? "White");
CMB_osdcolor.SelectedIndex = index;
try
{
CMB_osdcolor.SelectedIndex = index;
}
catch { }
if (MainV2.config["distunits"] != null)
+6 -6
View File
@@ -8,8 +8,8 @@
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FlightData));
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
this.contextMenuStripMap = new System.Windows.Forms.ContextMenuStrip(this.components);
this.goHereToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.flyToHereAltToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
@@ -1293,8 +1293,8 @@
//
// dataGridViewImageColumn1
//
dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
this.dataGridViewImageColumn1.DefaultCellStyle = dataGridViewCellStyle7;
dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
this.dataGridViewImageColumn1.DefaultCellStyle = dataGridViewCellStyle1;
resources.ApplyResources(this.dataGridViewImageColumn1, "dataGridViewImageColumn1");
this.dataGridViewImageColumn1.Image = global::ArdupilotMega.Properties.Resources.up;
this.dataGridViewImageColumn1.ImageLayout = System.Windows.Forms.DataGridViewImageCellLayout.Stretch;
@@ -1302,8 +1302,8 @@
//
// dataGridViewImageColumn2
//
dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
this.dataGridViewImageColumn2.DefaultCellStyle = dataGridViewCellStyle8;
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
this.dataGridViewImageColumn2.DefaultCellStyle = dataGridViewCellStyle2;
resources.ApplyResources(this.dataGridViewImageColumn2, "dataGridViewImageColumn2");
this.dataGridViewImageColumn2.Image = global::ArdupilotMega.Properties.Resources.down;
this.dataGridViewImageColumn2.ImageLayout = System.Windows.Forms.DataGridViewImageCellLayout.Stretch;
@@ -343,6 +343,19 @@ namespace ArdupilotMega.GCSViews
((QuickView)ctls[0]).DataBindings.Add(new System.Windows.Forms.Binding("number", this.bindingSource1, MainV2.config["quickView" + f].ToString(), true));
}
}
else
{
// if no config, update description on predefined
try
{
Control[] ctls = this.Controls.Find("quickView" + f, true);
if (ctls.Length > 0)
{
((QuickView)ctls[0]).desc = MainV2.cs.GetNameandUnit(((QuickView)ctls[0]).desc);
}
}
catch { }
}
}
if (MainV2.comPort.param.ContainsKey("BATT_MONITOR") && (float)MainV2.comPort.param["BATT_MONITOR"] != 0)
File diff suppressed because it is too large. Load diff
+4 -4
View File
@@ -63,7 +63,7 @@ namespace ArdupilotMega
/// </summary>
public static bool MONO = false;
/// <summary>
/// speech engein enable
/// speech engine enable
/// </summary>
public static bool speechEnable = false;
/// <summary>
@@ -75,7 +75,7 @@ namespace ArdupilotMega
/// </summary>
public static Joystick joystick = null;
/// <summary>
/// track last joystick packet sent. used to track timming
/// track last joystick packet sent. used to control rate
/// </summary>
DateTime lastjoystick = DateTime.Now;
/// <summary>
@@ -91,7 +91,7 @@ namespace ArdupilotMega
/// </summary>
bool serialThread = false;
/// <summary>
/// used for mini https server for websockets/mjpeg video stream, and network link kmls
/// used for mini http server for websockets/mjpeg video stream, and network link kmls
/// </summary>
private TcpListener listener;
/// <summary>
@@ -2340,7 +2340,7 @@ namespace ArdupilotMega
private void MainMenu_MouseLeave(object sender, EventArgs e)
{
if (Control.MousePosition.Y < MainMenu.Bottom)
if (_connectionControl.PointToClient(Control.MousePosition).Y < MainMenu.Height)
return;
this.SuspendLayout();
+10 -3
View File
@@ -1069,12 +1069,19 @@ namespace ArdupilotMega
int timeout = 2000;
// imu calib take a little while
if (actionid == MAV_CMD.PREFLIGHT_CALIBRATION)
if (actionid == MAV_CMD.PREFLIGHT_CALIBRATION && p5 == 1)
{
// this is for advanced accel offsets, and blocks execution
return true;
} else if (actionid == MAV_CMD.PREFLIGHT_CALIBRATION)
{
retrys = 1;
timeout = 25000;
} else if (actionid == MAV_CMD.PREFLIGHT_REBOOT_SHUTDOWN) {
}
else if (actionid == MAV_CMD.PREFLIGHT_REBOOT_SHUTDOWN)
{
generatePacket(MAVLINK_MSG_ID_COMMAND_LONG, req);
MainV2.giveComport = false;
return true;
}
@@ -2785,7 +2792,7 @@ namespace ArdupilotMega
return temp;
}
public static bool translateMode(string modein, ref MAVLink.mavlink_set_mode_t mode)
public bool translateMode(string modein, ref MAVLink.mavlink_set_mode_t mode)
{
//MAVLink09.mavlink_set_mode_t mode = new MAVLink09.mavlink_set_mode_t();
mode.target_system = MainV2.comPort.sysid;
@@ -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.23")]
[assembly: AssemblyFileVersion("1.2.24")]
[assembly: NeutralResourcesLanguageAttribute("")]
+4 -4
View File
@@ -28,7 +28,7 @@
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SerialOutput));
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SerialOutput2));
this.CMB_serialport = new System.Windows.Forms.ComboBox();
this.BUT_connect = new ArdupilotMega.Controls.MyButton();
this.CMB_baudrate = new System.Windows.Forms.ComboBox();
@@ -71,7 +71,7 @@
this.CMB_baudrate.Size = new System.Drawing.Size(121, 21);
this.CMB_baudrate.TabIndex = 2;
//
// SerialOutput
// SerialOutput2
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
@@ -80,8 +80,8 @@
this.Controls.Add(this.BUT_connect);
this.Controls.Add(this.CMB_serialport);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "SerialOutput";
this.Text = "SerialOutput";
this.Name = "SerialOutput2";
this.Text = "SerialOutput - Microdrone";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.SerialOutput_FormClosing);
this.ResumeLayout(false);