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