void comPort_MavChanged(object sender, EventArgs e)
{
log.Info("Mav Changed " + MainV2.comPort.MAV.sysid);
HUD.Custom.src = MainV2.comPort.MAV.cs;
CustomWarning.defaultsrc = MainV2.comPort.MAV.cs;
MissionPlanner.Controls.PreFlight.CheckListItem.defaultsrc = MainV2.comPort.MAV.cs;
// when uploading a firmware we dont want to reload this screen.
if (instance.MyView.current.Control != null && instance.MyView.current.Control.GetType() == typeof(GCSViews.InitialSetup))
{
var page = ((GCSViews.InitialSetup)instance.MyView.current.Control).backstageView.SelectedPage;
if (page != null && page.Text == "Install Firmware")
{
return;
}
}
if (this.InvokeRequired)
{
this.Invoke((MethodInvoker) delegate
{
instance.MyView.Reload();
});
}
else
{
instance.MyView.Reload();
}
}