Browse Source

Improved client

master
Georgios Gerontakis 5 years ago
parent
commit
d1bf55cd66
  1. BIN
      tracking and telemetry/Client/.vs/Client/DesignTimeBuild/.dtbcache
  2. BIN
      tracking and telemetry/Client/.vs/Client/v16/.suo
  3. BIN
      tracking and telemetry/Client/.vs/Client/v16/Server/sqlite3/storage.ide
  4. 22
      tracking and telemetry/Client/Client.Designer.cs
  5. 34
      tracking and telemetry/Client/Client.cs
  6. 4
      tracking and telemetry/Client/Client.csproj
  7. BIN
      tracking and telemetry/Client/bin/Debug/Client.exe
  8. BIN
      tracking and telemetry/Client/bin/Debug/Client.pdb
  9. BIN
      tracking and telemetry/Client/bin/Debug/Enums.NET.dll
  10. BIN
      tracking and telemetry/Client/bin/Debug/Enums.NET.pdb
  11. 6882
      tracking and telemetry/Client/bin/Debug/Enums.NET.xml
  12. 3
      tracking and telemetry/Client/obj/Debug/Client.csproj.FileListAbsolute.txt
  13. BIN
      tracking and telemetry/Client/obj/Debug/Client.csproj.GenerateResource.cache
  14. BIN
      tracking and telemetry/Client/obj/Debug/Client.csprojAssemblyReference.cache
  15. BIN
      tracking and telemetry/Client/obj/Debug/Client.exe
  16. BIN
      tracking and telemetry/Client/obj/Debug/Client.pdb
  17. BIN
      tracking and telemetry/Client/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
  18. 1
      tracking and telemetry/Client/packages.config
  19. BIN
      tracking and telemetry/Client/packages/Enums.NET.3.0.2/.signature.p7s
  20. BIN
      tracking and telemetry/Client/packages/Enums.NET.3.0.2/Enums.NET.3.0.2.nupkg
  21. BIN
      tracking and telemetry/Client/packages/Enums.NET.3.0.2/lib/net45/Enums.NET.dll
  22. BIN
      tracking and telemetry/Client/packages/Enums.NET.3.0.2/lib/net45/Enums.NET.pdb
  23. 6882
      tracking and telemetry/Client/packages/Enums.NET.3.0.2/lib/net45/Enums.NET.xml
  24. BIN
      tracking and telemetry/Client/packages/Enums.NET.3.0.2/lib/netcoreapp3.0/Enums.NET.dll
  25. BIN
      tracking and telemetry/Client/packages/Enums.NET.3.0.2/lib/netcoreapp3.0/Enums.NET.pdb
  26. 8192
      tracking and telemetry/Client/packages/Enums.NET.3.0.2/lib/netcoreapp3.0/Enums.NET.xml
  27. BIN
      tracking and telemetry/Client/packages/Enums.NET.3.0.2/lib/netstandard1.0/Enums.NET.dll
  28. BIN
      tracking and telemetry/Client/packages/Enums.NET.3.0.2/lib/netstandard1.0/Enums.NET.pdb
  29. 6848
      tracking and telemetry/Client/packages/Enums.NET.3.0.2/lib/netstandard1.0/Enums.NET.xml
  30. BIN
      tracking and telemetry/Client/packages/Enums.NET.3.0.2/lib/netstandard1.1/Enums.NET.dll
  31. BIN
      tracking and telemetry/Client/packages/Enums.NET.3.0.2/lib/netstandard1.1/Enums.NET.pdb
  32. 6858
      tracking and telemetry/Client/packages/Enums.NET.3.0.2/lib/netstandard1.1/Enums.NET.xml
  33. BIN
      tracking and telemetry/Client/packages/Enums.NET.3.0.2/lib/netstandard1.3/Enums.NET.dll
  34. BIN
      tracking and telemetry/Client/packages/Enums.NET.3.0.2/lib/netstandard1.3/Enums.NET.pdb
  35. 6882
      tracking and telemetry/Client/packages/Enums.NET.3.0.2/lib/netstandard1.3/Enums.NET.xml
  36. BIN
      tracking and telemetry/Client/packages/Enums.NET.3.0.2/lib/netstandard2.0/Enums.NET.dll
  37. BIN
      tracking and telemetry/Client/packages/Enums.NET.3.0.2/lib/netstandard2.0/Enums.NET.pdb
  38. 6882
      tracking and telemetry/Client/packages/Enums.NET.3.0.2/lib/netstandard2.0/Enums.NET.xml
  39. BIN
      tracking and telemetry/Client/packages/Enums.NET.3.0.2/lib/netstandard2.1/Enums.NET.dll
  40. BIN
      tracking and telemetry/Client/packages/Enums.NET.3.0.2/lib/netstandard2.1/Enums.NET.pdb
  41. 6858
      tracking and telemetry/Client/packages/Enums.NET.3.0.2/lib/netstandard2.1/Enums.NET.xml
  42. BIN
      tracking and telemetry/Mavlink/obj/Debug/net35/MAVLink.csprojAssemblyReference.cache
  43. BIN
      tracking and telemetry/Mavlink/obj/Debug/net461/MAVLink.csprojAssemblyReference.cache
  44. BIN
      tracking and telemetry/Mavlink/obj/Debug/netstandard2.0/MAVLink.csprojAssemblyReference.cache

BIN
tracking and telemetry/Client/.vs/Client/DesignTimeBuild/.dtbcache

Binary file not shown.

BIN
tracking and telemetry/Client/.vs/Client/v16/.suo

Binary file not shown.

BIN
tracking and telemetry/Client/.vs/Client/v16/Server/sqlite3/storage.ide

Binary file not shown.

22
tracking and telemetry/Client/Client.Designer.cs

@ -34,6 +34,7 @@
this.but_connect = new System.Windows.Forms.Button();
this.serialPort1 = new System.IO.Ports.SerialPort(this.components);
this.listBox1 = new System.Windows.Forms.ListBox();
this.richTextBox1 = new System.Windows.Forms.RichTextBox();
this.SuspendLayout();
//
// CMB_comport
@ -73,22 +74,34 @@
//
// listBox1
//
this.listBox1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.listBox1.FormattingEnabled = true;
this.listBox1.ItemHeight = 16;
this.listBox1.Location = new System.Drawing.Point(6, 47);
this.listBox1.Name = "listBox1";
this.listBox1.Size = new System.Drawing.Size(169, 303);
this.listBox1.Size = new System.Drawing.Size(169, 292);
this.listBox1.TabIndex = 3;
//
// Client
// richTextBox1
//
this.richTextBox1.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.richTextBox1.Location = new System.Drawing.Point(191, 47);
this.richTextBox1.Name = "richTextBox1";
this.richTextBox1.Size = new System.Drawing.Size(458, 304);
this.richTextBox1.TabIndex = 4;
this.richTextBox1.Text = "";
//
// client
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(547, 363);
this.ClientSize = new System.Drawing.Size(661, 363);
this.Controls.Add(this.richTextBox1);
this.Controls.Add(this.listBox1);
this.Controls.Add(this.but_connect);
this.Controls.Add(this.cmb_baudrate);
this.Controls.Add(this.CMB_comport);
this.Name = "Client";
this.Name = "client";
this.Text = "Form1";
this.Load += new System.EventHandler(this.simpleexample_Load);
this.ResumeLayout(false);
@ -102,6 +115,7 @@
private System.Windows.Forms.Button but_connect;
private System.IO.Ports.SerialPort serialPort1;
private System.Windows.Forms.ListBox listBox1;
private System.Windows.Forms.RichTextBox richTextBox1;
}
}

34
tracking and telemetry/Client/Client.cs

@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Data;
using System.Drawing;
using System.IO.Ports;
@ -12,8 +13,11 @@ using System.Windows.Forms;
namespace Client
{
public partial class client : Form
{
MAVLink.MavlinkParse mavlink = new MAVLink.MavlinkParse();
// locking to prevent multiple reads on serial port
object readlock = new object();
@ -53,6 +57,14 @@ namespace Client
bgw.RunWorkerAsync();
}
public static DisplayAttribute GetDisplayAttributesFrom(Enum enumValue, Type enumType)
{
return enumType.GetMember(enumValue.ToString())
.First()
.GetCustomAttribute<DisplayAttribute>();
}
void bgw_DoWork(object sender, DoWorkEventArgs e)
{
while (serialPort1.IsOpen)
@ -102,7 +114,7 @@ namespace Client
if (sysid != packet.sysid || compid != packet.compid)
continue;
Console.WriteLine(packet.msgtypename);
//Console.WriteLine(packet.msgtypename);
listBox1.Invoke(new Action(() =>
{
@ -114,12 +126,20 @@ namespace Client
}));
if (packet.msgid == (byte)MAVLink.MAVLINK_MSG_ID.ATTITUDE)
//or
//if (packet.data.GetType() == typeof(MAVLink.mavlink_attitude_t))
{
var att = (MAVLink.mavlink_attitude_t)packet.data;
//Console.WriteLine(packet.msgtypename + " => " + att.pitch*57.2958 + " " + att.roll*57.2958);
if (packet.msgid == (byte)MAVLink.MAVLINK_MSG_ID.HEARTBEAT){
var heartbeat = (MAVLink.mavlink_heartbeat_t)packet.data;
var heartbeat_string = "Vehicle type: " + "" +
"\n Autopilot: " + "" +
"\n Base mode: " + heartbeat.base_mode +
"\n Custom mode: " + heartbeat.custom_mode +
"\n Mavlink Version: " + heartbeat.mavlink_version +
"\n System status: " + heartbeat.system_status;
richTextBox1.Invoke(new Action(() =>
{
richTextBox1.Text = heartbeat_string;
}));
}
}

4
tracking and telemetry/Client/Client.csproj

@ -36,6 +36,9 @@
<StartupObject />
</PropertyGroup>
<ItemGroup>
<Reference Include="Enums.NET, Version=3.0.0.0, Culture=neutral, PublicKeyToken=7ea1c1650d506225, processorArchitecture=MSIL">
<HintPath>packages\Enums.NET.3.0.2\lib\net45\Enums.NET.dll</HintPath>
</Reference>
<Reference Include="IronPython, Version=2.7.9.0, Culture=neutral, PublicKeyToken=7f709c5b713576e1, processorArchitecture=MSIL">
<HintPath>packages\IronPython.2.7.9\lib\net45\IronPython.dll</HintPath>
</Reference>
@ -61,6 +64,7 @@
<HintPath>packages\DynamicLanguageRuntime.1.2.2\lib\net45\Microsoft.Scripting.Metadata.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Core" />
<Reference Include="System.Data" />
<Reference Include="System.Drawing" />

BIN
tracking and telemetry/Client/bin/Debug/Client.exe

Binary file not shown.

BIN
tracking and telemetry/Client/bin/Debug/Client.pdb

Binary file not shown.

BIN
tracking and telemetry/Client/bin/Debug/Enums.NET.dll

Binary file not shown.

BIN
tracking and telemetry/Client/bin/Debug/Enums.NET.pdb

Binary file not shown.

6882
tracking and telemetry/Client/bin/Debug/Enums.NET.xml

File diff suppressed because it is too large

3
tracking and telemetry/Client/obj/Debug/Client.csproj.FileListAbsolute.txt

@ -26,3 +26,6 @@ C:\Users\GeorgiosGerontakis\Desktop\Talos_Drones_Tracking_and_Telemetry\tracking
C:\Users\GeorgiosGerontakis\Desktop\Talos_Drones_Tracking_and_Telemetry\tracking and telemetry\Client\obj\Debug\Client.exe
C:\Users\GeorgiosGerontakis\Desktop\Talos_Drones_Tracking_and_Telemetry\tracking and telemetry\Client\obj\Debug\Client.pdb
C:\Users\GeorgiosGerontakis\Desktop\Talos_Drones_Tracking_and_Telemetry\tracking and telemetry\Client\obj\Debug\Client.Client.resources
C:\Users\GeorgiosGerontakis\Desktop\Talos_Drones_Tracking_and_Telemetry\tracking and telemetry\Client\bin\Debug\Enums.NET.dll
C:\Users\GeorgiosGerontakis\Desktop\Talos_Drones_Tracking_and_Telemetry\tracking and telemetry\Client\bin\Debug\Enums.NET.pdb
C:\Users\GeorgiosGerontakis\Desktop\Talos_Drones_Tracking_and_Telemetry\tracking and telemetry\Client\bin\Debug\Enums.NET.xml

BIN
tracking and telemetry/Client/obj/Debug/Client.csproj.GenerateResource.cache

Binary file not shown.

BIN
tracking and telemetry/Client/obj/Debug/Client.csprojAssemblyReference.cache

Binary file not shown.

BIN
tracking and telemetry/Client/obj/Debug/Client.exe

Binary file not shown.

BIN
tracking and telemetry/Client/obj/Debug/Client.pdb

Binary file not shown.

BIN
tracking and telemetry/Client/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache

Binary file not shown.

1
tracking and telemetry/Client/packages.config

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="DynamicLanguageRuntime" version="1.2.2" targetFramework="net461" />
<package id="Enums.NET" version="3.0.2" targetFramework="net461" />
<package id="IronPython" version="2.7.9" targetFramework="net461" />
<package id="IronPython.StdLib" version="2.7.9" targetFramework="net461" />
<package id="log4net" version="2.0.8" targetFramework="net461" />

BIN
tracking and telemetry/Client/packages/Enums.NET.3.0.2/.signature.p7s

Binary file not shown.

BIN
tracking and telemetry/Client/packages/Enums.NET.3.0.2/Enums.NET.3.0.2.nupkg

Binary file not shown.

BIN
tracking and telemetry/Client/packages/Enums.NET.3.0.2/lib/net45/Enums.NET.dll

Binary file not shown.

BIN
tracking and telemetry/Client/packages/Enums.NET.3.0.2/lib/net45/Enums.NET.pdb

Binary file not shown.

6882
tracking and telemetry/Client/packages/Enums.NET.3.0.2/lib/net45/Enums.NET.xml

File diff suppressed because it is too large

BIN
tracking and telemetry/Client/packages/Enums.NET.3.0.2/lib/netcoreapp3.0/Enums.NET.dll

Binary file not shown.

BIN
tracking and telemetry/Client/packages/Enums.NET.3.0.2/lib/netcoreapp3.0/Enums.NET.pdb

Binary file not shown.

8192
tracking and telemetry/Client/packages/Enums.NET.3.0.2/lib/netcoreapp3.0/Enums.NET.xml

File diff suppressed because it is too large

BIN
tracking and telemetry/Client/packages/Enums.NET.3.0.2/lib/netstandard1.0/Enums.NET.dll

Binary file not shown.

BIN
tracking and telemetry/Client/packages/Enums.NET.3.0.2/lib/netstandard1.0/Enums.NET.pdb

Binary file not shown.

6848
tracking and telemetry/Client/packages/Enums.NET.3.0.2/lib/netstandard1.0/Enums.NET.xml

File diff suppressed because it is too large

BIN
tracking and telemetry/Client/packages/Enums.NET.3.0.2/lib/netstandard1.1/Enums.NET.dll

Binary file not shown.

BIN
tracking and telemetry/Client/packages/Enums.NET.3.0.2/lib/netstandard1.1/Enums.NET.pdb

Binary file not shown.

6858
tracking and telemetry/Client/packages/Enums.NET.3.0.2/lib/netstandard1.1/Enums.NET.xml

File diff suppressed because it is too large

BIN
tracking and telemetry/Client/packages/Enums.NET.3.0.2/lib/netstandard1.3/Enums.NET.dll

Binary file not shown.

BIN
tracking and telemetry/Client/packages/Enums.NET.3.0.2/lib/netstandard1.3/Enums.NET.pdb

Binary file not shown.

6882
tracking and telemetry/Client/packages/Enums.NET.3.0.2/lib/netstandard1.3/Enums.NET.xml

File diff suppressed because it is too large

BIN
tracking and telemetry/Client/packages/Enums.NET.3.0.2/lib/netstandard2.0/Enums.NET.dll

Binary file not shown.

BIN
tracking and telemetry/Client/packages/Enums.NET.3.0.2/lib/netstandard2.0/Enums.NET.pdb

Binary file not shown.

6882
tracking and telemetry/Client/packages/Enums.NET.3.0.2/lib/netstandard2.0/Enums.NET.xml

File diff suppressed because it is too large

BIN
tracking and telemetry/Client/packages/Enums.NET.3.0.2/lib/netstandard2.1/Enums.NET.dll

Binary file not shown.

BIN
tracking and telemetry/Client/packages/Enums.NET.3.0.2/lib/netstandard2.1/Enums.NET.pdb

Binary file not shown.

6858
tracking and telemetry/Client/packages/Enums.NET.3.0.2/lib/netstandard2.1/Enums.NET.xml

File diff suppressed because it is too large

BIN
tracking and telemetry/Mavlink/obj/Debug/net35/MAVLink.csprojAssemblyReference.cache

Binary file not shown.

BIN
tracking and telemetry/Mavlink/obj/Debug/net461/MAVLink.csprojAssemblyReference.cache

Binary file not shown.

BIN
tracking and telemetry/Mavlink/obj/Debug/netstandard2.0/MAVLink.csprojAssemblyReference.cache

Binary file not shown.
Loading…
Cancel
Save