Shooter and Intake boiler code (im geekin)

This commit is contained in:
Abhishrek05
2024-01-22 18:04:12 -07:00
parent c422fa4114
commit b35332921e
2 changed files with 10 additions and 8 deletions
@@ -14,9 +14,9 @@ import frc4388.robot.Constants.IntakeConstants;
public class Intake extends SubsystemBase {
/** Creates a new Intake. */
private Spark intakeMotor;
private Spark pivot;
public Intake(Spark intakeMotor, Spark pivot) {
private CANSparkMax intakeMotor;
private CANSparkMax pivot;
public Intake(CANSparkMax intakeMotor, CANSparkMax pivot) {
this.intakeMotor = intakeMotor;
this.pivot = pivot;
}
@@ -8,20 +8,22 @@ import edu.wpi.first.wpilibj2.command.SubsystemBase;
import frc4388.robot.Constants.ShooterConstants;
import com.ctre.phoenix.motorcontrol.can.WPI_TalonFX;
import com.ctre.phoenix6.hardware.TalonFX;
import com.ctre.phoenix6.signals.NeutralModeValue;
import com.ctre.phoenix.motorcontrol.NeutralMode;
public class Shooter extends SubsystemBase {
private WPI_TalonFX leftShooter;
private WPI_TalonFX rightShooter;
private TalonFX leftShooter;
private TalonFX rightShooter;
/** Creates a new Shooter. */
public Shooter(WPI_TalonFX leftTalonFX, WPI_TalonFX rightTalonFX) {
public Shooter(TalonFX leftTalonFX, TalonFX rightTalonFX) {
leftShooter = leftTalonFX;
rightShooter = rightTalonFX;
leftShooter.setNeutralMode(NeutralMode.Coast);
rightShooter.setNeutralMode(NeutralMode.Coast);
leftShooter.setNeutralMode(NeutralModeValue.Coast);
rightShooter.setNeutralMode(NeutralModeValue.Coast);
}
public void spin() {