|
Re: Major WPILib PIDController bug
Quote:
Originally Posted by virtuald
And yes, you're correct: enable doesn't seem to clear the buffer. setSetpoint does, however (which leads to a different bug, because onTarget will never be true if you keep calling setSetpoint over and over again).
|
Ah, I should have checked the source again before posting this. We were setting the setpoint at the outset of the command along with enabling the PID controller, and I had conflated which method caused the problem.
enable() does not clear the buffer at all.
setSetpoint() clears the buffer, but does not clear m_buftotal.
Editing my OP now to reflect this correction.
The effect of the bug is the same.
__________________
"Mmmmm, chain grease and aluminum shavings..."
"The breakfast of champions!"
Member, FRC Team 449: 2007-2010
Drive Mechanics Lead, FRC Team 449: 2009-2010
Alumnus/Technical Mentor, FRC Team 449: 2010-Present
Lead Technical Mentor, FRC Team 4464: 2012-2015
Technical Mentor, FRC Team 5830: 2015-2016
Last edited by Oblarg : 17-03-2016 at 20:40.
|