Merge "Clear error buffer total when clearing the buffer contents"

This commit is contained in:
Peter Johnson (294)
2016-05-05 23:30:50 -07:00
committed by Gerrit Code Review
2 changed files with 2 additions and 0 deletions

View File

@@ -352,6 +352,7 @@ void PIDController::SetSetpoint(float setpoint) {
// Clear m_buf.
m_buf = std::queue<double>();
m_bufTotal = 0;
}
if (m_table != nullptr) {

View File

@@ -510,6 +510,7 @@ public class PIDController implements PIDInterface, LiveWindowSendable, Controll
}
m_buf.clear();
m_bufTotal = 0;
if (table != null)
table.putNumber("setpoint", m_setpoint);