예제 #1
0
 public MotorModelList(bool useDummy)
 {
     MotorPort[] portList = { MotorPort.OutA, MotorPort.OutB, MotorPort.OutC, MotorPort.OutD };
     for (int i = 0; i < 4; i++)
     {
         if (useDummy)
         {
             motors [i] = new DummyMotorModel(portList [i]);
         }
         else
         {
             motors [i] = new MotorModel(portList [i]);
         }
     }
 }
예제 #2
0
		public MotorModelList (bool useDummy)
		{
			MotorPort[] portList = { MotorPort.OutA, MotorPort.OutB, MotorPort.OutC, MotorPort.OutD };
			for (int i = 0; i < 4; i++) 
			{
				if (useDummy) 
				{
					motors [i] = new DummyMotorModel (portList [i]);
				} 
				else 
				{
					motors [i] = new MotorModel (portList [i]);
				}
			}
		}