totalFuel and totalIgnition correction gauges in Tunerstudio #4955

This commit is contained in:
Andrey 2023-01-14 05:36:25 -05:00
parent 6d561bbf24
commit 12282635ef
2 changed files with 8 additions and 4 deletions

View File

@ -1,5 +1,5 @@
struct_no_prefix fuel_computer_s
float totalFuelCorrection
uint16_t autoscale afrTableYAxis;;"%",{1/100}, 0, 0, 0, 0
uint16_t autoscale targetLambda;@@GAUGE_NAME_TARGET_LAMBDA@@;"",{1/@@PACK_MULT_LAMBDA@@}, 0, 0, 0, 3
uint16_t autoscale targetAFR;@@GAUGE_NAME_TARGET_AFR@@;"ratio",{1/@@PACK_MULT_AFR@@}, 0, 0, 0, 2

View File

@ -127,16 +127,20 @@ float getRunningFuel(float baseFuel) {
efiAssert(CUSTOM_ERR_ASSERT, !cisnan(cltCorrection), "NaN cltCorrection", 0);
efiAssert(CUSTOM_ERR_ASSERT, !cisnan(postCrankingFuelCorrection), "NaN postCrankingFuelCorrection", 0);
float runningFuel = baseFuel * baroCorrection * iatCorrection * cltCorrection * postCrankingFuelCorrection;
float correction = baroCorrection * iatCorrection * cltCorrection * postCrankingFuelCorrection;
#if EFI_ANTILAG_SYSTEM
runningFuel *= (1 + engine->antilagController.fuelALSCorrection / 100);
correction *= (1 + engine->antilagController.fuelALSCorrection / 100);
#endif /* EFI_ANTILAG_SYSTEM */
#if EFI_LAUNCH_CONTROL
runningFuel *= engine->launchController.getFuelCoefficient();
correction *= engine->launchController.getFuelCoefficient();
#endif
engine->fuelComputer.totalFuelCorrection = correction;
float runningFuel = baseFuel * correction;
efiAssert(CUSTOM_ERR_ASSERT, !cisnan(runningFuel), "NaN runningFuel", 0);
engine->engineState.running.fuel = runningFuel * 1000;