Skip to content
This repository has been archived by the owner on May 19, 2024. It is now read-only.

Commit

Permalink
refactor(config): Remove old motor current limits class.
Browse files Browse the repository at this point in the history
  • Loading branch information
haydenheroux committed Apr 25, 2024
1 parent ff2c08e commit 650405e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 62 deletions.
56 changes: 0 additions & 56 deletions src/main/java/frc/lib/MotorCurrentLimits.java

This file was deleted.

5 changes: 2 additions & 3 deletions src/main/java/frc/robot/swerve/DriveMotorIOTalonFX.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import com.ctre.phoenix6.signals.InvertedValue;
import com.ctre.phoenix6.signals.NeutralModeValue;
import frc.lib.CAN;
import frc.lib.MotorCurrentLimits;
import frc.robot.swerve.SwerveConstants.MK4iConstants;

/** TalonFX drive motor. */
Expand Down Expand Up @@ -35,8 +34,8 @@ public DriveMotorIOTalonFX(CAN driveMotorCAN) {

talonFXBaseConfig.Feedback.SensorToMechanismRatio = MK4iConstants.DRIVE_GEARING;

talonFXBaseConfig.CurrentLimits =
new MotorCurrentLimits(80.0, 30.0, 60.0, 0.1).asCurrentLimitsConfigs();
// talonFXBaseConfig.CurrentLimits =
// new MotorCurrentLimits(80.0, 30.0, 60.0, 0.1).asCurrentLimitsConfigs();

positionRotations = talonFX.getPosition();
velocityRotationsPerSecond = talonFX.getVelocity();
Expand Down
5 changes: 2 additions & 3 deletions src/main/java/frc/robot/swerve/SteerMotorIOTalonFXPIDF.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import com.ctre.phoenix6.signals.InvertedValue;
import edu.wpi.first.math.geometry.Rotation2d;
import frc.lib.CAN;
import frc.lib.MotorCurrentLimits;
import frc.lib.config.Configurator;
import frc.robot.swerve.SwerveConstants.MK4iConstants;

Expand Down Expand Up @@ -42,8 +41,8 @@ public void configure() {

talonFXPIDFConfig.ClosedLoopGeneral.ContinuousWrap = true;

talonFXPIDFConfig.CurrentLimits =
new MotorCurrentLimits(35.0, 15.0, 25.0, 0.1).asCurrentLimitsConfigs();
// talonFXPIDFConfig.CurrentLimits =
// new MotorCurrentLimits(35.0, 15.0, 25.0, 0.1).asCurrentLimitsConfigs();

talonFXPIDFConfig.Feedback.SensorToMechanismRatio = MK4iConstants.STEER_GEARING;

Expand Down

0 comments on commit 650405e

Please sign in to comment.