From 6aeb99968e1c0e80b45fbbf5d0e1b36c9c8dd122 Mon Sep 17 00:00:00 2001 From: Sergey Sklyarov Date: Sun, 6 Apr 2025 20:58:15 +0300 Subject: [PATCH] update --- Common/DroneData.cs | 67 --------------------------------------------- Common/DroneData.h | 42 ---------------------------- 2 files changed, 109 deletions(-) delete mode 100644 Common/DroneData.cs delete mode 100644 Common/DroneData.h diff --git a/Common/DroneData.cs b/Common/DroneData.cs deleted file mode 100644 index 8c14e2c..0000000 --- a/Common/DroneData.cs +++ /dev/null @@ -1,67 +0,0 @@ -using System.Runtime.InteropServices; - -namespace DroneData -{ - public enum DataMode : ushort - { - None = 0, Response = 1, Request = 2 - }; - - public enum DataType : ushort - { - None = 0, Head = 1, - - // Output - DataIMU = 1001, DataPos = 1002, - - // Input - DataMotor4 = 2001, DataMotor6 = 2002 - }; - - public struct DataHead - { - public int Size; - - public DataMode Mode; - public DataType Type; - - static public int StrLen = Marshal.SizeOf(typeof(DroneData.DataHead)); - } - - public struct XYZ { public float X, Y, Z; } - - public struct DataIMU - { - public DataHead Head; - public XYZ Acc, Gyr, Mag; - - static public int StrLen = Marshal.SizeOf(typeof(DroneData.DataIMU)); - } - - public struct DataPos - { - public DataHead Head; - public XYZ Local; // Локальные координаты - public float LiDAR; // Датчик посадки - - static public int StrLen = Marshal.SizeOf(typeof(DroneData.DataPos)); - } - - public struct DataMotor4 - { - public DataHead Head; - public ulong Count; - public float UL, UR, DL, DR; - - static public int StrLen = Marshal.SizeOf(typeof(DroneData.DataMotor4)); - } - - public struct DataMotor6 - { - public DataHead Head; - public ulong Count; - public float UL, UR, LL, RR, DL, DR; - - static public int StrLen = Marshal.SizeOf(typeof(DroneData.DataMotor6)); - } -} \ No newline at end of file diff --git a/Common/DroneData.h b/Common/DroneData.h deleted file mode 100644 index 14d3512..0000000 --- a/Common/DroneData.h +++ /dev/null @@ -1,42 +0,0 @@ -namespace DroneData -{ - enum class StructType : unsigned long - { - // Output - DataIMU = 1, DataPos = 2, - - // Input - DataMotor4 = 1001, DataMotor6 = 1002 - }; - - public struct DataInfo - { - StructType Type; - unsigned long Size; - }; - - public struct DataXYZ { float X, Y, Z; }; - - public struct DataIMU - { - DataXYZ Acc, Gyr, Mag; - }; - - public struct DataPos - { - DataXYZ Local; // Локальные координаты - float LiDAR; // Датчик посадки - }; - - public struct DataMotor4 - { - ulong Count; - float M1, M2, M3, M4; - }; - - public struct DataMotor6 - { - ulong Count; - float M1, M2, M3, M4, M5, M6; - }; -} \ No newline at end of file