예제 #1
0
        private void HeartRateValueChanged(GattCharacteristic sender, GattValueChangedEventArgs e)
        {
            byte[] data;
            CryptographicBuffer.CopyToByteArray(e.CharacteristicValue, out data);

            var args = new Events.RateChangedEventArgs()
            {
                BeatsPerMinute = Utilities.ParseHeartRateValue(data)
            };

            OnRateChanged(args);
        }
예제 #2
0
 /// <summary>
 /// Raises the <see cref="E:ValueChanged" /> event.
 /// </summary>
 /// <param name="e">The <see cref="Events.RateChangedEventArgs"/> instance containing the event data.</param>
 protected virtual void OnRateChanged(Events.RateChangedEventArgs e)
 {
     RateChanged?.Invoke(this, e);
 }