async void NotifyTemperature(GattCharacteristic sender, GattValueChangedEventArgs args) { byte[] rawData = BLE_Utilities.getDataBytes(args); float temp = SensorConvert.convertTemperature(rawData); await this.Dispatcher.BeginInvoke((Action)(() => setTemperature(temp))); }
//##Temperature async Task ReadTemperature() { byte[] rawData = await BLE_Utilities.ReadData(Sensor.Temperature); float temp = SensorConvert.convertTemperature(rawData); await this.Dispatcher.BeginInvoke((Action)(() => setTemperature(temp))); }