Add fuel adder to launch fix #4777
This commit is contained in:
parent
b60107a807
commit
a17e12747e
|
@ -37,6 +37,7 @@ Release template (copy/paste this for new release):
|
|||
- Lua: function to access VIN setting #3967
|
||||
- Lua: designated Lua gauges with logging #4672
|
||||
- GCC11 is the suggested compiler now, GCC9 no longer supported #4680
|
||||
- Add fuel adder to launch #4777
|
||||
|
||||
### Fixed
|
||||
- Fuel Priming reset fix #4627
|
||||
|
|
|
@ -129,6 +129,11 @@ float getRunningFuel(float baseFuel) {
|
|||
efiAssert(CUSTOM_ERR_ASSERT, !cisnan(postCrankingFuelCorrection), "NaN postCrankingFuelCorrection", 0);
|
||||
|
||||
float runningFuel = baseFuel * baroCorrection * iatCorrection * cltCorrection * postCrankingFuelCorrection;
|
||||
|
||||
#if EFI_LAUNCH_CONTROL
|
||||
runningFuel *= engine->launchController.getFuelCoefficient();
|
||||
#endif
|
||||
|
||||
efiAssert(CUSTOM_ERR_ASSERT, !cisnan(runningFuel), "NaN runningFuel", 0);
|
||||
|
||||
engine->engineState.running.fuel = runningFuel * 1000;
|
||||
|
|
|
@ -94,6 +94,10 @@ LaunchControlBase::LaunchControlBase() {
|
|||
isLaunchCondition = false;
|
||||
}
|
||||
|
||||
bool LaunchControlBase::getFuelCoefficient() const {
|
||||
return 1 + (isLaunchCondition && engineConfiguration->launchControlEnabled ? engineConfiguration->launchFuelAdderPercent / 100.0 : 0);
|
||||
}
|
||||
|
||||
void LaunchControlBase::update() {
|
||||
if (!engineConfiguration->launchControlEnabled) {
|
||||
return;
|
||||
|
|
|
@ -18,6 +18,7 @@ public:
|
|||
// Update the state of the launch control system
|
||||
void update();
|
||||
|
||||
bool getFuelCoefficient() const;
|
||||
bool isInsideSpeedCondition() const;
|
||||
bool isInsideTpsCondition() const;
|
||||
bool isInsideSwitchCondition();
|
||||
|
|
Loading…
Reference in New Issue