mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-03 03:01:44 +00:00
Merge "Clear error buffer total when clearing the buffer contents"
This commit is contained in:
@@ -352,6 +352,7 @@ void PIDController::SetSetpoint(float setpoint) {
|
||||
|
||||
// Clear m_buf.
|
||||
m_buf = std::queue<double>();
|
||||
m_bufTotal = 0;
|
||||
}
|
||||
|
||||
if (m_table != nullptr) {
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user