diff --git a/GCSViews/FlightData.Designer.cs b/GCSViews/FlightData.Designer.cs index fe4efd528a..3e1aaab126 100644 --- a/GCSViews/FlightData.Designer.cs +++ b/GCSViews/FlightData.Designer.cs @@ -129,6 +129,8 @@ private void InitializeComponent() this.auxOptions3 = new MissionPlanner.Controls.AuxOptions(); this.auxOptions4 = new MissionPlanner.Controls.AuxOptions(); this.auxOptions5 = new MissionPlanner.Controls.AuxOptions(); + this.auxOptions6 = new MissionPlanner.Controls.AuxOptions(); + this.auxOptions7 = new MissionPlanner.Controls.AuxOptions(); this.tabScripts = new System.Windows.Forms.TabPage(); this.checkBoxRedirectOutput = new System.Windows.Forms.CheckBox(); this.BUT_edit_selected = new MissionPlanner.Controls.MyButton(); @@ -223,8 +225,6 @@ private void InitializeComponent() this.scriptChecker = new System.Windows.Forms.Timer(this.components); this.Messagetabtimer = new System.Windows.Forms.Timer(this.components); this.bindingSourceStatusTab = new System.Windows.Forms.BindingSource(this.components); - this.auxOptions6 = new MissionPlanner.Controls.AuxOptions(); - this.auxOptions7 = new MissionPlanner.Controls.AuxOptions(); ((System.ComponentModel.ISupportInitialize)(this.MainH)).BeginInit(); this.MainH.Panel1.SuspendLayout(); this.MainH.Panel2.SuspendLayout(); @@ -306,8 +306,6 @@ private void InitializeComponent() // SubMainLeft.Panel1 // this.SubMainLeft.Panel1.Controls.Add(this.hud1); - this.SubMainLeft.Panel1.ControlAdded += (sender, e) => ManageLeftPanelVisibility(); - this.SubMainLeft.Panel1.ControlRemoved += (sender, e) => ManageLeftPanelVisibility(); // // SubMainLeft.Panel2 // @@ -568,8 +566,6 @@ private void InitializeComponent() this.tabControlactions.SelectedIndex = 0; this.tabControlactions.DrawItem += new System.Windows.Forms.DrawItemEventHandler(this.tabControl1_DrawItem); this.tabControlactions.SelectedIndexChanged += new System.EventHandler(this.tabControl1_SelectedIndexChanged); - this.tabControlactions.ControlAdded += (sender, e) => ManageLeftPanelVisibility(); - this.tabControlactions.ControlRemoved += (sender, e) => ManageLeftPanelVisibility(); // // contextMenuStripactionstab // @@ -1891,6 +1887,16 @@ private void InitializeComponent() resources.ApplyResources(this.auxOptions5, "auxOptions5"); this.auxOptions5.Name = "auxOptions5"; // + // auxOptions6 + // + resources.ApplyResources(this.auxOptions6, "auxOptions6"); + this.auxOptions6.Name = "auxOptions6"; + // + // auxOptions7 + // + resources.ApplyResources(this.auxOptions7, "auxOptions7"); + this.auxOptions7.Name = "auxOptions7"; + // // tabScripts // this.tabScripts.Controls.Add(this.checkBoxRedirectOutput); @@ -2001,8 +2007,8 @@ private void InitializeComponent() // resources.ApplyResources(this.trackBarRoll, "trackBarRoll"); this.trackBarRoll.LargeChange = 10; - this.trackBarRoll.Maximum = 45; - this.trackBarRoll.Minimum = -45; + this.trackBarRoll.Maximum = 90; + this.trackBarRoll.Minimum = -90; this.trackBarRoll.Name = "trackBarRoll"; this.trackBarRoll.TickFrequency = 10; this.trackBarRoll.Scroll += new System.EventHandler(this.gimbalTrackbar_Scroll); @@ -2025,8 +2031,8 @@ private void InitializeComponent() // resources.ApplyResources(this.trackBarYaw, "trackBarYaw"); this.trackBarYaw.LargeChange = 10; - this.trackBarYaw.Maximum = 45; - this.trackBarYaw.Minimum = -45; + this.trackBarYaw.Maximum = 180; + this.trackBarYaw.Minimum = -180; this.trackBarYaw.Name = "trackBarYaw"; this.trackBarYaw.TickFrequency = 10; this.trackBarYaw.Scroll += new System.EventHandler(this.gimbalTrackbar_Scroll); @@ -2050,8 +2056,8 @@ private void InitializeComponent() // resources.ApplyResources(this.trackBarPitch, "trackBarPitch"); this.trackBarPitch.LargeChange = 10; - this.trackBarPitch.Maximum = 45; - this.trackBarPitch.Minimum = -45; + this.trackBarPitch.Maximum = 90; + this.trackBarPitch.Minimum = -90; this.trackBarPitch.Name = "trackBarPitch"; this.trackBarPitch.SmallChange = 5; this.trackBarPitch.TickFrequency = 10; @@ -2321,8 +2327,6 @@ private void InitializeComponent() // resources.ApplyResources(this.panel_persistent, "panel_persistent"); this.panel_persistent.Name = "panel_persistent"; - this.panel_persistent.ControlAdded += (sender, e) => ManageLeftPanelVisibility(); - this.panel_persistent.ControlRemoved += (sender, e) => ManageLeftPanelVisibility(); // // tableMap // @@ -2518,7 +2522,7 @@ private void InitializeComponent() this.windDir1.BackColor = System.Drawing.Color.Transparent; this.windDir1.DataBindings.Add(new System.Windows.Forms.Binding("Direction", this.bindingSource1, "wind_dir", true, System.Windows.Forms.DataSourceUpdateMode.Never)); this.windDir1.DataBindings.Add(new System.Windows.Forms.Binding("Speed", this.bindingSource1, "wind_vel", true, System.Windows.Forms.DataSourceUpdateMode.Never)); - this.windDir1.Direction = 360D; + this.windDir1.Direction = 180D; resources.ApplyResources(this.windDir1, "windDir1"); this.windDir1.Name = "windDir1"; this.windDir1.Speed = 0D; @@ -2719,16 +2723,6 @@ private void InitializeComponent() // this.bindingSourceStatusTab.DataSource = typeof(MissionPlanner.CurrentState); // - // auxOptions6 - // - resources.ApplyResources(this.auxOptions6, "auxOptions6"); - this.auxOptions6.Name = "auxOptions6"; - // - // auxOptions7 - // - resources.ApplyResources(this.auxOptions7, "auxOptions7"); - this.auxOptions7.Name = "auxOptions7"; - // // FlightData // this.Controls.Add(this.MainH); diff --git a/GCSViews/FlightData.cs b/GCSViews/FlightData.cs index 41e6c1ba44..eef9fe741c 100644 --- a/GCSViews/FlightData.cs +++ b/GCSViews/FlightData.cs @@ -223,6 +223,13 @@ public FlightData() log.Info("Components Done"); instance = this; + + this.SubMainLeft.Panel1.ControlAdded += (sender, e) => ManageLeftPanelVisibility(); + this.SubMainLeft.Panel1.ControlRemoved += (sender, e) => ManageLeftPanelVisibility(); + this.tabControlactions.ControlAdded += (sender, e) => ManageLeftPanelVisibility(); + this.tabControlactions.ControlRemoved += (sender, e) => ManageLeftPanelVisibility(); + this.panel_persistent.ControlAdded += (sender, e) => ManageLeftPanelVisibility(); + this.panel_persistent.ControlRemoved += (sender, e) => ManageLeftPanelVisibility(); // _serializer = new DockStateSerializer(dockContainer1); // _serializer.SavePath = Application.StartupPath + Path.DirectorySeparatorChar + "FDscreen.xml"; // dockContainer1.PreviewRenderer = new PreviewRenderer(); @@ -3757,6 +3764,9 @@ private void mainloop() } } + //nofly + NoFly.NoFly.UpdateNoFlyZone(this, gMapControl1.Position); + waypoints = DateTime.Now; } diff --git a/GCSViews/FlightData.resx b/GCSViews/FlightData.resx index c9fab839b6..67f0aaf4dd 100644 --- a/GCSViews/FlightData.resx +++ b/GCSViews/FlightData.resx @@ -694,7 +694,7 @@ modifyandSetLoiterRad - MissionPlanner.Controls.ModifyandSet, MissionPlanner, Version=1.3.8312.27344, Culture=neutral, PublicKeyToken=null + MissionPlanner.Controls.ModifyandSet, MissionPlanner, Version=1.3.8313.24739, Culture=neutral, PublicKeyToken=null tableLayoutPanel1 @@ -853,7 +853,7 @@ modifyandSetAlt - MissionPlanner.Controls.ModifyandSet, MissionPlanner, Version=1.3.8312.27344, Culture=neutral, PublicKeyToken=null + MissionPlanner.Controls.ModifyandSet, MissionPlanner, Version=1.3.8313.24739, Culture=neutral, PublicKeyToken=null tableLayoutPanel1 @@ -889,7 +889,7 @@ modifyandSetSpeed - MissionPlanner.Controls.ModifyandSet, MissionPlanner, Version=1.3.8312.27344, Culture=neutral, PublicKeyToken=null + MissionPlanner.Controls.ModifyandSet, MissionPlanner, Version=1.3.8313.24739, Culture=neutral, PublicKeyToken=null tableLayoutPanel1 @@ -1582,7 +1582,7 @@ checkListControl1 - MissionPlanner.Controls.PreFlight.CheckListControl, MissionPlanner, Version=1.3.8312.27344, Culture=neutral, PublicKeyToken=null + MissionPlanner.Controls.PreFlight.CheckListControl, MissionPlanner, Version=1.3.8313.24739, Culture=neutral, PublicKeyToken=null tabPagePreFlight @@ -3071,7 +3071,7 @@ servoOptions1 - MissionPlanner.Controls.ServoOptions, MissionPlanner, Version=1.3.8312.27344, Culture=neutral, PublicKeyToken=null + MissionPlanner.Controls.ServoOptions, MissionPlanner, Version=1.3.8313.24739, Culture=neutral, PublicKeyToken=null flowLayoutPanelServos @@ -3092,7 +3092,7 @@ servoOptions2 - MissionPlanner.Controls.ServoOptions, MissionPlanner, Version=1.3.8312.27344, Culture=neutral, PublicKeyToken=null + MissionPlanner.Controls.ServoOptions, MissionPlanner, Version=1.3.8313.24739, Culture=neutral, PublicKeyToken=null flowLayoutPanelServos @@ -3113,7 +3113,7 @@ servoOptions3 - MissionPlanner.Controls.ServoOptions, MissionPlanner, Version=1.3.8312.27344, Culture=neutral, PublicKeyToken=null + MissionPlanner.Controls.ServoOptions, MissionPlanner, Version=1.3.8313.24739, Culture=neutral, PublicKeyToken=null flowLayoutPanelServos @@ -3134,7 +3134,7 @@ servoOptions4 - MissionPlanner.Controls.ServoOptions, MissionPlanner, Version=1.3.8312.27344, Culture=neutral, PublicKeyToken=null + MissionPlanner.Controls.ServoOptions, MissionPlanner, Version=1.3.8313.24739, Culture=neutral, PublicKeyToken=null flowLayoutPanelServos @@ -3155,7 +3155,7 @@ servoOptions5 - MissionPlanner.Controls.ServoOptions, MissionPlanner, Version=1.3.8312.27344, Culture=neutral, PublicKeyToken=null + MissionPlanner.Controls.ServoOptions, MissionPlanner, Version=1.3.8313.24739, Culture=neutral, PublicKeyToken=null flowLayoutPanelServos @@ -3176,7 +3176,7 @@ servoOptions6 - MissionPlanner.Controls.ServoOptions, MissionPlanner, Version=1.3.8312.27344, Culture=neutral, PublicKeyToken=null + MissionPlanner.Controls.ServoOptions, MissionPlanner, Version=1.3.8313.24739, Culture=neutral, PublicKeyToken=null flowLayoutPanelServos @@ -3197,7 +3197,7 @@ servoOptions7 - MissionPlanner.Controls.ServoOptions, MissionPlanner, Version=1.3.8312.27344, Culture=neutral, PublicKeyToken=null + MissionPlanner.Controls.ServoOptions, MissionPlanner, Version=1.3.8313.24739, Culture=neutral, PublicKeyToken=null flowLayoutPanelServos @@ -3218,7 +3218,7 @@ servoOptions8 - MissionPlanner.Controls.ServoOptions, MissionPlanner, Version=1.3.8312.27344, Culture=neutral, PublicKeyToken=null + MissionPlanner.Controls.ServoOptions, MissionPlanner, Version=1.3.8313.24739, Culture=neutral, PublicKeyToken=null flowLayoutPanelServos @@ -3239,7 +3239,7 @@ servoOptions9 - MissionPlanner.Controls.ServoOptions, MissionPlanner, Version=1.3.8312.27344, Culture=neutral, PublicKeyToken=null + MissionPlanner.Controls.ServoOptions, MissionPlanner, Version=1.3.8313.24739, Culture=neutral, PublicKeyToken=null flowLayoutPanelServos @@ -3260,7 +3260,7 @@ servoOptions10 - MissionPlanner.Controls.ServoOptions, MissionPlanner, Version=1.3.8312.27344, Culture=neutral, PublicKeyToken=null + MissionPlanner.Controls.ServoOptions, MissionPlanner, Version=1.3.8313.24739, Culture=neutral, PublicKeyToken=null flowLayoutPanelServos @@ -3281,7 +3281,7 @@ servoOptions11 - MissionPlanner.Controls.ServoOptions, MissionPlanner, Version=1.3.8312.27344, Culture=neutral, PublicKeyToken=null + MissionPlanner.Controls.ServoOptions, MissionPlanner, Version=1.3.8313.24739, Culture=neutral, PublicKeyToken=null flowLayoutPanelServos @@ -3302,7 +3302,7 @@ servoOptions12 - MissionPlanner.Controls.ServoOptions, MissionPlanner, Version=1.3.8312.27344, Culture=neutral, PublicKeyToken=null + MissionPlanner.Controls.ServoOptions, MissionPlanner, Version=1.3.8313.24739, Culture=neutral, PublicKeyToken=null flowLayoutPanelServos @@ -3323,7 +3323,7 @@ relayOptions1 - MissionPlanner.Controls.RelayOptions, MissionPlanner, Version=1.3.8312.27344, Culture=neutral, PublicKeyToken=null + MissionPlanner.Controls.RelayOptions, MissionPlanner, Version=1.3.8313.24739, Culture=neutral, PublicKeyToken=null flowLayoutPanelServos @@ -3344,7 +3344,7 @@ relayOptions2 - MissionPlanner.Controls.RelayOptions, MissionPlanner, Version=1.3.8312.27344, Culture=neutral, PublicKeyToken=null + MissionPlanner.Controls.RelayOptions, MissionPlanner, Version=1.3.8313.24739, Culture=neutral, PublicKeyToken=null flowLayoutPanelServos @@ -3365,7 +3365,7 @@ relayOptions3 - MissionPlanner.Controls.RelayOptions, MissionPlanner, Version=1.3.8312.27344, Culture=neutral, PublicKeyToken=null + MissionPlanner.Controls.RelayOptions, MissionPlanner, Version=1.3.8313.24739, Culture=neutral, PublicKeyToken=null flowLayoutPanelServos @@ -3386,7 +3386,7 @@ relayOptions4 - MissionPlanner.Controls.RelayOptions, MissionPlanner, Version=1.3.8312.27344, Culture=neutral, PublicKeyToken=null + MissionPlanner.Controls.RelayOptions, MissionPlanner, Version=1.3.8313.24739, Culture=neutral, PublicKeyToken=null flowLayoutPanelServos @@ -3407,7 +3407,7 @@ relayOptions5 - MissionPlanner.Controls.RelayOptions, MissionPlanner, Version=1.3.8312.27344, Culture=neutral, PublicKeyToken=null + MissionPlanner.Controls.RelayOptions, MissionPlanner, Version=1.3.8313.24739, Culture=neutral, PublicKeyToken=null flowLayoutPanelServos @@ -3428,7 +3428,7 @@ relayOptions6 - MissionPlanner.Controls.RelayOptions, MissionPlanner, Version=1.3.8312.27344, Culture=neutral, PublicKeyToken=null + MissionPlanner.Controls.RelayOptions, MissionPlanner, Version=1.3.8313.24739, Culture=neutral, PublicKeyToken=null flowLayoutPanelServos @@ -3503,7 +3503,7 @@ auxOptions1 - MissionPlanner.Controls.AuxOptions, MissionPlanner, Version=1.3.8312.27344, Culture=neutral, PublicKeyToken=null + MissionPlanner.Controls.AuxOptions, MissionPlanner, Version=1.3.8313.24739, Culture=neutral, PublicKeyToken=null flowLayoutPanel1 @@ -3524,7 +3524,7 @@ auxOptions2 - MissionPlanner.Controls.AuxOptions, MissionPlanner, Version=1.3.8312.27344, Culture=neutral, PublicKeyToken=null + MissionPlanner.Controls.AuxOptions, MissionPlanner, Version=1.3.8313.24739, Culture=neutral, PublicKeyToken=null flowLayoutPanel1 @@ -3545,7 +3545,7 @@ auxOptions3 - MissionPlanner.Controls.AuxOptions, MissionPlanner, Version=1.3.8312.27344, Culture=neutral, PublicKeyToken=null + MissionPlanner.Controls.AuxOptions, MissionPlanner, Version=1.3.8313.24739, Culture=neutral, PublicKeyToken=null flowLayoutPanel1 @@ -3566,7 +3566,7 @@ auxOptions4 - MissionPlanner.Controls.AuxOptions, MissionPlanner, Version=1.3.8312.27344, Culture=neutral, PublicKeyToken=null + MissionPlanner.Controls.AuxOptions, MissionPlanner, Version=1.3.8313.24739, Culture=neutral, PublicKeyToken=null flowLayoutPanel1 @@ -3587,7 +3587,7 @@ auxOptions5 - MissionPlanner.Controls.AuxOptions, MissionPlanner, Version=1.3.8312.27344, Culture=neutral, PublicKeyToken=null + MissionPlanner.Controls.AuxOptions, MissionPlanner, Version=1.3.8313.24739, Culture=neutral, PublicKeyToken=null flowLayoutPanel1 @@ -3608,7 +3608,7 @@ auxOptions6 - MissionPlanner.Controls.AuxOptions, MissionPlanner, Version=1.3.8312.27344, Culture=neutral, PublicKeyToken=null + MissionPlanner.Controls.AuxOptions, MissionPlanner, Version=1.3.8313.24739, Culture=neutral, PublicKeyToken=null flowLayoutPanel1 @@ -3629,7 +3629,7 @@ auxOptions7 - MissionPlanner.Controls.AuxOptions, MissionPlanner, Version=1.3.8312.27344, Culture=neutral, PublicKeyToken=null + MissionPlanner.Controls.AuxOptions, MissionPlanner, Version=1.3.8313.24739, Culture=neutral, PublicKeyToken=null flowLayoutPanel1 @@ -5294,7 +5294,7 @@ distanceBar1 - MissionPlanner.Controls.DistanceBar, MissionPlanner, Version=1.3.8312.27344, Culture=neutral, PublicKeyToken=null + MissionPlanner.Controls.DistanceBar, MissionPlanner, Version=1.3.8313.24739, Culture=neutral, PublicKeyToken=null splitContainer1.Panel2 diff --git a/NoFly/NoFly.cs b/NoFly/NoFly.cs index b5cd574800..6809fbc29a 100644 --- a/NoFly/NoFly.cs +++ b/NoFly/NoFly.cs @@ -125,8 +125,8 @@ public static void Scan() { if (item.HorizontalProjection?.Type == "Polygon") { - //if (item.LowerVerticalReference == "AGL" && item.UomDimensions == "M" && item.LowerLimit > 300) - //continue; + if (item.LowerVerticalReference == "AGL" && item.UomDimensions == "M" && item.LowerLimit > 300) + continue; var coordinates = item.HorizontalProjection.Coordinates[0].Select(c => new PointLatLng(c[1], c[0])).ToList(); @@ -168,6 +168,12 @@ public static void Scan() NoFlyEvent(null, new NoFlyEventArgs(kmlpolygonsoverlay)); } + public static void UpdateNoFlyZone(object sender, PointLatLngAlt plla) + { + UpdateNoFlyZoneEvent?.Invoke(sender, plla); + } + + public static event EventHandler UpdateNoFlyZoneEvent; public static void LoadNoFly(string file) {