| 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 |