/// <summary>
        /// Called when gyroscope data has been acquired from the Myo.
        /// </summary>
        /// <param name="evt">The pointer to the event.</param>
        /// <param name="timestamp">The timestamp of the event.</param>
        protected virtual void OnAcquiredGyroscopeData(IntPtr evt, DateTime timestamp)
        {
            var gyroscope = _myoDeviceDriver.GetGyroscope(evt);

            this.Gyroscope = gyroscope;

            var handler = GyroscopeDataAcquired;

            if (handler != null)
            {
                var args = new GyroscopeDataEventArgs(
                    this,
                    timestamp,
                    gyroscope);
                handler.Invoke(this, args);
            }
        }
Beispiel #2
0
        /// <summary>
        /// Called when gyroscope data has been acquired from the Myo.
        /// </summary>
        /// <param name="evt">The pointer to the event.</param>
        /// <param name="timestamp">The timestamp of the event.</param>
        protected virtual void OnAcquiredGyroscopeData(IntPtr evt, DateTime timestamp)
        {
            // Contract.Requires<ArgumentException>(evt != IntPtr.Zero, "The event handle must be set.");

            var gyroscope = _myoDeviceDriver.GetGyroscope(evt);

            this.Gyroscope = gyroscope;

            var handler = GyroscopeDataAcquired;

            if (handler != null)
            {
                var args = new GyroscopeDataEventArgs(
                    this,
                    timestamp,
                    gyroscope);
                handler.Invoke(this, args);
            }
        }