예제 #1
0
// SetTiltAngle sets the angle the kinect is tilted. Note that the device may
// not be done tilting when this function returns.
func (device *Device) SetTiltAngle(degrees float64) error {

	errCode := C.freenect_set_tilt_degs(device.device, C.double(degrees))

	if errCode < 0 {
		return fmt.Errorf("could not set tilt to ", degrees)
	}

	return nil
}
예제 #2
0
//FREENECTAPI int freenect_set_tilt_degs(freenect_device *dev, double angle);
func (dev *Device) SetTiltDegs(angle float64) int {
	return int(C.freenect_set_tilt_degs(dev.ptr(), C.double(angle)))
}
예제 #3
0
// Sets the desired target angle (in degrees) of the device and starts the motor (if necessary). Note that range is something like +- 27 degrees.
func (tilt *Tilt) SetAngle(deg float64) int {
	return int(C.freenect_set_tilt_degs(tilt.device.dev, C.double(deg)))
}