Make AFR great again! (#1929)

Co-authored-by: Andrei <andreikagit@users.noreply.github.com>
This commit is contained in:
andreika-git 2020-11-05 22:35:11 +02:00 committed by GitHub
parent 9a01d3a4a0
commit eb2882857f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 45 additions and 1 deletions

View File

@ -208,6 +208,7 @@ struct_no_prefix engine_configuration_s
custom fuel_table_t 4*@@FUEL_RPM_COUNT@@x@@FUEL_LOAD_COUNT@@ array, F32, @OFFSET@, [@@FUEL_RPM_COUNT@@x@@FUEL_LOAD_COUNT@@],"ms", 1, 0, 0.0, 500.0, 2
custom ve_table_t 4*@@FUEL_RPM_COUNT@@x@@FUEL_LOAD_COUNT@@ array, F32, @OFFSET@, [@@FUEL_RPM_COUNT@@x@@FUEL_LOAD_COUNT@@],"%", 1, 0, 0, 999.0, 2
custom lambda_table_t @@FUEL_RPM_COUNT@@x@@FUEL_LOAD_COUNT@@ array, U08, @OFFSET@, [@@FUEL_RPM_COUNT@@x@@FUEL_LOAD_COUNT@@],"deg", {1/@@PACK_MULT_LAMBDA_CFG@@}, 0, 0.6, 1.5, 2
custom afr_table_t @@FUEL_RPM_COUNT@@x@@FUEL_LOAD_COUNT@@ array, U08, @OFFSET@, [@@FUEL_RPM_COUNT@@x@@FUEL_LOAD_COUNT@@],"deg", {1/@@PACK_MULT_AFR_CFG@@}, 0, 0, 25.0, 1
custom tcubinary_table_t @@TCU_GEAR_COUNT@@x@@TCU_SOLENOID_COUNT@@ array, U08, @OFFSET@, [@@TCU_GEAR_COUNT@@x@@TCU_SOLENOID_COUNT@@],"onoff", 1, 0, 0, 1, 0
@ -1490,7 +1491,12 @@ ve_table_t veTable;
float[FUEL_LOAD_COUNT] veLoadBins;;"kPa", 1, 0.0, 0, 400.0, 2
float[FUEL_RPM_COUNT] veRpmBins;;"RPM", 1, 0.0, 0, 18000.0, 2
#if LAMBDA
lambda_table_t lambdaTable;
#else
afr_table_t lambdaTable;
#endif
float[FUEL_LOAD_COUNT] lambdaLoadBins;;"", 1, 0.0, 0, 500.0, 2
float[FUEL_RPM_COUNT] lambdaRpmBins;;"RPM", 1, 0.0, 0, 18000.0, 2

View File

@ -90,7 +90,11 @@ enable2ndByteCanID = false
pageButtons = "&EGO"
gauge1 = RPMGauge
#if LAMBDA
gauge2 = lambda1Gauge
#else
gauge2 = afr1Gauge
#endif
gauge3 = MAPGauge
gauge4 = veValueGauge
@ -135,8 +139,13 @@ enable2ndByteCanID = false
[VeAnalyze]
; tableName, lambdaTargetTableName, lambdaChannel, egoCorrectionChannel, activeCondition
#if LAMBDA
veAnalyzeMap = veTableTbl, lambdaTableTbl, lambdaValue, egoCorrection, { 1 }
lambdaTargetTables = lambdaTableTbl, afrTSCustom
#else
veAnalyzeMap = veTableTbl, afrTableTbl, AFRValue, egoCorrection, { 1 }
lambdaTargetTables = afrTableTbl, afrTSCustom
#endif
; filter = Name, "DisplayName", outputChannel, operator, defaultVal, userAdjustable
filter = minRPMFilter, "Minimum RPM", RPMValue, < , 500, , true
@ -531,7 +540,11 @@ enable2ndByteCanID = false
yAxis = 0, 28, 10
xBins = narrowToWideOxygenBins
yBins = narrowToWideOxygen
#if LAMBDA
gauge = lambda1Gauge
#else
gauge = afr1Gauge
#endif
curve = fsioCurve1, "FSIO Curve #1"
columnLabel = "X", "Y"
@ -709,7 +722,11 @@ enable2ndByteCanID = false
yAxis = 0, 250, 10
xBins = idleVeBins, RPMValue
yBins = idleVe
#if LAMBDA
gauge = lambda1Gauge
#else
gauge = afr1Gauge
#endif
curve = crankingAdvanceCurve, "Cranking Advance Angle"
columnLabel = "RPM", "degrees"
@ -838,7 +855,11 @@ enable2ndByteCanID = false
upDownLabel = "(Later)", "(Sooner)"
#if LAMBDA
table = lambdaTableTbl, lambdaTableMap, "Target Lambda Table", 1
#else
table = afrTableTbl, afrTableMap, "Target AFR Table", 1
#endif
; constant, variable
xBins = lambdaRpmBins, RPMValue
yBins = lambdaLoadBins, afrTableYAxis
@ -1032,9 +1053,13 @@ gaugeCategory = Knock
[WueAnalyze]
; wueCurveName, afrTempCompensationCurve, lambdaTargetTableName, lambdaChannel, coolantTempChannel, egoCorrectionChannel, wueChannel, activeCondition
#if LAMBDA
wueAnalyzeMap = wueAnalyzer_warmup_curve, wueAfrTargetOffsetCurve, lambdaTableTbl, lambdaValue, coolant, cltCorrection, egoCorrection
lambdaTargetTables = lambdaTableTbl, afrTSCustom
#else
wueAnalyzeMap = wueAnalyzer_warmup_curve, wueAfrTargetOffsetCurve, afrTableTbl, AFRValue, coolant, cltCorrection, egoCorrection
lambdaTargetTables = afrTableTbl, afrTSCustom
#endif
wuePercentOffset = 0 ; for working with 0 based enrichment set to 100
option = disableLiveUpdates
@ -1065,7 +1090,11 @@ gaugeCategory = Knock
gauge2 = CLTGauge
gauge3 = TPSGauge
gauge4 = MAPGauge
#if LAMBDA
gauge5 = lambda1Gauge
#else
gauge5 = afr1Gauge
#endif
gauge6 = VBattGauge
gauge7 = dwellGauge
gauge8 = ignadvGauge
@ -1292,7 +1321,11 @@ menuDialog = main
subMenu = std_separator
# Fuel model
#if LAMBDA
subMenu = lambdaTableTbl, "Target lambda", 0, {isInjectionEnabled == 1}
#else
subMenu = afrTableTbl, "Target AFR", 0, {isInjectionEnabled == 1}
#endif
subMenu = cltFuelCorrCurve, "CLT multiplier", 0, {isInjectionEnabled == 1}
subMenu = iatFuelCorrCurve, "IAT multiplier", 0, {isInjectionEnabled == 1}
subMenu = fuelClosedLoopDialog, "Closed loop fuel correction", 0, {isInjectionEnabled == 1}
@ -3361,3 +3394,8 @@ cmd_set_engine_type_default = "@@TS_IO_TEST_COMMAND_char@@\x00\x31\x00\x00"
[Tools]
;addTool = toolName, PanelName
addTool = veTableGenerator, "VE Table Generator", veTableTbl
#if LAMBDA
#else
addTool = afrTableGenerator, "AFR Table Generator", afrTableTbl
#endif