Дофига исправлений

This commit is contained in:
2025-04-04 02:12:55 +03:00
parent b8ff486e5a
commit 46e296b7c2
4 changed files with 57 additions and 34 deletions

View File

@ -33,7 +33,7 @@ namespace DroneSimulator
if (data.Connect)
{
Drone drone = new Drone(data.ID);
drone.Create(0.5f, 10.0f);
drone.Create(0.5f, 1.0f, 1.0f);
screen2D.CreateDrone(Color.Red, data.ID);
@ -73,12 +73,7 @@ namespace DroneSimulator
drone.SetQadroPow(id.MotorUL, id.MotorUR, id.MotorDL, id.MotorDR);
Drone.DataOut od = new Drone.DataOut();
od.AccX = drone.Acc.X; od.AccY = drone.Acc.Y; od.AccZ = drone.Acc.Z;
od.GyrX = drone.Gyr.X; od.GyrY = drone.Gyr.Y; od.GyrZ = drone.Gyr.Z;
od.PosX = drone.PosXYZ.X; od.PosY = drone.PosXYZ.Y;
od.LaserRange = drone.LaserRange;
Drone.DataOut od = drone.GetDataOut();
try { data.Client.Send(Drone.getBytes(od)); }
catch { }