示例#1
0
// SetLED sets the color or pattern of the LED on the Kinect.
func (device *Device) SetLED(color LEDColor) error {

	errCode := C.freenect_set_led(device.device, C.freenect_led_options(color))

	if errCode != 0 {
		return errors.New("could not set LED color")
	}

	return nil
}
示例#2
0
//FREENECTAPI int freenect_set_led(freenect_device *dev, freenect_led_options option);
func (dev *Device) SetLed(option LedOptions) int {
	return int(C.freenect_set_led(dev.ptr(), C.freenect_led_options(option)))
}
示例#3
0
// Sets the LED option - a combination of color and blink.
func (device *Device) LED(option LEDOption) int {
	return int(C.freenect_set_led(device.dev, C.freenect_led_options(option)))
}