diff --git a/Tools/ArdupilotMegaPlanner/GCSViews/Configuration.cs b/Tools/ArdupilotMegaPlanner/GCSViews/Configuration.cs index a96b29a136..ecd2272dec 100644 --- a/Tools/ArdupilotMegaPlanner/GCSViews/Configuration.cs +++ b/Tools/ArdupilotMegaPlanner/GCSViews/Configuration.cs @@ -805,7 +805,14 @@ namespace ArdupilotMega.GCSViews // Add the video device hr = m_FilterGraph.AddSourceFilterForMoniker(capDevices[CMB_videosources.SelectedIndex].Mon, null, "Video input", out capFilter); - DsError.ThrowExceptionForHR(hr); + try + { + DsError.ThrowExceptionForHR(hr); + } + catch (Exception ex) { + MessageBox.Show("Can not add video source\n" + ex.ToString()); + return; + } // Find the stream config interface hr = capGraph.FindInterface(PinCategory.Capture, MediaType.Video, capFilter, typeof(IAMStreamConfig).GUID, out o); diff --git a/Tools/ArdupilotMegaPlanner/GCSViews/FlightPlanner.cs b/Tools/ArdupilotMegaPlanner/GCSViews/FlightPlanner.cs index aaa6713bb9..0416c5ea3a 100644 --- a/Tools/ArdupilotMegaPlanner/GCSViews/FlightPlanner.cs +++ b/Tools/ArdupilotMegaPlanner/GCSViews/FlightPlanner.cs @@ -279,8 +279,6 @@ namespace ArdupilotMega.GCSViews { cell = Commands.Rows[selectedrow].Cells[Alt.Index] as DataGridViewTextBoxCell; - cell.Value = TXT_DefaultAlt.Text; - { float result; float.TryParse(TXT_homealt.Text, out result); @@ -297,6 +295,8 @@ namespace ArdupilotMega.GCSViews } } + cell.Value = TXT_DefaultAlt.Text; + float ans; if (float.TryParse(cell.Value.ToString(), out ans)) { diff --git a/Tools/ArdupilotMegaPlanner/Properties/AssemblyInfo.cs b/Tools/ArdupilotMegaPlanner/Properties/AssemblyInfo.cs index f2c19f4cac..27fdeb3d7c 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.0.0.0")] -[assembly: AssemblyFileVersion("1.1.32")] +[assembly: AssemblyFileVersion("1.1.33")] [assembly: NeutralResourcesLanguageAttribute("")] diff --git a/Tools/ArdupilotMegaPlanner/ResEdit.cs b/Tools/ArdupilotMegaPlanner/ResEdit.cs index bac3c95552..40e7eed05b 100644 --- a/Tools/ArdupilotMegaPlanner/ResEdit.cs +++ b/Tools/ArdupilotMegaPlanner/ResEdit.cs @@ -196,6 +196,12 @@ namespace resedit private void button3_Click(object sender, EventArgs e) { + if (!File.Exists("translation/output.html")) + { + MessageBox.Show("No existing translation has been done"); + return; + } + StreamReader sr1 = new StreamReader("translation/output.html"); string file = sr1.ReadToEnd(); diff --git a/Tools/ArdupilotMegaPlanner/Setup/Setup.cs b/Tools/ArdupilotMegaPlanner/Setup/Setup.cs index e74335d23a..0dc82864d9 100644 --- a/Tools/ArdupilotMegaPlanner/Setup/Setup.cs +++ b/Tools/ArdupilotMegaPlanner/Setup/Setup.cs @@ -800,13 +800,18 @@ namespace ArdupilotMega.Setup { if (startup || ((TextBox)sender).Enabled == false) return; - float measuredvoltage = float.Parse(TXT_measuredvoltage.Text); - float voltage = float.Parse(TXT_voltage.Text); - float divider = float.Parse(TXT_divider.Text); - if (voltage == 0) - return; - float new_divider = (measuredvoltage * divider) / voltage; - TXT_divider.Text = new_divider.ToString(); + try + { + float measuredvoltage = float.Parse(TXT_measuredvoltage.Text); + float voltage = float.Parse(TXT_voltage.Text); + float divider = float.Parse(TXT_divider.Text); + if (voltage == 0) + return; + float new_divider = (measuredvoltage * divider) / voltage; + TXT_divider.Text = new_divider.ToString(); + } + catch { MessageBox.Show("Invalid number entered"); return; } + try { if (MainV2.comPort.param["VOLT_DIVIDER"] == null) diff --git a/Tools/ArdupilotMegaPlanner/bin/Release/ArdupilotMegaPlanner.pdb b/Tools/ArdupilotMegaPlanner/bin/Release/ArdupilotMegaPlanner.pdb index 2bf33a5851..300211a45b 100644 Binary files a/Tools/ArdupilotMegaPlanner/bin/Release/ArdupilotMegaPlanner.pdb and b/Tools/ArdupilotMegaPlanner/bin/Release/ArdupilotMegaPlanner.pdb differ diff --git a/Tools/ArdupilotMegaPlanner/bin/Release/dataflashlog.xml b/Tools/ArdupilotMegaPlanner/bin/Release/dataflashlog.xml index 658471c37b..c579e07f98 100644 --- a/Tools/ArdupilotMegaPlanner/bin/Release/dataflashlog.xml +++ b/Tools/ArdupilotMegaPlanner/bin/Release/dataflashlog.xml @@ -13,12 +13,12 @@ CRS - Roll - Pitch - Yaw - CH1 out - CH2 out - CH4 out + Roll IN + Roll + Pitch IN + Pitch + Yaw IN + Yaw WP Dist @@ -27,26 +27,23 @@ Lat Err nav lon nav lat - nav lon I - nav lat I - Loiter Lon I - Loiter Lat I + X Speed + Y Speed + nav lon I + nav lat I - Roll IN - Pitch IN - Thr IN - Yaw IN - Sonar Alt - Baro Alt - Next WP Alt - Nav Throttle - Angle boost - Manual boost - Climb Rate - rc3 servo out - alt hold int - Thr int + Thr IN + Sonar Alt + Baro Alt + WP Alt + Nav Throttle + Angle boost + Manual boost + Climb Rate + rc3 servo out + alt hold int + Thr int Perf Timer @@ -65,8 +62,8 @@ Accel Z - Throttle in - Throttle intergrator + Thr IN + Thr int Voltage Current Current total @@ -76,8 +73,22 @@ Current # ID options - + p1 + Alt + Lat + Long + + X raw + Y raw + SurfaceQual + X cm + Y cm + Lat + Long + Roll Cmd + Pitch Cmd + FlightMode Thr Cruise diff --git a/Tools/ArdupilotMegaPlanner/dataflashlog.xml b/Tools/ArdupilotMegaPlanner/dataflashlog.xml index 658471c37b..c579e07f98 100644 --- a/Tools/ArdupilotMegaPlanner/dataflashlog.xml +++ b/Tools/ArdupilotMegaPlanner/dataflashlog.xml @@ -13,12 +13,12 @@ CRS - Roll - Pitch - Yaw - CH1 out - CH2 out - CH4 out + Roll IN + Roll + Pitch IN + Pitch + Yaw IN + Yaw WP Dist @@ -27,26 +27,23 @@ Lat Err nav lon nav lat - nav lon I - nav lat I - Loiter Lon I - Loiter Lat I + X Speed + Y Speed + nav lon I + nav lat I - Roll IN - Pitch IN - Thr IN - Yaw IN - Sonar Alt - Baro Alt - Next WP Alt - Nav Throttle - Angle boost - Manual boost - Climb Rate - rc3 servo out - alt hold int - Thr int + Thr IN + Sonar Alt + Baro Alt + WP Alt + Nav Throttle + Angle boost + Manual boost + Climb Rate + rc3 servo out + alt hold int + Thr int Perf Timer @@ -65,8 +62,8 @@ Accel Z - Throttle in - Throttle intergrator + Thr IN + Thr int Voltage Current Current total @@ -76,8 +73,22 @@ Current # ID options - + p1 + Alt + Lat + Long + + X raw + Y raw + SurfaceQual + X cm + Y cm + Lat + Long + Roll Cmd + Pitch Cmd + FlightMode Thr Cruise