This commit is contained in:
Abhishrek05
2024-02-20 19:58:04 -07:00
parent 0f71e0ec08
commit 904a2f2688
4 changed files with 6 additions and 14 deletions
@@ -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,19 +63,12 @@ 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
public void periodic() {
@@ -1,4 +1,4 @@
package frc4388.utility.configurable;
package frc4388.utility.Configurable;
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
@@ -1,4 +1,4 @@
package frc4388.utility.configurable;
package frc4388.utility.Configurable;
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;