From 3ee640e4e24a12efc166ddfe23efaf5063f0872d Mon Sep 17 00:00:00 2001 From: Josh Stewart Date: Tue, 21 Jun 2016 17:33:53 +1000 Subject: [PATCH] Fix for mistake in previous includeAFR commit --- reference/speeduino.ini | 4 ++-- utils.ino | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/reference/speeduino.ini b/reference/speeduino.ini index a235fb78..97503b92 100644 --- a/reference/speeduino.ini +++ b/reference/speeduino.ini @@ -626,8 +626,8 @@ page = 8 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 recieved." - multiplyMAP = "If enabled, the MAP reading is included directly into the pulsewidth calculation. This results in a flatter VE table that can be easier to tune in some instances" - includeAFR = "When enabled, the current AFR reading is included directly in the pulsewidth calculation as a percentage of the stoichiometric ration." + multiplyMAP = "If enabled, the MAP reading is included directly into the pulsewidth calculation. This results in a flatter VE table that can be easier to tune in some instances. VE table must be retuned when this value is changed." + includeAFR = "When enabled, the current AFR reading is incorporated directly in the pulsewidth calculation as a percentage of the current target ratio. VE table must be retuned when this value is changed. " [UserDefinedTS] diff --git a/utils.ino b/utils.ino index 29538ac0..31762f53 100644 --- a/utils.ino +++ b/utils.ino @@ -332,7 +332,7 @@ unsigned int PW(int REQ_FUEL, byte VE, byte MAP, int corrections, int injOpen, b //100% float free version, does sacrifice a little bit of accuracy, but not much. iVE = ((int)VE << 7) / 100; if( configPage1.multiplyMAP ) { iMAP = ((int)MAP << 7) / currentStatus.baro; } //Include multiply MAP (vs baro) if enabled - if( configPage1.includeAFR ) { iAFR = ((int)currentStatus.O2 << 7) / configPage1.stoich; } //Include AFR (vs stoich) if enabled + if( configPage1.includeAFR ) { iAFR = ((int)currentStatus.O2 << 7) / currentStatus.afrTarget; } //Include AFR (vs target) if enabled iCorrections = (corrections << 7) / 100; //int iTPS = ((int)TPS << 7) / 100;