Exemple #1
0
 public TowerControl(Robot robot) {
   try {
     this.robot = robot;
     pickupPiston = new FestoDA(6);
     shootPiston = new FestoDA(4);
     Util.consoleLog("DigInput");
     ballCheck = new DigitalInput(0);
     Util.consoleLog("DigInput end");
     this.belt = robot.belt;
   } catch (Exception e) {
     e.printStackTrace(Util.logPrintStream);
   }
 }
Exemple #2
0
 /** Initializes the TowerControl class, setting the belt and hood position to known states. */
 public void run() {
   if (initDone == false) {
     initDone = true;
     pickupPiston.SetB();
     shootPiston.SetA();
     if (robot.isComp()) {
       robot.InitializeCANTalon((CANTalon) belt);
       launchMotor1 = new Talon(0);
       launchMotor2 = new Talon(1);
       Util.consoleLog("Launch Motors end");
     } else if (robot.isClone()) {
       launchMotor1 = new Talon(1);
       launchMotor2 = new Talon(2);
     }
     shoot = new Shooter(robot);
     pickup = new Pickup(robot);
   }
 }