Пример #1
0
        private void Accelerometer_ReadingChanged(object sender, BandSensorReadingEventArgs <IBandAccelerometerReading> e)
        {
            var s = e.SensorReading;

            if (s.AccelerationX == 0 && s.AccelerationY == 0 && s.AccelerationZ == 0)
            {
                return;
            }

            var totAcc = Sqrt(s.AccelerationX * s.AccelerationX + s.AccelerationY * s.AccelerationY + s.AccelerationZ * s.AccelerationZ);

            if (totAcc > 4.0)
            {
                Pulled?.Invoke();
            }

            Debug.WriteLine(totAcc);
        }
Пример #2
0
 public void ForegroundPull()
 {
     Pulled?.Invoke();
 }