GCC Code Coverage Report


Directory: ./
File: firmware/init/sensor/init_input_shaft_speed_sensor.cpp
Date: 2025-10-03 00:57:22
Coverage Exec Excl Total
Lines: 70.0% 7 0 10
Functions: 50.0% 1 0 2
Branches: 25.0% 1 0 4
Decisions: 50.0% 1 - 2

Line Branch Decision Exec Source
1 #include "pch.h"
2
3 /**
4 * We were NOT able to get this code working reliable
5 * it could be that biquad parameter or biquad overall is part of the problem
6 */
7
8 #include "init.h"
9 #include "frequency_sensor.h"
10 #include "input_shaft_speed_converter.h"
11
12 FrequencySensor inputShaftSpeedSensor(SensorType::InputShaftSpeed, MS2NT(500));
13 static InputShaftSpeedConverter inputSpeedConverter;
14
15 2 void initInputShaftSpeedSensor() {
16 2 int parameter = engineConfiguration->issFilterReciprocal;
17
18
1/4
✗ Branch 0 not taken.
✓ Branch 1 taken 2 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
1/2
✓ Decision 'true' taken 2 times.
✗ Decision 'false' not taken.
2 if (parameter < 3 || parameter > 200) {
19 2 parameter = 3;
20 }
21
22 2 float filterParameter = 1.0f / parameter;
23 2 inputShaftSpeedSensor.initIfValid(engineConfiguration->tcuInputSpeedSensorPin, inputSpeedConverter, filterParameter);
24 2 }
25
26 void deinitInputShaftSpeedSensor() {
27 inputShaftSpeedSensor.deInit();
28 }
29