[wpiutil] Improve wpi::circular_buffer iterators (#3410)

The implementation of wpi::circular_buffer has been effectively replaced
with a dynamically sized copy of wpi::static_circular_buffer with a
resize() member function.
This commit is contained in:
Tyler Veness
2021-06-05 21:08:12 -07:00
committed by GitHub
parent 8aecda03ed
commit 82856cf816
8 changed files with 393 additions and 297 deletions

View File

@@ -150,7 +150,9 @@ public class LinearFilter {
double retVal = 0.0;
// Rotate the inputs
m_inputs.addFirst(input);
if (m_inputGains.length > 0) {
m_inputs.addFirst(input);
}
// Calculate the new value
for (int i = 0; i < m_inputGains.length; i++) {
@@ -161,7 +163,9 @@ public class LinearFilter {
}
// Rotate the outputs
m_outputs.addFirst(retVal);
if (m_outputGains.length > 0) {
m_outputs.addFirst(retVal);
}
return retVal;
}