Пример #1
0
        private void VrSet_SensorDataUpdate(object sender, PSVRSensorEventArgs e)
        {
            if (BMI055Integrator.calibrating && blinkTimer == null)
            {
                blinkTimer = new System.Threading.Timer(blink, null, 150, 150);
            }
            else if (!BMI055Integrator.calibrating && blinkTimer != null)
            {
                blinkTimer.Change(Timeout.Infinite, Timeout.Infinite);
                blinkTimer = null;
                PSVRController.LedsDefault();
            }

            if (cnt++ > 10)
            {
                cnt = 0;
                tapper.Feed(e.SensorData);
            }


            lock (locker)
            {
                if (broadcaster != null)
                {
                    broadcaster.Broadcast(e.SensorData);
                }
            }
        }