[wpimath] Enable continuous angle input for HolonomicDriveController (#4453)

This commit is contained in:
Starlight220
2022-10-07 01:46:22 +03:00
committed by GitHub
parent 893b46139a
commit b2276e47de
2 changed files with 5 additions and 1 deletions

View File

@@ -15,7 +15,9 @@ HolonomicDriveController::HolonomicDriveController(
ProfiledPIDController<units::radian> thetaController)
: m_xController(std::move(xController)),
m_yController(std::move(yController)),
m_thetaController(std::move(thetaController)) {}
m_thetaController(std::move(thetaController)) {
m_thetaController.EnableContinuousInput(0_deg, 360.0_deg);
}
bool HolonomicDriveController::AtReference() const {
const auto& eTranslate = m_poseError.Translation();