コード例 #1
0
        private void DroneAnimation()
        {
            Command DroneAnimationCommand = new PlayDroneAnimationCommand(ARDrone.Control.Commands.DroneAnimation.YAW_DANCE,2);

            //if (!droneControl.IsCommandPossible(resetCommand) || !droneControl.IsCommandPossible(flatTrimCommand))
            //    return;

            //droneControl.SendCommand(resetCommand);
            droneControl.SendCommand(DroneAnimationCommand);
            UpdateUIAsync("Sending YAW_DANCE animation");
        }
コード例 #2
0
ファイル: MainWindow.xaml.cs プロジェクト: abraxas4/ARDrone
        private void button6_Click(object sender, RoutedEventArgs e)
        {
            DroneAnimation animation = ARDrone.Control.Commands.DroneAnimation.WAVE;
            int miliseconds = Convert.ToInt16(animationDurationBox.Text.ToString()) * 1000;

            switch (DroneAnimationComboBox.SelectedIndex)
            {
                case 0: animation = ARDrone.Control.Commands.DroneAnimation.FLIP_FRONT; break;
                case 1: animation = ARDrone.Control.Commands.DroneAnimation.FLIP_BACK; break;
                case 2: animation = ARDrone.Control.Commands.DroneAnimation.FLIP_LEFT; break;
                case 3: animation = ARDrone.Control.Commands.DroneAnimation.FLIP_RIGHT; break;
                case 4: animation = ARDrone.Control.Commands.DroneAnimation.PHI_M30_DEG; break;
                case 5: animation = ARDrone.Control.Commands.DroneAnimation.PHI_30_DEG; break;
                case 6: animation = ARDrone.Control.Commands.DroneAnimation.THETA_M30_DEG; break;
                case 7: animation = ARDrone.Control.Commands.DroneAnimation.THETA_30_DEG; break;
                case 8: animation = ARDrone.Control.Commands.DroneAnimation.THETA_20DEG_YAW_200DEG; break;
                case 9: animation = ARDrone.Control.Commands.DroneAnimation.THETA_20DEG_YAW_M200DEG; break;
                case 10: animation = ARDrone.Control.Commands.DroneAnimation.TURNAROUND; break;
                case 11: animation = ARDrone.Control.Commands.DroneAnimation.TURNAROUND_GODOWN; break;
                case 12: animation = ARDrone.Control.Commands.DroneAnimation.YAW_DANCE; break;
                case 13: animation = ARDrone.Control.Commands.DroneAnimation.PHI_DANCE; break;
                case 14: animation = ARDrone.Control.Commands.DroneAnimation.THETA_DANCE; break;
                case 15: animation = ARDrone.Control.Commands.DroneAnimation.VZ_DANCE; break;
                case 16: animation = ARDrone.Control.Commands.DroneAnimation.WAVE; break;
                case 17: animation = ARDrone.Control.Commands.DroneAnimation.PHI_THETA_MIXED; break;
                case 18: animation = ARDrone.Control.Commands.DroneAnimation.DOUBLE_PHI_THETA_MIXED; break;
                case 19: animation = ARDrone.Control.Commands.DroneAnimation.MAYDAY; break;
            }

            Command DroneAnimationCommand = new PlayDroneAnimationCommand(animation, miliseconds);

            droneControl.SendCommand(DroneAnimationCommand);
        }
コード例 #3
0
ファイル: MainWindow.xaml.cs プロジェクト: abraxas4/ARDrone
        private void button8_Click(object sender, RoutedEventArgs e)
        {
            Command DroneAnimationCommand = new PlayDroneAnimationCommand(ARDrone.Control.Commands.DroneAnimation.FLIP_LEFT, 40);

            droneControl.SendCommand(DroneAnimationCommand);
            UpdateUIAsync("Sending MAYDAY animation");
        }
コード例 #4
0
ファイル: MainWindow.xaml.cs プロジェクト: abraxas4/ARDrone
        private void button2_Click(object sender, RoutedEventArgs e)
        {
            Command DroneAnimationCommand = new PlayDroneAnimationCommand(ARDrone.Control.Commands.DroneAnimation.VZ_DANCE, 4000);

            droneControl.SendCommand(DroneAnimationCommand);
            UpdateUIAsync("Sending Dance animation");
        }