Skip to content

Commit

Permalink
Added feedforward to TalonFX drive motors.
Browse files Browse the repository at this point in the history
Signed-off-by: thenetworkgrinch <thenetworkgrinch@users.noreply.github.com>
  • Loading branch information
thenetworkgrinch committed Jan 16, 2024
1 parent a93f433 commit 5a47d51
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/swervelib/motors/TalonFXSwerve.java
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ public void setReference(double setpoint, double feedforward, double position)

if (isDriveMotor)
{
motor.setControl(m_velocityVoltageSetter.withVelocity(setpoint));
motor.setControl(m_velocityVoltageSetter.withVelocity(setpoint).withFeedForward(feedforward));
} else
{
motor.setControl(m_angleVoltageSetter.withPosition(setpoint));
Expand Down

0 comments on commit 5a47d51

Please sign in to comment.