示例#1
0
        public object Clone()
        {
            ArmCommand newCommand = new ArmCommand();

            newCommand.MovementQueue = new Queue <int[]>(this.MovementQueue);
            return(newCommand);
        }
示例#2
0
        void CommandTimer_Tick(object sender, EventArgs e)
        {
            if (currentCommand.MovementQueue.Count != 0)
            {
                Array.Copy(currentCommand.MovementQueue.Dequeue(), currentArm.CurrentAngles, 7);
                currentArm.setAngles();
            }

            else
            {
                currentCommand = null;
                CommandTimer.Stop();
            }
        }
示例#3
0
        void CommandTimer_Tick(object sender, EventArgs e)
        {
            if (currentCommand.MovementQueue.Count != 0)
            {
                Array.Copy(currentCommand.MovementQueue.Dequeue(), currentArm.CurrentAngles, 7);
                currentArm.setAngles();
            }

            else
            {
                currentCommand = null;
                CommandTimer.Stop();
            }
        }
示例#4
0
 public ArmCommand(ArmCommand other)
 {
     MovementQueue = other.MovementQueue;
 }
示例#5
0
 public object Clone()
 {
     ArmCommand newCommand = new ArmCommand();
     newCommand.MovementQueue = new Queue<int[]>(this.MovementQueue);
     return newCommand;
 }
示例#6
0
 public ArmCommand(ArmCommand other)
 {
     MovementQueue = other.MovementQueue;
 }
示例#7
0
 public void loadAndStart(ArmCommand command)
 {
     currentCommand = (ArmCommand)command.Clone();
     CommandTimer.Start();
 }
示例#8
0
 public void loadAndStart(ArmCommand command)
 {
     currentCommand = (ArmCommand)command.Clone();
     CommandTimer.Start();
 }