From db9d4c82010b524e3368aa49c4717c436212608e Mon Sep 17 00:00:00 2001 From: Andrey Date: Thu, 1 Sep 2022 19:05:40 -0400 Subject: [PATCH] tear down Engine god object #4511 just trying different things --- firmware/controllers/algo/engine_state.h | 7 +++++-- firmware/controllers/algo/fuel/fuel_computer.txt | 8 ++++++++ firmware/integration/LiveData.yaml | 4 ++++ 3 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 firmware/controllers/algo/fuel/fuel_computer.txt diff --git a/firmware/controllers/algo/engine_state.h b/firmware/controllers/algo/engine_state.h index fe907853cc..31a9c32578 100644 --- a/firmware/controllers/algo/engine_state.h +++ b/firmware/controllers/algo/engine_state.h @@ -50,7 +50,12 @@ public: float currentVe = 0; float currentVeLoad = 0; + + // fuel computer float currentAfrLoad = 0; + float targetLambda = 0.0f; + float stoichiometricRatio = 0.0f; + // fuel computer end float fuelingLoad = 0; float ignitionLoad = 0; @@ -69,6 +74,4 @@ public: multispark_state multispark; - float targetLambda = 0.0f; - float stoichiometricRatio = 0.0f; }; diff --git a/firmware/controllers/algo/fuel/fuel_computer.txt b/firmware/controllers/algo/fuel/fuel_computer.txt new file mode 100644 index 0000000000..b73f6f27a4 --- /dev/null +++ b/firmware/controllers/algo/fuel/fuel_computer.txt @@ -0,0 +1,8 @@ +struct_no_prefix fuel_computer_s + + float currentAfrLoad + float targetLambda + float stoichiometricRatio + float targetAFR_t + +end_struct \ No newline at end of file diff --git a/firmware/integration/LiveData.yaml b/firmware/integration/LiveData.yaml index 7ab00f6b46..ebf755f9d1 100644 --- a/firmware/integration/LiveData.yaml +++ b/firmware/integration/LiveData.yaml @@ -32,6 +32,10 @@ Usages: java: InjectorModel.java folder: controllers/algo/fuel + - name: fuel_computer + java: FuelComputer.java + folder: controllers/algo/fuel + - name: launch_control_state java: LaunchControl.java folder: controllers/algo