/// <summary> /// Called when the Myo has detected a change in the user's pose. /// </summary> /// <param name="evt">The pointer to the event.</param> /// <param name="timestamp">The timestamp of the event.</param> protected virtual void OnPoseChanged(IntPtr evt, DateTime timestamp) { var pose = _myoDeviceDriver.GetEventPose(evt); this.Pose = pose; var handler = PoseChanged; if (handler != null) { var args = new PoseEventArgs(this, timestamp, pose); handler.Invoke(this, args); } }
/// <summary> /// Called when the Myo has detected a change in the user's pose. /// </summary> /// <param name="evt">The pointer to the event.</param> /// <param name="timestamp">The timestamp of the event.</param> protected virtual void OnPoseChanged(IntPtr evt, DateTime timestamp) { // Contract.Requires<ArgumentException>(evt != IntPtr.Zero, "The event handle must be set."); var pose = _myoDeviceDriver.GetEventPose(evt); this.Pose = pose; var handler = PoseChanged; if (handler != null) { var args = new PoseEventArgs(this, timestamp, pose); handler.Invoke(this, args); } }