@@ -28,7 +28,7 @@ public void setDistanceToFeedSpot(double distance) {
28
28
}
29
29
30
30
public ShooterSubsystem (TalonFX motor ) {
31
- super (SubsystemPriority .SHOOTER , ShooterState .IDLE_NO_GP );
31
+ super (SubsystemPriority .SHOOTER , ShooterState .IDLE_STOPPED );
32
32
this .motor = motor ;
33
33
34
34
// TODO: Tune lookup table
@@ -40,7 +40,7 @@ public ShooterSubsystem(TalonFX motor) {
40
40
public boolean atGoal () {
41
41
return switch (getState ()) {
42
42
case SUBWOOFER_SHOT -> MathUtil .isNear (ShooterRpms .SUBWOOFER , shooterRPM , 50 );
43
- case IDLE_WITH_GP , IDLE_NO_GP ->true ;
43
+ case IDLE_WARMUP , IDLE_STOPPED ->true ;
44
44
case PODIUM_SHOT -> MathUtil .isNear (ShooterRpms .PODIUM ,shooterRPM ,50 );
45
45
case DROP ->MathUtil .isNear (ShooterRpms .DROP ,shooterRPM ,50 );
46
46
case FEEDING ->MathUtil .isNear (feedSpotDistanceToRpm .get (distanceToFeedSpot ),shooterRPM ,50 );
@@ -66,8 +66,8 @@ protected ShooterState getNextState(ShooterState currentState) {
66
66
@ Override
67
67
protected void afterTransition (ShooterState newState ) {
68
68
switch (newState ) {
69
- case IDLE_NO_GP -> motor .disable ();
70
- case IDLE_WITH_GP -> motor .setControl (velocityRequest .withVelocity (ShooterRpms .IDLE_WITH_GP / 60.0 ));
69
+ case IDLE_STOPPED -> motor .disable ();
70
+ case IDLE_WARMUP -> motor .setControl (velocityRequest .withVelocity (ShooterRpms .IDLE_WARMUP / 60.0 ));
71
71
case SPEAKER_SHOT ->
72
72
motor .setControl (
73
73
velocityRequest .withVelocity (speakerDistanceToRpm .get (distanceToSpeaker ) / 60.0 ));
@@ -82,7 +82,9 @@ protected void afterTransition(ShooterState newState) {
82
82
83
83
@ Override
84
84
public void robotPeriodic () {
85
- // Log stator current, supply current, current velocity in RPM, applied voltage
85
+
86
+ super .robotPeriodic ();
87
+
86
88
DogLog .log ("Shooter/StatorCurrent" ,motor .getStatorCurrent ().getValueAsDouble ());
87
89
DogLog .log ("Shooter/SupplyCurrent" , motor .getSupplyCurrent ().getValueAsDouble ());
88
90
DogLog .log ("Shooter/RPM" ,motor .getVelocity ().getValueAsDouble ()*60.0 );
0 commit comments