GCC Code Coverage Report


Directory: ./
File: firmware/init/sensor/init_fuel_level.cpp
Date: 2025-10-03 00:57:22
Coverage Exec Excl Total
Lines: 66.7% 4 0 6
Functions: 100.0% 1 0 1
Branches: 50.0% 1 0 2
Decisions: 50.0% 1 - 2

Line Branch Decision Exec Source
1 #include "pch.h"
2
3 #include "adc_subscription.h"
4 #include "fuel_level_sensor.h"
5
6 static FuelLevelSensor fuelSensor(SensorType::FuelLevel, /* timeout = */ MS2NT(500));
7
8 2 void initFuelLevel() {
9 2 adc_channel_e channel = engineConfiguration->fuelLevelSensor;
10
11
1/2
✓ Branch 1 taken 2 times.
✗ Branch 2 not taken.
1/2
✓ Decision 'true' taken 2 times.
✗ Decision 'false' not taken.
2 if (!isAdcChannelValid(channel)) {
12 2 return;
13 }
14
15 // noisy data from fuel tank slosh is handled on an higher level
16 AdcSubscription::SubscribeSensor(fuelSensor, channel, /*lowpassCutoff =*/ 100);
17 fuelSensor.Register();
18 }
19