public LedAnimation(LedAnimationType type, float frequency, int duration) : this() { Type = type; Frequency = frequency; Duration = duration; }
public LedAnimation(LedAnimationType type, float frequency, int duration) : this() { Type = type; Frequency = frequency; Duration = duration; }
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; }
private void LedAnimationCB_SelectionChanged(object sender, SelectionChangedEventArgs e) { LedAnimationType selectedAnimation = (LedAnimationType)Enum.Parse(typeof(LedAnimationType), LedAnimationCB.SelectedItem.ToString(), false); droneController.ledAnimationType = selectedAnimation; }
private void LedAnimation(LedAnimationType ledAnimationType) { settings.Leds.LedAnimation = new LedAnimation(ledAnimationType, 2.0f, 5); _client.Send(settings); }