Esempio n. 1
0
    //初始化设备
    public bool InitDevice()
    {
        // Get the KinectManager instance
        if (kinectManager == null)
        {
            kinectManager = KinectManager.Instance;
        }

        if (gloveManager == null)
        {
            gloveManager = DTGloveManager.instance;
        }

        if (lpSensorManager == null)
        {
            lpSensorManager = new LpSensorManager(ref test_data, ref cur_ModelCtrlData.wristCtrlData, 23333, "00:04:3E:9E:00:C5", 20);

            if (lpSensorManager.Init())
            {
                lpThread = new Thread(new ThreadStart(lpSensorManager.receiveData));
                lpThread.Start();
            }
        }

        if (!KinectManager.IsKinectInitialized())
        {
            Debug.Log("Kinect 未初始化");
            return(false);
        }
        if (!DTGloveManager.instance.glove.IsOpen())
        {
            Debug.Log("5DT 未初始化");
            return(false);
        }

        return(true);
    }
 void Start()
 {
     instance = this;
     InitDevice();
 }