diff --git a/Arduino/BoardDetect.cs b/Arduino/BoardDetect.cs index ec957524c0..eb0b0f5468 100644 --- a/Arduino/BoardDetect.cs +++ b/Arduino/BoardDetect.cs @@ -109,8 +109,6 @@ public static boards DetectBoard(string port) return boards.b2560; } } - - return boards.none; } if (serialPort.IsOpen) @@ -232,8 +230,6 @@ public static boards DetectBoard(string port) return boards.b2560; } } - - return boards.none; } public enum ap_var_type diff --git a/ArdupilotMega.sln b/ArdupilotMega.sln index ec0c82a129..982af9133f 100644 --- a/ArdupilotMega.sln +++ b/ArdupilotMega.sln @@ -20,10 +20,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Core", "ExtLibs\Core\Core.c EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenTK.GLControl", "ExtLibs\GLControl\OpenTK.GLControl.csproj", "{A625BE88-0000-0000-0000-000000000000}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GMap.NET.Core", "ExtLibs\GMap.NET.Core\GMap.NET.Core.csproj", "{D0C39D9D-BED0-418B-9A5E-713176CAF40C}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GMap.NET.WindowsForms", "ExtLibs\GMap.NET.WindowsForms\GMap.NET.WindowsForms.csproj", "{E06DEF77-F933-42FB-AFD7-DB2D0D8D6A98}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "KMLib", "ExtLibs\KMLib\KMLib.csproj", "{29976BA4-A04D-4A80-A866-098C879C2FDE}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharpKml", "ExtLibs\SharpKml\SharpKml.csproj", "{53F12A60-E9CC-44BC-8366-1AE3AB2B547D}" @@ -119,22 +115,6 @@ Global {A625BE88-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU {A625BE88-0000-0000-0000-000000000000}.Release|x86.ActiveCfg = Release|Any CPU {A625BE88-0000-0000-0000-000000000000}.Release|x86.Build.0 = Release|Any CPU - {D0C39D9D-BED0-418B-9A5E-713176CAF40C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D0C39D9D-BED0-418B-9A5E-713176CAF40C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D0C39D9D-BED0-418B-9A5E-713176CAF40C}.Debug|x86.ActiveCfg = Debug|Any CPU - {D0C39D9D-BED0-418B-9A5E-713176CAF40C}.Debug|x86.Build.0 = Debug|Any CPU - {D0C39D9D-BED0-418B-9A5E-713176CAF40C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D0C39D9D-BED0-418B-9A5E-713176CAF40C}.Release|Any CPU.Build.0 = Release|Any CPU - {D0C39D9D-BED0-418B-9A5E-713176CAF40C}.Release|x86.ActiveCfg = Release|Any CPU - {D0C39D9D-BED0-418B-9A5E-713176CAF40C}.Release|x86.Build.0 = Release|Any CPU - {E06DEF77-F933-42FB-AFD7-DB2D0D8D6A98}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E06DEF77-F933-42FB-AFD7-DB2D0D8D6A98}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E06DEF77-F933-42FB-AFD7-DB2D0D8D6A98}.Debug|x86.ActiveCfg = Debug|Any CPU - {E06DEF77-F933-42FB-AFD7-DB2D0D8D6A98}.Debug|x86.Build.0 = Debug|Any CPU - {E06DEF77-F933-42FB-AFD7-DB2D0D8D6A98}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E06DEF77-F933-42FB-AFD7-DB2D0D8D6A98}.Release|Any CPU.Build.0 = Release|Any CPU - {E06DEF77-F933-42FB-AFD7-DB2D0D8D6A98}.Release|x86.ActiveCfg = Release|Any CPU - {E06DEF77-F933-42FB-AFD7-DB2D0D8D6A98}.Release|x86.Build.0 = Release|Any CPU {29976BA4-A04D-4A80-A866-098C879C2FDE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {29976BA4-A04D-4A80-A866-098C879C2FDE}.Debug|Any CPU.Build.0 = Debug|Any CPU {29976BA4-A04D-4A80-A866-098C879C2FDE}.Debug|x86.ActiveCfg = Debug|Any CPU diff --git a/ChangeLog.txt b/ChangeLog.txt index 91e6d7c6fa..4e26373a91 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,4 +1,16 @@ -* Mission Planner 1.2.84 +* Mission Planner 1.2.85 +update map library - this will invalidate your map prefetch +remove arial narrow and Century Gothic font issues +add ability to load a kml linestring as a mission +add kmz overlay and import support +fix AC imax limits +add view flightplan as kml +fix speech over speak +fix bad first packet in mavlink logs +support now DF log gps line +modify getParam timeout from 0.2 to 0.7 + +* Mission Planner 1.2.84 add new winddir fix px4 uploader same fw error update parammetadatabackup.xml diff --git a/Common.cs b/Common.cs index fe2e5f5b82..c74b1c3f18 100644 --- a/Common.cs +++ b/Common.cs @@ -70,14 +70,15 @@ public override void OnRender(Graphics g) if (Pen.Color == Color.Blue) Pen.Color = Color.White; - double width = (Overlay.Control.Manager.GetDistance(Overlay.Control.FromLocalToLatLng(0, 0), Overlay.Control.FromLocalToLatLng(Overlay.Control.Width, 0)) * 1000.0); - double height = (Overlay.Control.Manager.GetDistance(Overlay.Control.FromLocalToLatLng(0, 0), Overlay.Control.FromLocalToLatLng(Overlay.Control.Height, 0)) * 1000.0); + double width = (Overlay.Control.MapProvider.Projection.GetDistance(Overlay.Control.FromLocalToLatLng(0, 0), Overlay.Control.FromLocalToLatLng(Overlay.Control.Width, 0)) * 1000.0); + double height = (Overlay.Control.MapProvider.Projection.GetDistance(Overlay.Control.FromLocalToLatLng(0, 0), Overlay.Control.FromLocalToLatLng(Overlay.Control.Height, 0)) * 1000.0); double m2pixelwidth = Overlay.Control.Width / width; double m2pixelheight = Overlay.Control.Height / height; GPoint loc = new GPoint((int)(LocalPosition.X - (m2pixelwidth * wprad * 2)), LocalPosition.Y);// MainMap.FromLatLngToLocal(wpradposition); - g.DrawArc(Pen, new System.Drawing.Rectangle(LocalPosition.X - Offset.X - (Math.Abs(loc.X - LocalPosition.X) / 2), LocalPosition.Y - Offset.Y - Math.Abs(loc.X - LocalPosition.X) / 2, Math.Abs(loc.X - LocalPosition.X), Math.Abs(loc.X - LocalPosition.X)), 0, 360); + if (m2pixelheight > 0.5) + g.DrawArc(Pen, new System.Drawing.Rectangle(LocalPosition.X - Offset.X - (int)(Math.Abs(loc.X - LocalPosition.X) / 2), LocalPosition.Y - Offset.Y - (int)Math.Abs(loc.X - LocalPosition.X) / 2, (int)Math.Abs(loc.X - LocalPosition.X), (int)Math.Abs(loc.X - LocalPosition.X)), 0, 360); } } @@ -180,7 +181,7 @@ public override void OnRender(Graphics g) float desired_lead_dist = 100; - double width = (Overlay.Control.Manager.GetDistance(Overlay.Control.FromLocalToLatLng(0, 0), Overlay.Control.FromLocalToLatLng(Overlay.Control.Width, 0)) * 1000.0); + double width = (Overlay.Control.MapProvider.Projection.GetDistance(Overlay.Control.FromLocalToLatLng(0, 0), Overlay.Control.FromLocalToLatLng(Overlay.Control.Width, 0)) * 1000.0); double m2pixelwidth = Overlay.Control.Width / width; float alpha = ((desired_lead_dist * (float)m2pixelwidth) / MainV2.comPort.MAV.cs.radius) * rad2deg; diff --git a/Controls/ServoOptions.cs b/Controls/ServoOptions.cs index 03c3cd0748..2a7124e579 100644 --- a/Controls/ServoOptions.cs +++ b/Controls/ServoOptions.cs @@ -28,7 +28,7 @@ public ServoOptions() servo++; - TXT_rcchannel.BackColor = Color.Silver; + TXT_rcchannel.BackColor = Color.Gray; } void loadSettings() diff --git a/CurrentState.cs b/CurrentState.cs index 4203909b20..ab979040e7 100644 --- a/CurrentState.cs +++ b/CurrentState.cs @@ -671,6 +671,19 @@ enum gcs_severity { //MAVLink.packets[(byte)MAVLink.MSG_NAMES.HIL_CONTROLS] = null; } + bytearray = mavinterface.MAV.packets[(byte)MAVLink.MAVLINK_MSG_ID.SYSTEM_TIME]; + + if (bytearray != null) + { + var systime = bytearray.ByteArrayToStructure(6); + + DateTime newtime = DateTime.Now; + + //UInt64 ms_per_week = 7000ULL*86400ULL; + //UInt64 unix_offset = 17000ULL*86400ULL + 52*10*7000ULL*86400ULL - 15000ULL; + //UInt64 fix_time_ms = unix_offset + time_week*ms_per_week + time_week_ms; + } + bytearray = mavinterface.MAV.packets[(byte)MAVLink.MAVLINK_MSG_ID.HWSTATUS]; if (bytearray != null) @@ -811,6 +824,11 @@ enum gcs_severity { messageHigh = "Bad OptFlow Health"; messageHighTime = DateTime.Now; } + else if (sensors_present.rc_receiver != sensors_enabled.rc_receiver) + { + messageHigh = "NO RC Receiver"; + messageHighTime = DateTime.Now; + } mavinterface.MAV.packets[(byte)MAVLink.MAVLINK_MSG_ID.SYS_STATUS] = null; @@ -1202,6 +1220,7 @@ public Mavlink_Sensors(uint p) public bool altitude_control { get { return bitArray[13]; } set { bitArray[13] = value; } } public bool xy_position_control { get { return bitArray[14]; } set { bitArray[14] = value; } } public bool motor_control { get { return bitArray[15]; } set { bitArray[15] = value; } } + public bool rc_receiver { get { return bitArray[16]; } set { bitArray[16] = value; } } public int Value { diff --git a/ExtLibs/Comms/CommsUdpSerial.cs b/ExtLibs/Comms/CommsUdpSerial.cs index 46f75407af..0639b42484 100644 --- a/ExtLibs/Comms/CommsUdpSerial.cs +++ b/ExtLibs/Comms/CommsUdpSerial.cs @@ -73,7 +73,7 @@ public bool DtrEnable set; } - public void Open() + public void Open() { if (client.Client.Connected) { @@ -81,6 +81,18 @@ public void Open() return; } + string dest = Port; + + dest = OnSettings("UDP_port", dest); + + if (System.Windows.Forms.DialogResult.Cancel == InputBox.Show("Listern Port", "Enter Local port (ensure remote end is already sending)", ref dest)) + { + return; + } + Port = dest; + + OnSettings("UDP_port", Port, true); + ProgressReporterDialogue frmProgressReporter = new ProgressReporterDialogue { StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen, @@ -98,18 +110,6 @@ public void Open() void frmProgressReporter_DoWork(object sender, Controls.ProgressWorkerEventArgs e, object passdata = null) { - string dest = Port; - - dest = OnSettings("UDP_port", dest); - - if (System.Windows.Forms.DialogResult.Cancel == InputBox.Show("Listern Port", "Enter Local port (ensure remote end is already sending)", ref dest)) - { - return; - } - Port = dest; - - OnSettings("UDP_port", Port, true); - client = new UdpClient(int.Parse(Port)); while (true) @@ -148,7 +148,7 @@ void frmProgressReporter_DoWork(object sender, Controls.ProgressWorkerEventArgs client.Close(); } log.Info(ex.ToString()); - CustomMessageBox.Show("Please check your Firewall settings\nPlease try running this command\n1. Run the following command in an elevated command prompt to disable Windows Firewall temporarily:\n \nNetsh advfirewall set allprofiles state off\n \nNote: This is just for test; please turn it back on with the command 'Netsh advfirewall set allprofiles state on'.\n", "Error"); + //CustomMessageBox.Show("Please check your Firewall settings\nPlease try running this command\n1. Run the following command in an elevated command prompt to disable Windows Firewall temporarily:\n \nNetsh advfirewall set allprofiles state off\n \nNote: This is just for test; please turn it back on with the command 'Netsh advfirewall set allprofiles state on'.\n", "Error"); throw new Exception("The socket/serialproxy is closed " + e); } } diff --git a/ExtLibs/Controls/InputBox.cs b/ExtLibs/Controls/InputBox.cs index 2d9de6bf39..277e51c533 100644 --- a/ExtLibs/Controls/InputBox.cs +++ b/ExtLibs/Controls/InputBox.cs @@ -26,7 +26,7 @@ public static DialogResult Show(string title, string promptText, ref string valu // ensure we run this on the right thread - mono - mac if (Application.OpenForms.Count > 0 && Application.OpenForms[0].InvokeRequired) { - Application.OpenForms[0].Invoke((Action)delegate + Application.OpenForms[0].Invoke((MethodInvoker)delegate { answer = ShowUI(title, promptText, passin, password); }); @@ -90,12 +90,13 @@ static DialogResult ShowUI(string title, string promptText, string value, bool p DialogResult dialogResult = DialogResult.Cancel; - Console.WriteLine("Input Box"); + Console.WriteLine("Input Box " + System.Threading.Thread.CurrentThread.Name); - form.ShowDialog(); + Application.DoEvents(); + form.ShowDialog(); - Console.WriteLine("Input Box 2"); + Console.WriteLine("Input Box 2 " + System.Threading.Thread.CurrentThread.Name); dialogResult = form.DialogResult; diff --git a/ExtLibs/Controls/MissionPlanner.Controls.csproj b/ExtLibs/Controls/MissionPlanner.Controls.csproj index bcea1bd4a8..4968940d8e 100644 --- a/ExtLibs/Controls/MissionPlanner.Controls.csproj +++ b/ExtLibs/Controls/MissionPlanner.Controls.csproj @@ -31,6 +31,14 @@ 4 + + False + ..\..\..\..\..\..\..\Desktop\DIYDrones\greatmaps_09991dd06609\Demo.WindowsForms\bin\Debug\GMap.NET.Core.dll + + + False + ..\..\..\..\..\..\..\Desktop\DIYDrones\greatmaps_09991dd06609\Demo.WindowsForms\bin\Debug\GMap.NET.WindowsForms.dll + ..\..\Lib\log4net.dll @@ -282,14 +290,6 @@ {a625be88-0000-0000-0000-000000000000} OpenTK.GLControl - - {d0c39d9d-bed0-418b-9a5e-713176caf40c} - GMap.NET.Core - - - {e06def77-f933-42fb-afd7-db2d0d8d6a98} - GMap.NET.WindowsForms - {1378a66c-38e4-46f5-a05f-dc04ef7d4d16} MissionPlanner.Utilities diff --git a/ExtLibs/Controls/ProgressReporterDialogue.designer.cs b/ExtLibs/Controls/ProgressReporterDialogue.designer.cs index 1a00e8193b..78e541eacc 100644 --- a/ExtLibs/Controls/ProgressReporterDialogue.designer.cs +++ b/ExtLibs/Controls/ProgressReporterDialogue.designer.cs @@ -122,8 +122,7 @@ private void InitializeComponent() // // ProgressReporterDialogue // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.ClientSize = new System.Drawing.Size(306, 144); this.ControlBox = false; this.Controls.Add(this.btnClose); diff --git a/ExtLibs/Controls/QuickView.cs b/ExtLibs/Controls/QuickView.cs index 88f8e7db97..fa3488e008 100644 --- a/ExtLibs/Controls/QuickView.cs +++ b/ExtLibs/Controls/QuickView.cs @@ -91,7 +91,7 @@ void GetFontSize() //SizeF extenttest2 = Graphics.FromHwnd(this.Handle).MeasureString(labelWithPseudoOpacity2.Text, this.Font); - //SizeF extent = Measure.MeasureString(Graphics.FromHwnd(this.Handle), this.Font, labelWithPseudoOpacity2.Text); + // SizeF extent2 = Measure.MeasureString(Graphics.FromHwnd(this.Handle), this.Font, labelWithPseudoOpacity2.Text); // extent = extenttest; diff --git a/ExtLibs/GMap.NET.Core/GMap.NET/GMaps.cs b/ExtLibs/GMap.NET.Core/GMap.NET/GMaps.cs index c6340b2dae..b17b15b1e4 100644 --- a/ExtLibs/GMap.NET.Core/GMap.NET/GMaps.cs +++ b/ExtLibs/GMap.NET.Core/GMap.NET/GMaps.cs @@ -1916,7 +1916,7 @@ internal string TileXYToQuadKey(int tileX, int tileY, int levelOfDetail) internal string MakeGeocoderUrl(string keywords, string language) { string key = keywords.Replace(' ', '+'); - return string.Format("http://maps.{3}/maps/geo?q={0}&hl={1}&output=csv&key={2}", key, language, GoogleMapsAPIKey, GServer); + return string.Format("https://maps.{3}/maps/geo?q={0}&hl={1}&output=csv&key={2}", key, language, GoogleMapsAPIKey, GServer); } /// @@ -1927,7 +1927,7 @@ internal string MakeGeocoderUrl(string keywords, string language) /// internal string MakeReverseGeocoderUrl(PointLatLng pt, string language) { - return string.Format("http://maps.{4}/maps/geo?hl={0}&ll={1},{2}&output=xml&key={3}", language, pt.Lat.ToString(CultureInfo.InvariantCulture), pt.Lng.ToString(CultureInfo.InvariantCulture), GoogleMapsAPIKey, GServer); + return string.Format("https://maps.{4}/maps/geo?hl={0}&ll={1},{2}&output=xml&key={3}", language, pt.Lat.ToString(CultureInfo.InvariantCulture), pt.Lng.ToString(CultureInfo.InvariantCulture), GoogleMapsAPIKey, GServer); } /// @@ -1942,7 +1942,7 @@ internal string MakeRouteUrl(PointLatLng start, PointLatLng end, string language { string highway = avoidHighways ? "&mra=ls&dirflg=dh" : "&mra=ls&dirflg=d"; - return string.Format("http://maps.{6}/maps?f=q&output=dragdir&doflg=p&hl={0}{1}&q=&saddr=@{2},{3}&daddr=@{4},{5}", language, highway, start.Lat.ToString(CultureInfo.InvariantCulture), start.Lng.ToString(CultureInfo.InvariantCulture), end.Lat.ToString(CultureInfo.InvariantCulture), end.Lng.ToString(CultureInfo.InvariantCulture), GServer); + return string.Format("https://maps.{6}/maps?f=q&output=dragdir&doflg=p&hl={0}{1}&q=&saddr=@{2},{3}&daddr=@{4},{5}", language, highway, start.Lat.ToString(CultureInfo.InvariantCulture), start.Lng.ToString(CultureInfo.InvariantCulture), end.Lat.ToString(CultureInfo.InvariantCulture), end.Lng.ToString(CultureInfo.InvariantCulture), GServer); } /// @@ -1957,7 +1957,7 @@ internal string MakeRouteUrl(string start, string end, string language, bool avo { string highway = avoidHighways ? "&mra=ls&dirflg=dh" : "&mra=ls&dirflg=d"; - return string.Format("http://maps.{4}/maps?f=q&output=dragdir&doflg=p&hl={0}{1}&q=&saddr=@{2}&daddr=@{3}", language, highway, start.Replace(' ', '+'), end.Replace(' ', '+'), GServer); + return string.Format("https://maps.{4}/maps?f=q&output=dragdir&doflg=p&hl={0}{1}&q=&saddr=@{2}&daddr=@{3}", language, highway, start.Replace(' ', '+'), end.Replace(' ', '+'), GServer); } /// @@ -1972,7 +1972,7 @@ internal string MakeRouteAndDirectionsKmlUrl(PointLatLng start, PointLatLng end, { string highway = avoidHighways ? "&mra=ls&dirflg=dh" : "&mra=ls&dirflg=d"; - return string.Format("http://maps.{6}/maps?f=q&output=kml&doflg=p&hl={0}{1}&q=&saddr=@{2},{3}&daddr=@{4},{5}", language, highway, start.Lat.ToString(CultureInfo.InvariantCulture), start.Lng.ToString(CultureInfo.InvariantCulture), end.Lat.ToString(CultureInfo.InvariantCulture), end.Lng.ToString(CultureInfo.InvariantCulture), GServer); + return string.Format("https://maps.{6}/maps?f=q&output=kml&doflg=p&hl={0}{1}&q=&saddr=@{2},{3}&daddr=@{4},{5}", language, highway, start.Lat.ToString(CultureInfo.InvariantCulture), start.Lng.ToString(CultureInfo.InvariantCulture), end.Lat.ToString(CultureInfo.InvariantCulture), end.Lng.ToString(CultureInfo.InvariantCulture), GServer); } /// @@ -1987,7 +1987,7 @@ internal string MakeRouteAndDirectionsKmlUrl(string start, string end, string la { string highway = avoidHighways ? "&mra=ls&dirflg=dh" : "&mra=ls&dirflg=d"; - return string.Format("http://maps.{4}/maps?f=q&output=kml&doflg=p&hl={0}{1}&q=&saddr=@{2}&daddr=@{3}", language, highway, start.Replace(' ', '+'), end.Replace(' ', '+'), GServer); + return string.Format("https://maps.{4}/maps?f=q&output=kml&doflg=p&hl={0}{1}&q=&saddr=@{2}&daddr=@{3}", language, highway, start.Replace(' ', '+'), end.Replace(' ', '+'), GServer); } /// @@ -2001,7 +2001,7 @@ internal string MakeWalkingRouteUrl(PointLatLng start, PointLatLng end, string l { string directions = "&mra=ls&dirflg=w"; - return string.Format("http://maps.{6}/maps?f=q&output=dragdir&doflg=p&hl={0}{1}&q=&saddr=@{2},{3}&daddr=@{4},{5}", language, directions, start.Lat.ToString(CultureInfo.InvariantCulture), start.Lng.ToString(CultureInfo.InvariantCulture), end.Lat.ToString(CultureInfo.InvariantCulture), end.Lng.ToString(CultureInfo.InvariantCulture), GServer); + return string.Format("https://maps.{6}/maps?f=q&output=dragdir&doflg=p&hl={0}{1}&q=&saddr=@{2},{3}&daddr=@{4},{5}", language, directions, start.Lat.ToString(CultureInfo.InvariantCulture), start.Lng.ToString(CultureInfo.InvariantCulture), end.Lat.ToString(CultureInfo.InvariantCulture), end.Lng.ToString(CultureInfo.InvariantCulture), GServer); } /// @@ -2014,7 +2014,7 @@ internal string MakeWalkingRouteUrl(PointLatLng start, PointLatLng end, string l internal string MakeWalkingRouteUrl(string start, string end, string language) { string directions = "&mra=ls&dirflg=w"; - return string.Format("http://maps.{4}/maps?f=q&output=dragdir&doflg=p&hl={0}{1}&q=&saddr=@{2}&daddr=@{3}", language, directions, start.Replace(' ', '+'), end.Replace(' ', '+'), GServer); + return string.Format("https://maps.{4}/maps?f=q&output=dragdir&doflg=p&hl={0}{1}&q=&saddr=@{2}&daddr=@{3}", language, directions, start.Replace(' ', '+'), end.Replace(' ', '+'), GServer); } #endregion @@ -2028,7 +2028,7 @@ internal void TryCorrectGoogleVersions() { if(!IsCorrectedGoogleVersions) { - string url = string.Format("http://maps.{0}", GServer); + string url = string.Format("https://maps.{0}", GServer); try { HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url); diff --git a/ExtLibs/Grid/Grid.cs b/ExtLibs/Grid/Grid.cs index 1eb80fe993..b128f0772d 100644 --- a/ExtLibs/Grid/Grid.cs +++ b/ExtLibs/Grid/Grid.cs @@ -43,9 +43,9 @@ public enum StartPosition static void addtomap(linelatlng pos) { return; - List list = new List(); - list.Add(pos.p1.ToLLA()); - list.Add(pos.p2.ToLLA()); + //List list = new List(); + //list.Add(pos.p1.ToLLA()); + //list.Add(pos.p2.ToLLA()); // polygons.Routes.Add(new GMapRoute(list, "test") { Stroke = new System.Drawing.Pen(System.Drawing.Color.Yellow,4) }); diff --git a/ExtLibs/Grid/GridPlugin.cs b/ExtLibs/Grid/GridPlugin.cs index 97df994cae..e7345078bd 100644 --- a/ExtLibs/Grid/GridPlugin.cs +++ b/ExtLibs/Grid/GridPlugin.cs @@ -59,7 +59,7 @@ void but_Click(object sender, EventArgs e) { Form gridui = new GridUI(this); MissionPlanner.Utilities.ThemeManager.ApplyThemeTo(gridui); - gridui.Show(); + gridui.ShowDialog(); } else { diff --git a/ExtLibs/Grid/GridUI.Designer.cs b/ExtLibs/Grid/GridUI.Designer.cs index 0d7dd635ab..a5ecb4b29b 100644 --- a/ExtLibs/Grid/GridUI.Designer.cs +++ b/ExtLibs/Grid/GridUI.Designer.cs @@ -28,7 +28,6 @@ protected override void Dispose(bool disposing) /// private void InitializeComponent() { - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(GridUI)); this.groupBox1 = new System.Windows.Forms.GroupBox(); this.label3 = new System.Windows.Forms.Label(); this.NUM_spacing = new System.Windows.Forms.NumericUpDown(); @@ -965,10 +964,11 @@ private void InitializeComponent() this.map.Bearing = 0F; this.map.CanDragMap = true; this.map.Dock = System.Windows.Forms.DockStyle.Fill; + this.map.EmptyTileColor = System.Drawing.Color.Gray; this.map.GrayScaleMode = false; + this.map.HelperLineOption = GMap.NET.WindowsForms.HelperLineOptions.DontShow; this.map.LevelsKeepInMemmory = 5; this.map.Location = new System.Drawing.Point(0, 0); - this.map.MapType = GMap.NET.MapType.GoogleSatellite; this.map.MarkersEnabled = true; this.map.MaxZoom = 19; this.map.MinZoom = 2; @@ -978,9 +978,10 @@ private void InitializeComponent() this.map.PolygonsEnabled = true; this.map.RetryLoadTile = 0; this.map.RoutesEnabled = true; + this.map.ScaleMode = GMap.NET.WindowsForms.ScaleModes.Fractional; + this.map.SelectedAreaFillColor = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(65)))), ((int)(((byte)(105)))), ((int)(((byte)(225))))); this.map.ShowTileGridLines = false; this.map.Size = new System.Drawing.Size(755, 457); - this.map.streamjpg = ((System.IO.MemoryStream)(resources.GetObject("map.streamjpg"))); this.map.TabIndex = 0; this.map.Zoom = 3D; // diff --git a/ExtLibs/Grid/GridUI.cs b/ExtLibs/Grid/GridUI.cs index e44557a415..97745dc993 100644 --- a/ExtLibs/Grid/GridUI.cs +++ b/ExtLibs/Grid/GridUI.cs @@ -52,9 +52,9 @@ public GridUI(GridPlugin plugin) InitializeComponent(); - map.MapType = plugin.Host.FDMapType; + map.MapProvider = plugin.Host.FDMapType; - layerpolygons = new GMapOverlay(map, "polygons"); + layerpolygons = new GMapOverlay( "polygons"); map.Overlays.Add(layerpolygons); CMB_startfrom.DataSource = Enum.GetNames(typeof(Grid.StartPosition)); @@ -69,12 +69,13 @@ public GridUI(GridPlugin plugin) void AddDrawPolygon() { - layerpolygons.Polygons.Add(plugin.Host.FPDrawnPolygon); + layerpolygons.Polygons[0].Fill = Brushes.Transparent; + foreach (var item in plugin.Host.FPDrawnPolygon.Points) { - layerpolygons.Markers.Add(new GMapMarkerGoogleRed(item)); + layerpolygons.Markers.Add(new GMarkerGoogle(item,GMarkerGoogleType.red)); } } @@ -137,7 +138,7 @@ private void domainUpDown1_ValueChanged(object sender, EventArgs e) if (chk_internals.Checked) { - layerpolygons.Markers.Add(new GMapMarkerGoogleGreen(item) { ToolTipText = a.ToString(), ToolTipMode = MarkerTooltipMode.OnMouseOver }); + layerpolygons.Markers.Add(new GMarkerGoogle(item,GMarkerGoogleType.green) { ToolTipText = a.ToString(), ToolTipMode = MarkerTooltipMode.OnMouseOver }); a++; } try @@ -179,7 +180,7 @@ private void domainUpDown1_ValueChanged(object sender, EventArgs e) { strips++; if (chk_markers.Checked) - layerpolygons.Markers.Add(new GMapMarkerGoogleGreen(item) { ToolTipText = a.ToString(), ToolTipMode = MarkerTooltipMode.Always }); + layerpolygons.Markers.Add(new GMarkerGoogle(item,GMarkerGoogleType.green) { ToolTipText = a.ToString(), ToolTipMode = MarkerTooltipMode.Always }); a++; } @@ -189,6 +190,7 @@ private void domainUpDown1_ValueChanged(object sender, EventArgs e) // add wp polygon wppoly = new GMapPolygon(list2, "Grid"); wppoly.Stroke.Color = Color.Yellow; + wppoly.Fill = Brushes.Transparent; wppoly.Stroke.Width = 4; if (chk_grid.Checked) layerpolygons.Polygons.Add(wppoly); diff --git a/ExtLibs/Grid/GridUI.resx b/ExtLibs/Grid/GridUI.resx index 612344924f..29dcb1b3a3 100644 --- a/ExtLibs/Grid/GridUI.resx +++ b/ExtLibs/Grid/GridUI.resx @@ -112,19 +112,9 @@ 2.0 - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - AAEAAAD/////AQAAAAAAAAAMAgAAAEttc2NvcmxpYiwgVmVyc2lvbj0yLjAuMC4wLCBDdWx0dXJlPW5l - dXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAABZTeXN0ZW0uSU8uTWVtb3J5 - U3RyZWFtCgAAAAdfYnVmZmVyB19vcmlnaW4JX3Bvc2l0aW9uB19sZW5ndGgJX2NhcGFjaXR5C19leHBh - bmRhYmxlCV93cml0YWJsZQpfZXhwb3NhYmxlB19pc09wZW4dTWFyc2hhbEJ5UmVmT2JqZWN0K19faWRl - bnRpdHkHAAAAAAAAAAACAggICAgBAQEBAgAAAAkDAAAAAAAAAAAAAAAAAAAAAAAAAAEBAQEKDwMAAAAA - AAAAAgs= - - \ No newline at end of file diff --git a/ExtLibs/Grid/MissionPlanner.Grid.csproj b/ExtLibs/Grid/MissionPlanner.Grid.csproj index f2cbbb9d47..f268f6f379 100644 --- a/ExtLibs/Grid/MissionPlanner.Grid.csproj +++ b/ExtLibs/Grid/MissionPlanner.Grid.csproj @@ -37,6 +37,12 @@ ..\..\Lib\AStar.dll False + + ..\..\..\..\..\..\..\Desktop\DIYDrones\greatmaps_09991dd06609\Demo.WindowsForms\bin\Debug\GMap.NET.Core.dll + + + ..\..\..\..\..\..\..\Desktop\DIYDrones\greatmaps_09991dd06609\Demo.WindowsForms\bin\Debug\GMap.NET.WindowsForms.dll + False ..\..\Lib\log4net.dll @@ -87,16 +93,6 @@ GeoUtility False - - {d0c39d9d-bed0-418b-9a5e-713176caf40c} - GMap.NET.Core - False - - - {e06def77-f933-42fb-afd7-db2d0d8d6a98} - GMap.NET.WindowsForms - False - {20296734-5f3c-4593-a0d5-dd20b440b13a} MAVLink diff --git a/ExtLibs/MissionPlanner.Stats/MissionPlanner.Stats.csproj b/ExtLibs/MissionPlanner.Stats/MissionPlanner.Stats.csproj index 420176e8bd..458396649c 100644 --- a/ExtLibs/MissionPlanner.Stats/MissionPlanner.Stats.csproj +++ b/ExtLibs/MissionPlanner.Stats/MissionPlanner.Stats.csproj @@ -32,6 +32,10 @@ 4 + + False + ..\..\..\..\..\..\..\Desktop\DIYDrones\greatmaps_09991dd06609\Demo.WindowsForms\bin\Debug\GMap.NET.Core.dll + @@ -70,11 +74,6 @@ GeoUtility False - - {d0c39d9d-bed0-418b-9a5e-713176caf40c} - GMap.NET.Core - False - {20296734-5f3c-4593-a0d5-dd20b440b13a} MAVLink diff --git a/ExtLibs/TrackerHome/TrackerHomeGPS.csproj b/ExtLibs/TrackerHome/TrackerHomeGPS.csproj index 1322143e44..003819819f 100644 --- a/ExtLibs/TrackerHome/TrackerHomeGPS.csproj +++ b/ExtLibs/TrackerHome/TrackerHomeGPS.csproj @@ -32,6 +32,10 @@ 4 + + False + ..\..\..\..\..\..\..\Desktop\DIYDrones\greatmaps_09991dd06609\Demo.WindowsForms\bin\Debug\GMap.NET.Core.dll + @@ -71,11 +75,6 @@ GeoUtility False - - {d0c39d9d-bed0-418b-9a5e-713176caf40c} - GMap.NET.Core - False - {1378a66c-38e4-46f5-a05f-dc04ef7d4d16} MissionPlanner.Utilities diff --git a/ExtLibs/Utilities/MissionPlanner.Utilities.csproj b/ExtLibs/Utilities/MissionPlanner.Utilities.csproj index f81b1b2780..d4dac0c53e 100644 --- a/ExtLibs/Utilities/MissionPlanner.Utilities.csproj +++ b/ExtLibs/Utilities/MissionPlanner.Utilities.csproj @@ -40,6 +40,14 @@ ..\..\Lib\DirectShowLib-2005.dll False + + False + ..\..\..\..\..\..\..\Desktop\DIYDrones\greatmaps_09991dd06609\Demo.WindowsForms\bin\Debug\GMap.NET.Core.dll + + + False + ..\..\..\..\..\..\..\Desktop\DIYDrones\greatmaps_09991dd06609\Demo.WindowsForms\bin\Debug\GMap.NET.WindowsForms.dll + ..\..\Lib\ICSharpCode.SharpZipLib.dll False @@ -101,11 +109,6 @@ GeoUtility False - - {d0c39d9d-bed0-418b-9a5e-713176caf40c} - GMap.NET.Core - False -