//## Gyroscope async Task ReadGyroscope() { byte[] rawData = await BLE_Utilities.ReadData(Sensor.Gyroscope); float[] vals = SensorConvert.convertGyroscope(rawData); await this.Dispatcher.BeginInvoke((Action)(() => setGyroscope(vals[0], vals[1], vals[2]))); }
async void NotifyGyroscope(GattCharacteristic sender, GattValueChangedEventArgs args) { byte[] rawData = BLE_Utilities.getDataBytes(args); float[] vals = SensorConvert.convertGyroscope(rawData); await this.Dispatcher.BeginInvoke((Action)(() => setGyroscope(vals[0], vals[1], vals[2]))); }