add changes

This commit is contained in:
Michael Mikovsky
2024-10-24 17:04:03 -06:00
parent 157770b1b8
commit e9dcabce62
2 changed files with 29 additions and 14 deletions
@@ -18,6 +18,7 @@ import com.ctre.phoenix6.StatusSignal;
import com.ctre.phoenix6.Utils;
import com.ctre.phoenix6.configs.CANcoderConfiguration;
import com.ctre.phoenix6.configs.ClosedLoopRampsConfigs;
import com.ctre.phoenix6.configs.CurrentLimitsConfigs;
import com.ctre.phoenix6.configs.FeedbackConfigs;
import com.ctre.phoenix6.configs.MotorOutputConfigs;
import com.ctre.phoenix6.configs.OpenLoopRampsConfigs;
@@ -73,6 +74,12 @@ public class SwerveModule extends SubsystemBase {
new MotorOutputConfigs()
.withNeutralMode(NeutralModeValue.Brake)
.withDutyCycleNeutralDeadband(SwerveDriveConstants.Configurations.NEUTRAL_DEADBAND)
).withCurrentLimits(
new CurrentLimitsConfigs()
.withStatorCurrentLimit(110)
.withStatorCurrentLimitEnable(true)
.withSupplyCurrentLimit(110)
.withSupplyCurrentLimitEnable(true)
);
driveMotor.getConfigurator().apply(motorCfg);