AForge.Video.Kinect.Kinect.SetLedColor C# (CSharp) Method

SetLedColor() public method

Set color of Kinect's LED.
Some error occurred with the device. Check error message.
public SetLedColor ( LedColorOption ledColor ) : void
ledColor LedColorOption LED color to set.
return void
        public void SetLedColor( LedColorOption ledColor )
        {
            lock ( sync )
            {
                CheckDevice( );

                int result = KinectNative.freenect_set_led( rawDevice, ledColor );

                if ( result != 0 )
                {
                    throw new DeviceErrorException( "Failed setting LED color to " + ledColor + ". Error code: " + result );
                }
            }
        }