From 289efc78d5688976968885f550a713585579cbde Mon Sep 17 00:00:00 2001 From: ryan123rudder <42309874+ryan123rudder@users.noreply.github.com> Date: Tue, 23 Mar 2021 16:39:17 -0600 Subject: [PATCH] New points --- src/main/deploy/Robot Data - Distances.csv | 1 + src/main/java/frc4388/robot/RobotContainer.java | 9 ++++++--- .../robot/commands/shooter/ShooterTrenchPosition.java | 6 +++--- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/main/deploy/Robot Data - Distances.csv b/src/main/deploy/Robot Data - Distances.csv index dbe365d..0ee5cca 100644 --- a/src/main/deploy/Robot Data - Distances.csv +++ b/src/main/deploy/Robot Data - Distances.csv @@ -1,6 +1,7 @@ Distance (in),Hood Ext. (u),Drum Velocity (u/ds),Center Displacment (deg) 0,16,6000,0, 65.9,16,6000,0, +103,19,6600,1, 126.6,20.25,7000,0, 180,24,8000,0, 185.85,26.5, 9000,1.1, diff --git a/src/main/java/frc4388/robot/RobotContainer.java b/src/main/java/frc4388/robot/RobotContainer.java index 080c646..97bd1e9 100644 --- a/src/main/java/frc4388/robot/RobotContainer.java +++ b/src/main/java/frc4388/robot/RobotContainer.java @@ -185,8 +185,10 @@ public class RobotContainer { private void configureButtonBindings() { /* Test Buttons */ // A driver test button - /*new JoystickButton(getDriverJoystick(), XboxController.A_BUTTON) - .whileHeld(new InstantCommand(() -> m_robotDrive.tankDriveVelocity(1, -1), m_robotDrive));*/ + new JoystickButton(getDriverJoystick(), XboxController.A_BUTTON) + .whileHeld(new ShooterTrenchPosition(m_robotShooter, m_robotShooterHood, m_robotShooterAim)) + .whenReleased(new InterruptSubystem(m_robotShooter)) + .whenReleased(new InterruptSubystem(m_robotShooterHood)); // B driver test button new JoystickButton(getDriverJoystick(), XboxController.B_BUTTON) @@ -231,7 +233,7 @@ public class RobotContainer { //.whenPressed(new ShootFullGroup(m_robotShooter, m_robotShooterAim, m_robotShooterHood, m_robotStorage), false); //.whenReleased(new ManageStorage(m_robotStorage, StorageMode.RESET)); //.whenReleased(new RunCommand(() -> m_robotLime.limeOff())); - .whenPressed(new RunCommand(() -> m_robotStorage.runStorage(1), m_robotStorage)) + .whenPressed(new RunCommand(() -> m_robotStorage.runStorage(0.3), m_robotStorage)) .whenReleased(new InterruptSubystem(m_robotStorage)); // extends or retracts the extender @@ -270,6 +272,7 @@ public class RobotContainer { .whileHeld(new CalibrateShooter(m_robotShooter, m_robotShooterAim, m_robotShooterHood)); + //Run drum new JoystickManualButton(getOperatorJoystick(), XboxController.B_BUTTON, false) .whileHeld(new ShootPrepGroup(m_robotShooter, m_robotShooterAim, m_robotShooterHood, m_robotStorage), false) diff --git a/src/main/java/frc4388/robot/commands/shooter/ShooterTrenchPosition.java b/src/main/java/frc4388/robot/commands/shooter/ShooterTrenchPosition.java index ba452b7..793f245 100644 --- a/src/main/java/frc4388/robot/commands/shooter/ShooterTrenchPosition.java +++ b/src/main/java/frc4388/robot/commands/shooter/ShooterTrenchPosition.java @@ -34,9 +34,9 @@ public class ShooterTrenchPosition extends CommandBase { // Called every time the scheduler runs while the command is scheduled. @Override public void execute() { - m_shooter.runDrumShooterVelocityPID(5000); - m_hood.runAngleAdjustPID(3); - m_aim.runshooterRotatePID(-26.5); + m_shooter.runDrumShooterVelocityPID(5500); + m_hood.runAngleAdjustPID(11); + //m_aim.runshooterRotatePID(-28); } // Called once the command ends or is interrupted.