Files
Simulator/DroneClient/utils/RC.cs

46 lines
933 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DroneClient.utils
{
internal class RC
{
private Vector control = new();
private float throttle = 0;
public void SetControl(float roll, float pitch, float yaw)
{
control.X = roll;
control.Y = pitch;
control.Z = yaw;
}
public void SetRoll(float roll)
{
control.X = roll;
}
public void SetPitch(float pitch)
{
control.Y = pitch;
}
public void SetYaw(float yaw)
{
control.Z = yaw;
}
public void SetThrottle(float throttle)
{
this.throttle = throttle;
}
public Vector GetControl() { return control; }
public float GetThrottle() { return throttle; }
}
}