mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
[wpilibc] Fix ProfiledPID SetTolerance default velocity value (#4054)
When trying to set the tolerance of a ProfiledPID, it fails if you don't give it a velocity value. It was missing a conversion from double to the appropiate unit.
This commit is contained in:
committed by
GitHub
parent
bc9e96e86f
commit
ac5d46cfa7
@@ -224,9 +224,9 @@ class ProfiledPIDController
|
||||
* @param positionTolerance Position error which is tolerable.
|
||||
* @param velocityTolerance Velocity error which is tolerable.
|
||||
*/
|
||||
void SetTolerance(
|
||||
Distance_t positionTolerance,
|
||||
Velocity_t velocityTolerance = std::numeric_limits<double>::infinity()) {
|
||||
void SetTolerance(Distance_t positionTolerance,
|
||||
Velocity_t velocityTolerance =
|
||||
Velocity_t(std::numeric_limits<double>::infinity())) {
|
||||
m_controller.SetTolerance(positionTolerance.value(),
|
||||
velocityTolerance.value());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user