public static SendLEDPattern Create(LEDPattern ledPattern, LEDColor ledColor, uint durationMs)
 {
     return(new SendLEDPattern
     {
         baseCommand = new InputDeviceCommand(Type, kSize),
         pattern = (uint)ledPattern,
         color = (uint)ledColor,
         duration = durationMs
     });
 }
 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
     });
 }
Esempio n. 3
0
    public void SendLEDPattern()
    {
#if UNITY_MAGIC_LEAP
        LEDPattern pattern  = (LEDPattern)ledPatternDropdown.value;
        LEDColor   color    = (LEDColor)ledColorDropdown.value;
        uint       duration = (uint)ledDurationSlider.value;

        MagicLeapController controller = InputSystem.GetDevice <MagicLeapController>();
        if (controller != null)
        {
            controller.StartLEDPattern(pattern, color, duration);
        }
#endif
    }
Esempio n. 4
0
        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);
        }
Esempio n. 5
0
        public bool StartLEDPattern(LEDPattern ledPattern, LEDColor ledColor, uint durationMs)
        {
            var command = SendLEDPattern.Create(ledPattern, ledColor, durationMs);

            return(ExecuteCommand(ref command) >= 0);
        }