* motors. The piston controlling the platform pushes the ball onto the wheel.
* The wheel is controlled by a motor, which is running before the ball is
* pushed onto the wheel. The spinning wheel propels the ball.
- *
+ *
* @author superuser
- *
+ *
*/
public class Shooter extends Subsystem {
public Shooter() {
shooter = new CANTalon(Constants.Shooter.PORT);
- hood1 = new DoubleSolenoid(Constants.Shooter.HOOD_FORWARD,
- Constants.Shooter.HOOD_REVERSE);
- hood2 = new DoubleSolenoid(Constants.Shooter.HOOD_FORWARD,
- Constants.Shooter.HOOD_REVERSE);
- punch = new DoubleSolenoid(Constants.Shooter.PUNCH_FORWARD,
- Constants.Shooter.PUNCH_REVERSE);
+ hood1 = new DoubleSolenoid(Constants.DriveTrain.MODULE_B_ID,
+ Constants.Shooter.RIGHT_HOOD_FORWARD,
+ Constants.Shooter.RIGHT_HOOD_REVERSE); // right
+ hood2 = new DoubleSolenoid(Constants.DriveTrain.MODULE_A_ID,
+ Constants.Shooter.LEFT_HOOD_FORWARD,
+ Constants.Shooter.LEFT_HOOD_REVERSE);// left
+ punch = new DoubleSolenoid(Constants.DriveTrain.MODULE_A_ID,
+ Constants.Shooter.PUNCH_FORWARD, Constants.Shooter.PUNCH_REVERSE);
encoder = new Encoder(Constants.Shooter.ENCODER_PORT_A,
Constants.Shooter.ENCODER_PORT_B, false, EncodingType.k4X);
/***
* This method checks to see if the ball has successfully passed through the
* intake rollers and is inside.
- *
+ *
* @return whether the presence of the ball is true or false and returns the
* state of the condition (true or false).
*/
public boolean isBallInside() {
+
if (usePhotogate())
return photogate.isBallPresent();
else
return true;
+
}
public void setSpeed(double speed) {