Skip to content

Commit

Permalink
fix autonnotealign
Browse files Browse the repository at this point in the history
  • Loading branch information
CrolineCrois committed Apr 3, 2024
1 parent e649c70 commit 0607221
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/main/java/frc/robot/commands/auton/AutonBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ public Command goIntake(ChoreoTrajectory intakeTrajectory) {
new IntakeRollerIntakeCommand(intakeRollerSubsystem, lightBarSubsystem)
).withTimeout(1),
new IntakeRollerIntakeCommand(intakeRollerSubsystem, lightBarSubsystem).until(
() -> intakeRollerSubsystem.getBackSensorReached()).withTimeout(2)
() -> intakeRollerSubsystem.getRockwellSensorValue()).withTimeout(2)
// new IntakeRollerIntakeCommand(intakeRollerSubsystem, lightBarSubsystem)
// .alongWith(new DriveForwardCommand(swerveSubsystem).until(
// intakeRollerSubsystem::getFrontSensorValue).until(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public void initialize() {
@Override
//stops when there is a note in the intake
public boolean isFinished() {
return intakeRollerSubsystem.getFrontSensorReached();
return intakeRollerSubsystem.getAmpSensor();
}

@Override
Expand All @@ -87,6 +87,11 @@ after. If it remains out of frame, this issue should be rather evident (the robo

@Override
public void end(boolean interrupted) {
swerveSubsystem.setRobotRelativeDrivePowers(
0,
0,
0
);
System.out.println("Ended NoteAlignCommand");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -139,5 +139,7 @@ public void periodic() {
if (getFrontSensorValue()) {
lightBarSubsystem.setLightBarStatus(LightBarStatus.HOLDING_NOTE, 2);
}

System.out.println(getAmpSensor());
}
}

0 comments on commit 0607221

Please sign in to comment.