Skip to content

Commit

Permalink
edit wanted angle before changing state
Browse files Browse the repository at this point in the history
  • Loading branch information
amb2127 committed Apr 6, 2024
1 parent 2fba208 commit b72d28b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/main/java/org/codeorange/frc2024/robot/Robot.java
Original file line number Diff line number Diff line change
Expand Up @@ -376,16 +376,16 @@ public void teleopPeriodic() {
superstructure.setGoalState(Superstructure.States.SOURCE_INTAKE);
}
if(buttonPanel.getRisingEdge(5)) {
superstructure.setGoalState(Superstructure.States.SPEAKER);
superstructure.isFlipped = false;
superstructure.wantedAngle = 52;
superstructure.manualOverride = true;
superstructure.setGoalState(Superstructure.States.SPEAKER);
}
if(buttonPanel.getRisingEdge(11)) {
superstructure.setGoalState(Superstructure.States.SPEAKER);
superstructure.isFlipped = true;
superstructure.wantedAngle = 52;
superstructure.manualOverride = true;
superstructure.setGoalState(Superstructure.States.SPEAKER);
}
if(buttonPanel.getRisingEdge(6)) {
superstructure.setGoalState(Superstructure.States.SHOOT_OVER_STAGE);
Expand Down Expand Up @@ -452,8 +452,9 @@ public void teleopPeriodic() {
shooter.stop();
}
if(xbox.getRisingEdge(XboxButtons.Y)) {
superstructure.setGoalState(Superstructure.States.SPEAKER);
superstructure.wantedAngle = AngleLookupInterpolation.SHOOTER_ANGLE_BACK_LOW.get(drive.findDistanceToSpeaker())
superstructure.isFlipped = drive.isForward();
superstructure.setGoalState(Superstructure.States.SPEAKER);
}
if(xbox.getFallingEdge(XboxButtons.Y)) {
superstructure.setGoalState(Superstructure.States.STOW);
Expand Down

0 comments on commit b72d28b

Please sign in to comment.