Skip to content

Commit

Permalink
Merge branch '27-handoff-command' of https://github.com/Patribots4738…
Browse files Browse the repository at this point in the history
…/Crescendo2024 into 27-handoff-command
  • Loading branch information
Jacob1010-h committed Jan 24, 2024
2 parents dd1949b + 30753bc commit 1f3f61f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/main/java/frc/robot/commands/ShooterCalc.java
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,12 @@ public Command sendBackCommand() {
.andThen(() -> shooterSetSpeed(ShooterConstants.SHOOTER_BACK_SPEED));
}

public Command resetShooter() {
return Commands.runOnce(() -> stopAiming())
.andThen(Commands.runOnce(() -> shooterStop()))
.alongWith(Commands.runOnce(() -> pivotSetRestAngle()));
}

public void shooterSetSpeed(double speed) {
shooter.setSpeed(speed);
}
Expand All @@ -126,6 +132,10 @@ private void toggleAiming() {
this.aiming = (() -> !aiming.getAsBoolean());
}

private void stopAiming() {
this.aiming = (() -> false);
}

// Gets a SpeedAnglePair by interpolating values from a map of already
// known required speeds and angles for certain poses
private SpeedAnglePair calculateSpeed(Pose2d robotPose, boolean shootingAtSpeaker) {
Expand Down

0 comments on commit 1f3f61f

Please sign in to comment.