- passPortcullis = new DigitalButton(
- new DigitalInput(Constants.OI.PASS_PORTCULLIS_PORT));
- passChevalDeFrise = new DigitalButton(
- new DigitalInput(Constants.OI.PASS_CHEVAL_DE_FRISE_PORT));
- passDrawbridge = new DigitalButton(
- new DigitalInput(Constants.OI.PASS_DRAWBRIDGE));
- passSallyPort = new DigitalButton(
- new DigitalInput(Constants.OI.PASS_SALLYPORT_PORT));
-
- lowerChevalDeFrise = new DigitalButton(
- new DigitalInput(Constants.OI.ARCADE_INTAKEARM_LEVEL_ONE_PORT));
- moveToIntakeBoulder = new DigitalButton(
- new DigitalInput(Constants.OI.ARCADE_INTAKEARM_LEVEL_TWO_PORT));
- poiseAboveChevalDeFrise = new DigitalButton(
- new DigitalInput(Constants.OI.ARCADE_INTAKEARM_LEVEL_THREE_PORT));
- moveIntakeArmInsideRobot = new DigitalButton(
- new DigitalInput(Constants.OI.ARCADE_INTAKEARM_LEVEL_FOUR_PORT));
+ passPortcullis = new DigitalButton(new DigitalInput(
+ Constants.OI.PASS_PORTCULLIS_PORT));
+ passPortcullis.whenPressed(new PassPortcullis());
+
+ passChevalDeFrise = new DigitalButton(new DigitalInput(
+ Constants.OI.PASS_CHEVAL_DE_FRISE_PORT));
+ passChevalDeFrise.whenPressed(new PassChevalDeFrise());
+
+ passDrawbridge = new DigitalButton(new DigitalInput(
+ Constants.OI.PASS_DRAWBRIDGE_PORT));
+ passDrawbridge.whenPressed(new PassDrawBridge());
+
+ passSallyPort = new DigitalButton(new DigitalInput(
+ Constants.OI.PASS_SALLYPORT_PORT));
+ passSallyPort.whenPressed(new PassSallyPort());
+
+ lowerChevalDeFrise = new DigitalButton(new DigitalInput(
+ Constants.OI.ARCADE_INTAKEARM_LEVEL_ONE_PORT));
+ lowerChevalDeFrise.whenPressed(new MoveIntakeArmToAngle(
+ IntakeArm.potAngles[0], IntakeArm.moveIntakeArmSpeed));
+
+ moveToIntakeBoulder = new DigitalButton(new DigitalInput(
+ Constants.OI.ARCADE_INTAKEARM_LEVEL_TWO_PORT));
+ moveToIntakeBoulder.whenPressed(new MoveIntakeArmToAngle(
+ IntakeArm.potAngles[1], IntakeArm.moveIntakeArmSpeed));
+
+ poiseAboveChevalDeFrise = new DigitalButton(new DigitalInput(
+ Constants.OI.ARCADE_INTAKEARM_LEVEL_THREE_PORT));
+ poiseAboveChevalDeFrise.whenPressed(new MoveIntakeArmToAngle(
+ IntakeArm.potAngles[2], IntakeArm.moveIntakeArmSpeed));
+
+ moveIntakeArmInsideRobot = new DigitalButton(new DigitalInput(
+ Constants.OI.ARCADE_INTAKEARM_LEVEL_FOUR_PORT));
+ moveIntakeArmInsideRobot.whenPressed(new MoveIntakeArmToAngle(
+ IntakeArm.potAngles[3], IntakeArm.moveIntakeArmSpeed));