GCC Code Coverage Report


Directory: ./
File: firmware/controllers/sensors/converters/fuel_level_func.h
Date: 2025-10-03 00:57:22
Coverage Exec Excl Total
Lines: 100.0% 2 0 2
Functions: 100.0% 1 0 1
Branches: -% 0 0 0
Decisions: -% 0 - 0

Line Branch Decision Exec Source
1 //
2 // Created by kifir on 12/19/24.
3 //
4
5 #pragma once
6
7 #include "engine_configuration_defaults.h"
8
9 class FuelLevelFunc {
10 public:
11 3 FuelLevelFunc() : m_filteredValue() {
12 3 }
13 SensorResult convert(float inputValue);
14 private:
15 float getFuelLevelAlpha() const;
16 float filterFuelValue(float value);
17 void updateFilteredValue(float value);
18
19 static constexpr float MIN_FUEL_LEVEL_UPDATE_PERIOD_SEC =
20 engine_configuration_defaults::FUEL_LEVEL_UPDATE_PERIOD_SEC;
21
22 std::optional<float> m_filteredValue;
23 Timer m_fuelLevelTimer;
24 };
25