Exemplo n.º 1
0
        async void NotifyPressure(GattCharacteristic sender, GattValueChangedEventArgs args)
        {
            byte[] rawData = BLE_Utilities.getDataBytes(args);
            float  temp    = SensorConvert.convertPressure(rawData);

            await this.Dispatcher.BeginInvoke((Action)(() => setPressure(temp)));
        }
Exemplo n.º 2
0
        //##Pressure
        async Task ReadPressure()
        {
            byte[] rawData = await BLE_Utilities.ReadData(Sensor.Pressure);

            float temp = SensorConvert.convertPressure(rawData);

            await this.Dispatcher.BeginInvoke((Action)(() => setPressure(temp)));
        }