From da8fac33778cab3f743dc799d2203339f60c9368 Mon Sep 17 00:00:00 2001 From: aarav18 Date: Sun, 20 Mar 2022 16:22:11 -0600 Subject: [PATCH] smol change --- .../java/frc4388/robot/RobotContainer.java | 25 +++++++++++-------- .../robot/commands/ShooterCommands/Shoot.java | 3 ++- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/src/main/java/frc4388/robot/RobotContainer.java b/src/main/java/frc4388/robot/RobotContainer.java index 612ccf0..de5830a 100644 --- a/src/main/java/frc4388/robot/RobotContainer.java +++ b/src/main/java/frc4388/robot/RobotContainer.java @@ -74,6 +74,7 @@ import frc4388.robot.commands.ClimberCommands.RunClimberPath; // import frc4388.robot.commands.ButtonBoxCommands.TurretManual; import frc4388.robot.commands.ExtenderIntakeCommands.ExtenderIntakeGroup; import frc4388.robot.commands.ShooterCommands.AimToCenter; +import frc4388.robot.commands.ShooterCommands.Seek; import frc4388.robot.commands.ShooterCommands.Shoot; import frc4388.robot.commands.ShooterCommands.TrackTarget; import frc4388.robot.commands.StorageCommands.ManageStorage; @@ -283,18 +284,22 @@ public class RobotContainer { // .whenReleased(new InstantCommand(() -> m_robotTurret.runTurretWithInput(0.0), m_robotTurret)) // .whenReleased(() -> m_robotSwerveDrive.stopModules()); - new JoystickButton(getDriverController(), XboxController.Button.kX.value) - .whileHeld(new TrackTarget(m_robotTurret, m_robotBoomBoom, m_robotHood, m_robotVisionOdometry)); - // .whenReleased(new InstantCommand(() -> m_robotTurret.runTurretWithInput(0.0), m_robotTurret)) - // .whenReleased(new InstantCommand(() -> m_robotHood.runHood(0.0), m_robotHood)) - // .whenReleased(new InstantCommand(() -> m_robotBoomBoom.runDrumShooter(0.0), m_robotBoomBoom)); - - /* Operator Buttons */ - + // .whenReleased(new InstantCommand(() -> m_robotTurret.runTurretWithInput(0.0), m_robotTurret)) + // .whenReleased(new InstantCommand(() -> m_robotHood.runHood(0.0), m_robotHood)) + // .whenReleased(new InstantCommand(() -> m_robotBoomBoom.runDrumShooter(0.0), m_robotBoomBoom)); + + /* Operator Buttons */ + new JoystickButton(getOperatorController(), XboxController.Button.kY.value) - .whenPressed(new Shoot(m_robotSwerveDrive, m_robotBoomBoom, m_robotTurret, m_robotHood, m_robotVisionOdometry, false, false)); + .whenPressed(new Shoot(m_robotSwerveDrive, m_robotBoomBoom, m_robotTurret, m_robotHood, m_robotVisionOdometry, false, false)); + + // new JoystickButton(getDriverController(), XboxController.Button.kX.value) + // .whileHeld(new TrackTarget(m_robotTurret, m_robotBoomBoom, m_robotHood, m_robotVisionOdometry)); - // new JoystickButton(getOperatorController(), XboxController.Button.kY.value) + new JoystickButton(getOperatorController(), XboxController.Button.kB.value) + .whileHeld(new Seek(m_robotSwerveDrive, m_robotBoomBoom, m_robotTurret, m_robotHood, m_robotVisionOdometry)); + + // new JoystickButton(getOperatorController(), XboxController.Button.kY.value) // .whileHeld(new RunCommand(() -> m_robotClaws.setOpen(true))); // new JoystickButton(getOperatorController(), XboxController.Button.kB.value) diff --git a/src/main/java/frc4388/robot/commands/ShooterCommands/Shoot.java b/src/main/java/frc4388/robot/commands/ShooterCommands/Shoot.java index f3d1920..c4a448e 100644 --- a/src/main/java/frc4388/robot/commands/ShooterCommands/Shoot.java +++ b/src/main/java/frc4388/robot/commands/ShooterCommands/Shoot.java @@ -76,6 +76,7 @@ public class Shoot extends CommandBase { this.drum = drum; this.turret = turret; this.hood = hood; + this.visionOdometry = visionOdometry; this.toShoot = toShoot; this.endsWithLimelight = endsWithLimelight; @@ -188,7 +189,7 @@ public class Shoot extends CommandBase { // ? should stop the turret and the swerve ////this.swerve.stopModules(); - ////this.turret.runTurretWithInput(0); + this.turret.runTurretWithInput(0.0); if (this.toShoot) { this.hood.runHood(0.0);