diff --git a/Tools/ArdupilotMegaPlanner/GCSViews/FlightData.cs b/Tools/ArdupilotMegaPlanner/GCSViews/FlightData.cs index 8ed38e719d..4393832ce1 100644 --- a/Tools/ArdupilotMegaPlanner/GCSViews/FlightData.cs +++ b/Tools/ArdupilotMegaPlanner/GCSViews/FlightData.cs @@ -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); diff --git a/Tools/ArdupilotMegaPlanner/GCSViews/FlightPlanner.cs b/Tools/ArdupilotMegaPlanner/GCSViews/FlightPlanner.cs index 96506ac0c9..b8370b6608 100644 --- a/Tools/ArdupilotMegaPlanner/GCSViews/FlightPlanner.cs +++ b/Tools/ArdupilotMegaPlanner/GCSViews/FlightPlanner.cs @@ -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 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; diff --git a/Tools/ArdupilotMegaPlanner/GCSViews/Simulation.cs b/Tools/ArdupilotMegaPlanner/GCSViews/Simulation.cs index 601def43a7..bd7adc8fff 100644 --- a/Tools/ArdupilotMegaPlanner/GCSViews/Simulation.cs +++ b/Tools/ArdupilotMegaPlanner/GCSViews/Simulation.cs @@ -318,6 +318,7 @@ namespace ArdupilotMega.GCSViews /// true/false private void xmlconfig(bool write) { + int fixme; if (write) { ArdupilotMega.MainV2.config["REV_roll"] = CHKREV_roll.Checked.ToString(); diff --git a/Tools/ArdupilotMegaPlanner/Log.cs b/Tools/ArdupilotMegaPlanner/Log.cs index 654a06ed44..1e9f009df4 100644 --- a/Tools/ArdupilotMegaPlanner/Log.cs +++ b/Tools/ArdupilotMegaPlanner/Log.cs @@ -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 { 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; } diff --git a/Tools/ArdupilotMegaPlanner/MAVLink.cs b/Tools/ArdupilotMegaPlanner/MAVLink.cs index 9142c992b2..6eeced5507 100644 --- a/Tools/ArdupilotMegaPlanner/MAVLink.cs +++ b/Tools/ArdupilotMegaPlanner/MAVLink.cs @@ -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 if (MainV2.talk != null && MainV2.config["speechenable"] != null && MainV2.config["speechenable"].ToString() == "True") { - MainV2.talk.SpeakAsync(logdata); + //MainV2.talk.SpeakAsync(logdata); } } diff --git a/Tools/ArdupilotMegaPlanner/Properties/AssemblyInfo.cs b/Tools/ArdupilotMegaPlanner/Properties/AssemblyInfo.cs index 7b13d50ec2..4a441af67c 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.9")] +[assembly: AssemblyFileVersion("1.1.10")] [assembly: NeutralResourcesLanguageAttribute("")]