totalFuel and totalIgnition correction gauges in Tunerstudio #4955
This commit is contained in:
parent
c2c7c74dc5
commit
badd5c6de8
|
@ -1,5 +1,5 @@
|
||||||
struct_no_prefix fuel_computer_s
|
struct_no_prefix fuel_computer_s
|
||||||
|
float totalFuelCorrection
|
||||||
uint16_t autoscale afrTableYAxis;;"%",{1/100}, 0, 0, 0, 0
|
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 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
|
uint16_t autoscale targetAFR;@@GAUGE_NAME_TARGET_AFR@@;"ratio",{1/@@PACK_MULT_AFR@@}, 0, 0, 0, 2
|
||||||
|
|
|
@ -127,16 +127,20 @@ float getRunningFuel(float baseFuel) {
|
||||||
efiAssert(CUSTOM_ERR_ASSERT, !cisnan(cltCorrection), "NaN cltCorrection", 0);
|
efiAssert(CUSTOM_ERR_ASSERT, !cisnan(cltCorrection), "NaN cltCorrection", 0);
|
||||||
efiAssert(CUSTOM_ERR_ASSERT, !cisnan(postCrankingFuelCorrection), "NaN postCrankingFuelCorrection", 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
|
#if EFI_ANTILAG_SYSTEM
|
||||||
runningFuel *= (1 + engine->antilagController.fuelALSCorrection / 100);
|
correction *= (1 + engine->antilagController.fuelALSCorrection / 100);
|
||||||
#endif /* EFI_ANTILAG_SYSTEM */
|
#endif /* EFI_ANTILAG_SYSTEM */
|
||||||
|
|
||||||
#if EFI_LAUNCH_CONTROL
|
#if EFI_LAUNCH_CONTROL
|
||||||
runningFuel *= engine->launchController.getFuelCoefficient();
|
correction *= engine->launchController.getFuelCoefficient();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
engine->fuelComputer.totalFuelCorrection = correction;
|
||||||
|
|
||||||
|
float runningFuel = baseFuel * correction;
|
||||||
|
|
||||||
efiAssert(CUSTOM_ERR_ASSERT, !cisnan(runningFuel), "NaN runningFuel", 0);
|
efiAssert(CUSTOM_ERR_ASSERT, !cisnan(runningFuel), "NaN runningFuel", 0);
|
||||||
|
|
||||||
engine->engineState.running.fuel = runningFuel * 1000;
|
engine->engineState.running.fuel = runningFuel * 1000;
|
||||||
|
|
Loading…
Reference in New Issue