GCC Code Coverage Report


Directory: ./
File: firmware/controllers/algo/wall_fuel.h
Date: 2025-10-03 00:57:22
Coverage Exec Excl Total
Lines: 33.3% 2 0 6
Functions: 33.3% 1 0 3
Branches: -% 0 0 0
Decisions: -% 0 - 0

Line Branch Decision Exec Source
1 /*
2 * @file wall_fuel.h
3 *
4 */
5
6 #pragma once
7
8 #include "wall_fuel_state_generated.h"
9 #include "engine_module.h"
10
11 /**
12 * Wall wetting, also known as fuel film
13 * See https://github.com/rusefi/rusefi/issues/151 for the theory
14 */
15 class WallFuel : public wall_fuel_state_s {
16 public:
17 /**
18 * @param desiredMassGrams desired fuel quantity, in grams
19 * @return total adjusted fuel squirt mass in grams once wall wetting is taken into effect
20 */
21 float adjust(float desiredMassGrams);
22 float getWallFuel() const;
23 void resetWF();
24 int invocationCounter = 0;
25 };
26
27 struct IWallFuelController {
28 virtual bool getEnable() const = 0;
29 virtual float getAlpha() const = 0;
30 virtual float getBeta() const = 0;
31 };
32
33 class WallFuelController : public IWallFuelController, public EngineModule {
34 public:
35 using interface_t = IWallFuelController;
36
37 void onFastCallback() override;
38
39 8515 bool getEnable() const override {
40 8515 return m_enable;
41 }
42
43 float getAlpha() const override {
44 return m_alpha;
45 }
46
47 float getBeta() const override {
48 return m_beta;
49 }
50
51 protected:
52 float computeTau() const;
53 float computeBeta() const;
54
55 private:
56 bool m_enable = false;
57 float m_alpha = 0;
58 float m_beta = 0;
59 };
60