Skip to content

Commit

Permalink
fixed auto with toggle
Browse files Browse the repository at this point in the history
  • Loading branch information
Thierry-Lachance authored Feb 29, 2024
1 parent 2b9ef23 commit 104f08c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
9 changes: 4 additions & 5 deletions src/main/java/frc/robot/commands/AutoShootToSideCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,10 @@ public AutoShootToSideCommand(
// addCommands(new FooCommand(), new BarCommand());
addCommands(new AvancerXmCommand(drivetrain, -1.75)); // todo find the number of meter
addCommands(new SetRobotAngleCommand(drivetrain, limelight));
addCommands(new SetShooterSpeedCommand(shooter));
addCommands(
new ParallelDeadlineGroup(
new ShootNoteCommand(intake), new SetShooterSpeedCommand(shooter)));
addCommands(new StopShooterCommand(shooter));
addCommands(new SetShooterStateCommand(shooter));
addCommands(new WaitXSecondCommand(5));//to speed up
addCommands(new ShootNoteCommand());
addCommands(new SetShooterStateCommand(shooter));
addCommands(new AvancerXmCommand(drivetrain, 2));
}
}
2 changes: 1 addition & 1 deletion src/main/java/frc/robot/commands/ShootNoteCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public void end(boolean interrupted) {
// Returns true when the command should end.
@Override
public boolean isFinished() {
if(intake.getWheelEncoder() >= 20){
if(Math.abs(intake.getWheelEncoder()) >= 20){//validate if positive or negative
return true;
}
return false;
Expand Down

0 comments on commit 104f08c

Please sign in to comment.