Skip to content
This repository has been archived by the owner on Feb 14, 2023. It is now read-only.

Commit

Permalink
add assist the driver in lining up if the intake is open
Browse files Browse the repository at this point in the history
  • Loading branch information
varun7654 committed Mar 24, 2022
1 parent 1853a13 commit 0ef4661
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/frc/robot/Robot.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import frc.auton.guiauto.serialization.reflection.ClassInformationSender;
import frc.subsystem.*;
import frc.subsystem.Climber.ClimbState;
import frc.subsystem.Intake.IntakeSolState;
import frc.utility.*;
import frc.utility.Controller.XboxAxes;
import frc.utility.Controller.XboxButtons;
Expand Down Expand Up @@ -464,7 +465,7 @@ public void teleopPeriodic() {
shooter.setFiring(false);
shooter.setSpeed(0);
visionManager.unForceVisionOn(driverForcingVisionOn);
if (xbox.getRawAxis(XboxAxes.LEFT_TRIGGER) > 0.1) {
if (xbox.getRawAxis(XboxAxes.LEFT_TRIGGER) > 0.1 && intake.getIntakeSolState() == IntakeSolState.OPEN) {
drive.centerOntoBall(getControllerDriveInputs(), useFieldRelative);
} else if (climber.getClimbState() == ClimbState.IDLE || climber.isPaused()) { // If we're climbing don't allow the robot to be
// driven
Expand Down

0 comments on commit 0ef4661

Please sign in to comment.