// To do so, divide by the radius. The radius is the diagonal of the square chassis, diagonal = sqrt(2) * side_length.
public static final double MAX_ANGULAR_SPEED = MAX_SPEED / ((TRACK_WIDTH / 2) * Math.sqrt(2));
- public static final double COSF = 1.5;
+ public static final double COSF = 2.255;
// The maximum acceleration of the robot, limited by friction
public static final double MAX_LINEAR_ACCEL = COSF * Constants.GRAVITY_ACCELERATION;
import edu.wpi.first.wpilibj2.command.SubsystemBase;
import frc.robot.constants.Constants;
import frc.robot.constants.IdConstants;
+import frc.robot.constants.IntakeConstants;
import frc.robot.util.HubActive;
public class Shooter extends SubsystemBase implements ShooterIO {
double powerModifier = 1.05; // TESTED
- public Shooter(){
+ public Shooter() {
updateInputs();
TalonFXConfiguration config = new TalonFXConfiguration();
config.Slot0.kI = 0;
config.Slot0.kD = 0.0;
config.Slot0.kV = 0.125; //Maximum rps = 100 --> 12V/100rps
+
+ config.CurrentLimits
+ .withSupplyCurrentLimit(ShooterConstants.SHOOTER_CURRENT_LIMIT)
+ .withSupplyCurrentLimitEnable(true);
+
shooterMotorLeft.getConfigurator().apply(config);
shooterMotorRight.getConfigurator().apply(config);