Ejemplo n.º 1
0
        public void StopVideo()
        {
            CommandTuple cmdTuple = new CommandTuple(1, 21, 0);
            CommandParam cmdParam = new CommandParam();

            cmdParam.AddData((byte)0);  // Disable Video

            SendParam(cmdTuple, cmdParam);
        }
Ejemplo n.º 2
0
        protected void GenerateDroneCommand()
        {
            lock (ThisLock)
            {
                if (FlyVector.IsNull())
                {
                    return;
                }

                CommandTuple cmdTuple = new CommandTuple(1, 0, 2);
                int          roll     = Clamp(FlyVector.Roll, VectorMin, VectorMax);
                int          pitch    = Clamp(FlyVector.Pitch, VectorMin, VectorMax);
                int          yaw      = Clamp(FlyVector.Yaw, VectorMin, VectorMax);
                int          gaz      = Clamp(FlyVector.Gaz, VectorMin, VectorMax);

                CommandParam cmdParam = new CommandParam();

                cmdParam.AddData((byte)FlyVector.Flag);
                cmdParam.AddData((sbyte)roll);
                cmdParam.AddData((sbyte)pitch);
                cmdParam.AddData((sbyte)yaw);
                cmdParam.AddData((sbyte)gaz);
                cmdParam.AddData((uint)0);

                SendSinglePcmd(cmdTuple, cmdParam);

                Thread.Sleep(100);
            }
        }