Added setVoltage function to swerve motors, made SwervePoseEstimator public, and changed setting targetVelocity to inside setState

This commit is contained in:
thenetworkgrinch
2023-01-31 10:42:02 -06:00
parent b1a4d0e370
commit c3d6df94d0
5 changed files with 66 additions and 29 deletions

View File

@@ -236,6 +236,17 @@ public class REVSwerveMotor extends SwerveMotor
m_motor.set(speed);
}
/**
* Set the voltage of the motor.
*
* @param voltage Voltage to output.
*/
@Override
public void setVoltage(double voltage)
{
m_motor.setVoltage(voltage);
}
/**
* Get the current value of the encoder corresponding to the PID.
*