Skip to content

Commit

Permalink
better intake that actually works
Browse files Browse the repository at this point in the history
  • Loading branch information
Liammurray19 committed Feb 22, 2025
1 parent a7df5cc commit e2601ca
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/main/java/frc/robot/subsystems/CoralManip.java
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,13 @@ public Command betterintake() {
return run(() -> {
getData().motor.setpoint = INTAKE_SPEED;
}).until(() -> getData().gamePieceDetected).andThen(
resetCmd(), safeStateCmd(), startSafe(() -> {
startSafe(() -> {
getData().motor.setpoint = ALIGNMENT_SPEED;
}).until(() -> {
return getMap().motor.getEncoder().getDistance() > ALIGNMENT_DISTANCE;
}).until(() -> !getData().gamePieceDetected),
startSafe(() -> {
getData().motor.setpoint = ALIGNMENT_SPEED;
}).until(() -> getData().gamePieceDetected));

}));
}

@Override
Expand Down

0 comments on commit e2601ca

Please sign in to comment.