BUGfix: only add filters for enabled input channels

This commit is contained in:
Anne de Jong 2022-10-24 13:31:57 +02:00
parent 6eaf5db691
commit 48de9cc3cb

View File

@ -325,14 +325,16 @@ void StreamMgr::startStream(const DaqConfiguration &config) {
_inputFilters.push_back(nullptr); _inputFilters.push_back(nullptr);
} }
for (auto &ch : daq->inchannel_config) { for (auto &ch : daq->inchannel_config) {
if (ch.digitalHighPassCutOn < 0) { if (ch.enabled) {
_inputFilters.push_back(nullptr); if (ch.digitalHighPassCutOn < 0) {
} else if (ch.digitalHighPassCutOn == 0) { _inputFilters.push_back(nullptr);
throw rte("Digital highpass cuton should be > 0 if activated"); } else if (ch.digitalHighPassCutOn == 0) {
} else { throw rte("Digital highpass cuton should be > 0 if activated");
// Put in a digital high-pass filter. } else {
_inputFilters.emplace_back(std::make_unique<SeriesBiquad>( // Put in a digital high-pass filter.
SeriesBiquad::firstOrderHighPass(fs, ch.digitalHighPassCutOn))); _inputFilters.emplace_back(std::make_unique<SeriesBiquad>(
SeriesBiquad::firstOrderHighPass(fs, ch.digitalHighPassCutOn)));
}
} }
} // End of input filter creation } // End of input filter creation
} }