TPS acceleration docs

This commit is contained in:
rusefi 2019-03-16 11:14:52 -04:00
parent 874261cfe3
commit 69dcfd6338
4 changed files with 17 additions and 12 deletions

View File

@ -172,20 +172,20 @@ float AccelEnrichmemnt::getMaxDelta(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
// todo: eliminate code duplication between these two methods! Some pointer magic would help.
floatms_t AccelEnrichmemnt::getTpsEnrichment(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
int index = getMaxDeltaIndex(PASS_ENGINE_PARAMETER_SIGNATURE);
int maxDeltaIndex = getMaxDeltaIndex(PASS_ENGINE_PARAMETER_SIGNATURE);
// FuelSchedule *fs = engineConfiguration->injectionEvents;
float tpsTo = cb.get(index);
float tpsFrom = cb.get(index - 1);
float d = tpsTo - tpsFrom;
percent_t tpsTo = cb.get(maxDeltaIndex);
percent_t tpsFrom = cb.get(maxDeltaIndex - 1);
percent_t deltaTps = tpsTo - tpsFrom;
float valueFromTable = tpsTpsMap.getValue(tpsFrom, tpsTo);
floatms_t extraFuel;
if (d > engineConfiguration->tpsAccelEnrichmentThreshold) {
if (deltaTps > engineConfiguration->tpsAccelEnrichmentThreshold) {
extraFuel = valueFromTable;
} else if (d < -engineConfiguration->tpsDecelEnleanmentThreshold) {
extraFuel = d * engineConfiguration->tpsDecelEnleanmentMultiplier;
} else if (deltaTps < -engineConfiguration->tpsDecelEnleanmentThreshold) {
extraFuel = deltaTps * engineConfiguration->tpsDecelEnleanmentMultiplier;
} else {
extraFuel = 0;
}

View File

@ -1,4 +1,4 @@
// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Mon Mar 11 13:35:29 EDT 2019
// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Sat Mar 16 10:09:42 EDT 2019
// begin
#ifndef ENGINE_CONFIGURATION_GENERATED_H_
#define ENGINE_CONFIGURATION_GENERATED_H_
@ -1236,6 +1236,7 @@ typedef struct {
*/
int canSleepPeriodMs;
/**
* '4 stroke with symmetrical crank' is a pretty special case for example on Miata NB2
* See engineCycle
* set operation_mode X
* offset 488
@ -1810,10 +1811,12 @@ typedef struct {
*/
brain_pin_e LIS302DLCsPin;
/**
* How many engine cycles to consider?
* offset 2064
*/
int tpsAccelLength;
/**
* Maximum delta in TPS percentange over the 'length'
* offset 2068
*/
float tpsAccelEnrichmentThreshold;
@ -2578,4 +2581,4 @@ typedef struct {
#endif
// end
// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Mon Mar 11 13:35:29 EDT 2019
// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Sat Mar 16 10:09:42 EDT 2019

View File

@ -823,8 +823,8 @@ custom pin_mode_e 1 bits, U08, @OFFSET@, [0:5], @@pin_mode_e_enum@@
brain_pin_e LIS302DLCsPin;
int tpsAccelLength;;"cycles", 1, 0, 1, 200, 0
float tpsAccelEnrichmentThreshold;;"roc", 1, 0, 0, 200, 3
int tpsAccelLength;+How many engine cycles to consider?;"cycles", 1, 0, 1, 200, 0
float tpsAccelEnrichmentThreshold;+Maximum delta in TPS percentange over the 'length';"roc", 1, 0, 0, 200, 3
float vvtOffset;+angle between cam sensor and VVT zero position\nset vvt_offset X;"value", 1, 0, -720, 1000, 1
int engineLoadAccelLength;;"cycles", 1, 0, 1, 200, 0

View File

@ -63,7 +63,7 @@ enable2ndByteCanID = false
; see PAGE_0_SIZE in C source code
; CONFIG_DEFINITION_START
; this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Fri Mar 15 13:34:07 EDT 2019
; this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Sat Mar 16 10:09:42 EDT 2019
pageSize = 20000
page = 1
@ -947,6 +947,8 @@ page = 1
throttlePedalWOTVoltage = "Pedal in the floor"
startUpFuelPumpDuration = "on ECU start turn fuel pump on to build fuel pressure"
startOfCrankingPrimingPulse = "Prime pulse duration in ms\nSee also isFasterEngineSpinUpEnabled\nset cranking_priming_pulse X"
tpsAccelLength = "How many engine cycles to consider?"
tpsAccelEnrichmentThreshold = "Maximum delta in TPS percentange over the 'length'"
vvtOffset = "angle between cam sensor and VVT zero position\nset vvt_offset X"
slowAdcAlpha = "ExpAverage alpha coefficient"
camInput = "Camshaft input could be used either just for engine phase detection if your trigger shape does not include cam sensor as 'primary' channel, or it could be used for Variable Valve timing on one of the camshafts.\nTODO #660"