From 8542fdfaad331f5c09d9a975c0e2a5b7ceee35fe Mon Sep 17 00:00:00 2001 From: Josh Stewart Date: Mon, 22 Aug 2016 23:04:49 +1000 Subject: [PATCH] Apply the temperature offset to egoTemp. --- corrections.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/corrections.ino b/corrections.ino index b16ad1dc..c6e567ce 100644 --- a/corrections.ino +++ b/corrections.ino @@ -243,7 +243,7 @@ byte correctionsAFRClosedLoop() if( (ignitionCount & (configPage3.egoCount - 1)) == 1 ) //This is the equivalent of ( (ignitionCount % configPage3.egoCount) == 0 ) but without the expensive modulus operation. ie It results in True every ignition loops. Note that it only works for power of two vlaues for egoCount { //Check all other requirements for closed loop adjustments - if( (currentStatus.coolant > configPage3.egoTemp) && (currentStatus.RPM > (unsigned int)(configPage3.egoRPM * 100)) && (currentStatus.TPS < configPage3.egoTPSMax) && (currentStatus.O2 < configPage3.ego_max) && (currentStatus.O2 > configPage3.ego_min) && (currentStatus.runSecs > configPage3.ego_sdelay) ) + if( (currentStatus.coolant > (int)(configPage3.egoTemp - CALIBRATION_TEMPERATURE_OFFSET)) && (currentStatus.RPM > (unsigned int)(configPage3.egoRPM * 100)) && (currentStatus.TPS < configPage3.egoTPSMax) && (currentStatus.O2 < configPage3.ego_max) && (currentStatus.O2 > configPage3.ego_min) && (currentStatus.runSecs > configPage3.ego_sdelay) ) { //Determine whether the Y axis of the AFR target table tshould be MAP (Speed-Density) or TPS (Alpha-N) byte yValue;