mirror of
https://github.com/Team4388/2024AcrossTheRidgebotiverse.git
synced 2026-06-09 08:48:03 -06:00
fixes
This commit is contained in:
@@ -57,7 +57,7 @@ public class RobotContainer {
|
||||
/* Limelight */
|
||||
private final Limelight limelight = new Limelight();
|
||||
|
||||
private final Shooter m_robotShooter = new Shooter(m_robotMap.leftShooter, m_robotMap.rightShooter, limelight);
|
||||
private final Shooter m_robotShooter = new Shooter(m_robotMap.leftShooter, m_robotMap.rightShooter);
|
||||
|
||||
private final Intake m_robotIntake = new Intake(m_robotMap.intakeMotor, m_robotMap.pivotMotor);
|
||||
|
||||
@@ -73,7 +73,6 @@ public class RobotContainer {
|
||||
private final VirtualController m_virtualDriver = new VirtualController(0);
|
||||
private final VirtualController m_virtualOperator = new VirtualController(1);
|
||||
|
||||
private Limelight limelight = new Limelight();
|
||||
private Command intakeToShootStuff = new ArmIntakeIn(m_robotIntake, m_robotShooter);
|
||||
|
||||
private SequentialCommandGroup intakeToShoot = new SequentialCommandGroup(
|
||||
|
||||
@@ -22,13 +22,13 @@ public class Shooter extends SubsystemBase {
|
||||
private TalonFX leftShooter;
|
||||
private TalonFX rightShooter;
|
||||
|
||||
private double smartDashboardShooterSpeed;
|
||||
|
||||
/** Creates a new Shooter. */
|
||||
public Shooter(TalonFX leftTalonFX, TalonFX rightTalonFX, Limelight limelight) {
|
||||
public Shooter(TalonFX leftTalonFX, TalonFX rightTalonFX) {
|
||||
leftShooter = leftTalonFX;
|
||||
rightShooter = rightTalonFX;
|
||||
|
||||
this.limelight = limelight;
|
||||
|
||||
leftShooter.setNeutralMode(NeutralModeValue.Coast);
|
||||
rightShooter.setNeutralMode(NeutralModeValue.Coast);
|
||||
SmartDashboard.putNumber("Shooter Speed", ShooterConstants.SHOOTER_SPEED);
|
||||
@@ -63,18 +63,11 @@ public class Shooter extends SubsystemBase {
|
||||
}
|
||||
|
||||
public void stop() {
|
||||
shooterMode = 0;
|
||||
spin(0.d);
|
||||
}
|
||||
|
||||
public void idle() {
|
||||
if(limelight.isNearSpeaker()){
|
||||
shooterMode = 2;
|
||||
spin(ShooterConstants.SHOOTER_IDLE_LIMELIGHT);
|
||||
}else{
|
||||
shooterMode = 1;
|
||||
spin(ShooterConstants.SHOOTER_IDLE);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user