diff --git a/tracking and telemetry/Client/.vs/Client/v16/.suo b/tracking and telemetry/Client/.vs/Client/v16/.suo index 95e62fc..21d7021 100644 Binary files a/tracking and telemetry/Client/.vs/Client/v16/.suo and b/tracking and telemetry/Client/.vs/Client/v16/.suo differ diff --git a/tracking and telemetry/Client/.vs/Client/v16/Server/sqlite3/storage.ide b/tracking and telemetry/Client/.vs/Client/v16/Server/sqlite3/storage.ide index 4b8323e..b9201d1 100644 Binary files a/tracking and telemetry/Client/.vs/Client/v16/Server/sqlite3/storage.ide and b/tracking and telemetry/Client/.vs/Client/v16/Server/sqlite3/storage.ide differ diff --git a/tracking and telemetry/Client/Client.cs b/tracking and telemetry/Client/Client.cs index 066b533..816d3df 100644 --- a/tracking and telemetry/Client/Client.cs +++ b/tracking and telemetry/Client/Client.cs @@ -64,6 +64,19 @@ namespace Client .GetCustomAttribute(); } + public string FriutTypeDescription(Enum FruitType) + { + FieldInfo fi = FruitType.GetType().GetField(FruitType.ToString()); + DescriptionAttribute[] attributes = (DescriptionAttribute[])fi.GetCustomAttributes(typeof(DescriptionAttribute), false); + if (attributes.Length > 0) + { + return attributes[0].Description; + } + else + { + return FruitType.ToString(); + } + } void bgw_DoWork(object sender, DoWorkEventArgs e) { @@ -131,7 +144,7 @@ namespace Client 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 Autopilot: " + FriutTypeDescription((MAVLink.MAV_AUTOPILOT)heartbeat.autopilot) + "\n Base mode: " + heartbeat.base_mode + "\n Custom mode: " + heartbeat.custom_mode + "\n Mavlink Version: " + heartbeat.mavlink_version + diff --git a/tracking and telemetry/Client/bin/Debug/Client.exe b/tracking and telemetry/Client/bin/Debug/Client.exe index f385648..8457996 100644 Binary files a/tracking and telemetry/Client/bin/Debug/Client.exe and b/tracking and telemetry/Client/bin/Debug/Client.exe differ diff --git a/tracking and telemetry/Client/bin/Debug/Client.pdb b/tracking and telemetry/Client/bin/Debug/Client.pdb index 71ef1f9..6e3cfa9 100644 Binary files a/tracking and telemetry/Client/bin/Debug/Client.pdb and b/tracking and telemetry/Client/bin/Debug/Client.pdb differ diff --git a/tracking and telemetry/Client/obj/Debug/Client.csproj.GenerateResource.cache b/tracking and telemetry/Client/obj/Debug/Client.csproj.GenerateResource.cache index cab3be4..12235ae 100644 Binary files a/tracking and telemetry/Client/obj/Debug/Client.csproj.GenerateResource.cache and b/tracking and telemetry/Client/obj/Debug/Client.csproj.GenerateResource.cache differ diff --git a/tracking and telemetry/Client/obj/Debug/Client.csprojAssemblyReference.cache b/tracking and telemetry/Client/obj/Debug/Client.csprojAssemblyReference.cache index 519f805..a82d70f 100644 Binary files a/tracking and telemetry/Client/obj/Debug/Client.csprojAssemblyReference.cache and b/tracking and telemetry/Client/obj/Debug/Client.csprojAssemblyReference.cache differ diff --git a/tracking and telemetry/Client/obj/Debug/Client.exe b/tracking and telemetry/Client/obj/Debug/Client.exe index f385648..8457996 100644 Binary files a/tracking and telemetry/Client/obj/Debug/Client.exe and b/tracking and telemetry/Client/obj/Debug/Client.exe differ diff --git a/tracking and telemetry/Client/obj/Debug/Client.pdb b/tracking and telemetry/Client/obj/Debug/Client.pdb index 71ef1f9..6e3cfa9 100644 Binary files a/tracking and telemetry/Client/obj/Debug/Client.pdb and b/tracking and telemetry/Client/obj/Debug/Client.pdb differ