diff --git a/Tools/ArdupilotMegaPlanner/CurrentState.cs b/Tools/ArdupilotMegaPlanner/CurrentState.cs index af78701f3f..6912ffd17c 100644 --- a/Tools/ArdupilotMegaPlanner/CurrentState.cs +++ b/Tools/ArdupilotMegaPlanner/CurrentState.cs @@ -683,8 +683,8 @@ namespace ArdupilotMega } - byte[] bytes = mavinterface.packets[MAVLink.MAVLINK_MSG_ID_GLOBAL_POSITION_INT]; - if (bytes != null) + bytearray = mavinterface.packets[MAVLink.MAVLINK_MSG_ID_GLOBAL_POSITION_INT]; + if (bytearray != null) { var loc = bytearray.ByteArrayToStructure(6); diff --git a/Tools/ArdupilotMegaPlanner/GCSViews/FlightData.cs b/Tools/ArdupilotMegaPlanner/GCSViews/FlightData.cs index b0424f888c..00b2a2387e 100644 --- a/Tools/ArdupilotMegaPlanner/GCSViews/FlightData.cs +++ b/Tools/ArdupilotMegaPlanner/GCSViews/FlightData.cs @@ -535,7 +535,11 @@ namespace ArdupilotMega.GCSViews { this.BeginInvoke((System.Windows.Forms.MethodInvoker)delegate() { - MainV2.cs.UpdateCurrentSettings(bindingSource1); + try + { + MainV2.cs.UpdateCurrentSettings(bindingSource1); + } + catch { } }); } diff --git a/Tools/ArdupilotMegaPlanner/RAW_Sensor.cs b/Tools/ArdupilotMegaPlanner/RAW_Sensor.cs index 1b15cf9f6e..f3109aa829 100644 --- a/Tools/ArdupilotMegaPlanner/RAW_Sensor.cs +++ b/Tools/ArdupilotMegaPlanner/RAW_Sensor.cs @@ -145,8 +145,11 @@ namespace ArdupilotMega return; //Console.WriteLine(DateTime.Now.Millisecond + " timer2 serial"); - - MainV2.cs.UpdateCurrentSettings(currentStateBindingSource); + try + { + MainV2.cs.UpdateCurrentSettings(currentStateBindingSource); + } + catch { } if (sw != null && sw.BaseStream.CanWrite) { diff --git a/Tools/ArdupilotMegaPlanner/Setup/Setup.cs b/Tools/ArdupilotMegaPlanner/Setup/Setup.cs index 7e90bfc1c5..6c3feb616d 100644 --- a/Tools/ArdupilotMegaPlanner/Setup/Setup.cs +++ b/Tools/ArdupilotMegaPlanner/Setup/Setup.cs @@ -48,7 +48,11 @@ namespace ArdupilotMega.Setup void timer_Tick(object sender, EventArgs e) { - MainV2.cs.UpdateCurrentSettings(currentStateBindingSource); + try + { + MainV2.cs.UpdateCurrentSettings(currentStateBindingSource); + } + catch { } float pwm = 0; diff --git a/Tools/ArdupilotMegaPlanner/bin/Release/ArdupilotMegaPlanner.pdb b/Tools/ArdupilotMegaPlanner/bin/Release/ArdupilotMegaPlanner.pdb index f8684ba06d..34a41ea15f 100644 Binary files a/Tools/ArdupilotMegaPlanner/bin/Release/ArdupilotMegaPlanner.pdb and b/Tools/ArdupilotMegaPlanner/bin/Release/ArdupilotMegaPlanner.pdb differ