Пример #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)))
}
Пример #4
0
func (d *FreenectDevice) SetLed(color uint) {
	// TODO: Check result
	C.freenect_sync_set_led(C.freenect_led_options(color), d.DeviceIndexCType)
}