Animatroller.Framework.LogicalDevice.MotorWithFeedback.SetVector C# (CSharp) Метод

SetVector() публичный Метод

public SetVector ( double speed, int target, System.TimeSpan timeout ) : MotorWithFeedback
speed double
target int
timeout System.TimeSpan
Результат MotorWithFeedback
        public virtual MotorWithFeedback SetVector(double speed, int target, TimeSpan timeout)
        {
            if (!speed.WithinLimits(0, 1))
                throw new ArgumentOutOfRangeException("Speed");

            if (failed)
                throw new InvalidOperationException("Motor failed");

            if (!movementDone.WaitOne(0))
                throw new InvalidOperationException("Already moving");

            movementDone.Reset();
            lastCommandSent = DateTime.Now;
            this.Vector = new MotorVector(speed, target, timeout);

            return this;
        }