diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index a7901003..6a7c09a1 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -298,8 +298,8 @@ private void configureBindings() { //this sequential command group SHOULD (not tested) 1) start rev'ing up the shooter 2) drive backwards 3) for shoter to rev, then shoot the note 4) wait for the shot to leave the robot SequentialCommandGroup scoreAmp = new SequentialCommandGroup( new InstantCommand(()->shooter.shootSameRPS(ShooterConstants.AMP_RPS), shooter), - new DriveTimeCommand(-0.3, 0, 0, 0.2, driveTrain), - new WaitUntil(shooter::validShot), + new DriveTimeCommand(0.3, 0, 0, 0.3, driveTrain), + new WaitUntil(()->(shooter.validShot() && driveTrain.getChassisSpeeds().vxMetersPerSecond == 0)), new InstantCommand(()->indexer.set(IndexerConstants.INDEXER_AMP_SPEED), indexer), new WaitCommand(0.2) ); @@ -478,4 +478,4 @@ public void disabledInit() { new InstantCommand(angleShooterSubsystem::stop, angleShooterSubsystem); } } -} +} \ No newline at end of file diff --git a/src/main/java/frc/robot/commands/DriveTimeCommand.java b/src/main/java/frc/robot/commands/DriveTimeCommand.java index 9478a59e..42424df5 100644 --- a/src/main/java/frc/robot/commands/DriveTimeCommand.java +++ b/src/main/java/frc/robot/commands/DriveTimeCommand.java @@ -51,6 +51,7 @@ public void execute() { public void end(boolean interrupted) { timer.reset(); timer.stop(); + drivetrain.stop(); } // Returns true when the command should end. diff --git a/src/main/java/frc/robot/settings/Constants.java b/src/main/java/frc/robot/settings/Constants.java index ca503c9b..1fd865b8 100644 --- a/src/main/java/frc/robot/settings/Constants.java +++ b/src/main/java/frc/robot/settings/Constants.java @@ -240,7 +240,7 @@ public static final class ShooterConstants{ public static final double LONG_SHOOTING_RPS = 120; public static final double SHORT_SHOOTING_RPS = 80; - public static final double AMP_RPS = 8.5; + public static final double AMP_RPS = 9.5; public static final double SUBWOOFER_RPS = SHORT_SHOOTING_RPS; //the PID values used on the PID loop on the motor controller that control the position of the shooter angle