Ejemplo n.º 1
0
 public LedAnimation(LedAnimationType type, float frequency, int duration)
     : this()
 {
     Type      = type;
     Frequency = frequency;
     Duration  = duration;
 }
Ejemplo n.º 2
0
 public LedAnimation(LedAnimationType type, float frequency, int duration) 
     : this()
 {
     Type = type;
     Frequency = frequency;
     Duration = duration;
 }
Ejemplo n.º 3
0
        private void initAnimationComponent()
        {
            LedAnimationCB.ItemsSource = System.Enum.GetNames(typeof(LedAnimationType));
            LedAnimationType defaultLedType = LedAnimationType.BlinkGreenRed;

            LedAnimationCB.SelectedItem      = defaultLedType.ToString();
            LedAnimationCB.IsEnabled         = false;
            droneController.ledAnimationType = defaultLedType;
            droneController.isLedEnable      = false;

            FlightAnimationCB.ItemsSource = System.Enum.GetNames(typeof(FlightAnimationType));
            FlightAnimationType defaultFlightType = FlightAnimationType.FlipRight;

            FlightAnimationCB.SelectedItem      = defaultFlightType.ToString();
            FlightAnimationCB.IsEnabled         = false;
            droneController.flightAnimationType = defaultFlightType;
            droneController.isFlightEnable      = false;
        }
Ejemplo n.º 4
0
        private void LedAnimationCB_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            LedAnimationType selectedAnimation = (LedAnimationType)Enum.Parse(typeof(LedAnimationType), LedAnimationCB.SelectedItem.ToString(), false);

            droneController.ledAnimationType = selectedAnimation;
        }
Ejemplo n.º 5
0
 private void LedAnimation(LedAnimationType ledAnimationType)
 {
     settings.Leds.LedAnimation = new LedAnimation(ledAnimationType, 2.0f, 5);
     _client.Send(settings);
 }