X-Git-Url: http://challenge-bot.com/repos/?p=3501%2F2017steamworks;a=blobdiff_plain;f=src%2Forg%2Fusfirst%2Ffrc%2Fteam3501%2Frobot%2Fsubsystems%2FShooter.java;h=ab36fddee10a8be135c5589ef4c1a8b5baa8d0e2;hp=85ecf468d6a2498a420813de8a41e84105c8c0ce;hb=9ca89e45fa84b2ec93bc6adf60c7dde1e0a7defb;hpb=c9b2778700c8f0bd6dec88e9993e176823145308 diff --git a/src/org/usfirst/frc/team3501/robot/subsystems/Shooter.java b/src/org/usfirst/frc/team3501/robot/subsystems/Shooter.java index 85ecf46..ab36fdd 100644 --- a/src/org/usfirst/frc/team3501/robot/subsystems/Shooter.java +++ b/src/org/usfirst/frc/team3501/robot/subsystems/Shooter.java @@ -7,8 +7,6 @@ import org.usfirst.frc.team3501.robot.utils.PIDController; import com.ctre.CANTalon; -import edu.wpi.first.wpilibj.DoubleSolenoid; -import edu.wpi.first.wpilibj.DoubleSolenoid.Value; import edu.wpi.first.wpilibj.command.Subsystem; public class Shooter extends Subsystem { @@ -28,17 +26,12 @@ public class Shooter extends Subsystem { private double targetShootingSpeed = DEFAULT_SHOOTING_SPEED; private double currentShooterMotorValue = 0; - private final DoubleSolenoid piston; - private Shooter() { flyWheel1 = new CANTalon(Constants.Shooter.FLY_WHEEL1); flyWheel2 = new CANTalon(Constants.Shooter.FLY_WHEEL2); indexWheel = new CANTalon(Constants.Shooter.INDEX_WHEEL); hallEffect = new HallEffectSensor(Constants.Shooter.HALL_EFFECT_PORT, 1); - - piston = new DoubleSolenoid(Constants.Shooter.MODULE_NUMBER, - Constants.Shooter.PISTON_FORWARD, Constants.Shooter.PISTON_REVERSE); } /** @@ -60,7 +53,7 @@ public class Shooter extends Subsystem { * motor value from -1 to 1(fastest forward) */ public void setFlyWheelMotorVal(double val) { - val = MathLib.restrictToRange(val, 0.0, 1.0); + val = MathLib.restrictToRange(val, -1.0, 1.0); flyWheel1.set(val); flyWheel2.set(val); } @@ -149,22 +142,6 @@ public class Shooter extends Subsystem { this.currentShooterMotorValue = 0; } - public Value getPistonValue() { - return piston.get(); - } - - public void setHighGear() { - changeGear(Constants.Shooter.HIGH_GEAR); - } - - public void setLowGear() { - changeGear(Constants.Shooter.LOW_GEAR); - } - - private void changeGear(DoubleSolenoid.Value gear) { - piston.set(gear); - } - public void reverseFlyWheel() { this.setFlyWheelMotorVal(shooter.REVERSE_FLYWHEEL_MOTOR_VALUE); }