public static SendLEDEffect Create(LEDEffect ledEffect, LEDSpeed ledSpeed, LEDPattern ledPattern, LEDColor ledColor, uint durationMs) { return(new SendLEDEffect { baseCommand = new InputDeviceCommand(Type, kSize), effect = (uint)ledEffect, speed = (uint)ledSpeed, pattern = (uint)ledPattern, color = (uint)ledColor, duration = durationMs }); }
public void SendLEDEffect() { #if UNITY_MAGIC_LEAP LEDEffect effect = (LEDEffect)ledEffectDropdown.value; LEDSpeed speed = (LEDSpeed)ledSpeedDropdown.value; LEDPattern pattern = (LEDPattern)ledPatternDropdown.value; LEDColor color = (LEDColor)ledColorDropdown.value; uint duration = (uint)ledDurationSlider.value; MagicLeapController controller = InputSystem.GetDevice <MagicLeapController>(); if (controller != null) { controller.StartLEDEffect(effect, speed, pattern, color, duration); } #endif }
public bool StartLEDEffect(LEDEffect ledEffect, LEDSpeed ledSpeed, LEDPattern ledPattern, LEDColor ledColor, uint durationMs) { var command = SendLEDEffect.Create(ledEffect, ledSpeed, ledPattern, ledColor, durationMs); return(ExecuteCommand(ref command) >= 0); }