private async void LightSensorOnReadingChanged(Sensor.LightSensor sender, Sensor.LightSensorReadingChangedEventArgs args) { await _dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => { var lightReading = args.Reading; LuxLums = string.Format("{0,5:0.00}", lightReading.IlluminanceInLux); Brightness = lightReading.IlluminanceInLux / 100; }); }
private async void GyrometerOnReadingChanged(Sensor.Gyrometer sender, Sensor.GyrometerReadingChangedEventArgs args) { await _dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => { XAxisReading = args.Reading.AngularVelocityX; YAxisReading = args.Reading.AngularVelocityY; ZAxisReading = args.Reading.AngularVelocityZ; SetupNewLocation(); }); }
private async void InclinometerOnReadingChanged(Sensor.Inclinometer sender, Sensor.InclinometerReadingChangedEventArgs args) { await _dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => { PitchDegrees = args.Reading.PitchDegrees; RollDegrees = args.Reading.RollDegrees; YawDegrees = args.Reading.YawDegrees; SetupNewLocation(); }); }
private async void AccelerometerOnReadingChanged(Sensor.Accelerometer sender, Sensor.AccelerometerReadingChangedEventArgs args) { await _dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => { XAcceleration = args.Reading.AccelerationX; YAcceleration = args.Reading.AccelerationY; ZAcceleration = args.Reading.AccelerationZ; SetupNewLocation(); }); }
private async void AccelerometerOnShaken(Sensor.Accelerometer sender, Sensor.AccelerometerShakenEventArgs args) { await _dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => { ShakeCount = ShakeCount + 1; }); }