Added individual testing motors onto button board + added shooter equations back in
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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());
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,15 +56,9 @@ public class TargetingSubsystems extends SubsystemBase {
|
||||
|
||||
public static Rotation2d hubThetaPose = new Rotation2d();
|
||||
public static Optional<Alliance> 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");
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user