driver.get(PS5Button.LB).onTrue(
new SequentialCommandGroup(
- new InstantCommand(()-> shooter.setShooter(ShooterConstants.SHOOTER_VELOCITY)),
+ new InstantCommand(()-> shooter.setShooter(-ShooterConstants.SHOOTER_VELOCITY)),
new WaitCommand(0.8),
new InstantCommand(()-> shooter.setFeeder(ShooterConstants.FEEDER_RUN_POWER))
)
import com.ctre.phoenix6.signals.NeutralModeValue;
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
import edu.wpi.first.wpilibj2.command.InstantCommand;
-
+import edu.wpi.first.wpilibj2.command.SubsystemBase;
import frc.robot.constants.Constants;
import frc.robot.constants.IdConstants;
-public class Shooter {
+public class Shooter extends SubsystemBase {
private TalonFX shooterMotorLeft = new TalonFX(IdConstants.SHOOTER_LEFT_ID, Constants.RIO_CAN);
private TalonFX shooterMotorRight = new TalonFX(IdConstants.SHOOTER_RIGHT_ID, Constants.RIO_CAN);
public void setShooter(double linearVelocityMps) {
double wheelCircumference = Math.PI * ShooterConstants.SHOOTER_LAUNCH_DIAMETER;
shooterTargetSpeed = linearVelocityMps * ShooterConstants.SHOOTER_GEAR_RATIO / wheelCircumference; // rps
+ System.out.println("Shooter is working");
}
public double getFeederVelocity() {
//Tune this with rotating robot
double dV = TurretConstants.ROTATIONAL_VELOCITY_CONSTANT;
motor.setControl(voltageRequest.withPosition(motorTargetRotations).withFeedForward(dV * robotRotVel));
-
- System.out.println("Workingnnnnngnggdsfadsfsa");
}
}