Skip to content
This repository has been archived by the owner on May 19, 2024. It is now read-only.

Commit

Permalink
feat(intake): Improve eject sequence.
Browse files Browse the repository at this point in the history
  • Loading branch information
haydenheroux committed Apr 10, 2024
1 parent 68d3c6d commit ae4dccc
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/main/java/frc/robot/intake/IntakeConstants.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ public static class FrontRollerConstants {

public static final double INTAKE_SPEED = 34;

public static final double EJECT_SPEED = -34;

/** Maximum speed of the roller in rotations per second. */
public static final double MAXIMUM_SPEED = 67;
}
Expand Down Expand Up @@ -62,6 +64,8 @@ public static class BackRollerConstants {

public static final double INTAKE_SPEED = 34;

public static final double EJECT_SPEED = -34;

/** Maximum speed of the roller in rotations per second. */
public static final double MAXIMUM_SPEED = 67;
}
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/frc/robot/intake/IntakeState.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ public record IntakeState(

public static final IntakeState INTAKE = new IntakeState(FrontRollerConstants.INTAKE_SPEED, BackRollerConstants.INTAKE_SPEED);

public static final IntakeState EJECT = new IntakeState(FrontRollerConstants.EJECT_SPEED, BackRollerConstants.EJECT_SPEED);

public IntakeState {
Objects.requireNonNull(frontRollerVelocityRotationsPerSecond);
Objects.requireNonNull(backRollerVelocityRotationsPerSecond);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ public record SuperstructureState(
new SuperstructureState(ArmState.STOW, IntakeState.INTAKE, ShooterState.INTAKE);

public static final SuperstructureState EJECT_POSITION =
new SuperstructureState(ArmState.EJECT, IntakeState.IDLE, ShooterState.IDLE);
new SuperstructureState(ArmState.EJECT, IntakeState.EJECT, ShooterState.IDLE);

public static final SuperstructureState EJECT =
new SuperstructureState(ArmState.EJECT, IntakeState.IDLE, ShooterState.EJECT);
new SuperstructureState(ArmState.EJECT, IntakeState.EJECT, ShooterState.EJECT);

public static final SuperstructureState SPEAKER_PULL =
new SuperstructureState(ArmState.SPEAKER, IntakeState.IDLE, ShooterState.PULL);
Expand Down

0 comments on commit ae4dccc

Please sign in to comment.