Cranking add cold advance option (#872)

Co-authored-by: Josh Stewart <josh@noisymime.org>
This commit is contained in:
Vitor Moreno B. Sales 2023-05-09 21:32:11 -03:00 committed by GitHub
parent 424a96d9ea
commit 9a1c3e30c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 4 deletions

View File

@ -326,7 +326,7 @@ page = 1
reqFuel = scalar, U08, 24, "ms", 0.1, 0.0, 0.0, 25.5, 1
divider = scalar, U08, 25, "", 1.0, 0.0
alternate = bits, U08, 26, [0:0], "Simultaneous", "Alternating"
multiplyMAP1 = bits, U08, 26, [1:1], "No", "Yes"
crkngAddCLTAdv= bits, U08, 26, [1:1], "No", "Yes"
includeAFR = bits, U08, 26, [2:2], "No", "Yes"
hardCutType = bits, U08, 26, [3:3], "Full", "Rolling"
ignAlgorithm = bits, U08, 26, [4:6], $loadSourceNames
@ -2167,6 +2167,7 @@ menuDialog = main
ignBypassPin = "The ARDUINO pin that the ignition bypass is connected to. This is NOT the pin on the connector, but the pin it relates to on the arduino"
ignBypassEnable = "If turned on, a ground signal will be output during cranking on the specified pin. This is used to bypass the Speeduino ignition control during cranking."
ignCranklock = "On certain low resolution ignition patterns, the cranking timing can be locked to occur when a pulse is received."
crkngAddCLTAdv = "Adds cold advance values to cranking angle."
multiplyMAP = "If enabled, the MAP reading is included directly into the pulsewidth calculation by multiplying the VE lookup value by either the MAP:Baro ratio or MAP/100.\n This results in a flatter VE table that can be easier to tune in some instances. The MAP/100 option is generally used for compatibility with fuel tables from other ECUs. MAP:Baro ratio is recommended for new tunes. \n VE table must be retuned when this value is changed."
legacyMAP = "Use the legacy method of reading the MAP sensor that was used prior to the 201905 firmware. This should ONLY be enabled if you are upgrading from a firmware earlier than this"
@ -2789,6 +2790,7 @@ menuDialog = main
dialog = crankingIgnOptions, "Cranking Timing", yAxis
field = "Cranking advance Angle", CrankAng, { ignCranklock == 0 }
field = "Add cold advance", crkngAddCLTAdv, { ignCranklock == 0 }
field = "Cranking bypass", ignBypassEnable
field = "Bypass output pin", ignBypassPin { ignBypassEnable }
field = "Fix cranking timing with trigger", ignCranklock, { TrigPattern == 1 || TrigPattern == 4 || TrigPattern == 10 || TrigPattern == 9 }

View File

@ -723,7 +723,11 @@ int8_t correctionFixedTiming(int8_t advance)
int8_t correctionCrankingFixedTiming(int8_t advance)
{
int8_t ignCrankFixValue = advance;
if ( BIT_CHECK(currentStatus.engine, BIT_ENGINE_CRANK) ) { ignCrankFixValue = configPage4.CrankAng; } //Use the fixed cranking ignition angle
if ( BIT_CHECK(currentStatus.engine, BIT_ENGINE_CRANK) )
{
if ( configPage2.crkngAddCLTAdv == 0 ) { ignCrankFixValue = configPage4.CrankAng; } //Use the fixed cranking ignition angle
else { ignCrankFixValue = correctionCLTadvance(configPage4.CrankAng); } //Use the CLT compensated cranking ignition angle
}
return ignCrankFixValue;
}

View File

@ -781,7 +781,7 @@ struct config2 {
byte reqFuel; //24
byte divider;
byte injTiming : 1; ///< Injector timing (aka. injector staging) 0=simultaneous, 1=alternating
byte multiplyMAP_old : 1;
byte crkngAddCLTAdv : 1;
byte includeAFR : 1; //< Enable AFR compensation ? (See also @ref config2.incorporateAFR)
byte hardCutType : 1;
byte ignAlgorithm : 3;

View File

@ -427,7 +427,7 @@ void doUpdates(void)
configPage13.outputPin[7] = 0;
//New multiply MAP option added. Set new option to be the same as old
configPage2.multiplyMAP = configPage2.multiplyMAP_old;
configPage2.multiplyMAP = configPage2.crkngAddCLTAdv;
//New AE option added to allow for PW added in addition to existing PW multiply
configPage2.aeApplyMode = 0; //Set the AE mode to Multiply