/// <summary> /// Constructor of RotationVectorSensorAdapter. /// </summary> public RotationVectorSensorAdapter() { sensor = new RotationVectorSensor { Interval = 100, PausePolicy = SensorPausePolicy.None }; }
public RotationVectorPage() { Model = new RotationVectorModel { IsSupported = RotationVectorSensor.IsSupported, SensorCount = RotationVectorSensor.Count }; InitializeComponent(); if (Model.IsSupported) { RotationVector = new RotationVectorSensor(); RotationVector.DataUpdated += RotationVector_DataUpdated; RotationVector.AccuracyChanged += RotationVector_AccuracyChanged; canvas.ChartScale = 200; canvas.Series = new List <Series>() { new Series() { Color = SKColors.Red, Name = "X", FormattedText = "X={0:f2}", }, new Series() { Color = SKColors.Green, Name = "Y", FormattedText = "Y={0:f2}", }, new Series() { Color = SKColors.Blue, Name = "Z", FormattedText = "Z={0:f2}", }, new Series() { Color = SKColors.Blue, Name = "W", FormattedText = "W={0:f2}", }, }; } }