Beispiel #1
0
        /// <summary>
        /// Dispose resources
        /// </summary>
        public void Dispose()
        {
            if (Motor != IntPtr.Zero)
            {
                CLNUIDevice.DestroyMotor(Motor);
            }
            Motor = IntPtr.Zero;

            if (Camera != IntPtr.Zero)
            {
                CLNUIDevice.DestroyCamera(Camera);
            }
            Camera = IntPtr.Zero;

            DeviceId = 0;
        }
Beispiel #2
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="deviceid">Device id</param>
        public Kinect(int deviceid)
        {
            //		freenect.Kinect k = new freenect.Kinect(0);


            try
            {
                DeviceId = deviceid;
                Motor    = CLNUIDevice.CreateMotor(Serial);
                Camera   = CLNUIDevice.CreateCamera(Serial);


                SetMotorPosition(0);
            }
            catch (Exception e)
            {
                Trace.WriteLine("[Kinect] : Constructor failure : " + e.Message);
            }
        }
Beispiel #3
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="level"></param>
 public void SetMotorPosition(short level)
 {
     CLNUIDevice.SetMotorPosition(Motor, level);
 }
Beispiel #4
0
 /// <summary>
 /// Set
 /// </summary>
 /// <param name="mode"></param>
 public void SetLED(KinectLedBlinkMode mode)
 {
     CLNUIDevice.SetMotorLED(Motor, (byte)mode);
 }