Skip to content

Commit

Permalink
Big win
Browse files Browse the repository at this point in the history
  • Loading branch information
GreenTomato5 committed Nov 8, 2024
1 parent de726e2 commit f94f3f5
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
Expand Down

0 comments on commit f94f3f5

Please # to comment.