Skip to content

Commit

Permalink
CI fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jatinchowdhury18 committed Apr 6, 2024
1 parent 5953986 commit fe83de1
Showing 1 changed file with 10 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,22 +44,17 @@ class EllipticFilter : public SOSFilter<order, FloatType>
auto calcCoefsForQ = [&] (FloatType stageFreqOff, FloatType stageQ, FloatType stageLPGain, size_t stageOrder)
{
FloatType bCoefs[3], bOppCoefs[3], aCoefs[3];
auto calcBaseCoefficients = [&] (FloatType stageFreqOff, FloatType stageQ)
switch (type)
{
switch (type)
{
case EllipticFilterType::Lowpass:
CoefficientCalculators::calcSecondOrderLPF<FloatType, NumericType, false> (bCoefs, aCoefs, fc * stageFreqOff, stageQ, fs, fc);
CoefficientCalculators::calcSecondOrderHPF<FloatType, NumericType, false> (bOppCoefs, aCoefs, fc * stageFreqOff, stageQ, fs, fc);
break;
case EllipticFilterType::Highpass:
CoefficientCalculators::calcSecondOrderLPF<FloatType, NumericType, false> (bOppCoefs, aCoefs, fc / stageFreqOff, stageQ, fs, fc);
CoefficientCalculators::calcSecondOrderHPF<FloatType, NumericType, false> (bCoefs, aCoefs, fc / stageFreqOff, stageQ, fs, fc);
break;
}
};

calcBaseCoefficients (stageFreqOff, stageQ);
case EllipticFilterType::Lowpass:
CoefficientCalculators::calcSecondOrderLPF<FloatType, NumericType, false> (bCoefs, aCoefs, fc * stageFreqOff, stageQ, fs, fc);
CoefficientCalculators::calcSecondOrderHPF<FloatType, NumericType, false> (bOppCoefs, aCoefs, fc * stageFreqOff, stageQ, fs, fc);
break;
case EllipticFilterType::Highpass:
CoefficientCalculators::calcSecondOrderLPF<FloatType, NumericType, false> (bOppCoefs, aCoefs, fc / stageFreqOff, stageQ, fs, fc);
CoefficientCalculators::calcSecondOrderHPF<FloatType, NumericType, false> (bCoefs, aCoefs, fc / stageFreqOff, stageQ, fs, fc);
break;
}

for (size_t i = 0; i < 3; ++i)
bCoefs[i] = bOppCoefs[i] + stageLPGain * bCoefs[i];
Expand Down

0 comments on commit fe83de1

Please sign in to comment.