Skip to content

Commit

Permalink
Auto intake unless something else happens
Browse files Browse the repository at this point in the history
  • Loading branch information
David-Dube committed Feb 8, 2025
1 parent 166cac2 commit 8189333
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions src/main/java/frc/robot/HeadHoncho.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,14 @@ public void initialize() {
INTAKE_SUBSYSTEM.idle();
}

@Override
public void execute() {
if (DRIVE_SUBSYSTEM.isNearSource()) {
INTAKE_SUBSYSTEM.intake();
} else {
INTAKE_SUBSYSTEM.idle();
}
}

@Override
public SystemState nextState() {
if (intake_button.getAsBoolean() && END_EFFECTOR_SUBSYSTEM.isEmpty() && LIFT_SUBSYSTEM.isAtState(TargetLiftStates.STOW)) {
return INTAKE;
}

if (END_EFFECTOR_SUBSYSTEM.isEmpty()) return INTAKE;

if (regurgitate_button.getAsBoolean() && LIFT_SUBSYSTEM.isAtState(TargetLiftStates.STOW)) {
return REGURGITATE;
}
Expand Down

0 comments on commit 8189333

Please sign in to comment.