mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-25 01:41:43 +00:00
[wpimath] Modify C++ LinearFilter::Reset(span<double>, span<double>) to take span<T> (#6628)
Previously, the overload took a span<double>. However, m_inputs and m_outputs store type T, so the function could not be called for any T that does not have an implicit constructor from double.
This commit is contained in:
@@ -321,8 +321,7 @@ class LinearFilter {
|
||||
* @throws std::runtime_error if size of inputBuffer or outputBuffer does not
|
||||
* match the size of ffGains and fbGains provided in the constructor.
|
||||
*/
|
||||
void Reset(std::span<const double> inputBuffer,
|
||||
std::span<const double> outputBuffer) {
|
||||
void Reset(std::span<const T> inputBuffer, std::span<const T> outputBuffer) {
|
||||
// Clear buffers
|
||||
Reset();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user