[DFCO] Add a minimum coolant (#353)
* [DFCO] Add a minimum coolant On pure ethanol or E85 the engine need a lot fuel to return from DFCO when cold. Add a minimum temp Fixes copy-paste error Fix sign error * Add signed cast on the calibration offset Co-authored-by: Josh Stewart <josh@noisymime.org>
This commit is contained in:
parent
7edd9f7d38
commit
62e90379f6
|
@ -335,21 +335,26 @@ page = 1
|
|||
|
||||
injAngRPM = array, U08, 95, [4], "RPM" 100, 0.0, 100, 10000, 0
|
||||
idleTaperTime = scalar, U08, 99, "S", 0.1, 0.0, 0.0, 25.5, 1
|
||||
dfcoDelay = scalar, U08, 100, "S", 0.1, 0.0, 0.0, 25.5, 1 ;Remaind of DFCO settings are in page 4
|
||||
dfcoDelay = scalar, U08, 100, "S", 0.1, 0.0, 0.0, 25.5, 1 ;Remainder of DFCO settings are in page 4
|
||||
#if CELSIUS
|
||||
dfcoMinCLT = scalar, U08, 101, "C", 1.0, -40, -40, 215, 0
|
||||
#else
|
||||
dfcoMinCLT = scalar, U08, 101, "F", 1.8, -22.23, -40, 215, 0
|
||||
#endif
|
||||
|
||||
;VSS settings
|
||||
vssEnable = bits, U08, 101, [0:0], "Off", "On"
|
||||
vssPullup = bits, U08, 101, [1:1], "Off", "On"
|
||||
vssPulsesPerKm= scalar, U16, 102. "pulses" 1.0, 0.0, 0.0, 25500, 0
|
||||
vssSpare = scalar, U08, 104, "%", 1.0, 0, 0, 120, 0
|
||||
vssRatio1 = scalar, U16, 105, ":1", 0.01, 0, 0, 9.99, 2
|
||||
vssRatio2 = scalar, U16, 107, "%", 0.01, 0, 0, 9.99, 2
|
||||
vssRatio3 = scalar, U08, 109, "%", 0.01, 0, 0, 2.55, 2
|
||||
vssRatio4 = scalar, U08, 110, "%", 0.01, 0, 0, 2.55, 2
|
||||
vssRatio5 = scalar, U08, 111, "%", 0.01, 0, 0, 2.55, 2
|
||||
vssRatio6 = scalar, U08, 112, "%", 0.01, 0, 0, 2.55, 2
|
||||
;VSS settings
|
||||
vssEnable = bits, U08, 102, [0:0], "Off", "On"
|
||||
vssPullup = bits, U08, 102, [1:1], "Off", "On"
|
||||
vssPulsesPerKm= scalar, U16, 103. "pulses" 1.0, 0.0, 0.0, 25500, 0
|
||||
vssSpare = scalar, U08, 105, "%", 1.0, 0, 0, 120, 0
|
||||
vssRatio1 = scalar, U16, 106, ":1", 0.01, 0, 0, 9.99, 2
|
||||
vssRatio2 = scalar, U16, 108, "%", 0.01, 0, 0, 9.99, 2
|
||||
vssRatio3 = scalar, U08, 110, "%", 0.01, 0, 0, 2.55, 2
|
||||
vssRatio4 = scalar, U08, 111, "%", 0.01, 0, 0, 2.55, 2
|
||||
vssRatio5 = scalar, U08, 112, "%", 0.01, 0, 0, 2.55, 2
|
||||
vssRatio6 = scalar, U08, 113, "%", 0.01, 0, 0, 2.55, 2
|
||||
|
||||
unused2-95 = array, U08, 113, [15], "%", 1.0, 0.0, 0.0, 255, 0
|
||||
unused2-95 = array, U08, 114, [14], "%", 1.0, 0.0, 0.0, 255, 0
|
||||
|
||||
;Page 2 is the fuel map and axis bins only
|
||||
page = 2
|
||||
|
@ -1158,8 +1163,9 @@ page = 11
|
|||
defaultValue = battVCorMode, 1
|
||||
defaultValue = idleAdvEnabled, 0 ;Idle advance control turned off
|
||||
defaultValue = aseTsnDelay, 0.0
|
||||
defaultValue = dfcoDelay, 0.1
|
||||
defaultValue = idleTaperTime, 1.0
|
||||
defaultValue = dfcoDelay, 0.1
|
||||
defaultValue = dfcoMinCLT, 25
|
||||
|
||||
;Default pins
|
||||
defaultValue = fanPin, 0
|
||||
|
@ -1449,6 +1455,7 @@ menuDialog = main
|
|||
dfcoHyster = "Hysteresis for DFCO RPM. 200-300 RPM is typical for this, however a higher value may be needed if the RPM is fluctuating around the cutout speed"
|
||||
dfcoTPSThresh= "The TPS value below which DFCO will be active. Typical value is 5%-10%, but higher may be needed if TPS signal is noisy"
|
||||
dfcoDelay = "Delay for activate DFCO."
|
||||
dfcoMinCLT = "Minimum temperature to enable DFCO."
|
||||
|
||||
launchPin = "The ARDUINO pin that the clutch switch is connected to. This is NOT the pin on the connector, but the pin it relates to on the arduino"
|
||||
launchHiLo = "Whether the signal is High or Low when the clutch pedal is engaged. For a ground switching input (Most clutch switches), this should be LOW"
|
||||
|
@ -1755,10 +1762,11 @@ menuDialog = main
|
|||
|
||||
dialog = accelEnrichments_south, "Decelleration Fuel Cutoff (DFCO)"
|
||||
field = "Enabled", dfcoEnabled
|
||||
field = "TPS Threshold", dfcoTPSThresh, { dfcoEnabled }
|
||||
field = "Cutoff delay", dfcoDelay, { dfcoEnabled }
|
||||
field = "Cutoff RPM", dfcoRPM, { dfcoEnabled }
|
||||
field = "RPM Hysteresis", dfcoHyster, { dfcoEnabled }
|
||||
field = "TPS Threshold", dfcoTPSThresh, { dfcoEnabled }
|
||||
field = "Minimum engine temperature", dfcoMinCLT, { dfcoEnabled }
|
||||
field = "Cutoff delay", dfcoDelay, { dfcoEnabled }
|
||||
field = "Cutoff RPM", dfcoRPM, { dfcoEnabled }
|
||||
field = "RPM Hysteresis", dfcoHyster, { dfcoEnabled }
|
||||
|
||||
dialog = accelEnrichments_north_south, ""
|
||||
liveGraph = pump_ae_Graph, "AE Graph"
|
||||
|
|
|
@ -429,17 +429,20 @@ bool correctionDFCO()
|
|||
bool DFCOValue = false;
|
||||
if ( configPage2.dfcoEnabled == 1 )
|
||||
{
|
||||
if ( bitRead(currentStatus.status1, BIT_STATUS1_DFCO) == 1 ) {
|
||||
if ( bitRead(currentStatus.status1, BIT_STATUS1_DFCO) == 1 )
|
||||
{
|
||||
DFCOValue = ( currentStatus.RPM > ( configPage4.dfcoRPM * 10) ) && ( currentStatus.TPS < configPage4.dfcoTPSThresh );
|
||||
if ( DFCOValue == false) { dfcoStart = 0; }
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
if ( dfcoStart == 0 ) { dfcoStart = runSecsX10; }
|
||||
if ( ( currentStatus.RPM > (unsigned int)( (configPage4.dfcoRPM * 10) + configPage4.dfcoHyster) ) && ( currentStatus.TPS < configPage4.dfcoTPSThresh ) && ( (runSecsX10 - dfcoStart) > configPage2.dfcoDelay ) ){
|
||||
if ( ( currentStatus.coolant >= (int)(configPage2.dfcoMinCLT - CALIBRATION_TEMPERATURE_OFFSET) ) && ( currentStatus.RPM > (unsigned int)( (configPage4.dfcoRPM * 10) + configPage4.dfcoHyster) ) && ( currentStatus.TPS < configPage4.dfcoTPSThresh ) && ( (runSecsX10 - dfcoStart) > configPage2.dfcoDelay ) )
|
||||
{
|
||||
DFCOValue = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
} // DFCO active check
|
||||
} // DFCO enabled check
|
||||
return DFCOValue;
|
||||
}
|
||||
|
||||
|
|
|
@ -644,6 +644,7 @@ struct config2 {
|
|||
|
||||
byte idleTaperTime;
|
||||
byte dfcoDelay;
|
||||
byte dfcoMinCLT;
|
||||
|
||||
//VSS Stuff
|
||||
byte vssEnable : 1;
|
||||
|
@ -658,7 +659,7 @@ struct config2 {
|
|||
byte vssRatio5;
|
||||
byte vssRatio6;
|
||||
|
||||
byte unused2_95[15];
|
||||
byte unused2_95[14];
|
||||
|
||||
#if defined(CORE_AVR)
|
||||
};
|
||||
|
|
|
@ -321,6 +321,8 @@ void doUpdates()
|
|||
|
||||
//Introdced a DFCO delay option. Default it to 0
|
||||
configPage2.dfcoDelay = 0;
|
||||
//Introdced a minimum temperature for DFCO. Default it to 40C
|
||||
configPage2.dfcoMinCLT = 40;
|
||||
|
||||
writeAllConfig();
|
||||
EEPROM.write(EEPROM_DATA_VERSION, 14);
|
||||
|
|
Loading…
Reference in New Issue