Include Intake PIDs

This commit is contained in:
Michael Mikovsky
2024-12-05 16:48:42 -07:00
parent f7b759df6b
commit 51276a3e97
4 changed files with 8 additions and 8 deletions
+3 -3
View File
@@ -153,9 +153,9 @@ public final class Constants {
} }
public static final double IN_POSITION =0.0; public static final double IN_POSITION =0.0;
public static final double OUT_POSITION =0.0; public static final double OUT_POSITION =-50;
public static final double INTAKE_SPEED= 0.0; public static final double INTAKE_SPEED= 0.75;
public static final double OUTTAKE_SPEED= 0.0; public static final double OUTTAKE_SPEED= -1.0;
} }
public static final class ShooterConstants public static final class ShooterConstants
{ {
@@ -157,7 +157,7 @@ public class RobotContainer {
// ? /* Operator Buttons */ // ? /* Operator Buttons */
/*Intake */ /*Intake */
DualJoystickButton(getDeadbandedDriverController(), getVirtualOperatorController(), XboxController.RIGHT_BUMPER_BUTTON) DualJoystickButton(getDeadbandedOperatorController(), getVirtualOperatorController(), XboxController.RIGHT_BUMPER_BUTTON)
.onTrue(new SequentialCommandGroup( .onTrue(new SequentialCommandGroup(
new InstantCommand(() -> m_robotIntake.PIDOut()), new InstantCommand(() -> m_robotIntake.PIDOut()),
new InstantCommand(() -> m_robotIntake.spinIntakeMotor()) new InstantCommand(() -> m_robotIntake.spinIntakeMotor())
@@ -20,9 +20,9 @@ public class Intake extends SubsystemBase{
intakeMotor.setNeutralMode(NeutralModeValue.Brake); intakeMotor.setNeutralMode(NeutralModeValue.Brake);
var PIDConfigs = new Slot0Configs(); var PIDConfigs = new Slot0Configs();
PIDConfigs.kP = 0; PIDConfigs.kP = 1;
PIDConfigs.kI = 0; PIDConfigs.kI = 0;
PIDConfigs.kD = 0; PIDConfigs.kD = 0.25;
pivotMotor.getConfigurator().apply(PIDConfigs); pivotMotor.getConfigurator().apply(PIDConfigs);
} }
@@ -23,8 +23,8 @@ public class Shooter extends SubsystemBase {
} }
public void spin(double speed) { public void spin(double speed) {
leftShooter.set(speed); leftShooter.set(-speed);
rightShooter.set(speed); rightShooter.set(-speed);
} }
public void spin() { public void spin() {