mirror of
https://github.com/Team4388/2023WayOfTheRobot.git
synced 2026-06-09 00:37:59 -06:00
fix ignoreangles
This commit is contained in:
@@ -125,9 +125,7 @@ public class SwerveModule extends SubsystemBase {
|
|||||||
// convert the CANCoder from its position reading to ticks
|
// convert the CANCoder from its position reading to ticks
|
||||||
double currentTicks = encoder.getPosition() / encoder.configGetFeedbackCoefficient();
|
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);
|
double feetPerSecond = Units.metersToFeet(state.speedMetersPerSecond);
|
||||||
|
|
||||||
@@ -146,4 +144,4 @@ public class SwerveModule extends SubsystemBase {
|
|||||||
public double getVoltage() {
|
public double getVoltage() {
|
||||||
return (Math.abs(angleMotor.getMotorOutputVoltage()) + Math.abs(driveMotor.getMotorOutputVoltage()));
|
return (Math.abs(angleMotor.getMotorOutputVoltage()) + Math.abs(driveMotor.getMotorOutputVoltage()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user