Example #1
0
        public bool InitializeVehicle()
        {
            for (int i = 0; i < 4; i++)
            {
                Pylon newpylon = new Pylon();
                newpylon.PylonID = i + 1;
                newpylon.ServoAID = "Servo" + Convert.ToString(i + 1);
                newpylon.MotorAID = "Motor" + Convert.ToString(i + 1) + "A";
                newpylon.MotorBID = "Motor" + Convert.ToString(i + 1) + "B";
                VehiclePylons.Add(newpylon);

            }

            return true;
        }
Example #2
0
 public Pylon(int newPylonID, string newServoID, string newMotorAID, string newMotorBID)
 {
     Pylon myPylon = new Pylon();
     PylonID = newPylonID;
     ServoAID = newServoID;
     MotorAID = newMotorAID;
     MotorBID = newMotorBID;
     PylonCount++;
 }