Add lambda output

This commit is contained in:
Josh Stewart 2016-06-20 23:32:51 +10:00
parent a29c20e62f
commit a59135a0e6
2 changed files with 26 additions and 30 deletions

View File

@ -216,7 +216,7 @@ struct config1 {
byte mapMin;
unsigned int mapMax;
byte fpPrime; //Time (In seconds) that the fuel pump should be primed for on power up
byte unused50;
byte stoich;
byte unused51;
byte unused52;
byte unused53;

View File

@ -182,7 +182,7 @@ page = 2
mapMin = scalar, U08, 46, "kpa", 1.0, 0.0, 0.0, 255.0, 0
mapMax = scalar, U16, 47, "kpa", 1.0, 0.0, 0.0, 25500, 0
fpPrime = scalar, U08, 49, "s", 1.0, 0.0, 0.0, 255.0, 0
unused2-50 = scalar, U08, 50, "RPM", 100.0, 0.0, 100, 25500, 0
stoich = scalar, U08, 50, ":1", 0.1, 0.0, 0.0, 25.5, 1
unused2-51 = scalar, U08, 51, "RPM", 100.0, 0.0, 100, 25500, 0
unused2-52 = scalar, U08, 52, "RPM", 100.0, 0.0, 100, 25500, 0
unused2-53 = scalar, U08, 53, "RPM", 100.0, 0.0, 100, 25500, 0
@ -472,6 +472,7 @@ page = 8
defaultValue = inj2Ang, 355
defaultValue = inj3Ang, 355
defaultValue = inj4Ang, 355
defaultValue = nInjectors, 4
defaultValue = dutyLim, 100
defaultValue = mapMin, 10
defaultValue = mapMax, 260
@ -480,6 +481,7 @@ page = 8
defaultValue = ignCranklock, 0
defaultValue = multiplyMAP, 0
defaultValue = includeAFR, 0
defaultValue = stoich, 14.7
[Menu]
@ -586,20 +588,21 @@ page = 8
; constantName = "Help Text"
; tool tips tooltips
;Ensure all settings are defined as some MS2/BG words shipped with TS are not applicable.
nCylinders = "The number of cylinders in your engine."
engineType = "Most engines are Even Fire. Typical odd-fire engines are V-twin, some V4, Vmax, some V6, V10."
twoStroke = "Four-Stroke (most engines), Two-stroke."
nInjectors = "Number of primary injectors."
mapSample = "The method used for calculating the MAP reading\nFor 1-2 Cylinder engines, Cycle Minimum is recommended.\nFor more than 2 cylinders Cycle Average is recommended"
nCylinders = "The number of cylinders in your engine."
engineType = "Most engines are Even Fire. Typical odd-fire engines are V-twin, some V4, Vmax, some V6, V10."
twoStroke = "Four-Stroke (most engines), Two-stroke."
nInjectors = "Number of primary injectors."
mapSample = "The method used for calculating the MAP reading\nFor 1-2 Cylinder engines, Cycle Minimum is recommended.\nFor more than 2 cylinders Cycle Average is recommended"
stoich = "The stoichiometric ration of the fuel being used. For flex fuel, choose the primary fuel"
TrigPattern = "The type of input trigger decoder to be used."
numteeth = "Number of teeth on Primary Wheel."
TrigSpeed = "Primary trigger speed."
onetwo = "Number of Missing teeth on Primary Wheel."
TrigAng = "The Angle ATDC when tooth No:1 on the primary wheel passes the primary sensor."
StgCycles = "The number of revolutions that will be skipped during cranking before the injectors and coils are fired."
TrigEdge = "The Trigger edge of the primary sensor.\nLeading.\nTrailing."
TrigFilter = "Tuning of the trigger filter algorithm. The more aggressive the setting, the more noise will be removed, however this increases the chance of some true readings being filtered out (False positive). Medium is safe for most setups. Only select 'Aggressive' if no other options are working"
numteeth = "Number of teeth on Primary Wheel."
TrigSpeed = "Primary trigger speed."
onetwo = "Number of Missing teeth on Primary Wheel."
TrigAng = "The Angle ATDC when tooth No:1 on the primary wheel passes the primary sensor."
StgCycles = "The number of revolutions that will be skipped during cranking before the injectors and coils are fired."
TrigEdge = "The Trigger edge of the primary sensor.\nLeading.\nTrailing."
TrigFilter = "Tuning of the trigger filter algorithm. The more aggressive the setting, the more noise will be removed, however this increases the chance of some true readings being filtered out (False positive). Medium is safe for most setups. Only select 'Aggressive' if no other options are working"
sparkMode = "Wasted Spark: Ignition outputs are on the channels <= half the number of cylinders. Eg 4 cylinder outputs on IGN1 and IGN2.\nSingle Channel: All ignition pulses are output on IGN1.\nWasted COP: Ignition pulses are output on all ignition channels up to the number of cylinders. Eg 4 cylinder outputs on all ignition channels. No valid for >4 cylinders"
IgInv = "Whether the spark fires when the ignition sign goes high or goes low. Most ignition systems 'Going Low' but please verify this as damage to coils can result from the incorrect selection"
@ -614,11 +617,11 @@ page = 8
iacAlgorithm = "Selects method of idle control.\nNone = no idle control valve.\nOn/Off valve.\nPWM valve (2,3 wire).\nStepper Valve (4,6,8 wire)."
iacPWMdir = "Normal PWM valves increase RPM with higher duty. If RPM decreases with higher duty then select Reverse"
dfcoRPM = "The RPM above which DFCO will be active. Typically set a few hundred RPM above maximum idle speed"
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"
dfcoRPM = "The RPM above which DFCO will be active. Typically set a few hundred RPM above maximum idle speed"
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"
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"
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"
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 recieved."
@ -648,9 +651,10 @@ page = 8
dialog = engine_constants_south
topicHelp = Mhelp
field = "Injector Layout", injLayout, { nCylinders <= 4 }
field = "Board Layout", pinLayout
field = "MAP Sample method", mapSample
field = "Stoichiometric ratio", stoich
field = "Injector Layout", injLayout, { nCylinders <= 4 }
field = "Board Layout", pinLayout
field = "MAP Sample method", mapSample
dialog = engine_constants, ""
panel = std_injection, North
@ -1044,16 +1048,6 @@ page = 8
; and deceleration enleanment numbers. See the definition of the variable
; accDecEnrich in the OutputChannels section.
;
; David Hooke contributed the lambda gauge and associated transfer
; function files.
;
; "The lambda gauge is the best way (my opinion) to report data from a
; wide band EGO gauge, it standardizes the output irrespective of fuel
; or mix of fuels, so you needn't do any brainwork to know if your 75%
; gasoline and 25% methanol is rich at 10:1 or not.
;
; "Use the file WBlambda100AVR.inc, if using a standard ADC (e.g., AVR cpu).
; Use the file WBlambda100MOT.inc, if using a biased ADC (e.g., MOT cpu)."
;-------------------------------------------------------------------------------
; Define a gauge's characteristics here, then go to a specific layout
; block (Tuning or FrontPage) and use the name you've defined here to
@ -1314,6 +1308,7 @@ page = 8
dutyCycle = { 100.0*pulseWidth/cycleTime }
boostCutOut = { boostCutFuel || boostCutSpark }
lambda = { afr / stoich }
#if EXPANDED_CLT_TEMP
clt_exp = { 1 }
@ -1365,6 +1360,7 @@ page = 8
entry = tpsADC, "tpsADC", int, "%d"
entry = tps, "TPS", int, "%d"
entry = afr, "O2", float, "%.3f"
entry = lambda, "%", float, "%.3f"
entry = iat, "IAT", int, "%d"
entry = coolant, "CLT", int, "%d"
entry = engine, "Engine", int, "%d"