private void CharacteristicOnValueUpdated(object sender, CharacteristicUpdateEventArgs characteristicReadEventArgs) { var characteristic = characteristicReadEventArgs.Characteristic; if (characteristic.Id == VoltageGuid) { Voltage = BitConverter.ToUInt16(characteristic.Value, 0); } if (characteristic.Id == TemperatureGuid) { Temperature = BitConverter.ToInt16(characteristic.Value, 0); } if (characteristic.Id == EltGuid) { Elt = BitConverter.ToUInt32(characteristic.Value, 0); } if (characteristic.Id == VoltageTemperatureZoneAccGuid) { // Keh? } if (characteristic.Id == TimeGuid) { Time = BitConverter.ToUInt32(characteristic.Value, 0); } if (characteristic.Id == ConfigurationGuid) { Configuration = BitConverter.ToInt32(characteristic.Value, 0); } }
private void OnCharacteristicValueUpdated(object sender, CharacteristicUpdateEventArgs e) { if (e.Characteristic.Id == this.Id) { ValueUpdated(this, e); } }