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=d786d22cf5120e6ff680d6c017256ba8c487bd44;hp=150ce5091a27713f73a63b970f06ee1274daa138;hb=268b004857f2e73159cccfc18edeff7ad33dfe78;hpb=9e91dcb88316fdb4a1915c9d164b5e753a1ba89d diff --git a/src/org/usfirst/frc/team3501/robot/subsystems/Shooter.java b/src/org/usfirst/frc/team3501/robot/subsystems/Shooter.java index 150ce50..d786d22 100644 --- a/src/org/usfirst/frc/team3501/robot/subsystems/Shooter.java +++ b/src/org/usfirst/frc/team3501/robot/subsystems/Shooter.java @@ -1,6 +1,7 @@ package org.usfirst.frc.team3501.robot.subsystems; import org.usfirst.frc.team3501.robot.Constants; +import org.usfirst.frc.team3501.robot.utils.HallEffectSensor; import com.ctre.CANTalon; @@ -9,6 +10,7 @@ import edu.wpi.first.wpilibj.command.Subsystem; public class Shooter extends Subsystem { public double wheelP = 0, wheelI = 0, wheelD = -0; private static Shooter shooter; + private static HallEffectSensor hallEffect; private final CANTalon flyWheel, indexWheel; public static final double DEFAULT_INDEXING_SPEED = 0; @@ -21,6 +23,11 @@ public class Shooter extends Subsystem { flyWheel = new CANTalon(Constants.Shooter.FLY_WHEEL); indexWheel = new CANTalon(Constants.Shooter.INDEX_WHEEL); + hallEffect = new HallEffectSensor(Constants.Shooter.HALL_EFFECT_PORT, 1); + } + + public static HallEffectSensor getHallEffectSensor() { + return hallEffect; } /** @@ -74,7 +81,7 @@ public class Shooter extends Subsystem { } - public double getShooterSpeed() { - return 0.0; + public double getShooterRPM() { + return hallEffect.getRPM(); } }