+ toggleShooter = new JoystickButton(leftJoystick,
+ Constants.OI.LEFT_JOYSTICK_TRIGGER_PORT);
+ SpinRobot180_1 = new JoystickButton(leftJoystick, Constants.OI.SPIN1_PORT);
+ SpinRobot180_1.whenPressed(new Turn180());
+
+ SpinRobot180_2 = new JoystickButton(leftJoystick, Constants.OI.SPIN2_PORT);
+ SpinRobot180_2.whenPressed(new Turn180());
+
+ compactRobot_1 = new JoystickButton(leftJoystick,
+ Constants.OI.LEFT_JOYSTICK_TOP_CENTER_PORT);
+ compactRobot_2 = new JoystickButton(leftJoystick,
+ Constants.OI.LEFT_JOYSTICK_TOP_LOW_PORT);
+
+ intakeBoulder = new JoystickButton(rightJoystick,
+ Constants.OI.RIGHT_JOYSTICK_TRIGGER_PORT);
+ shootBoulder = new JoystickButton(rightJoystick,
+ Constants.OI.RIGHT_JOYSTICK_THUMB_PORT);
+
+ toggleScaling = new DigitalButton(
+ new DigitalInput(Constants.OI.TOGGLE_SCALING_PORT));
+ toggleScaling.whenPressed(new ToggleScaling());
+
+ if (!Constants.Scaler.SCALING) {
+ compactRobot_1.whenPressed(new CompactRobot());
+ compactRobot_2.whenPressed(new CompactRobot());
+
+ intakeBoulder.whenPressed(new IntakeBall());
+ shootBoulder.whenPressed(new Shoot());
+
+ } else {
+ // toggleShooter becomes winch
+ // compact robot button 1 and 2 retracts the lift
+ // intake button stops the winch
+ // shoot button extends the lift
+ toggleShooter.whenPressed(new RunWinchContinuous(
+ Constants.Scaler.SCALE_SPEED, Constants.Scaler.SECONDS_TO_SCALE));
+ compactRobot_1.whenPressed(new RetractLift());
+ compactRobot_2.whenPressed(new RetractLift());
+
+ intakeBoulder.whenReleased(new StopWinch());
+ shootBoulder.whenPressed(new ExtendLift());
+ }
+ }