fix ignoreangles

This commit is contained in:
Aarav Shah
2023-02-27 18:08:25 -07:00
committed by GitHub
parent 172dc46e65
commit df81b70fa4
@@ -125,9 +125,7 @@ public class SwerveModule extends SubsystemBase {
// convert the CANCoder from its position reading to ticks
double currentTicks = encoder.getPosition() / encoder.configGetFeedbackCoefficient();
if (!ignoreAngle) {
angleMotor.set(TalonFXControlMode.Position, currentTicks + deltaTicks);
}
angleMotor.set(TalonFXControlMode.Position, currentTicks + deltaTicks);
double feetPerSecond = Units.metersToFeet(state.speedMetersPerSecond);
@@ -146,4 +144,4 @@ public class SwerveModule extends SubsystemBase {
public double getVoltage() {
return (Math.abs(angleMotor.getMotorOutputVoltage()) + Math.abs(driveMotor.getMotorOutputVoltage()));
}
}
}