Browse Source

APM Planner 1.1.10

fix log crash
master
Michael Oborne 13 years ago
parent
commit
1ed7c48de4
  1. 2
      Tools/ArdupilotMegaPlanner/GCSViews/FlightData.cs
  2. 8
      Tools/ArdupilotMegaPlanner/GCSViews/FlightPlanner.cs
  3. 1
      Tools/ArdupilotMegaPlanner/GCSViews/Simulation.cs
  4. 12
      Tools/ArdupilotMegaPlanner/Log.cs
  5. 4
      Tools/ArdupilotMegaPlanner/MAVLink.cs
  6. 2
      Tools/ArdupilotMegaPlanner/Properties/AssemblyInfo.cs

2
Tools/ArdupilotMegaPlanner/GCSViews/FlightData.cs

@ -256,7 +256,7 @@ namespace ArdupilotMega.GCSViews @@ -256,7 +256,7 @@ namespace ArdupilotMega.GCSViews
// re-request servo data
if (!(lastdata.AddSeconds(8) > DateTime.Now) && comPort.BaseStream.IsOpen)
{
Console.WriteLine("REQ streams - flightdata");
//Console.WriteLine("REQ streams - flightdata");
try
{
//System.Threading.Thread.Sleep(1000);

8
Tools/ArdupilotMegaPlanner/GCSViews/FlightPlanner.cs

@ -2863,7 +2863,7 @@ namespace ArdupilotMega.GCSViews @@ -2863,7 +2863,7 @@ namespace ArdupilotMega.GCSViews
private void panelMap_Resize(object sender, EventArgs e)
{
// this is a mono fix for the zoom bar
Console.WriteLine("panelmap "+panelMap.Size.ToString());
//Console.WriteLine("panelmap "+panelMap.Size.ToString());
MainMap.Size = new Size(panelMap.Size.Width - 50,panelMap.Size.Height);
trackBar1.Location = new System.Drawing.Point(panelMap.Size.Width - 50,trackBar1.Location.Y);
trackBar1.Size = new System.Drawing.Size(trackBar1.Size.Width, panelMap.Size.Height - trackBar1.Location.Y);
@ -2968,6 +2968,12 @@ namespace ArdupilotMega.GCSViews @@ -2968,6 +2968,12 @@ namespace ArdupilotMega.GCSViews
if (MainV2.comPort.param["FENCE_ACTION"].ToString() != "0")
MainV2.comPort.setParam("FENCE_ACTION", 0);
if (drawnpolygon == null)
{
MessageBox.Show("No polygon to upload");
return;
}
MainV2.comPort.setParam("FENCE_TOTAL", drawnpolygon.Points.Count);
byte a = 0;

1
Tools/ArdupilotMegaPlanner/GCSViews/Simulation.cs

@ -318,6 +318,7 @@ namespace ArdupilotMega.GCSViews @@ -318,6 +318,7 @@ namespace ArdupilotMega.GCSViews
/// <param name="write">true/false</param>
private void xmlconfig(bool write)
{
int fixme;
if (write)
{
ArdupilotMega.MainV2.config["REV_roll"] = CHKREV_roll.Checked.ToString();

12
Tools/ArdupilotMegaPlanner/Log.cs

@ -87,7 +87,11 @@ namespace ArdupilotMega @@ -87,7 +87,11 @@ namespace ArdupilotMega
System.Threading.Thread.Sleep(2000);
comPort.Write("\n\n\n\n");
try
{
comPort.Write("\n\n\n\n");
}
catch { }
while (threadrun)
{
@ -140,7 +144,11 @@ namespace ArdupilotMega @@ -140,7 +144,11 @@ namespace ArdupilotMega
{
this.BeginInvoke((System.Windows.Forms.MethodInvoker)delegate()
{
TXT_status.Text = status.ToString() + " " + receivedbytes + " " + comPort.BytesToRead;
try
{
TXT_status.Text = status.ToString() + " " + receivedbytes + " " + comPort.BytesToRead;
}
catch { }
});
start = DateTime.Now;
}

4
Tools/ArdupilotMegaPlanner/MAVLink.cs

@ -2073,7 +2073,7 @@ namespace ArdupilotMega @@ -2073,7 +2073,7 @@ namespace ArdupilotMega
if (bpstime.Second != DateTime.Now.Second && !logreadmode)
{
Console.Write("bps {0} loss {1} left {2} mem {3} \n", bps1, synclost, BaseStream.BytesToRead, System.GC.GetTotalMemory(false));
// Console.Write("bps {0} loss {1} left {2} mem {3} \n", bps1, synclost, BaseStream.BytesToRead, System.GC.GetTotalMemory(false));
bps2 = bps1; // prev sec
bps1 = 0; // current sec
bpstime = DateTime.Now;
@ -2170,7 +2170,7 @@ namespace ArdupilotMega @@ -2170,7 +2170,7 @@ namespace ArdupilotMega
if (MainV2.talk != null && MainV2.config["speechenable"] != null && MainV2.config["speechenable"].ToString() == "True")
{
MainV2.talk.SpeakAsync(logdata);
//MainV2.talk.SpeakAsync(logdata);
}
}

2
Tools/ArdupilotMegaPlanner/Properties/AssemblyInfo.cs

@ -34,5 +34,5 @@ using System.Resources; @@ -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.9")]
[assembly: AssemblyFileVersion("1.1.10")]
[assembly: NeutralResourcesLanguageAttribute("")]

Loading…
Cancel
Save