diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index a02106d..fc79c8d 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -232,7 +232,7 @@ public class RobotContainer { // full shooting system including linear actuators //driverXbox.rightTrigger().onTrue(m_ShooterSubsystem.shootFuelCommand().andThen(new WaitCommand(1.5))); //.andThen(m_IntakeSubsystem.assistFuelIntakeCommand().repeatedly())); - driverXbox.rightTrigger().onTrue(m_ShooterSubsystem.setShooterMotorsRPMCommand(-3400)); + driverXbox.rightTrigger().onTrue(m_ShooterSubsystem.shootFuelCommand()); driverXbox.leftBumper().onTrue(m_IntakeSubsystem .startIntakeMotorCommand(Constants.IntakeConstants.INTAKE_WHEELS_MOTOR_RPM_SLOW)); // driverXbox.rightBumper().onTrue(m_IntakeSubsystem.assistFuelIntakeCommand(Constants.IntakeConstants.INTAKE_THROUGHBORE_ENCODER_MIDDLE, @@ -258,15 +258,12 @@ public class RobotContainer { // driverXbox.b().whileTrue(m_TargetingSubsystems.aimAndRangeToPose(Constants.TargetingConstants.LEFT_CLIMB_POSE)); - operatorXbox.x().whileTrue(m_ShooterSubsystem.testLeftShooterCommand()) + topButtons.button(12).whileTrue(m_ShooterSubsystem.testLeftShooterCommand()) .onFalse(m_ShooterSubsystem.stopLeftShooterCommand()); - operatorXbox.y().whileTrue(m_ShooterSubsystem.testCenterShooterCommand()) + topButtons.button(11).whileTrue(m_ShooterSubsystem.testCenterShooterCommand()) .onFalse(m_ShooterSubsystem.stopCenterShooterCommand()); - operatorXbox.b().whileTrue(m_ShooterSubsystem.testRightShooterCommand()) + topButtons.button(10).whileTrue(m_ShooterSubsystem.testRightShooterCommand()) .onFalse(m_ShooterSubsystem.stopRightShooterCommand()); - operatorXbox.a().whileTrue(m_ShooterSubsystem. - setIndexerAndRampMotorRPMCommand()) - .onFalse(m_ShooterSubsystem.stopIndexerAndRampMotorCommand()); topButtons.axisGreaterThan(1, 0.3) @@ -386,7 +383,7 @@ public class RobotContainer { } public Command setIdleShooterRPMCommand() { - return Commands.runOnce(() -> m_ShooterSubsystem + return Commands.runOnce(() -> ShooterSubsystem .setShooterMotorsRPM(Constants.ShooterConstants.IDLE_SHOOTER_RPM)) .andThen(m_ShooterSubsystem.stopIndexerAndRampMotorCommand()); } diff --git a/src/main/java/frc/robot/subsystems/IntakeSubsystem.java b/src/main/java/frc/robot/subsystems/IntakeSubsystem.java index dcbd473..b53b21f 100644 --- a/src/main/java/frc/robot/subsystems/IntakeSubsystem.java +++ b/src/main/java/frc/robot/subsystems/IntakeSubsystem.java @@ -85,8 +85,8 @@ public class IntakeSubsystem extends SubsystemBase { // Slot 2 .p(.8, ClosedLoopSlot.kSlot2) - .i(.001, ClosedLoopSlot.kSlot2) - .d(0.3, ClosedLoopSlot.kSlot2); + .i(.0, ClosedLoopSlot.kSlot2) + .d(0.8, ClosedLoopSlot.kSlot2); intakeRotatorConfig.smartCurrentLimit(80); intakeRotatorMotor.configure(intakeRotatorConfig, com.revrobotics.ResetMode.kNoResetSafeParameters, diff --git a/src/main/java/frc/robot/subsystems/ShooterSubsystem.java b/src/main/java/frc/robot/subsystems/ShooterSubsystem.java index 06743a2..2f80b32 100644 --- a/src/main/java/frc/robot/subsystems/ShooterSubsystem.java +++ b/src/main/java/frc/robot/subsystems/ShooterSubsystem.java @@ -111,13 +111,6 @@ public class ShooterSubsystem extends SubsystemBase { indexerAndRampMotorPIDController = indexerAndRampMotor.getClosedLoopController(); } - // private static SparkMax leftActuatorMotor = new - // SparkMax(Constants.ShooterConstants.LEFT_ACTUATOR_PWM_PORT, - // MotorType.kBrushless); - - // private static SparkMax rightActuatorMotor = new - // SparkMax(Constants.ShooterConstants.RIGHT_ACTUATOR_PWM_PORT, - // MotorType.kBrushless); public void setShooterMotorsRPM() { centerShooterMotorPIDController.setSetpoint(Constants.ShooterConstants.SHOOTER_RPM, ControlType.kVelocity); @@ -267,7 +260,10 @@ public class ShooterSubsystem extends SubsystemBase { @Override public void periodic() { - SmartDashboard.putNumber("Shooter Velocity", leftShooterMotor.getEncoder().getVelocity()); + SmartDashboard.putString("Shooter Velocity", "Left: " + + leftShooterMotor.getEncoder().getVelocity() + + " Center:" + centerShooterMotor.getEncoder().getVelocity() + + " Right: " + rightShooterMotor.getEncoder().getVelocity()); } } diff --git a/src/main/java/frc/robot/subsystems/TargetingSubsystems.java b/src/main/java/frc/robot/subsystems/TargetingSubsystems.java index 0602c5a..8671b66 100644 --- a/src/main/java/frc/robot/subsystems/TargetingSubsystems.java +++ b/src/main/java/frc/robot/subsystems/TargetingSubsystems.java @@ -56,15 +56,9 @@ public class TargetingSubsystems extends SubsystemBase { public static Rotation2d hubThetaPose = new Rotation2d(); public static Optional alliance = DriverStation.getAlliance(); - private static ShuffleboardTab cameras; public TargetingSubsystems() { photonAimPIDController.enableContinuousInput(-Math.PI, Math.PI); - cameras = Shuffleboard.getTab("Vision"); - // cameras.addCamera("Rear Left Camera","Rear Left - // Camera","http://photonvision.local:5800/#/cameras"); - // cameras.addCamera("Rear Right Camera", "Rear Right Camera", - // "http://photonvision.local:5800/#/cameras"); }