Skip to content

Commit e5ba7dd

Browse files
committed
MissionPlanner: use local libs
1 parent a00167c commit e5ba7dd

26 files changed

+220
-205
lines changed

Controls/ProximityControl.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ public class ProximityControl : Form
2020
MAVState _parent;
2121
private Proximity.directionState _dS => _parent.Proximity.DirectionState;
2222

23-
KeyValuePair<MAVLINK_MSG_ID, Func<MAVLinkMessage, bool>> sub;
2423
private Timer timer1;
2524
private IContainer components;
2625

@@ -191,9 +190,6 @@ public void Show()
191190

192191
public void Dispose()
193192
{
194-
if (_parent != null)
195-
_parent.parent.UnSubscribeToPacketType(sub);
196-
197193
timer1.Stop();
198194
}
199195

ExtLibs/MissionPlanner.Gridv2/GridUIv2.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
using System.Text;
77
using System.Windows.Forms;
88
using System.Xml;
9+
using GeoAPI.CoordinateSystems;
10+
using GeoAPI.CoordinateSystems.Transformations;
911
using GMap.NET;
1012
using GMap.NET.WindowsForms;
1113
using GMap.NET.WindowsForms.Markers;
@@ -462,7 +464,7 @@ double calcpolygonarea(List<PointLatLng> polygon)
462464

463465
CoordinateTransformationFactory ctfac = new CoordinateTransformationFactory();
464466

465-
GeographicCoordinateSystem wgs84 = GeographicCoordinateSystem.WGS84;
467+
IGeographicCoordinateSystem wgs84 = GeographicCoordinateSystem.WGS84;
466468

467469
int utmzone = (int)((polygon[0].Lng - -186.0) / 6.0);
468470

ExtLibs/MissionPlanner.Gridv2/MissionPlanner.Gridv2.csproj

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,6 @@
5050
<HintPath>..\..\packages\log4net.2.0.8\lib\net45-full\log4net.dll</HintPath>
5151
<Private>false</Private>
5252
</Reference>
53-
<Reference Include="ProjNet">
54-
<HintPath>..\..\packages\ProjNet.1.2\lib\net20\ProjNet.dll</HintPath>
55-
<Private>False</Private>
56-
</Reference>
5753
<Reference Include="System">
5854
<Private>false</Private>
5955
</Reference>
@@ -180,6 +176,7 @@
180176
<Name>MAVLink</Name>
181177
<Private>False</Private>
182178
</ProjectReference>
179+
<ProjectReference Include="..\ProjNet\ProjNET.csproj" />
183180
<ProjectReference Include="..\Strings\MissionPlanner.Strings.csproj" />
184181
<ProjectReference Include="..\Utilities\MissionPlanner.Utilities.csproj">
185182
<Project>{1378A66C-38E4-46F5-A05F-DC04EF7D4D16}</Project>
@@ -199,11 +196,6 @@
199196
<ItemGroup>
200197
<None Include="app.config" />
201198
</ItemGroup>
202-
<ItemGroup>
203-
<PackageReference Include="ProjNet">
204-
<Version>1.2.0</Version>
205-
</PackageReference>
206-
</ItemGroup>
207199
<ItemGroup>
208200
<Reference Update="System.Runtime.Serialization">
209201
<Private>false</Private>

ExtLibs/ProjNet/ProjNET.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
<SolutionDir Condition=" '$(SolutionDir)' == '' ">$(ProjectDir)..\</SolutionDir>
66
<RootNamespace>ProjNet</RootNamespace>
77
<TargetFrameworks>netstandard2.0</TargetFrameworks>
8+
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
89

910

1011
</PropertyGroup>

ExtLibs/SimpleGrid/MissionPlanner.SimpleGrid.csproj

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,6 @@
5050
<HintPath>..\..\packages\log4net.2.0.8\lib\net45-full\log4net.dll</HintPath>
5151
<Private>false</Private>
5252
</Reference>
53-
<Reference Include="ProjNet">
54-
<HintPath>..\..\packages\ProjNet.1.2\lib\net20\ProjNet.dll</HintPath>
55-
<Private>False</Private>
56-
</Reference>
5753
<Reference Include="System">
5854
<Private>false</Private>
5955
</Reference>
@@ -175,6 +171,7 @@
175171
<Name>MAVLink</Name>
176172
<Private>False</Private>
177173
</ProjectReference>
174+
<ProjectReference Include="..\ProjNet\ProjNET.csproj" />
178175
<ProjectReference Include="..\Utilities\MissionPlanner.Utilities.csproj">
179176
<Project>{1378A66C-38E4-46F5-A05F-DC04EF7D4D16}</Project>
180177
<Name>MissionPlanner.Utilities</Name>
@@ -190,11 +187,6 @@
190187
<ItemGroup>
191188
<None Include="app.config" />
192189
</ItemGroup>
193-
<ItemGroup>
194-
<PackageReference Include="ProjNet">
195-
<Version>1.2.0</Version>
196-
</PackageReference>
197-
</ItemGroup>
198190
<ItemGroup>
199191
<Reference Update="System.Runtime.Serialization">
200192
<Private>false</Private>

ExtLibs/SimpleGrid/SimpleGridUI.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
using System.Drawing;
44
using System.Reflection;
55
using System.Windows.Forms;
6+
using GeoAPI.CoordinateSystems;
7+
using GeoAPI.CoordinateSystems.Transformations;
68
using GMap.NET;
79
using GMap.NET.WindowsForms;
810
using GMap.NET.WindowsForms.Markers;
@@ -372,7 +374,7 @@ double calcpolygonarea(List<PointLatLng> polygon)
372374

373375
CoordinateTransformationFactory ctfac = new CoordinateTransformationFactory();
374376

375-
GeographicCoordinateSystem wgs84 = GeographicCoordinateSystem.WGS84;
377+
IGeographicCoordinateSystem wgs84 = GeographicCoordinateSystem.WGS84;
376378

377379
int utmzone = (int)((polygon[0].Lng - -186.0) / 6.0);
378380

ExtLibs/Utilities/MissionPlanner.Utilities.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,32 +11,32 @@
1111
</PropertyGroup>
1212

1313
<ItemGroup>
14-
<PackageReference Include="alglibnet2" Version="0.0.0" />
1514
<PackageReference Include="BitMiracle.LibTiff.NET" Version="2.4.560" />
1615
<PackageReference Include="CSMatIO" Version="1.0.20" />
1716
<PackageReference Include="DirectShowLib" Version="1.0.0" />
1817
<PackageReference Include="log4net" Version="2.0.8" />
1918
<PackageReference Include="Microsoft.CSharp" Version="4.5.0" />
20-
<PackageReference Include="netDXF" Version="2.1.0" />
2119
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
2220
<PackageReference Include="OpenTK" Version="3.0.1" />
2321
<PackageReference Include="OpenTK.GLControl" Version="3.0.1" />
24-
<PackageReference Include="ProjNet" Version="1.2.0" />
25-
<PackageReference Include="SharpZipLib" Version="0.86.0" />
2622
<PackageReference Include="System.Drawing.Common" Version="4.5.0" />
2723
<PackageReference Include="System.IO.Ports" Version="4.5.0" />
2824
<PackageReference Include="System.Reactive.Linq" Version="4.0.0" />
2925
</ItemGroup>
3026

3127
<ItemGroup>
28+
<ProjectReference Include="..\alglibnet\alglibnet.csproj" />
3229
<ProjectReference Include="..\Comms\MissionPlanner.Comms.csproj" />
3330
<ProjectReference Include="..\Core\Core.csproj" />
3431
<ProjectReference Include="..\GeoUtility\GeoUtility.csproj" />
3532
<ProjectReference Include="..\GMap.NET.Core\GMap.NET.Core.csproj" />
33+
<ProjectReference Include="..\ICSharpCode.SharpZipLib\ICSharpCode.SharpZipLib.csproj" />
3634
<ProjectReference Include="..\KMLib\KMLib.csproj" />
3735
<ProjectReference Include="..\LibVLC.NET\LibVLC.NET.csproj" />
3836
<ProjectReference Include="..\Mavlink\MAVLink.csproj" />
3937
<ProjectReference Include="..\MetaDataExtractorCSharp240d\MetaDataExtractor.csproj" />
38+
<ProjectReference Include="..\netDxf\netDxf.csproj" />
39+
<ProjectReference Include="..\ProjNet\ProjNET.csproj" />
4040
<ProjectReference Include="..\SharpKml\SharpKml.csproj" />
4141
<ProjectReference Include="..\Zeroconf\Zeroconf\Zeroconf.csproj" />
4242
</ItemGroup>

ExtLibs/Utilities/PointLatLngAlt.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
using System.Drawing;
44
using System.Linq;
55
using System.Text;
6+
using GeoAPI.CoordinateSystems;
7+
using GeoAPI.CoordinateSystems.Transformations;
68
using GMap.NET;
79
using ProjNet.CoordinateSystems;
810
using ProjNet.CoordinateSystems.Transformations;
@@ -23,7 +25,7 @@ public class PointLatLngAlt: IComparable
2325
public Color color = Color.White;
2426

2527
static CoordinateTransformationFactory ctfac = new CoordinateTransformationFactory();
26-
static GeographicCoordinateSystem wgs84 = GeographicCoordinateSystem.WGS84;
28+
static IGeographicCoordinateSystem wgs84 = GeographicCoordinateSystem.WGS84;
2729

2830
public PointLatLngAlt(double lat, double lng, double alt, string tag)
2931
{
@@ -206,7 +208,7 @@ public static List<double[]> ToUTM(int utmzone, List<PointLatLngAlt> list)
206208

207209
list.ForEach(x => { data.Add((double[])x); });
208210

209-
return trans.MathTransform.TransformList(data);
211+
return trans.MathTransform.TransformList(data).ToList();
210212
}
211213

212214

ExtLibs/Utilities/TerrainFollow.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public TerrainFollow(IMAVLinkInterface inInterface)
2828
_interface = inInterface;
2929

3030
log.Info("Subscribe to packets");
31-
subscription = _interface.SubscribeToPacketType(MAVLink.MAVLINK_MSG_ID.TERRAIN_REQUEST, ReceviedPacket);
31+
subscription = _interface.SubscribeToPacketType(MAVLink.MAVLINK_MSG_ID.TERRAIN_REQUEST, ReceivedPacket);
3232
}
3333

3434
~TerrainFollow()
@@ -37,7 +37,7 @@ public TerrainFollow(IMAVLinkInterface inInterface)
3737
_interface.UnSubscribeToPacketType(subscription);
3838
}
3939

40-
private bool ReceviedPacket(MAVLink.MAVLinkMessage rawpacket)
40+
private bool ReceivedPacket(MAVLink.MAVLinkMessage rawpacket)
4141
{
4242
if (rawpacket.msgid == (byte) MAVLink.MAVLINK_MSG_ID.TERRAIN_REQUEST)
4343
{

ExtLibs/Utilities/utmpos.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
using System.Collections.Generic;
33
using System.Linq;
44
using System.Text;
5+
using GeoAPI.CoordinateSystems;
6+
using GeoAPI.CoordinateSystems.Transformations;
57
using ProjNet.CoordinateSystems;
68
using ProjNet.CoordinateSystems.Transformations;
79

@@ -16,7 +18,7 @@ public struct utmpos
1618
public object Tag;
1719

1820
static CoordinateTransformationFactory ctfac = new CoordinateTransformationFactory();
19-
static GeographicCoordinateSystem wgs84 = GeographicCoordinateSystem.WGS84;
21+
static IGeographicCoordinateSystem wgs84 = GeographicCoordinateSystem.WGS84;
2022

2123
public utmpos(double x, double y, int zone)
2224
{

ExtLibs/px4uploader/px4uploader.csproj

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,15 @@
2828
</ItemGroup>
2929

3030
<ItemGroup>
31-
<PackageReference Include="BouncyCastle" Version="1.8.2" />
3231
<PackageReference Include="System.IO.Ports" Version="4.5.0" />
3332
<PackageReference Include="System.Reflection.Emit.Lightweight" Version="4.3.0" />
3433
<PackageReference Include="System.Text.Encoding.CodePages" Version="4.5.0" />
3534
</ItemGroup>
3635

36+
<ItemGroup>
37+
<ProjectReference Include="..\BouncyCastle\BouncyCastle.csproj" />
38+
</ItemGroup>
39+
3740
<ItemGroup>
3841
<Reference Include="Ionic.Zip.NetStandard">
3942
<HintPath>..\Ionic.Zip.NetStandard.dll</HintPath>

GCSViews/FlightData.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4537,7 +4537,6 @@ private void setQuickViewRowsCols(string cols, string rows)
45374537
}
45384538

45394539
Random random = new Random();
4540-
private Process gst;
45414540

45424541
Color GetColor()
45434542
{

GCSViews/FlightPlanner.cs

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@
4040
using Point = System.Drawing.Point;
4141
using System.Text.RegularExpressions;
4242
using GDAL;
43+
using GeoAPI.CoordinateSystems;
44+
using GeoAPI.CoordinateSystems.Transformations;
4345
using MissionPlanner.ArduPilot;
4446
using MissionPlanner.Grid;
4547
using MissionPlanner.Plugin;
@@ -51,7 +53,6 @@ public partial class FlightPlanner : MyUserControl, IDeactivate, IActivate
5153
private static readonly ILog log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
5254
int selectedrow;
5355
public bool quickadd;
54-
bool isonline = true;
5556
bool sethome;
5657
bool polygongridmode;
5758
bool splinemode;
@@ -894,17 +895,6 @@ private void FlightPlanner_Load(object sender, EventArgs e)
894895

895896
trackBar1.Value = (int) MainMap.Zoom;
896897

897-
// check for net and set offline if needed
898-
try
899-
{
900-
IPAddress[] addresslist = Dns.GetHostAddresses("www.google.com");
901-
}
902-
catch (Exception)
903-
{
904-
// here if dns failed
905-
isonline = false;
906-
}
907-
908898
updateCMDParams();
909899

910900
panelMap.Visible = false;
@@ -2806,7 +2796,7 @@ double calcpolygonarea(List<PointLatLng> polygon)
28062796

28072797
CoordinateTransformationFactory ctfac = new CoordinateTransformationFactory();
28082798

2809-
GeographicCoordinateSystem wgs84 = GeographicCoordinateSystem.WGS84;
2799+
IGeographicCoordinateSystem wgs84 = GeographicCoordinateSystem.WGS84;
28102800

28112801
int utmzone = (int) ((polygon[0].Lng - -186.0)/6.0);
28122802

Grid/GridUI.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
using com.drew.imaging.jpg;
1313
using com.drew.metadata;
1414
using com.drew.metadata.exif;
15+
using GeoAPI.CoordinateSystems;
16+
using GeoAPI.CoordinateSystems.Transformations;
1517
using GMap.NET;
1618
using GMap.NET.WindowsForms;
1719
using GMap.NET.WindowsForms.Markers;
@@ -897,7 +899,7 @@ double calcpolygonarea(List<PointLatLngAlt> polygon)
897899

898900
CoordinateTransformationFactory ctfac = new CoordinateTransformationFactory();
899901

900-
GeographicCoordinateSystem wgs84 = GeographicCoordinateSystem.WGS84;
902+
IGeographicCoordinateSystem wgs84 = GeographicCoordinateSystem.WGS84;
901903

902904
int utmzone = (int)((polygon[0].Lng - -186.0) / 6.0);
903905

Log/LogBrowse.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -593,8 +593,6 @@ public void LoadLog(string FileName)
593593

594594
Loading.ShowLoading("Scanning coloum widths", this);
595595

596-
int b = 0;
597-
598596
int colcount = 0;
599597

600598
foreach (var msgid in logdata.FMT)

Log/LogDownload.cs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,9 @@
11
using System;
2-
using System.Collections.Generic;
3-
using System.ComponentModel;
4-
using System.Data;
5-
using System.Drawing;
62
using System.Reflection;
7-
using System.Text;
83
using System.Windows.Forms;
94
using System.IO.Ports;
105
using System.IO;
116
using System.Text.RegularExpressions;
12-
using KMLib;
13-
using KMLib.Feature;
14-
using KMLib.Geometry;
15-
using Core.Geometry;
16-
using ICSharpCode.SharpZipLib.Zip;
17-
using ICSharpCode.SharpZipLib.Checksums;
18-
using ICSharpCode.SharpZipLib.Core;
197
using log4net;
208
using MissionPlanner.Comms;
219
using MissionPlanner.Utilities;

Log/LogDownloadMavLink.cs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,13 @@
11
using System;
22
using System.Collections.Generic;
33
using System.ComponentModel;
4-
using System.Data;
5-
using System.Drawing;
64
using System.Reflection;
7-
using System.Text;
85
using System.Windows.Forms;
9-
using System.IO.Ports;
106
using System.IO;
117
using System.Linq;
12-
using System.Text.RegularExpressions;
13-
using KMLib;
14-
using KMLib.Feature;
15-
using KMLib.Geometry;
16-
using Core.Geometry;
17-
using ICSharpCode.SharpZipLib.Zip;
18-
using ICSharpCode.SharpZipLib.Checksums;
19-
using ICSharpCode.SharpZipLib.Core;
208
using log4net;
21-
using MissionPlanner.Comms;
229
using MissionPlanner.Utilities;
2310
using System.Diagnostics;
24-
using System.Threading;
2511

2612
namespace MissionPlanner.Log
2713
{

Log/LogDownloadscp.cs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,13 @@
11
using System;
22
using System.Collections.Generic;
33
using System.ComponentModel;
4-
using System.Data;
5-
using System.Drawing;
64
using System.Reflection;
7-
using System.Text;
85
using System.Windows.Forms;
9-
using System.IO.Ports;
106
using System.IO;
117
using System.Linq;
12-
using System.Text.RegularExpressions;
13-
using KMLib;
14-
using KMLib.Feature;
15-
using KMLib.Geometry;
16-
using Core.Geometry;
17-
using ICSharpCode.SharpZipLib.Zip;
18-
using ICSharpCode.SharpZipLib.Checksums;
19-
using ICSharpCode.SharpZipLib.Core;
208
using log4net;
21-
using MissionPlanner.Comms;
229
using MissionPlanner.Utilities;
2310
using System.Diagnostics;
24-
using System.Threading;
2511
using MissionPlanner.Controls;
2612
using Renci.SshNet;
2713
using Renci.SshNet.Sftp;

0 commit comments

Comments
 (0)