public static final int POT_CHANNEL = 0;
public static final double INTAKE_SPEED = 0.5;
public static final double OUTPUT_SPEED = -0.5;
+ public static final double STOP_SPEED = 0.0;
public final static double FULL_RANGE = 270.0; // in degrees
public final static double OFFSET = -135.0; // in degrees
public static final double ZERO_ANGLE = 0;
import edu.wpi.first.wpilibj.command.Command;
public class ToggleBallRollerExpel extends Command {
- final double BALL_INTAKE_SPEED = 0.3;
public ToggleBallRollerExpel() {
}
@Override
protected void initialize() {
- Robot.shooter.setSpeed(BALL_INTAKE_SPEED);
+ if (Robot.intakeArm.areRollersRolling())
+ Robot.intakeArm.stopRollers();
+ else
+ Robot.intakeArm.intakeBall();
}
@Override
intakeRoller.set(Constants.IntakeArm.OUTPUT_SPEED);
}
+ public void stopRollers() {
+ intakeRoller.set(Constants.IntakeArm.STOP_SPEED);
+ }
+
/***
* This method gets you the current voltage of the motor that controls the
* intake arm roller. The range of voltage is from [-1,1]. A negative voltage