GCC Code Coverage Report


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 100.0% 9 / 0 / 9
Functions: 100.0% 2 / 0 / 2
Branches: 100.0% 2 / 0 / 2
Decisions: 100.0% 2 / - / 2

firmware/controllers/lua/lua_biquad.h
Line Branch Decision Exec Source
1 #include "pch.h"
2 #include "biquad.h"
3
4 #pragma once
5
6 struct LuaBiQuad {
7 Biquad delegate;
8
9 8 float filter(float input) {
10
2/2
✓ Branch 0 taken 3 times.
✓ Branch 1 taken 5 times.
2/2
✓ Decision 'true' taken 3 times.
✓ Decision 'false' taken 5 times.
8 if (isFirstValue) {
11 3 delegate.cookSteadyState(input);
12 3 isFirstValue = false;
13 }
14 8 return delegate.filter(input);
15 }
16
17 3 void configureLowpass(float samplingFrequency, float cutoffFrequency) {
18 3 delegate.configureLowpass(samplingFrequency, cutoffFrequency);
19 3 isFirstValue = true;
20 3 }
21
22 bool isFirstValue = true;
23 };
24