Skip to content

Commit

Permalink
weird intake issue
Browse files Browse the repository at this point in the history
  • Loading branch information
PGgit08 committed Mar 8, 2024
1 parent a5ec483 commit 39a9c6f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/main/java/frc/robot/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public static class Physical {

public static class Encoders {
public static final int INTAKE_STOWED = 0;
public static final int INTAKE_OUT = 15;
public static final int INTAKE_OUT = 13;

public static final int SHOOTER_SHOOT_VEL = 10; // TODO: get this
}
Expand Down
5 changes: 2 additions & 3 deletions src/main/java/frc/robot/RobotContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public RobotContainer() {
));

// Non drive/operate default commands
// _intakeSubsystem.setDefaultCommand(new FeedActuate(_intakeSubsystem, ActuatorState.STOWED, FeedMode.NONE));
_intakeSubsystem.setDefaultCommand(new FeedActuate(_intakeSubsystem, ActuatorState.STOWED, FeedMode.NONE));

configureBindings();

Expand Down Expand Up @@ -137,8 +137,7 @@ private void configureBindings() {
_operatorController.square().whileTrue(safeFeedIn);
_operatorController.circle().whileTrue(feedOut);
_operatorController.triangle().whileTrue(new FeedActuate(_intakeSubsystem, ActuatorState.STOWED, FeedMode.OUTTAKE));
// _operatorController.cross().whileTrue(new FeedActuate(_intakeSubsystem, FeedMode.INTAKE));
_operatorController.cross().whileTrue(new SetElevator(_elevatorSubsystem, () -> .3));
_operatorController.cross().whileTrue(new FeedActuate(_intakeSubsystem, FeedMode.INTAKE));

// driver bindings
_driveController.R1().onTrue(Commands.runOnce(() -> _swerveSubsystem.fieldOriented = !_swerveSubsystem.fieldOriented, _swerveSubsystem));
Expand Down
3 changes: 3 additions & 0 deletions src/main/java/frc/robot/commands/shooter/SetShooter.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public SetShooter(ShooterSubsystem shooter) {
// Called when the command is initially scheduled.
@Override
public void initialize() {
_shooter.setAngle(_angle.getAsDouble());
}

// Called every time the scheduler runs while the command is scheduled.
Expand All @@ -43,12 +44,14 @@ public void execute() {
// Called once the command ends or is interrupted.
@Override
public void end(boolean interrupted) {
System.out.println("DONE");
_shooter.stopAngle();
}

// Returns true when the command should end.
@Override
public boolean isFinished() {
System.out.println(_shooter.atDesiredAngle());
return _shooter.atDesiredAngle();
}
}
1 change: 1 addition & 0 deletions src/main/java/frc/robot/subsystems/ShooterSubsystem.java
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ public void periodic() {

/** Returns true if the shooter is at the last desired angle setpoint. */
public boolean atDesiredAngle() {
System.out.println(_angleController.getSetpoint());
return _angleController.atSetpoint();
}

Expand Down

0 comments on commit 39a9c6f

Please sign in to comment.