Пример #1
0
        private void LedAnimation()
        {
            Command LedAnimationCommand = new PlayLedAnimationCommand(ARDrone.Control.Commands.LedAnimation.BLINK_STANDARD, 2, 2);

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

            //droneControl.SendCommand(resetCommand);
            droneControl.SendCommand(LedAnimationCommand);
            UpdateUIAsync("Sending Marquee Blink LED animation");
        }
Пример #2
0
        private void button9_Click(object sender, RoutedEventArgs e)
        {
            LedAnimation animation   = ARDrone.Control.Commands.LedAnimation.BLANK;
            int          miliseconds = Convert.ToInt16(LedDuration.Text.ToString());
            int          frequency   = Convert.ToInt16(LedFrequency.Text.ToString());

            switch (LedAnimationComboBox.SelectedIndex)
            {
            case 0: animation = ARDrone.Control.Commands.LedAnimation.BLINK_GREEN_RED; break;

            case 1: animation = ARDrone.Control.Commands.LedAnimation.BLINK_GREEN; break;

            case 2: animation = ARDrone.Control.Commands.LedAnimation.BLINK_RED; break;

            case 3: animation = ARDrone.Control.Commands.LedAnimation.BLINK_ORANGE; break;

            case 4: animation = ARDrone.Control.Commands.LedAnimation.SNAKE_GREEN_RED; break;

            case 5: animation = ARDrone.Control.Commands.LedAnimation.FIRE; break;

            case 6: animation = ARDrone.Control.Commands.LedAnimation.STANDARD; break;

            case 7: animation = ARDrone.Control.Commands.LedAnimation.RED; break;

            case 8: animation = ARDrone.Control.Commands.LedAnimation.GREEN; break;

            case 9: animation = ARDrone.Control.Commands.LedAnimation.RED_SNAKE; break;

            case 10: animation = ARDrone.Control.Commands.LedAnimation.BLANK; break;

            case 11: animation = ARDrone.Control.Commands.LedAnimation.LEFT_GREEN_RIGHT_RED; break;

            case 12: animation = ARDrone.Control.Commands.LedAnimation.LEFT_RED_RIGHT_GREEN; break;

            case 13: animation = ARDrone.Control.Commands.LedAnimation.BLINK_STANDARD; break;
            }

            Command DroneAnimationCommand = new PlayLedAnimationCommand(animation, frequency, miliseconds);

            droneControl.SendCommand(DroneAnimationCommand);
        }