New mode for TPS/TPS enrichment to be a multiplier #3167

only:f407-discovery
This commit is contained in:
Andrey 2024-06-09 18:15:34 -04:00
parent 36be456c0d
commit e145edb96d
5 changed files with 20 additions and 8 deletions

View File

@ -36,6 +36,7 @@ Release template (copy/paste this for new release):
- simpler basic firmware updater #5577
- prohibit mcu_standby on ECU start-up #6589
- Allow to choose lower RPM cutoff for AC Compressor #6597
- New TPS/TPS enrichment mode: percent adder #3167
### Fixed
- knock logic not activated until any configuration change via TS #6462

View File

@ -26,7 +26,8 @@
static tps_tps_Map3D_t tpsTpsMap{"tps"};
floatms_t TpsAccelEnrichment::getTpsEnrichment() {
// on this level we do not distinguish between multiplier and 'ms adder' modes
float TpsAccelEnrichment::getTpsEnrichment() {
ScopePerf perf(PE::GetTpsEnrichment);
if (engineConfiguration->tpsAccelLookback == 0) {

View File

@ -328,16 +328,19 @@ float getInjectionMass(int rpm) {
engine->module<InjectorModelSecondary>()->prepare();
}
floatms_t tpsAccelEnrich = engine->tpsAccelEnrichment.getTpsEnrichment();
float tpsAccelEnrich = engine->tpsAccelEnrichment.getTpsEnrichment();
efiAssert(ObdCode::CUSTOM_ERR_ASSERT, !cisnan(tpsAccelEnrich), "NaN tpsAccelEnrich", 0);
engine->engineState.tpsAccelEnrich = tpsAccelEnrich;
// For legacy reasons, the TPS accel table is in units of milliseconds, so we have to convert BACK to mass
float tpsAccelPerInjection = durationMultiplier * tpsAccelEnrich;
float tpsFuelMass = engine->module<InjectorModelPrimary>()->getFuelMassForDuration(tpsAccelPerInjection);
return injectionFuelMass + tpsFuelMass;
if (engineConfiguration->tpsTpsPercentMode) {
return injectionFuelMass * (1 + tpsAccelPerInjection);
} else {
// For legacy reasons, the TPS accel table is in units of milliseconds, so we have to convert BACK to mass
float tpsFuelMass = engine->module<InjectorModelPrimary>()->getFuelMassForDuration(tpsAccelPerInjection);
return injectionFuelMass + tpsFuelMass;
}
}
#endif

View File

@ -802,7 +802,7 @@ bit is_enabled_spi_2
bit disableEtbWhenEngineStopped;Allows disabling the ETB when the engine is stopped. You may not like the power draw or PWM noise from the motor, so this lets you turn it off until it's necessary.
bit is_enabled_spi_4
bit pauseEtbControl;Disable the electronic throttle motor and DC idle motor for testing.\nThis mode is for testing ETB/DC idle position sensors, etc without actually driving the throttle.
bit unusedAlign
bit tpsTpsPercentMode,"percent adder","ms adder"
bit verboseKLine
bit idleIncrementalPidCic
bit enableAemXSeries;AEM X-Series or rusEFI Wideband

View File

@ -1884,7 +1884,7 @@ menuDialog = main
# Accel enrichment
subMenu = AccelEnrich, "Acceleration enrichment", 0, {isInjectionEnabled == 1}
subMenu = tpsTpsAccelTbl, "TPS/TPS acceleration extra fuel", 0, {isInjectionEnabled == 1}
subMenu = tpsTpsDialog, "TPS/TPS acceleration extra fuel", 0, {isInjectionEnabled == 1}
subMenu = tpsTspRpmCorrection, "TPS/TPS extra fuel RPM correction", 0, {isInjectionEnabled == 1}
groupMenu = "Wall wetting AE"
@ -4462,6 +4462,13 @@ dialog = tcuControls, "Transmission Settings"
panel = boostOpenLoopYAxisSelector, North
panel = boostTableTbl, Center
dialog = tpsTpsModeSelector
field = "Mode", tpsTpsPercentMode
dialog = tpsTpsDialog, "", border
panel = tpsTpsModeSelector, North
panel = tpsTpsAccelTbl, Center
dialog = boostOpenLoopGearAdderDialog, "", border
panel = boostOpenLoopGearAdderCurve, Center