Skip to content

Commit 868b634

Browse files
committed
auto climb code
1 parent 3e3bde3 commit 868b634

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/main/java/frc/robot/HeadHoncho.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,12 @@ public void initialize() {
4848

4949
@Override
5050
public SystemState nextState() {
51+
52+
if(s_autoClimb && DriverStation.isFMSAttached() && DriverStation.isTeleopEnabled() && DriverStation.getMatchTime() <= 22.0){
53+
s_autoClimb = false;
54+
return MOUNT;
55+
}
56+
5157
if (s_intakeButton.getAsBoolean() && END_EFFECTOR_SUBSYSTEM.isEmpty() && LIFT_SUBSYSTEM.isAtState(TargetLiftStates.STOW)) {
5258
return INTAKE;
5359
}
@@ -367,6 +373,7 @@ public void end(boolean interrupted) {
367373
private static BooleanSupplier s_climbButton;
368374
private static Boolean s_lastClimbBoolean = false;
369375
private static Boolean s_climbButtonRising = false;
376+
private static Boolean s_autoClimb = true;
370377

371378
public HeadHoncho(
372379
DriveSubsystem driveSubsystem,

0 commit comments

Comments
 (0)