Ignition advance range changes (#701)
* Signed int8 for fixed crank angle (range -10to80) * Limit ignition advance in tables to 70 and use different range for multiplied * Limit WMI and Nitrous ign adv to reasonable values * Fix IAT timing retard table * Don't let IAT retard correction set a fixed advance. No other correction does this and this fixed correction can be changed by other corrections. Also the current code is not working as ignition offset is not used for IAT retard.
This commit is contained in:
parent
b0acb92742
commit
366f720455
|
@ -437,7 +437,7 @@ page = 2
|
|||
;Start Ignition table (Page 3)
|
||||
;--------------------------------------------------
|
||||
page = 3
|
||||
advTable1 = array, U08, 0,[16x16], "deg", 1.0, -40, -40, 215.0, 0
|
||||
advTable1 = array, U08, 0,[16x16], "deg", 1.0, -40, -40, 70.0, 0
|
||||
rpmBins2 = array, U08, 256,[ 16], "RPM", 100.0, 0.0, 100, 25500, 0
|
||||
mapBins1 = array, U08, 272, [ 16], { bitStringValue(algorithmUnits , ignAlgorithm) }, 2.0, 0.0, 0.0, {ignLoadMax}, 0 ; This name has to be used in order for the table to show up in MLVs table. I can't find the regexs that make this work :(
|
||||
|
||||
|
@ -448,7 +448,7 @@ page = 3
|
|||
page = 4
|
||||
TrigAng = scalar, S16, 0, "Deg", 1, 0, -360, 360, 0
|
||||
FixAng = scalar, S08, 2, "Deg", 1, 0, -64, 64, 0 ; Allow negative values here
|
||||
CrankAng = scalar, U08, 3, "Deg", 1, 0, -10, 80, 0
|
||||
CrankAng = scalar, S08, 3, "Deg", 1, 0, -10, 80, 0
|
||||
TrigAngMul = scalar, U08, 4, "", 1, 0, 0, 88, 0 ; Multiplier for tooth counts that don't evenly divide into 360
|
||||
TrigEdge = bits, U08, 5,[0:0], "RISING", "FALLING"
|
||||
TrigSpeed = bits, U08, 5,[1:1], "Crank Speed", "Cam Speed"
|
||||
|
@ -509,11 +509,11 @@ page = 4
|
|||
|
||||
;IAT (Inlet air temp) timing retard
|
||||
#if CELSIUS
|
||||
iatRetBins = array, U08, 48, [ 6], "C", 1.0, 0.0, 0.00, 255.0, 0
|
||||
iatRetBins = array, U08, 48, [ 6], "C", 1.0, 0.0, 0.00, 125.0, 0
|
||||
#else
|
||||
iatRetBins = array, U08, 48, [ 6], "F", 1.8, 17.77, 0.00, 255.0, 0 ; No -40 degree offset here
|
||||
iatRetBins = array, U08, 48, [ 6], "F", 1.8, 17.77, 32.00, 257.0, 0 ; No -40 degree offset here
|
||||
#endif
|
||||
iatRetRates = array, U08, 54, [ 6], "deg", 1.0, 0.0, 0.00, 255.0, 0
|
||||
iatRetRates = array, U08, 54, [ 6], "deg", 1.0, 0.0, 0.00, 30.0, 0
|
||||
;Decelleration Fuel Cut Off (DFCO)
|
||||
dfcoRPM = scalar, U08, 60, "RPM", 10.0, 0.0, 100, 2550, 0
|
||||
dfcoHyster = scalar, U08, 61, "RPM", 1.0, 0.0, 100, 255.0, 0
|
||||
|
@ -1060,7 +1060,7 @@ page = 10
|
|||
n2o_stage1_maxRPM = scalar, U08, 82, "RPM", 100, 0.0, 1000, 10000, 0
|
||||
n2o_stage1_adderMin = scalar, U08, 83, "ms", 0.1, 0, 0, 25.5, 1
|
||||
n2o_stage1_adderMax = scalar, U08, 84, "ms", 0.1, 0, 0, 25.5, 1
|
||||
n2o_stage1_retard = scalar, U08, 85, "Deg", 1.0, 0.0, 0.0, 250.0, 0
|
||||
n2o_stage1_retard = scalar, U08, 85, "Deg", 1.0, 0.0, 0.0, 40.0, 0
|
||||
|
||||
n2o_stage2_pin = bits , U08, 86, [0:5], $IO_Pins_no_def
|
||||
n2o_stage2_unused = bits , U08, 86, [6:7], "No", "Yes", "INVALID", "INVALID"
|
||||
|
@ -1068,7 +1068,7 @@ page = 10
|
|||
n2o_stage2_maxRPM = scalar, U08, 88, "RPM", 100, 0.0, 1000, 10000, 0
|
||||
n2o_stage2_adderMin = scalar, U08, 89, "ms", 0.1, 0, 0, 32, 1
|
||||
n2o_stage2_adderMax = scalar, U08, 90, "ms", 0.1, 0, 0, 32, 1
|
||||
n2o_stage2_retard = scalar, U08, 91, "Deg", 1.0, 0.0, 0.0, 250.0, 0
|
||||
n2o_stage2_retard = scalar, U08, 91, "Deg", 1.0, 0.0, 0.0, 40.0, 0
|
||||
|
||||
; Knock settings
|
||||
knock_mode = bits , U08, 92, [0:1], "Off","Digital","Analog", "INVALID"
|
||||
|
@ -1162,7 +1162,7 @@ page = 10
|
|||
wmiEnabledPin = bits, U08, 158, [0:5], "Board Default", $DIGITAL_PIN
|
||||
|
||||
wmiAdvBins = array, U08, 159, [6], "kPa", 2.0, 0.0, 0.0, 511.0, 0
|
||||
wmiAdvAdj = array, U08, 165, [6], "Deg", 1.0, -40, -40, 215.0, 0
|
||||
wmiAdvAdj = array, U08, 165, [6], "Deg", 1.0, -40, -40, 40.0, 0
|
||||
|
||||
vvtCLminDuty = scalar, U08, 171, "%", 0.5, 0.0, 0.0, 100.0, 1 ; Minimum and maximum duty cycles when using closed loop
|
||||
vvtCLmaxDuty = scalar, U08, 172, "%", 0.5, 0.0, 0.0, 100.0, 1
|
||||
|
@ -1319,7 +1319,7 @@ page = 13
|
|||
;Second ignition map (Page 14)
|
||||
;--------------------------------------------------
|
||||
page = 14
|
||||
advTable2 = array, U08, 0,[16x16], "deg", 1.0, -40, -40, 215.0, 0
|
||||
advTable2 = array, U08, 0,[16x16], "deg", 1.0, -40, { ign2ValuesMin }, { ign2ValuesMax }, 0
|
||||
rpmBins3 = array, U08, 256,[ 16], "RPM", 100.0, 0.0, 100, 25500, 0
|
||||
mapBins2 = array, U08, 272, [ 16], { bitStringValue(algorithmUnits , spark2Algorithm) }, 2.0, 0.0, 0.0, { ign2LoadMax }, 0 ; This name has to be used in order for the table to show up in MLVs table. I can't find the regexs that make this work :(
|
||||
|
||||
|
@ -4160,7 +4160,11 @@ cmdVSSratio6 = "E\x99\x06"
|
|||
; IAT based ignition timing retard
|
||||
curve = iat_retard_curve, "IAT timing retard"
|
||||
columnLabel = "Inlet Air Temp", "Retard"
|
||||
xAxis = -40, 200, 5
|
||||
#if CELSIUS
|
||||
xAxis = 0, 125, 5
|
||||
#else
|
||||
xAxis = 32, 257, 5
|
||||
#endif
|
||||
yAxis = 0, 30, 5
|
||||
xBins = iatRetBins, iat
|
||||
yBins = iatRetRates
|
||||
|
@ -4941,6 +4945,8 @@ cmdVSSratio6 = "E\x99\x06"
|
|||
ignLoadMax = { (ignAlgorithm == 0 || ignAlgorithm == 2) ? 511 : 100 }
|
||||
fuel2LoadMax = { (fuel2Algorithm == 0 || fuel2Algorithm == 2) ? 511 : 100 }
|
||||
ign2LoadMax = { (spark2Algorithm == 0 || spark2Algorithm == 2) ? 511 : 100 }
|
||||
ign2ValuesMin = { (spark2Mode == 1) ? 0 : -40 }
|
||||
ign2ValuesMax = { (spark2Mode == 1) ? 215 : 70 }
|
||||
|
||||
fuelLoad2 = { fuel2Algorithm == 0 ? map : fuel2Algorithm == 1 ? tps : fuel2Algorithm == 2 ? 0 : 0 }
|
||||
ignLoad2 = { spark2Algorithm == 0 ? map : spark2Algorithm == 1 ? tps : spark2Algorithm == 2 ? 0 : ignLoad }
|
||||
|
|
|
@ -701,7 +701,7 @@ int8_t correctionFixedTiming(int8_t advance)
|
|||
*/
|
||||
int8_t correctionCrankingFixedTiming(int8_t advance)
|
||||
{
|
||||
byte ignCrankFixValue = advance;
|
||||
int8_t ignCrankFixValue = advance;
|
||||
if ( BIT_CHECK(currentStatus.engine, BIT_ENGINE_CRANK) ) { ignCrankFixValue = configPage4.CrankAng; } //Use the fixed cranking ignition angle
|
||||
return ignCrankFixValue;
|
||||
}
|
||||
|
@ -733,14 +733,9 @@ int8_t correctionWMITiming(int8_t advance)
|
|||
*/
|
||||
int8_t correctionIATretard(int8_t advance)
|
||||
{
|
||||
byte ignIATValue = advance;
|
||||
//Adjust the advance based on IAT. If the adjustment amount is greater than the current advance, just set advance to 0
|
||||
int8_t advanceIATadjust = table2D_getValue(&IATRetardTable, currentStatus.IAT);
|
||||
int tempAdvance = (advance - advanceIATadjust);
|
||||
if (tempAdvance >= -OFFSET_IGNITION) { ignIATValue = tempAdvance; }
|
||||
else { ignIATValue = -OFFSET_IGNITION; }
|
||||
|
||||
return ignIATValue;
|
||||
return advance - advanceIATadjust;
|
||||
}
|
||||
/** Ignition correction for coolant temperature (CLT).
|
||||
*/
|
||||
|
|
|
@ -909,7 +909,7 @@ struct config4 {
|
|||
|
||||
int16_t triggerAngle; ///< Angle (ATDC) when tooth No:1 on the primary wheel sends signal (-360 to +360 deg.)
|
||||
int8_t FixAng; ///< Fixed Ignition angle value (enabled by @ref configPage2.fixAngEnable, copied to ignFixValue, Negative values allowed, See corrections.ino)
|
||||
byte CrankAng; ///< Fixed start-up/cranking ignition angle (See: corrections.ino)
|
||||
int8_t CrankAng; ///< Fixed start-up/cranking ignition angle (See: corrections.ino)
|
||||
byte TrigAngMul; ///< Multiplier for non evenly divisible tooth counts.
|
||||
|
||||
byte TrigEdge : 1; ///< Primary (RPM1) Trigger Edge - 0 - RISING, 1 = FALLING (Copied from this config to primaryTriggerEdge)
|
||||
|
|
Loading…
Reference in New Issue