mirror of https://github.com/ArduPilot/ardupilot
parent
fb76aa9ca9
commit
3ebb27b51c
|
@ -12,6 +12,24 @@ namespace ArdupilotMega
|
|||
{
|
||||
public event ProgressEventHandler Progress;
|
||||
|
||||
public void Open()
|
||||
{
|
||||
// default dtr status is false
|
||||
base.Open();
|
||||
|
||||
// let it settle
|
||||
System.Threading.Thread.Sleep(10);
|
||||
|
||||
// pull dtr low
|
||||
this.DtrEnable = true;
|
||||
System.Threading.Thread.Sleep(1);
|
||||
// free dtr
|
||||
this.DtrEnable = false;
|
||||
System.Threading.Thread.Sleep(1);
|
||||
// pull dtr low
|
||||
this.DtrEnable = true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Used to start initial connecting after serialport.open
|
||||
/// </summary>
|
||||
|
|
|
@ -659,6 +659,8 @@ namespace ArdupilotMega.GCSViews
|
|||
}
|
||||
|
||||
private void timer1_Tick(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
// Make sure that the curvelist has at least one curve
|
||||
if (zg1.GraphPane.CurveList.Count <= 0)
|
||||
|
@ -689,14 +691,10 @@ namespace ArdupilotMega.GCSViews
|
|||
}
|
||||
|
||||
// Make sure the Y axis is rescaled to accommodate actual data
|
||||
try
|
||||
{
|
||||
zg1.AxisChange();
|
||||
}
|
||||
catch { }
|
||||
|
||||
// Force a redraw
|
||||
try
|
||||
{
|
||||
|
||||
zg1.Invalidate();
|
||||
}
|
||||
catch { }
|
||||
|
|
|
@ -281,14 +281,15 @@ namespace ArdupilotMega.GCSViews
|
|||
|
||||
{
|
||||
float result;
|
||||
float.TryParse(TXT_homealt.Text, out result);
|
||||
bool pass = float.TryParse(TXT_homealt.Text, out result);
|
||||
|
||||
if (result == 0)
|
||||
if (result == 0 || pass == false)
|
||||
{
|
||||
MessageBox.Show("You must have a home altitude");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!float.TryParse(TXT_DefaultAlt.Text, out result))
|
||||
int results1;
|
||||
if (!int.TryParse(TXT_DefaultAlt.Text, out results1))
|
||||
{
|
||||
MessageBox.Show("Your default alt is not valid");
|
||||
return;
|
||||
|
@ -2059,8 +2060,12 @@ namespace ArdupilotMega.GCSViews
|
|||
void MainMap_OnMapZoomChanged()
|
||||
{
|
||||
if (MainMap.Zoom > 0)
|
||||
{
|
||||
try
|
||||
{
|
||||
trackBar1.Value = (int)(MainMap.Zoom);
|
||||
}
|
||||
catch { }
|
||||
//textBoxZoomCurrent.Text = MainMap.Zoom.ToString();
|
||||
center.Position = MainMap.Position;
|
||||
}
|
||||
|
@ -2198,11 +2203,15 @@ namespace ArdupilotMega.GCSViews
|
|||
}
|
||||
|
||||
private void comboBoxMapType_SelectedValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
MainMap.MapType = (MapType)comboBoxMapType.SelectedItem;
|
||||
FlightData.mymap.MapType = (MapType)comboBoxMapType.SelectedItem;
|
||||
MainV2.config["MapType"] = comboBoxMapType.Text;
|
||||
}
|
||||
catch { MessageBox.Show("Map change failed. try zomming out first."); }
|
||||
}
|
||||
|
||||
private void Commands_EditingControlShowing(object sender, DataGridViewEditingControlShowingEventArgs e)
|
||||
{
|
||||
|
@ -2840,6 +2849,8 @@ namespace ArdupilotMega.GCSViews
|
|||
Commands.Rows.RemoveAt(no - 1); // home is 0
|
||||
}
|
||||
else if (int.TryParse(CurentRectMarker.InnerMarker.Tag.ToString().Replace("grid", ""), out no))
|
||||
{
|
||||
try
|
||||
{
|
||||
drawnpolygon.Points.RemoveAt(no - 1);
|
||||
drawnpolygons.Markers.Clear();
|
||||
|
@ -2854,7 +2865,10 @@ namespace ArdupilotMega.GCSViews
|
|||
MainMap.UpdatePolygonLocalPosition(drawnpolygon);
|
||||
|
||||
MainMap.Invalidate();
|
||||
|
||||
}
|
||||
catch {
|
||||
MessageBox.Show("Remove point Failed. Please try again.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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.33")]
|
||||
[assembly: AssemblyFileVersion("1.1.34")]
|
||||
[assembly: NeutralResourcesLanguageAttribute("")]
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue