Exemple #1
0
 public void AddCommand(RouterCommand r)
 {
     lock (commands)
     {
         commands.Add(r);
         finalPosition = r.FinalPosition();
     }
 }
Exemple #2
0
 void RobotReady(object o, EventArgs e)
 {
     lock (commands)
     {
         if (commands.Count > 0)
         {
             RouterCommand c = commands[0];
             Console.WriteLine("Executing Command {0}", commands.Count);
             commands.RemoveAt(0);
             c.Execute(device);
         }
         else
         {
             finalPosition = device.GetPosition();
         }
     }
 }
Exemple #3
0
 public void AddCommand(RouterCommand r)
 {
     lock (commands)
     {
         commands.Add(r);
         finalPosition = r.FinalPosition();
     }
 }
Exemple #4
0
 public void AddRouterCommands(RouterCommand[] router_commands)
 {
     lock (commands)
     {
         this.commands.AddRange(router_commands);
         Console.WriteLine("Now Has " + commands.Count + " Router Commands");
     }
 }