package org.usfirst.frc.team3501.robot;
+import org.usfirst.frc.team3501.robot.Constants.IntakeArm;
import org.usfirst.frc.team3501.robot.commands.driving.SetHighGear;
import org.usfirst.frc.team3501.robot.commands.driving.SetLowGear;
import org.usfirst.frc.team3501.robot.commands.driving.ToggleFront;
import org.usfirst.frc.team3501.robot.commands.intakearm.MoveIntakeArm;
-import org.usfirst.frc.team3501.robot.commands.intakearm.RunIntake;
+import org.usfirst.frc.team3501.robot.commands.intakearm.RunIntakeContinuous;
import org.usfirst.frc.team3501.robot.commands.shooter.FireCatapult;
import org.usfirst.frc.team3501.robot.commands.shooter.ResetCatapult;
// Left joystick
gearShift = new JoystickButton(leftJoystick,
Constants.OI.LEFT_JOYSTICK_GEAR_SHIFT_PORT);
- gearShift.whenPressed(new SetLowGear());
- gearShift.whenReleased(new SetHighGear());
+ gearShift.whenPressed(new SetHighGear());
+ gearShift.whenReleased(new SetLowGear());
extendIntake1 = new JoystickButton(leftJoystick,
Constants.OI.LEFT_JOYSTICK_EXTEND_INTAKE_1_PORT);
- extendIntake1.whenPressed(new MoveIntakeArm(Constants.IntakeArm.EXTEND));
+ extendIntake1.whenPressed(new MoveIntakeArm(IntakeArm.EXTEND));
extendIntake2 = new JoystickButton(leftJoystick,
Constants.OI.LEFT_JOYSTICK_EXTEND_INTAKE_2_PORT);
- extendIntake2.whenPressed(new MoveIntakeArm(Constants.IntakeArm.EXTEND));
+ extendIntake2.whenPressed(new MoveIntakeArm(IntakeArm.EXTEND));
retractIntake1 = new JoystickButton(leftJoystick,
Constants.OI.LEFT_JOYSTICK_RETRACT_INTAKE_1_PORT);
- retractIntake1.whenPressed(new MoveIntakeArm(Constants.IntakeArm.RETRACT));
+ retractIntake1.whenPressed(new MoveIntakeArm(IntakeArm.RETRACT));
retractIntake2 = new JoystickButton(leftJoystick,
Constants.OI.LEFT_JOYSTICK_RETRACT_INTAKE_2_PORT);
- retractIntake2.whenPressed(new MoveIntakeArm(Constants.IntakeArm.RETRACT));
+ retractIntake2.whenPressed(new MoveIntakeArm(IntakeArm.RETRACT));
toggleFront = new JoystickButton(leftJoystick,
Constants.OI.LEFT_JOYSTICK_TOGGLE_FRONT_PORT);
// Right joystick
intake = new JoystickButton(rightJoystick,
Constants.OI.RIGHT_JOYSTICK_INTAKE_PORT);
- intake.whenPressed(new RunIntake(Constants.IntakeArm.IN));
+ intake.whenPressed(new RunIntakeContinuous(IntakeArm.IN));
+ intake.whenReleased(new RunIntakeContinuous(IntakeArm.STOP));
outtake1 = new JoystickButton(rightJoystick,
Constants.OI.RIGHT_JOYSTICK_OUTTAKE_1_PORT);
- outtake1.whenPressed(new RunIntake(Constants.IntakeArm.OUT));
+ outtake1.whenPressed(new RunIntakeContinuous(IntakeArm.OUT));
+ outtake1.whenReleased(new RunIntakeContinuous(IntakeArm.STOP));
outtake2 = new JoystickButton(rightJoystick,
Constants.OI.RIGHT_JOYSTICK_OUTTAKE_2_PORT);
- outtake2.whenPressed(new RunIntake(Constants.IntakeArm.OUT));
+ outtake2.whenPressed(new RunIntakeContinuous(IntakeArm.OUT));
+ outtake2.whenReleased(new RunIntakeContinuous(IntakeArm.STOP));
shooterUp = new JoystickButton(rightJoystick,
Constants.OI.RIGHT_JOYSTICK_SHOOTER_UP_PORT);