diff --git a/src/main/java/frc/robot/pioneersLib/bumSwerve/SwerveMotor/SwerveMotorIOTalonFX.java b/src/main/java/frc/robot/pioneersLib/bumSwerve/SwerveMotor/SwerveMotorIOTalonFX.java index 755a29a..429efbd 100644 --- a/src/main/java/frc/robot/pioneersLib/bumSwerve/SwerveMotor/SwerveMotorIOTalonFX.java +++ b/src/main/java/frc/robot/pioneersLib/bumSwerve/SwerveMotor/SwerveMotorIOTalonFX.java @@ -161,10 +161,10 @@ public void setVoltage(double volts) { public void setPosition(double setpoint) { if (isDrive) throw new UnsupportedOperationException("Cannot set position on a drive motor"); - // PositionVoltage command = new PositionVoltage(setpoint * gearRatio/360).withSlot(0); - // motor.setControl(command); + PositionVoltage command = new PositionVoltage(setpoint/360).withSlot(0); + motor.setControl(command); - setVoltage(feedbackController.calculate(getAngle().getDegrees(), setpoint)); + // setVoltage(feedbackController.calculate(getAngle().getDegrees(), setpoint)); positionError = Math.abs(setpoint/360 - motorPosition.getValueAsDouble()); }