예제 #1
0
 /// <summary>
 /// Sets the LED color
 /// </summary>
 /// <param name="r">Red value of the LED color (0-255)</param>
 /// <param name="g">Green value of the LED color (0-255)</param>
 /// <param name="b">Blue value of the LED color (0-255)</param>
 public void SetLED(int r, int g, int b)
 {
     _motionController.Color = new Color(r / 255f, g / 255f, b / 255f);
     if (!disconnected)
     {
         PsMoveApi.psmove_set_leds(_motionController.Handle, (byte)r, (byte)g, (byte)b);
     }
 }