public object Clone() { ArmCommand newCommand = new ArmCommand(); newCommand.MovementQueue = new Queue <int[]>(this.MovementQueue); return(newCommand); }
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(); } }
public ArmCommand(ArmCommand other) { MovementQueue = other.MovementQueue; }
public object Clone() { ArmCommand newCommand = new ArmCommand(); newCommand.MovementQueue = new Queue<int[]>(this.MovementQueue); return newCommand; }
public void loadAndStart(ArmCommand command) { currentCommand = (ArmCommand)command.Clone(); CommandTimer.Start(); }