Esempio n. 1
0
 // ToDo: FlyTo overload "mid"
 public static Task <bool> FlyTo(this ITelloClient tello, int x, int y, int z, int speed)
 {
     CommandConstraints.CheckDistance(x);
     CommandConstraints.CheckDistance(y);
     CommandConstraints.CheckDistance(z);
     CommandConstraints.CheckSpeed(speed);
     return(tello.SendAction($"go {x} {y} {z} {speed}"));
 }
Esempio n. 2
0
        // ToDo: Curve overload "mid"
        public static Task <bool> Curve(this ITelloClient tello, int x1, int y1, int z1, int x2, int y2, int z2, int speed)
        {
            CommandConstraints.CheckDistance(x1);
            CommandConstraints.CheckDistance(y1);
            CommandConstraints.CheckDistance(z1);
            CommandConstraints.CheckDistance(x2);
            CommandConstraints.CheckDistance(y2);
            CommandConstraints.CheckDistance(z2);
            CommandConstraints.CheckSpeed(speed);

            // ToDo: x/y/z can’t be between -20 20 at the same time.

            return(tello.SendAction($"curve {x1} {y1} {z1} {x2} {y2} {z2} {speed}"));
        }
Esempio n. 3
0
 public static Task <bool> FlyDirection(this ITelloClient tello, MoveDirection direction, int cm)
 {
     CommandConstraints.CheckDistance(cm);
     return(tello.SendAction($"{direction.ToString().ToLower()} {cm}"));
 }