You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In a PIDCommand (created similarly to the example), using getController().atSetpoint() returns false, even if the error is below the tolerance.
This seems to be because PIDCommand usescalculate(measurement, setpoint) to set the setpoint, instead of setSetpoint.
However, the calculate method doesn't actually set m_haveSetPoint to true, so atSetPoint continues to return false (m_haveSetPoint is still false).
This was probably caused by 1e05b21.
The text was updated successfully, but these errors were encountered:
calcmogul
added a commit
to calcmogul/allwpilib
that referenced
this issue
Jan 29, 2023
In a PIDCommand (created similarly to the example), using
getController().atSetpoint()
returns false, even if the error is below the tolerance.This seems to be because PIDCommand uses
calculate(measurement, setpoint)
to set the setpoint, instead ofsetSetpoint
.However, the
calculate
method doesn't actually setm_haveSetPoint
to true, so atSetPoint continues to return false (m_haveSetPoint
is still false).This was probably caused by 1e05b21.
The text was updated successfully, but these errors were encountered: