Example #1
0
 public int AddCommand(MotorCommand command)
 {
     command.Address = MotorAddress;
     lock (Commands)
     {
         Commands.Add(command);
         Commands.Last().MotorCommandProgress += new MotorCommandProgressHandler(MotorControl_MotorCommandProgress);
         return(Commands.Count() - 1);
     }
 }
Example #2
0
 public int AddMotorCommand(int MotorAddress, MotorCommand Command)
 {
     lock (Motors)
     {
         Command.Address = MotorAddress;
         if (!Motors.ContainsKey(MotorAddress))
         {
             InitializeMotor(MotorAddress);
         }
         return(Motors[MotorAddress].AddCommand(Command));
     }
 }