Fix up templated TrapezoidProfile classes (#2151)

* Fix two-phase name lookup bug

* Fix param in ProfiledPIDCommand constructor overload

* Fix ProfiledPIDCommand/Controller
This commit is contained in:
Oblarg
2019-12-04 23:40:37 -05:00
committed by Peter Johnson
parent 8c2ff94d70
commit f7a93713fa
3 changed files with 15 additions and 14 deletions

View File

@@ -217,9 +217,10 @@ class ProfiledPIDController
* @param velocityTolerance Velocity error which is tolerable.
*/
void SetTolerance(
double positionTolerance,
double velocityTolerance = std::numeric_limits<double>::infinity()) {
m_controller.SetTolerance(positionTolerance, velocityTolerance);
Distance_t positionTolerance,
Velocity_t velocityTolerance = std::numeric_limits<double>::infinity()) {
m_controller.SetTolerance(positionTolerance.template to<double>(),
velocityTolerance.template to<double>());
}
/**