This commit is contained in:
2025-04-06 17:17:15 +03:00
parent fd2318cbf6
commit da7f5a8404
7 changed files with 233 additions and 28 deletions

42
Common/DroneData.cs Normal file
View File

@ -0,0 +1,42 @@
namespace DroneData
{
enum StructType : ulong
{
// Output
DataIMU = 1, DataPos = 2,
// Input
DataMotor4 = 1001, DataMotor6 = 1002
};
public struct DataInfo
{
StructType Type;
ulong Size;
}
public struct DataXYZ { float X, Y, Z; }
public struct DataIMU
{
DataXYZ Acc, Gyr, Mag;
}
public struct DataPos
{
DataXYZ Local; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
float LiDAR; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
}
public struct DataMotor4
{
ulong Count;
float M1, M2, M3, M4;
}
public struct DataMotor6
{
ulong Count;
float M1, M2, M3, M4, M5, M6;
}
}

42
Common/DroneData.h Normal file
View File

@ -0,0 +1,42 @@
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; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
float LiDAR; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
};
public struct DataMotor4
{
ulong Count;
float M1, M2, M3, M4;
};
public struct DataMotor6
{
ulong Count;
float M1, M2, M3, M4, M5, M6;
};
}