void Accelerometer_ReadingChanged(object sender, BandSensorReadingEventArgs<IBandAccelerometerReading> e) { CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => { SensorReading reading = new SensorReading { X = e.SensorReading.AccelerationX, Y = e.SensorReading.AccelerationY, Z = e.SensorReading.AccelerationZ }; _prev = _last; _last = reading; Recalculate(); }); }
void Accelerometer_ReadingChanged(object sender, BandSensorReadingEventArgs <IBandAccelerometerReading> e) { CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => { SensorReading reading = new SensorReading { X = e.SensorReading.AccelerationX, Y = e.SensorReading.AccelerationY, Z = e.SensorReading.AccelerationZ }; _prev = _last; _last = reading; Recalculate(); }); }