mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-22 01:11:42 +00:00
[wpilib] PIDController: Recompute the error in AtSetpoint() (#2822)
This makes AtSetpoint() return false after the setpoint is changed with SetSetpoint(). Closes #2821. Co-authored-by: Prateek Machiraju <prateek.machiraju@gmail.com>
This commit is contained in:
@@ -238,6 +238,7 @@ class PIDController : public frc::Sendable,
|
||||
double m_velocityTolerance = std::numeric_limits<double>::infinity();
|
||||
|
||||
double m_setpoint = 0;
|
||||
double m_measurement = 0;
|
||||
};
|
||||
|
||||
} // namespace frc2
|
||||
|
||||
Reference in New Issue
Block a user