; vems.ini for Megatune2.25 + vems firmware 1.1.x
; tab stop 4
;
; 


[MegaTune]
	MTversion      = 2.25 ; MegaTune itself; needs to match exec version.
	versionInfo    = "S"  ; Put this in the title bar.
	queryCommand   = "Q" ; MSnS returns 30
#if 12X12
	#if HIGHBOOST
		signature      = "VEMS v1.0 12x12 kpa=2,2"  
	#else
		signature      = "VEMS v1.0 12x12 kpa=2,1"  
	#endif 
#else
	#if HIGHBOOST
		signature      = "VEMS v1.0 8x8 kpa=2,2"  
	#else
		signature      = "VEMS v1.0 8x8 kpa=2,1"  
	#endif 
#endif
	
	writeXML 		= true


;-------------------------------------------------------------------------------

[Constants]

	;----------------------------------------------------------------------------
	; Constants Definition
	; --------------------
	;
	; Scalar Values
	; -------------
	; The scaling and translation values are used as follows:
	;    msValue   = userValue / scale - translate
	;    userValue = (msValue + translate) * scale
	;
	; I've got no good way to handle a few of these things yet.
	;
	; Temperatures are fine, check out the Fielding IAC example (fastIdleT).
	;
	; The TPS stuff is a problem, because we have to modify the ini file for
	; each TPS installation and again whenever we move the TPS...  I figured
	; out a moderately palatable solution to presenting the frequency
	; divider in the boost control values, turn it into a bit field and then
	; enumerate the resulting frequencies.
	;
	; Array Values
	; ------------
	; Arrays are specified just like scalars, except that they have a "shape"
	; entry in the fourth parameter.  The shape allows you to define lists or
	; tables, for example [8] defines a list with eight values and [2x4] defines
	; a table with eight values (two rows and four columns).  Tables may be
	; stored in either "X-" or "Y-order."  X-order means that memory is layed
	; out like.
	;
	;     [x1,y1] [x2,y1]...[xn,y1] [x1,y2]...
	;
	; Y-order would be
	;
	;     [x1,y1] [x1,y2]...[x1,yn] [x2,y1]...
	;
	; To use the TableEditor, you must define two lists and a table, and
	; the lengths of the lists must correspond to the shape of the table.
	;
	; Bit Fields
	; ----------
	; Bits are numbered 0-7, the rightmost being bit zero.  The basic
	; data word that stores bit fields must be unsigned.
	;
	; You need NOT supply the correct number of labels matching the
	; number of bits you've specified (one bit requires 2 values, two
	; bits requires 4 values and so on).  If you neglect to supply enough
	; labels, they will be synthesized using the sequence "1", "2" and so
	; on based upon their position in the sequence (the 3Type and matType
	; will end up with identical lists).
	;
	; If you specify a label as "INVALID" (all upper case), then it will
	; not be displayed in the combo box, so you can leave out values that
	; make no sense.
	;
	;----------------------------------------------------------------------------

	verify = on
	interWriteDelay     = 1   ; Ignored if writeBlocks is "on".
	writeBlocks         = off ; or off (default is on)
	endianness          = big
	nPages              = 6
	burnCommand         = "B"
#if 12X12
	pageSize            = 24, 168, 168, 168, 255,20 ; h-table, ve-table, lambda-table, ign-table, config, b&t-table
#else
	pageSize            = 24, 80, 80, 80, 255,16 ; h-table, ve-table, lambda-table, ign-table, config, b&t-table
#endif
	pageActivationDelay = 0
							;hwmap, ve, afr, spark, config,boost
	pageActivate		= "p\001","p\004","p\007","p\006","p\000","p\002"
	pageReadCommand		= "h","j","l","n","o","t"
	pageValueWrite		= "H%o%v", "J%o%v", "L%o%v","N%o%v","O%o%v","T%o%v"
	pageChunkWrite		= "", ,"", "", "" ,"" ,""    ; No chunk write

   ;  name       = bits,   type, offset, bits
   ;  name       = array,  type, offset, shape, units,     scale, translate,    lo,      hi, digits
   ;  name       = scalar, type, offset,        units,     scale, translate,    lo,      hi, digits

page = 1
	h0		= array,	U08,	0,	[8],	"inj",	1.0,	0.0,	0.0,	255.0,	0     
	h00		= scalar,	U08,	0,	"",	1.0,	0.0,	0.0,	255,	0
	h01		= scalar,	U08,	1,	"",	1.0,	0.0,	0.0,	255,	0
	h02		= scalar,	U08,	2,	"",	1.0,	0.0,	0.0,	255,	0
	h03		= scalar,	U08,	3,	"",	1.0,	0.0,	0.0,	255,	0
	h04		= scalar,	U08,	4,	"",	1.0,	0.0,	0.0,	255,	0
	h05		= scalar,	U08,	5,	"",	1.0,	0.0,	0.0,	255,	0
	h06		= scalar,	U08,	6,	"",	1.0,	0.0,	0.0,	255,	0
	h07		= scalar,	U08,	7,	"",	1.0,	0.0,	0.0,	255,	0
	h1	= array,	U08,	8,	[  8], "inj",	1.0,	0.0,	0.0,	255.0,	0   
	h10		= scalar,	U08,	8,	"",	1.0,	0.0,	0.0,	255,	0
	h11		= scalar,	U08,	9,	"",	1.0,	0.0,	0.0,	255,	0
	h12		= scalar,	U08,	10,	"",	1.0,	0.0,	0.0,	255,	0
	h13		= scalar,	U08,	11,	"",	1.0,	0.0,	0.0,	255,	0
	h14		= scalar,	U08,	12,	"",	1.0,	0.0,	0.0,	255,	0
	h15		= scalar,	U08,	13,	"",	1.0,	0.0,	0.0,	255,	0
	h16		= scalar,	U08,	14,	"",	1.0,	0.0,	0.0,	255,	0
	h17		= scalar,	U08,	15,	"",	1.0,	0.0,	0.0,	255,	0
	h2	= array,	U08,	16,	[  8], "inj",	1.0,	0.0,	0.0,	255.0,	0 
	h20	= bits,		U08,	16, [0:2], "0 (EC36 Pin 35)", "1 (EC36 Pin 33) ", "2 (EC36 Pin 34)", "3 (EC36 Pin 36)","4 (EC36 Pin 11)","5 (EC36 Pin 12)","6 (EC36 Pin 24)", "7 (EC36 Pin 10) "
	h21	= bits,		U08,	17, [0:2], "0 (EC36 Pin 35)", "1 (EC36 Pin 33) ", "2 (EC36 Pin 34)", "3 (EC36 Pin 36)","4 (EC36 Pin 11)","5 (EC36 Pin 12)","6 (EC36 Pin 24)", "7 (EC36 Pin 10) "
	h22	= bits,		U08,	18, [0:2], "0 (EC36 Pin 35)", "1 (EC36 Pin 33) ", "2 (EC36 Pin 34)", "3 (EC36 Pin 36)","4 (EC36 Pin 11)","5 (EC36 Pin 12)","6 (EC36 Pin 24)", "7 (EC36 Pin 10) "
	h23	= bits,		U08,	19, [0:2], "0 (EC36 Pin 35)", "1 (EC36 Pin 33) ", "2 (EC36 Pin 34)", "3 (EC36 Pin 36)","4 (EC36 Pin 11)","5 (EC36 Pin 12)","6 (EC36 Pin 24)", "7 (EC36 Pin 10) "
	h24	= bits,		U08,	20, [0:2], "0 (EC36 Pin 35)", "1 (EC36 Pin 33) ", "2 (EC36 Pin 34)", "3 (EC36 Pin 36)","4 (EC36 Pin 11)","5 (EC36 Pin 12)","6 (EC36 Pin 24)", "7 (EC36 Pin 10) "
	h25	= bits,		U08,	21, [0:2], "0 (EC36 Pin 35)", "1 (EC36 Pin 33) ", "2 (EC36 Pin 34)", "3 (EC36 Pin 36)","4 (EC36 Pin 11)","5 (EC36 Pin 12)","6 (EC36 Pin 24)", "7 (EC36 Pin 10) "
	h26	= bits,		U08,	22, [0:2], "0 (EC36 Pin 35)", "1 (EC36 Pin 33) ", "2 (EC36 Pin 34)", "3 (EC36 Pin 36)","4 (EC36 Pin 11)","5 (EC36 Pin 12)","6 (EC36 Pin 24)", "7 (EC36 Pin 10) "
	h27	= bits,		U08,	23, [0:2], "0 (EC36 Pin 35)", "1 (EC36 Pin 33) ", "2 (EC36 Pin 34)", "3 (EC36 Pin 36)","4 (EC36 Pin 11)","5 (EC36 Pin 12)","6 (EC36 Pin 24)", "7 (EC36 Pin 10) "

	h2d0	= bits,		U08,	16, [0:2], "INVALID", "0+1 (EC36 Pin 35+33) ", "1+2 (EC36 Pin 33+34)", "2+3 (EC36 Pin 34+36)","3+4 (EC36 Pin  36+11)","4+5 (EC36 Pin 11+12)","5+6 (EC36 Pin 12+24)", "6+7 (EC36 Pin 24+10) "
	h2d1	= bits,		U08,	17, [0:2], "INVALID", "0+1 (EC36 Pin 35+33) ", "1+2 (EC36 Pin 33+34)", "2+3 (EC36 Pin 34+36)","3+4 (EC36 Pin  36+11)","4+5 (EC36 Pin 11+12)","5+6 (EC36 Pin 12+24)", "6+7 (EC36 Pin 24+10) "
	h2d2	= bits,		U08,	18, [0:2], "INVALID", "0+1 (EC36 Pin 35+33) ", "1+2 (EC36 Pin 33+34)", "2+3 (EC36 Pin 34+36)","3+4 (EC36 Pin  36+11)","4+5 (EC36 Pin 11+12)","5+6 (EC36 Pin 12+24)", "6+7 (EC36 Pin 24+10) "
	h2d3	= bits,		U08,	19, [0:2], "INVALID", "0+1 (EC36 Pin 35+33) ", "1+2 (EC36 Pin 33+34)", "2+3 (EC36 Pin 34+36)","3+4 (EC36 Pin  36+11)","4+5 (EC36 Pin 11+12)","5+6 (EC36 Pin 12+24)", "6+7 (EC36 Pin 24+10) "
	h2d4	= bits,		U08,	20, [0:2], "INVALID", "0+1 (EC36 Pin 35+33) ", "1+2 (EC36 Pin 33+34)", "2+3 (EC36 Pin 34+36)","3+4 (EC36 Pin  36+11)","4+5 (EC36 Pin 11+12)","5+6 (EC36 Pin 12+24)", "6+7 (EC36 Pin 24+10) "
	h2d5	= bits,		U08,	21, [0:2], "INVALID", "0+1 (EC36 Pin 35+33) ", "1+2 (EC36 Pin 33+34)", "2+3 (EC36 Pin 34+36)","3+4 (EC36 Pin  36+11)","4+5 (EC36 Pin 11+12)","5+6 (EC36 Pin 12+24)", "6+7 (EC36 Pin 24+10) "
	h2d6	= bits,		U08,	22, [0:2], "INVALID", "0+1 (EC36 Pin 35+33) ", "1+2 (EC36 Pin 33+34)", "2+3 (EC36 Pin 34+36)","3+4 (EC36 Pin  36+11)","4+5 (EC36 Pin 11+12)","5+6 (EC36 Pin 12+24)", "6+7 (EC36 Pin 24+10) "
	h2d7	= bits,		U08,	23, [0:2], "INVALID", "0+1 (EC36 Pin 35+33) ", "1+2 (EC36 Pin 33+34)", "2+3 (EC36 Pin 34+36)","3+4 (EC36 Pin  36+11)","4+5 (EC36 Pin 11+12)","5+6 (EC36 Pin 12+24)", "6+7 (EC36 Pin 24+10) "


page = 2
#if 12X12
	veTable		= array,	U08,	  0, [12X12],   "%",   1.0,  0.0,   0.0,   255.0, 0
	rpmBins		= array,	U08,	 144, [  12], "RPM", 100.0,  0.0, 100.0, 25500.0, 0
	#if HIGHBOOST
		mapBins	= array,	U08,	 156, [  12], "kPa",   2.0,  0.0,   0.0,   510.0, 0
	#else 
		mapBins	= array,	U08,	 156, [  12], "kPa",   1.0,  0.0,   0.0,   255.0, 0
	#endif
#else
	veTable		= array,	U08,	  0, [8x8],   "%",   1.0,  0.0,   0.0,   255.0, 0
	rpmBins		= array,	U08,	 64, [  8], "RPM", 100.0,  0.0, 100.0, 25500.0, 0
	#if HIGHBOOST
		mapBins	= array,	U08,	 72, [  8], "kPa",   2.0,  0.0,   0.0,   510.0, 0
	#else 
		mapBins	= array,	U08,	 72, [  8], "kPa",   1,  0.0,   0.0,   255.0, 0
	#endif
#endif

page = 4

	#if 12X12
		sparkTable		= array,	U08,	  0, [12X12], "Deg",		0.25,		0.0,   0.0,	  63.75,	2
		rpmBinsS		= array,	U08,	 144, [  12], "RPM",     100.0,		0.0, 100.0, 25500.0,	0
		#if HIGHBOOST
			mapBinsS	= array,	U08,	 156, [  12], "kPa",       2.0,		0.0,   0.0,   510.0,	0
		#else
			mapBinsS	= array,	U08,	 156, [  12], "kPa",       1.0,		0.0,   0.0,   255.0,	0
		#endif
	#else
		sparkTable		= array,	U08,	  0, [8x8], "Deg",		0.25,		0.0,   0.0,	  63.75,	2
		rpmBinsS		= array,	U08,	 64, [  8], "RPM",     100.0,		0.0, 100.0, 25500.0,	0
		#if HIGHBOOST
			mapBinsS	= array,	U08,	 72, [  8], "kPa",       2.0,		0.0,   0.0,   510.0,	0
		#else
			mapBinsS	= array,	U08,	 72, [  8], "kPa",       1.0,		0.0,   0.0,   255.0,	0
		#endif
	#endif


page = 3
	#if 12X12
		lambdaTable		= array,	U08,	  0, [12X12],	"Lambda",	0.00390625,	73.0,	0.56,	1.28,		2
		rpmBinsA		= array,	U08,	144,   [12],	"RPM",		100.0,		0.0,	0.0,	25000.0,	0
		#if HIGHBOOST
			mapBinsA	= array,	U08,	 156,   [12],	"kPa",		  2.0,		0.0,	0.0,	 510,	0
		#else
			mapBinsA	= array,	U08,	 156,   [12],	"kPa",		  1.0,		0.0,	0.0,	 255,	0
		#endif
	#else
		lambdaTable		= array,	U08,	  0, [8x8],	"Lambda",		  0.00390625,		73.0,	0.56,	 1.28,	2
		rpmBinsA		= array,	U08,	 64,   [8],	"RPM",		100.0,		0.0,	0.0, 25000.0,	0
		#if HIGHBOOST
			mapBinsA	= array,	U08,	 72,   [8],	"kPa",		  2.0,		0.0,	0.0,	 510,	0
		#else
			mapBinsA	= array,	U08,	 72,   [8],	"kPa",		  1.0,		0.0,	0.0,	 255,	0
		#endif
	#endif

page = 6
	boosttpsTable = array, U08, 0, [8], "TPS Scaling",1
	boosttps1 = scalar, U08, 0, "%", 0.392, 0, 0, 100, 0
	boosttps2 = scalar, U08, 1, "%", 0.392, 0, 0, 100, 0
	boosttps3 = scalar, U08, 2, "%", 0.392, 0, 0, 100, 0
	boosttps4 = scalar, U08, 3, "%", 0.392, 0, 0, 100, 0
	boosttps5 = scalar, U08, 4, "%", 0.392, 0, 0, 100, 0
	boosttps6 = scalar, U08, 5, "%", 0.392, 0, 0, 100, 0
	boosttps7 = scalar, U08, 6, "%", 0.392, 0, 0, 100, 0
	boosttps8 = scalar, U08, 7, "%", 0.392, 0, 0, 100, 0

#if 12X12
	boostTable = array, U08, 8, [12], "kPa", 2, 0, 0, 510, 0
#else
	boostTable = array, U08, 8 ,[8], "kPa", 2, 0, 0, 510, 0
#endif

page = 5
;	primep			= scalar,	U08,	0,	"ms",	0.1,	0.0,	0.0,	25.5,	1
	primePulse		= scalar,	U08,	0,	"ms",	0.1,	0.0,	0.0,	25.5,	1
	primep_temp_scaling = scalar, U08,	1,	"%",	0.392,	0.0,	0.0,	100,	1
;	cwl				= scalar,	U08,	2,	"ms",	0.1,	0.0,	0.0,	25.5,	1
	crankCold		= scalar,	U08,	2,	"ms",	0.1,	0.0,	0.0,	25.5,	1
;	cwh				= scalar,	U08,	3,	"ms",	0.1,	0.0,	0.0,	25.5,	1
	crankHot		= scalar,	U08,	3,	"ms",	0.1,	0.0,	0.0,	25.5,	1
	cranking_thres	= scalar,	U08,	4,	"rpm",	100,	0.0,	0.0,	25500,	0
;	awev			= scalar,	U08,	5,	"%",	1.0,	0.0,	0.0,	255,	0
	asePct			= scalar,	U08,	5,	"%",	1.0,	0.0,	0.0,	255,	0
	awev_temp_scaling = scalar, U08,	6,	"%",	0.392,	0.0,	0.0,	100,	1
;	awec			= scalar,	U08,	7,	"",	6.0,	0.0,	0.0,	1530,	0
	aseCount		= scalar,	U08,	7,	"",	6.0,	0.0,	0.0,	1530,	0

#if CELSIUS
	warmup_clt_range	= array,	U08,	8,	[10],	"°C",	0.555,	-72,	-40,	102,	0
	warmup_clt_range0	= scalar,	U08,	8,	"°C",	0.555,	-72,	-40,	102,	1
	warmup_clt_range1	= scalar,	U08,	9,	"°C",	0.555,	-72,	-40,	102,	1
	warmup_clt_range2	= scalar,	U08,	10,	"°C",	0.555,	-72,	-40,	102,	1
	warmup_clt_range3	= scalar,	U08,	11,	"°C",	0.555,	-72,	-40,	102,	1
	warmup_clt_range4	= scalar,	U08,	12,	"°C",	0.555,	-72,	-40,	102,	1
	warmup_clt_range5	= scalar,	U08,	13,	"°C",	0.555,	-72,	-40,	102,	1
	warmup_clt_range6	= scalar,	U08,	14,	"°C",	0.555,	-72,	-40,	102,	1
	warmup_clt_range7	= scalar,	U08,	15,	"°C",	0.555,	-72,	-40,	102,	1
	warmup_clt_range8	= scalar,	U08,	16,	"°C",	0.555,	-72,	-40,	102,	1
	warmup_clt_range9	= scalar,	U08,	17,	"°C",	0.555,	-72,	-40,	102,	1
#else
	warmup_clt_range	= array,	U08,	8,	[10],	"°F",	1.0,	-40,	-40,	215,	0
	warmup_clt_range0	= scalar,	U08,	8,	"°F",	1.0,	-40,	-40,	215,	0
	warmup_clt_range1	= scalar,	U08,	9,	"°F",	1.0,	-40,	-40,	215,	0
	warmup_clt_range2	= scalar,	U08,	10,	"°F",	1.0,	-40,	-40,	215,	0
	warmup_clt_range3	= scalar,	U08,	11,	"°F",	1.0,	-40,	-40,	215,	0
	warmup_clt_range4	= scalar,	U08,	12,	"°F",	1.0,	-40,	-40,	215,	0
	warmup_clt_range5	= scalar,	U08,	13,	"°F",	1.0,	-40,	-40,	215,	0
	warmup_clt_range6	= scalar,	U08,	14,	"°F",	1.0,	-40,	-40,	215,	0
	warmup_clt_range7	= scalar,	U08,	15,	"°F",	1.0,	-40,	-40,	215,	0
	warmup_clt_range8	= scalar,	U08,	16,	"°F",	1.0,	-40,	-40,	215,	0
	warmup_clt_range9	= scalar,	U08,	17,	"°F",	1.0,	-40,	-40,	215,	0
#endif

	warmup_clt		= array,	U08,	18,	[10],	"%",	1.0,	0.0,	0.0,	255,	0
	wueBins			= array,	U08,	18,	[10],	"%",	1.0,	0.0,	0.0,	255,	0
	warmup_clt0		= scalar,	U08,	18,	"%",	1.0,	0.0,	0.0,	255,	0
	warmup_clt1		= scalar,	U08,	19,	"%",	1.0,	0.0,	0.0,	255,	0
	warmup_clt2		= scalar,	U08,	20,	"%",	1.0,	0.0,	0.0,	255,	0
	warmup_clt3		= scalar,	U08,	21,	"%",	1.0,	0.0,	0.0,	255,	0
	warmup_clt4		= scalar,	U08,	22,	"%",	1.0,	0.0,	0.0,	255,	0
	warmup_clt5		= scalar,	U08,	23,	"%",	1.0,	0.0,	0.0,	255,	0
	warmup_clt6		= scalar,	U08,	24,	"%",	1.0,	0.0,	0.0,	255,	0
	warmup_clt7		= scalar,	U08,	25,	"%",	1.0,	0.0,	0.0,	255,	0
	warmup_clt8		= scalar,	U08,	26,	"%",	1.0,	0.0,	0.0,	255,	0
	warmup_clt9		= scalar,	U08,	27,	"%",	1.0,	0.0,	0.0,	255,	0
	warmup_rpm_scale	= scalar,	U08,	28, "%",	0.392,	0.0,	0.0,	100,	0	
	req_fuel		= scalar,	U08,	29,	"ms",	0.1,	0.0,	0.0,	25.5,	1
	dividerbyte		= scalar,	U08,	30,	"",		1.0,	0.0,	0.0,	255,	0
	divider			= bits,		U08,	30,	[0:4], "INVALID"
	alternate		= scalar,	U08,	31,	"",		1.0,	0.0,	0.0,	255,	0
	alternateCrank	= bits,		U08,	31, [4:4], "Alternate", "All banks"
	alternateCyl	= bits,		U08,	31, [0:2], "0 only", "1..0", "2..0", "3..0", "4..0", "5..0", "6..0", "7..0"
	injopen			= scalar,	U08,	32,	"us",	16,		0.0,	0.0,	4080,	0
	battfac			= scalar,	U08,	33,	"us",	16,		0.0,	0.0,	4080,	0
	kpafac			= scalar,	U08,	34,	"kPa",	2.0,	0.0,	0.0,	512,	0
	kpaoffs			= scalar,	U08,	35,	"kPa",	0.25,	-128.0,	-32.0,	31.75,	2
	injocfuel		= scalar,	U08,	36,	"us",	24,		0.0,	0.0,	6120,	0
	injrampup_battfac	= scalar,	U08,	37,	"us",	16,		0.0,	0.0,	4080,	0
	injpwm			= scalar,	U08,	38,	"%",	0.392,	0.0,	0.0,	100,	1
	injpwmt			= scalar,	U08,	39,	"ms",	0.1,	0.0,	0.0,	25.5,	1
	als_launch_input= scalar,	U08,	40,	"",		0.0,	0.0,	0.0,	0
    als_input		= bits , 	U08,	40,	[4:7], "0","1","2","3","4","5","6","7","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","old: SDA"
	launch_input	= bits , 	U08,	40,	[0:3], "0","1","2","3","4","5","6","7","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","old: SCL"
	rpmk			= scalar,	U16,	41,	"",		1.0,	0.0,	0.0,	65535,    0
;	tpsdot_kpadot_conf = scalar,	U08,	43,	"",	1.0,	0.0,	0.0,	255,	0
	tpsdot_kpadot_conf	= bits,	U08,	43, [0:0], "Throttle based", "Pressure based"
	mapProportion	= bits,		U08,	43, [0:0], "TPSdot", "MAPdot" 
	tpsdotrate		= array,	U08,	44,	[4],	"dv/dt",	1,	0.0,	0.0,	255,	0
	tpsaq			= array,	U08,	48,	[4],	"mS",	0.1,	0.0,	0.0,	25.5,	1
	tpsaq1			= scalar,	U08,	48, "mS",	0.1,	0.0,	0.0,	25.5,	1
	tpsaq2			= scalar,	U08,	49, "mS",	0.1,	0.0,	0.0,	25.5,	1
	tpsaq3			= scalar,	U08,	50, "mS",	0.1,	0.0,	0.0,	25.5,	1
	tpsaq4			= scalar,	U08,	51, "mS",	0.1,	0.0,	0.0,	25.5,	1
	tpsdt1			= scalar,	U08,	44,	"dv/dt",	1.0,	0.0,	0.0,	255,	0
	tpsdt2			= scalar,	U08,	45,	"dv/dt",	1.0,	0.0,	0.0,	255,	0
	tpsdt3			= scalar,	U08,	46,	"dv/dt",	1.0,	0.0,	0.0,	255,	0
	tpsdt4			= scalar,	U08,	47,	"dv/dt",	1.0,	0.0,	0.0,	255,	0

%	taeRates		= array,	U08,	44,	[4],	"ms",	0.1960784,	0.0,	0.0,	50.0,	1
%	taeBins			= array,	U08,	48,	[4],	"ms",	0.1,		0.0,	0.0,	25.5,	1
%	taeTime			= scalar,	U08,	53,	"ms",	0.1,	0.0,	0.0,	25.5,	1
%	taeColdM		= scalar,	U08,	54,	"%",	1.0,	0.0,	0.0,	255,	0
%	taeColdA		= scalar,	U08,	55,	"ms",	0.1,	0.0,	0.0,	25.5,	1

	als_cut_mintps	= scalar,	U08,	52,	"%",	0.392, 0.0,	0.0,	100,	0
	tpsasync		= scalar,	U08,	53,	"mS",	0.1,	0.0,	0.0,	25.5,	1
	acmult			= scalar,	U08,	54,	"%",	1.0,	-100,	-100,	155,	0
	tpsacold		= scalar,	U08,	55,	"mS",	0.1,	0.0,	0.0,	25.5,	1
	launch_enrich	= scalar,	U08,	56,	"%",	0.392, 0.0,	0.0,	100,	1
	launch_retard	= scalar,	U08,	57,	"deg",	0.25, 0.0,	0.0,	63.75,	2
	overrun_fuelcut	= scalar,	U08,	58,	"rpm",	100,	0.0,	0.0,	25500,	0
	overrun_fuelresume	= scalar, U08,	59,	"rpm",	100,	0.0,	0.0,	25500,	0
	rev_limit		= scalar,	U08,	60,	"rpm",	100,	0.0,	0.0,	25500,	0
	airden_ignore	= scalar,	U08,	61,	"",	1.0,	0.0,	0.0,	255,	0
	config11		= scalar,	U08,	62,	"",	1.0,	0.0,	0.0,    255,	0
	mapType			= bits,		U08,	62,	[0:1], "115 kPa", "250 kPa", "INVALID", "INVALID"
	twoStroke		= bits,		U08,	62,	[2:2], "Four-stroke", "Two-stroke"
	injType			= bits,		U08,	62,	[3:3], "Port", "Throttle Body"
	nCylinders		= bits,		U08,	62,	[4:7+1]
	config12		= scalar,	U08,	63,	"",	1.0,	0.0,	0.0,	255,	0
	cltType			= bits,		U08,	63, [0:1], "GM", "Unknown1", "Unknown2", "Unknown3"
	matType			= bits,		U08,	63, [2:3], "GM", "Unknown1", "Unknown2", "Unknown3"
	nInjectors		= bits,		U08,	63, [4:7+1]
	config13		= scalar,	U08,	64,	"",	1.0,	0.0,	0.0,	255,	0
	engineType		= bits,		U08,	64, [0:0], "Even fire", "Odd fire"
	egoType			= bits,		U08,	64, [1:1], "Narrow band", "Wide band"
	loadmult		= bits,		U08,	64, [2:2], "Enabled", "Disabled"
	baroCorr		= bits,		U08,	64, [3:3], "Off",	  "On"
	batt_cal		= scalar,	U08,	65,	"",	1.0,	0.0,	0.0,	255,	0
#if CELSIUS
	fastidle		= scalar,	U08,	66,	"°C",	0.555,	-72,	-40,	102.0,	0
#else
	fastidle		= scalar,	U08,	66,	"°F",	1.0,	-40,	-40,	215.0,	0
#endif

	als_max_cut		= bits,		U08,	67,	[0:4],	"Disabled","6.9%","12.9%","19%","25.5%","32.2%","38.5%","46.7%","INVALID","55.3%","62.6%","68.9%","74.2%","83.0%","87.3%","93.7%","100%","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID"
	dbaro			= scalar,	U08,	68,	"kPa",	1.0,	0.0,	0.0,	255,	0
	tps_low			= scalar,	U08,	69,	"ADC",	1.0,	0.0,	0.0,	255,	0
	tps_high		= scalar,	U08,	70,	"ADC",	1.0,	0.0,	0.0,	255,	0
#if CELSIUS
	fan_temp		= scalar,	U08,	71,	"°C",	0.555,	-72,	-40,	102.0,	0
	fan_hyst		= scalar,	U08,	72,	"°C",	1.0,	0.555,	0.0,	141.525,	0
#else
	fan_temp		= scalar,	U08,	71,	"°F",	1.0,	-40,	-40,	215.0,	0
	fan_hyst		= scalar,	U08,	72,	"°F",	1.0,	0.0,	0.0,	255,	0
#endif

	fan_channel			= scalar,	U08,	73,	"",	1.0,	0.0,	0.0,	255,	0
	fan_channel_enable	= bits,		U08,	73,	[3:3], "Enabled", "Disabled"
#if VER2
	fan_channel_names	= bits,		U08,	73,	[0:3], "PORTA", "PORTB", "PORTC", "INVALID", "INVALID", "INVALID", "PORTD", "PORTE", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "Disabled"
#else
	fan_channel_names	= bits,		U08,	73,	[0:3], "INJFET", "SPECFET", "I259", "INVALID", "INVALID", "INVALID", "S259", "P259", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "Disabled"
#endif
	fan_channel_bits	= bits,		U08,	73,	[4:7], "0","1","2","3","4","5","6","7","i0","i1","i2","i3","i4","i5","i6","i7"
	iac_step_seq		= scalar,	U08,	74,	"",	1.0,	0.0,	0.0,	255,	0
	iac_conf			= scalar,	U08,	75,	"",	1.0,	0.0,	0.0,	255,	0
	; bit5: dual solenoid bit4:advance, bit3:preciseidle (0=on/off), bit2:stepper (0=pwm), bit1:low_power_halt, bit0:power_iac_only_when_move
	iac_power_off_stepper = bits,	U08,	75,	[0:0],	"Disabled",	"Enabled"
	iac_low_power_halt	= bits,		U08,	75,	[1:1],	"Disabled",	"Enabled"
	iac_stepper			= bits,		U08,	75,	[2:2],	"PWM",		"Stepper"
	iac_type 			= bits,		U08,	75,	[3:3],	"ON/OFF",	"PWM/Stepper"
	iac_advance			= bits,		U08,	75,	[4:4],	"Disabled", "Enabled"
	iac_dualsol			= bits,		U08,	75,	[5:5],	"Disabled", "Enabled"
	iac_pid_conf_asym	= bits,		U08,	75,	[6:6],	"Disabled", "Enabled"
	softrpm_idle_enable	= bits,		U08,	75,	[7:7], "Disabled", "Enabled"
	iac_max_steps		= scalar,	U08,	76,	"",	1.0,	0.0,	0.0,	255,	0
	iac_tps_thres		= scalar,	U08,	77,	"%",	0.392,	0.0,	0.0,	100,	0
	softrpm_idle_tps	= scalar,	U08,	77,	"%",	0.392, 0.0,	0.0,	100,	0
#if CELSIUS
	iac_cold_idle_temp	= scalar, U08,	78,	"°C",	0.555,	-72,	-40,	102.0,	0
	iac_warm_idle_temp	= scalar, U08,	79,	"°C",	0.555,	-72,	-40,	102.0,	0
#else
	iac_cold_idle_temp	= scalar, U08,	78,	"°F",	1.0,	-40,	-40,	215.0,	0
	iac_warm_idle_temp	= scalar, U08,	79,	"°F",	1.0,	-40,	-40,	215.0,	0
#endif
	iac_cold_rpm		= scalar,	U08,	80,	"rpm",	10,		0.0,	0.0,	2550,	0
	softrpm_idle_range	= scalar,	U08,	80,	"rpm",	4,	0.0,	0.0,	1020,	0
	iac_warm_rpm		= scalar,	U08,	81,	"rpm",	10,		0.0,	0.0,	2550,	0
	softrpm_idle_rpm	= scalar,	U08,	81,	"rpm",	100,	0.0,	0.0,	25500,	0
	iac_cold_start_pos	= scalar,	U08,	82,	"", 	1.0,	0.0,	0.0,	255,	0
	iac_cold_start_pct	= scalar,	U08,	82,	"%",	0.392,	0.0,	0.0,	100,	0
	iac_warm_start_pos	= scalar,	U08,	83,	"", 	1.0,	0.0,	0.0,	255,	0
	iac_warm_start_pct	= scalar,	U08,	83,	"%",	0.392,	0.0,	0.0,	100,	0
	iac_afterstart_rpm	= scalar,	U08,	84,	"rpm",	10,		0.0,	0.0,	2550,	0
	iac_afterstart_duration	= scalar,	U08,	85,	"s",	0.1,	0.0,	0.0,	25.5,	1
	iac_speed			= scalar,	U08,	86,	"",	1.0,	0.0,	0.0,	255,	0
	iac_kp				= scalar,	U08,	87,	"",	1.0,	0.0,	0.0,	255,	0
	iac_ki				= scalar,	U08,	88,	"",	1.0,	0.0,	0.0,	255,	0
	iac_kd				= scalar,	U08,	89,	"",	1.0,	0.0,	0.0,	255,	0
	launch_rpm			= scalar,	U08,	90,	"rpm",	100,	0.0,	0.0,	25500,	0
	iac_integral_limit_dec	= scalar,	U08,	91,	"",	1.0,	0.0,	0.0,	255,	0
	iac_integral_limit_inc	= scalar,	U08,	92,	"",	1.0,	0.0,	0.0,	255,	0
	iac_integral_deadband	= scalar,	U08,	93,	"rpm",	1.0,	0.0,	0.0,	255,	0
	iac_deadband			= scalar,	U08,	94,	"rpm",	1.0,	0.0,	0.0,	255,	0
	als_cut_maxtps			= scalar,	U08,	95,	"%",	0.392, 0.0,	0.0,	100,	0
	iac_overclose_interval	= scalar,	U08,	96,	"s",	1.0,	0.0,	0.0,	255,	0

	iac_ref_pos0		= scalar,	U08,	97,	"",	1.0,	0.0,	0.0,	255,	0
	iac_ref_pos1		= scalar,	U08,	98,	"",	1.0,	0.0,	0.0,	255,	0
	iac_ref_pos2		= scalar,	U08,	99,	"",	1.0,	0.0,	0.0,	255,	0
	iac_ref_pos3		= scalar,	U08,	100,	"",	1.0,	0.0,	0.0,	255,	0
	iac_ref_pos4		= scalar,	U08,	101,	"",	1.0,	0.0,	0.0,	255,	0
	iac_ref_pos5		= scalar,	U08,	102,	"",	1.0,	0.0,	0.0,	255,	0
	iac_ref_pos6		= scalar,	U08,	103,	"",	1.0,	0.0,	0.0,	255,	0
	iac_ref_pos7		= scalar,	U08,	104,	"",	1.0,	0.0,	0.0,	255,	0
	iac_ref_pos8		= scalar,	U08,	105,	"",	1.0,	0.0,	0.0,	255,	0
	iac_ref_pos9		= scalar,	U08,	106,	"",	1.0,	0.0,	0.0,	255,	0

	iac_ref_pospct0		= scalar,	U08,	97, 	"%",	0.392,	0.0,	0.0,	100,	0
	iac_ref_pospct1		= scalar,	U08,	98, 	"%",	0.392,	0.0,	0.0,	100,	0
	iac_ref_pospct2		= scalar,	U08,	99, 	"%",	0.392,	0.0,	0.0,	100,	0
	iac_ref_pospct3		= scalar,	U08,	100,	"%",	0.392,	0.0,	0.0,	100,	0
	iac_ref_pospct4		= scalar,	U08,	101,	"%",	0.392,	0.0,	0.0,	100,	0
	iac_ref_pospct5		= scalar,	U08,	102,	"%",	0.392,	0.0,	0.0,	100,	0
	iac_ref_pospct6		= scalar,	U08,	103,	"%",	0.392,	0.0,	0.0,	100,	0
	iac_ref_pospct7		= scalar,	U08,	104,	"%",	0.392,	0.0,	0.0,	100,	0
	iac_ref_pospct8		= scalar,	U08,	105,	"%",	0.392,	0.0,	0.0,	100,	0
	iac_ref_pospct9		= scalar,	U08,	106,	"%",	0.392,	0.0,	0.0,	100,	0

	iac_sol_channel			= scalar,	U08,	107,	"",	1.0,	0.0,	0.0,	255,	0
	iac_sol_channel_enable	= bits,		U08,	107,	[3:3], "Enabled", "Disabled"
#if VER2
	iac_sol_channel_names 	= bits,	U08,	107,	[0:3], "PORTA", "PORTB", "PORTC", "INVALID", "INVALID", "INVALID", "PORTD", "PORTE", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "Disabled"
#else
	iac_sol_channel_names	= bits,	U08,	107,	[0:3], "INJFET", "SPECFET", "I259", "INVALID", "INVALID", "INVALID", "S259", "P259", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "Disabled"
#endif
	iac_sol_channel_bits	= bits,	U08,	107,	[4:7], "0","1","2","3","4","5","6","7","i0","i1","i2","i3","i4","i5","i6","i7"
	iac_sol_dualchannel		= bits,	U08,	107,	[4:7], "1","2","3","4","5","6","7","NA","i1","i2","i3","i4","i5","i6","i7","NA"
	iac_ign_slope			= scalar,U08,	108,	"deg/256rpm",	0.25,	0.0,	0.0,	63.5,	2
	softrpm_range			= scalar,	U08,	109,	"rpm",	4,	0.0,	0.0,	1020,	0
	iac_ign_advance_limit	= scalar,	U08,	110,	"deg",	0.25,	0.0,	0.0,	63.5,	2
	iac_ign_retard_limit	= scalar,	U08,	111,	"deg",	0.25,	0.0,	0.0,	63.5,	2
	iac_ign_threshold		= scalar,	U08,	112,	"deg",	0.25,	0.0,	0.0,	63.5,	2
	ego_conf				= scalar,	U08,	113,	"",	1.0,	0.0,	0.0,	255,	0
	ego_conf_nbo2			= bits,		U08,	113,	[5:5],	"Disabled",	"NBO2"
	ego_conf_pid			= bits,		U08,	113,	[0:0],	"Disabled",	"Enabled"
	ego_lag					= scalar,	U08,	114,	"",	1.0,	0.0,	0.0,	255,	0
#if CELSIUS
	ego_coolant	= scalar, U08,	115,	"°C",	0.555,	-72,	-40,	102.0,	0
#else
	ego_coolant	= scalar, U08,	115,	"°F",	1.0,	-40,	-40,	215.0,	0
#endif
	ego_maxtps			= scalar,	U08,	116,	"%",	0.392,	0.0,	0.0,	100,	0
#if HIGHBOOST
	ego_maxmap			= scalar,	U08,	117,	"kPa",	2.0,	0.0,	0.0,	510,	0
#else
	ego_maxmap			= scalar,	U08,	117,	"kPa",	1.0,	0.0,	0.0,	255,	0
#endif
	ego_minrpm			= scalar,	U08,	118,	"rpm",	100,	0.0,	0.0,	25500,	0
	ego_maxrpm			= scalar,	U08,	119,	"rpm",	100,	0.0,	0.0,	25500,	0
	ego_warmup			= scalar,	U08,	120,	"sec",	1.0,	0.0,	0.0,	255,	0
	ego_lean_limit		= scalar,	U08,	121,	"%",	0.392,	0.0,	0.0,	100,	0
	ego_rich_limit		= scalar,	U08,	122,	"%",	0.392,	0.0,	0.0,	100,	0
	ego_pid_kp			= scalar,	U08,	123,	"",	1.0,	0.0,	0.0,	255,	0
	als_enrich			= scalar,	U08,	124,	"%",	0.392, 0.0,	0.0,	100,	1
	ego_delta			= scalar,	U08,	125,	"%",	0.392 ,	0.0,	0.0,	100,	0
	ego_target			= scalar,	U08,	126,	"V",	0.0196,	0.0,	0.0,	5,	2
	ego_pid_window		= scalar,	U08,	127,	"",	1.0,	0.0,	0.0,	255,	0
	wbo2_warmup_ramp	= scalar,	U08,	128,	"mV/s",	3.17,	0.0,	0.0,	809.5,	1
	als_react_tps		= scalar,	U08,	129,	"%",	0.392, 0.0,	0.0,	100,	0
	wbo2_abs_limit		= scalar,	U08,	130,	"",	1.0,	0.0,	0.0,	255,	0
	wbo2_limit_maxt		= scalar,	U08,	131,	"s",	0.262,	0.0,	0.0,	66.81,	1
	wbo2_fallback		= scalar,	U08,	132,	"V", 1.0,	0.0,	0.0,	255,	0
	wbo2_retry_t		= scalar,	U08,	133,	"s",	4.0,	0.0,	0.0,	1020,	0
	wbo2_edgetime_corr	= scalar,	U08,	134,	"",	1.0,	0.0,	0.0,	255,	0
	wbo2_edgetime_min	= scalar,	U08,	135,	"",	1.0,	0.0,	0.0,	255,	0
	wbo2_ri_target		= scalar,	U08,	136,	"",	1.0,	0.0,	0.0,	255,	0
	wbo2_nernstdc_target= scalar,	U08,	137,	"",	1.0,	0.0,	0.0,	255,	0
	wbo2_pump_pw_zero	= scalar,	U08,	138,	"5V/256",	1.0,	0.0,	0.0,	255,	0
	wbo2_calibration	= scalar,	U08,	139,	"",	1.0,	0.0,	0.0,	255,	0
	wbo2_heater_pid_kp	= scalar,	U08,	140,	"",	1.0,	0.0,	0.0,	255,	0
	wbo2_heater_pid_ki	= scalar,	U08,	141,	"",	1.0,	0.0,	0.0,	255,	0
	wbo2_heater_pid_kd	= scalar,	U08,	142,	"",	1.0,	0.0,	0.0,	255,	0
	wbo2_heater_pid_ilimit	= scalar,	U08,	143,	"",	1.0,	0.0,	0.0,	255,	0
	wbo2_pump_pid_kp	= scalar,	U08,	144,	"",	1.0,	0.0,	0.0,	255,	0
	wbo2_pump_pid_ki	= scalar,	U08,	145,	"",	1.0,	0.0,	0.0,	255,	0
	wbo2_pump_pid_kd	= scalar,	U08,	146,	"",	1.0,	0.0,	0.0,	255,	0
	wbo2_pump_pid_ilimit= scalar,	U08,	147,	"",	1.0,	0.0,	0.0,	255,	0
	wbo2_ri_confidence_scale	= scalar,	U08,	148,	"",	1.0,	0.0,	0.0,	255,	0
	knock_conf			= scalar,	U08,	149,	"",	1.0,	0.0,	0.0,	255,	0
	knock_conf_enable	= bits,		U08,	149,	[0:0], "Enabled", "Disabled"
	knock_conf_channel	= bits,		U08,	149,	[1:1], "Channel 0", "Channel 1"
	knock_sampling_window	= scalar,	U08,	150,	"",	1.0,	0.0,	0.0,	255,	0
	knock1_frequency	= bits,		U08,	151,	[0:5],"1.22","1.26","1.31","1.35","1.4","1.45","1.51","1.57","1.63","1.71","1.78","1.87","1.96","2.07","2.18","2.31","2.46","2.54","2.62","2.71","2.81","2.92","3.03","3.15","3.28","3.43","3.59","3.76","3.95","4.16","4.39","4.66","4.95","5.12","5.29","5.48","5.68","5.9","6.12","6.37","6.64","6.94","7.27","7.64","8.02","8.46", "8.95","9.5","10.12","10.46","10.83","11.22","11.65","12.1","12.6","13.14","13.72","14.36","15.07","15.84","16.71","17.67","18.76","19.98"
	knock1_gain			= bits,		U08,	152,	[0:5],2,1.882,1.778,1.684,1.6,1.523,1.455,1.391,1.333,1.28,1.231,1.185,1.143,1.063,1,0.944,0.895,0.85,0.81,0.773,0.739,0.708,0.68,0.654,0.63,0.607,0.586,0.567,0.548,0.5,0.471,0.444,0.421,0.4,0.381,0.364,0.348,0.333,0.32,0.308,0.296,0.286,0.276,0.267,0.258,0.25,0.236,0.222,0.211,0.2,0.19,0.182,0.174,0.167,0.16,0.154,0.148,0.143,0.138,0.133,0.129,0.125,0.118,0.111
	knock1_integrator	= bits,		U08,	153,	[0:4], "40","45","50","55","60","65","70","75","80","90","100","110","120","130","140","150","160","180","200","220","240","260","280","300","320","360","400","440","480","520","560","600"
	knock2_frequency	= bits,		U08,	154,	[0:5],"1.22","1.26","1.31","1.35","1.4","1.45","1.51","1.57","1.63","1.71","1.78","1.87","1.96","2.07","2.18","2.31","2.46","2.54","2.62","2.71","2.81","2.92","3.03","3.15","3.28","3.43","3.59","3.76","3.95","4.16","4.39","4.66","4.95","5.12","5.29","5.48","5.68","5.9","6.12","6.37","6.64","6.94","7.27","7.64","8.02","8.46", "8.95","9.5","10.12","10.46","10.83","11.22","11.65","12.1","12.6","13.14","13.72","14.36","15.07","15.84","16.71","17.67","18.76","19.98"
	knock2_gain			= bits,		U08,	155,	[0:5],2,1.882,1.778,1.684,1.6,1.523,1.455,1.391,1.333,1.28,1.231,1.185,1.143,1.063,1,0.944,0.895,0.85,0.81,0.773,0.739,0.708,0.68,0.654,0.63,0.607,0.586,0.567,0.548,0.5,0.471,0.444,0.421,0.4,0.381,0.364,0.348,0.333,0.32,0.308,0.296,0.286,0.276,0.267,0.258,0.25,0.236,0.222,0.211,0.2,0.19,0.182,0.174,0.167,0.16,0.154,0.148,0.143,0.138,0.133,0.129,0.125,0.118,0.111
	knock2_integrator	= bits,		U08,	156,	[0:4], "40","45","50","55","60","65","70","75","80","90","100","110","120","130","140","150","160","180","200","220","240","260","280","300","320","360","400","440","480","520","560","600"
	knock_threshold		= scalar,	U08,	157,	"",	1.0,	0.0,	0.0,	255,	0
	knock_noise_scale	= scalar,	U08,	158,	"",	1.0,	0.0,	0.0,	255,	0
	knock_max_retard	= scalar,	U08,	159,	"deg",	0.25,	0.0,	0.0,	63.75,	2
	knock_default_retard	= scalar,	U08,	160,	"deg",	0.25,	0.0,	0.0,	63.75,	2
	knock_retard_step	= scalar,	U08,	161,	"deg",	0.25,	0.0,	0.0,	63.75,	2
	knock_retard_delay	= scalar,	U08,	162,	"ms",	15.0,	0.0,	0.0,	3825,	0
	knock_advance_step	= scalar,	U08,	163,	"deg",	0.25,	0.0,	0.0,	63.75,	2
	knock_advance_delay	= scalar,	U08,	164,	"ms",	15.0,	0.0,	0.0,	3825,	0
	knock_minrpm		= scalar,	U08,	165,	"rpm",	100,	0.0,	0.0,	25500,	0
	knock_maxrpm		= scalar,	U08,	166,	"rpm",	100,	0.0,	0.0,	25500,	0
#if CELSIUS
	ve_learn_coolant	= scalar,	U08,	167,	"°C",	0.555,	-72,	-40,	102.0,	0
#else
	ve_learn_coolant	= scalar,	U08,	167,	"°F",	1.0,	-40,	-40,	215.0,	0
#endif
	ve_learn_max_power	= scalar,	U08,	168,	"",	1.0,	0.0,	0.0,	255,	0
	ve_learn_rpm_scale	= scalar,	U08,	169,	"",	1.0,	0.0,	0.0,	255,	0
	ve_learn_kpa_scale	= scalar,	U08,	170,	"",	1.0,	0.0,	0.0,	255,	0
	ve_learn_ego_scale	= scalar,	U08,	171,	"",	1.0,	0.0,	0.0,	255,	0
	ve_learn_min_weight	= scalar,	U08,	172,	"",	1.0,	0.0,	0.0,	255,	0
	ve_learn_speed		= scalar,	U08,	173,	"",	1.0,	0.0,	0.0,	255,	0
	ve_learn_limit		= scalar,	U08,	174,	"%",	0.392,	0.0,	0.0,	100,	0
	ve_learn_conf		= scalar,	U08,	175,	"",	1.0,	0.0,	0.0,	255,	0
	ve_learn_on			= bits,		U08,	175,	[0:0],	"Disabled", "Enabled"	
	ve_learn_sim		= bits,		U08,	175,	[1:1],	"Disabled", "Enabled"	
	ve_learn_2x2		= bits,		U08,	175,	[2:2],	"Disabled", "Enabled"	
	lcd_c0				= scalar,	U08,	176,	"",	1.0,	0.0,	0.0,	255,	0
	lcd_c0_busypoll		= bits,		U08,	176,	[0:0],	"Disabled",	"Enabled"
	lcd_c0_easygoto		= bits,		U08,	176,	[1:1],	"Disabled",	"Enabled"
	lcd_c0_reinit		= bits,		U08,	176,	[3:3],	"Disabled",	"Enabled"
	lcd_c0_pwm_brightness	= bits,		U08,	176,	[4:4],	"Disabled",	"Enabled"
	lcd_c0_sw_brightness	= bits,		U08,	176,	[5:5],	"Disabled",	"Enabled"
	lcd_delay			= scalar,	U08,	177,	"",	1.0,	0.0,	0.0,	255,	0
	lcd_delay_before	= bits,		U08,	177,	[4:7]
	lcd_delay_en		= bits,		U08,	177,	[0:3]
	lcd_backlight		= scalar,	U08,	178,	"%",	0.392,	0.0,	0.0,	100,	0
	kpa_config_resolution	= bits,	U08,	179,	[0:3],	"INVALID","1 (Default)","2 (High-Boost)","INVALID","4 (Insane)","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID"
	kpafac_unit			= bits,	U08,	179,	[4:7],	"INVALID","INVALID","2 (Default)","INVALID","4 (>510kPa sensors)","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID"
	ign_balance			= scalar,	U08,	180,	"deg",	0.25,	0.0,	0.0,	63.25,	2
	als_retard_mintps	= scalar,	U08,	181,	"%",	0.392, 0.0,	0.0,	100,	0
	als_retard_maxtps	= scalar,	U08,	182,	"%",	0.392, 0.0,	0.0,	100,	0
	lcd_default_view	= scalar,	U08,	183,	"",	1.0,	0.0,	0.0,	255,	0
	primary_trigger		= scalar,	U08,	184,	"",	1.0,	0.0,	0.0,	255,	0
	primary_trig0		= bits,		U08,	184,	[0:0],	"Falling",	"Rising"
	primary_trig1		= bits,		U08,	184,	[1:1],	"Multitooth",	"Coil-type"
	primary_trig2		= bits,		U08,	184,	[2:2],	"Disabled",	"Enabled" ; filtering 
	primary_trig3		= bits,		U08,	184,	[3:3],	"Disabled",	"Enabled"; Advanced multitooth 
	primary_trig4		= bits,		U08,	184,	[4:4],	"Disabled",	"Enabled" ; N-1
	primary_trig5		= bits,		U08,	184,	[5:5],	"Disabled",	"Enabled" ; Fiat Stilo
	primary_trig6		= bits,		U08,	184,	[6:6],	"Disabled",	"Enabled" ; Fiat Stilo
	primary_trig7		= bits,		U08,	184,	[7:7],	"Disabled",	"Enabled" ; Fiat Stilo
	secondary_trigger	= scalar,	U08,	185,	"",	1.0,	0.0,	0.0,	255,	0
	secondary_trig0		= bits,		U08,	185,	[0:0],	"Falling",	"Rising"
	secondary_trig1		= bits,		U08,	185,	[1:1],	"Enabled",	"Disabled"
	secondary_trig2		= bits,		U08,	185,	[2:2],	"Disabled",	"Enabled"
	secondary_trig3		= bits,		U08,	185,	[3:3],	"Multitooth",	"Coil-type"
	secondary_trig4		= bits,		U08,	185,	[4:4],	"Alien advance", "Cam sync"
	secondary_trig5		= bits,		U08,	185,	[5:5],	"Single",	"Both"
	tooth_wheel			= scalar,	U08,	186,	"",	1.0,	0.0,	0.0,	255,	0
	trigger_tooth		= scalar,	U08,	187,	"",	1.0,	0.0,	0.0,	255,	0
	another_trigger_tooth	= scalar,	U08,	188,	"",	1.0,	0.0,	0.0,	255,	0
	crank_minper		= scalar,	U08,	189,	"usec",	16,	0.0,	0.0,	4080,	0
	tooth_wheel_twidth1	= scalar,	U08,	190,	"",	1.0,	0.0,	0.0,	255,	0
	tooth_wheel_twidth2	= scalar,	U08,	191,	"",	1.0,	0.0,	0.0,	255,	0
	cam_sync_r_edge_phase	= scalar,	U08,	192,	"",	1.0,	0.0,	0.0,	255,	0
	cam_sync_f_edge_phase	= scalar,	U08,	193,	"",	1.0,	0.0,	0.0,	255,	0
	reset_engphase_after	= scalar,	U08,	194,	"",	1.0,	0.0,	0.0,	255,	0
	ign_tdcdelay		= scalar,	U08,	195,	"deg",	0.5,	0.0,	0.0,	127.5,	1
	ign_dwell14			= scalar,	U08,	196,	"ms",	0.064,	0.0,	0.0,	16.32,	2
	ign_dwell6			= scalar,	U08,	197,	"ms",	0.027,	0.0,	0.0,	6.885,	2
	ign_crank_advance	= scalar,	U08,	198,	"deg",	0.25,	0.0,	0.0,	63.75,	2
	ign_out				= scalar,	U08,	199,	"",	1.0,	0.0,	0.0,	255,	0
	ign_out_type		= bits,		U08,	199,	[4:6], "EDIS", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "DUMMY"
	ign_out_inv			= bits, 	U08,	199,	[0:0], "Disabled",  "Enabled"
	ign_out_dual		= bits,		U08,	199,	[1:1], "Disabled",  "Enabled"
	ignchmax			= bits,		U08,	200, [0:2], "00 only ", "01..00", "02..00","03..00","04..00","05..00", "06..00","07..00" 
	ignchmaxscalar		= scalar,	U08,	200,	"",	1.0,	0.0,	0.0,	255,	0

	engine_off_delay	= scalar,	U08,	201,	"s",	0.262,	0.0,	0.0,	66.81,	1
	pump_on_mintime		= scalar,	U08,	202,	"s",	0.262,	0.0,	0.0,	66.81,	1
	fuelpump_channel	= scalar,	U08,	203,	"",	1.0,	0.0,	0.0,	255,	0
	fuelpump_channel_enable	= bits,		U08,	203,	[3:3], "Enabled", "Disabled"
#if VER2
	fuelpump_channel_names	= bits,		U08,	203,	[0:3], "PORTA", "PORTB", "PORTC", "INVALID", "INVALID", "INVALID", "PORTD", "PORTE", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "Disabled"
#else
	fuelpump_channel_names	= bits,		U08,	203,	[0:3], "INJFET", "SPECFET", "I259", "INVALID", "INVALID", "INVALID", "S259", "P259", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "Disabled"
#endif
	fuelpump_channel_bits	= bits,		U08,	203,	[4:7], "0","1","2","3","4","5","6","7","i0","i1","i2","i3","i4","i5","i6","i7"

	inj_stage2_rate			= scalar,	U08,	204,	"",	1.0,	0.0,	0.0,	255,	0
	inj_stage2_start_tps	= scalar,	U08,	205,	"%",	0.392,	0.0,	0.0,	100,	0
#if HIGHBOOST
	inj_stage2_start_map	= scalar,	U08,	206,	"kPa",	2.0,	0.0,	0.0,	510,	0
#else
	inj_stage2_start_map	= scalar,	U08,	206,	"kPa",	1.0,	0.0,	0.0,	255,	0
#endif
	als_deact_rpm		= scalar,	U08,	207,	"rpm",	100,	0.0,	0.0,	25500,	0
	als_deact_time		= scalar,	U08,	208,	"sec",	1,	0.0,	0.0,	255,	0
#if CELSIUS
	als_deact_egt		= scalar,	U08,	209,	"°C",	8,	0.0,	0.0,	2040,	0
#else
	als_deact_egt		= scalar,	U08,	209,	"°F",	14.4, 32,	0.0,	3704,	0
#endif
	als_retard			= scalar,	U08,	210,	"deg",	0.25, 0.0,	0.0,	63.75,	2
	als_rev_limit		= scalar,	U08,	211,	"rpm",	100,	0.0,	0.0,	25500,	0
	misc1out_minrpm		= scalar,	U08,	212,	"rpm",	100,	0.0,	0.0,	25500,	0
	misc1out_maxrpm		= scalar,	U08,	213,	"rpm",	100,	0.0,	0.0,	25500,	0
	misc1out_mintps		= scalar,	U08,	214,	"%",	0.392,	0.0,	0.0,	100,	0
	misc1out_maxtps		= scalar,	U08,	215,	"%",	0.392,	0.0,	0.0,	100,	0
#if HIGHBOOST
	misc1out_minmap		= scalar,	U08,	216,	"kPa",	2.0,	0.0,	0.0,	510,	0
	misc1out_maxmap		= scalar,	U08,	217,	"kPa",	2.0,	0.0,	0.0,	510,	0
#else
	misc1out_minmap		= scalar,	U08,	216,	"kPa",	1.0,	0.0,	0.0,	255,	0
	misc1out_maxmap		= scalar,	U08,	217,	"kPa",	1.0,	0.0,	0.0,	255,	0
#endif
	misc1out_channel	= scalar,	U08,	218,	"",	1.0,	0.0,	0.0,	255,	0
	misc1out_channel_enable	= bits,		U08,	218,	[3:3],	"Enabled",	"Disabled"
#if VER2
	misc1out_channel_names	= bits,		U08,	218,	[0:3], "PORTA", "PORTB", "PORTC", "INVALID", "INVALID", "INVALID", "PORTD", "PORTE", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "Disabled"
#else
	misc1out_channel_names	= bits,		U08,	218,	[0:3], "INJFET", "SPECFET", "I259", "INVALID", "INVALID", "INVALID", "S259", "P259", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "Disabled"
#endif
	misc1out_channel_bits	= bits,		U08,	218,	[4:7],	"0","1","2","3","4","5","6","7","i0","i1","i2","i3","i4","i5","i6","i7"
	misc2out_minrpm		= scalar,	U08,	219,	"rpm",	100,	0.0,	0.0,	25500,	0
	misc2out_maxrpm		= scalar,	U08,	220,	"rpm",	100,	0.0,	0.0,	25500,	0
	misc2out_mintps		= scalar,	U08,	221,	"%",	0.392,	0.0,	0.0,	100,	0
	misc2out_maxtps		= scalar,	U08,	222,	"%",	0.392,	0.0,	0.0,	100,	0
#if HIGHBOOST
	misc2out_minmap		= scalar,	U08,	223,	"kPa",	2.0,	0.0,	0.0,	510,	0
	misc2out_maxmap		= scalar,	U08,	224,	"kPa",	2.0,	0.0,	0.0,	510,	0
#else
	misc2out_minmap		= scalar,	U08,	223,	"kPa",	1.0,	0.0,	0.0,	255,	0
	misc2out_maxmap		= scalar,	U08,	224,	"kPa",	1.0,	0.0,	0.0,	255,	0
#endif	
	misc2out_channel	= scalar,	U08,	225,	"",	1.0,	0.0,	0.0,	255,	0
	misc2out_channel_enable	= bits,	U08,	225,	[3:3],  "Enabled", "Disabled"
#if VER2
	misc2out_channel_names	= bits,		U08,	225,	[0:3], "PORTA", "PORTB", "PORTC", "INVALID", "INVALID", "INVALID", "PORTD", "PORTE", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "Disabled"
#else
	misc2out_channel_names	= bits,		U08,	225,	[0:3], "INJFET", "SPECFET", "I259", "INVALID", "INVALID", "INVALID", "S259", "P259", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "Disabled"
#endif
	misc2out_channel_bits	= bits,	U08,	225,	[4:7], "0","1","2","3","4","5","6","7","i0","i1","i2","i3","i4","i5","i6","i7"
	act_wot_rpm			= scalar,	U08,	226,	"rpm",	100,	0.0,	0.0,	25500,	0
	act_wot_channel		= scalar,	U08,	227,	"",	1.0,	0.0,	0.0,	255,	0
	act_wot_channel_enable	= bits,	U08,	227,	[3:3], "Enabled", "Disabled"
#if VER2
	act_wot_channel_names	= bits,		U08,	227,	[0:3], "PORTA", "PORTB", "PORTC", "INVALID", "INVALID", "INVALID", "PORTD", "PORTE", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "Disabled"
#else
	act_wot_channel_names	= bits,		U08,	227,	[0:3], "INJFET", "SPECFET", "I259", "INVALID", "INVALID", "INVALID", "S259", "P259", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "Disabled"
#endif
	act_wot_channel_bits	= bits,	U08,	227,	[4:7], "0","1","2","3","4","5","6","7","i0","i1","i2","i3","i4","i5","i6","i7"
	act_rpm_rpm			= scalar,	U08,	228,	"rpm",	100,	0.0,	0.0,	25500,	0
	act_rpm_channel		= scalar,	U08,	229,	"",	1.0,	0.0,	0.0,	255,	0
	act_rpm_channel_enable	= bits,	U08,	229,	[3:3], "Enabled", "Disabled"
#if VER2
	act_rpm_channel_names	= bits,		U08,	229,	[0:3], "PORTA", "PORTB", "PORTC", "INVALID", "INVALID", "INVALID", "PORTD", "PORTE", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "Disabled"
#else
	act_rpm_channel_names	= bits,		U08,	229,	[0:3], "INJFET", "SPECFET", "I259", "INVALID", "INVALID", "INVALID", "S259", "P259", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "Disabled"
#endif
	act_rpm_channel_bits	= bits,	U08,	229,	[4:7], "0","1","2","3","4","5","6","7","i0","i1","i2","i3","i4","i5","i6","i7"
	egt1_cal			= scalar,	U08,	230,	"",	1.0,	0.0,	0.0,	255,	0
	als_tks_output		= scalar,	U08,	231,	"",	1,	0.0,	0.0,	255,	0	
	als_tks_enable		= bits,		U08,    231,	[3:3], "Enabled", "Disabled"
#if VER2
	als_tks_names		= bits,		U08,	231,	[0:3], "PORTA", "PORTB", "PORTC", "INVALID", "INVALID", "INVALID", "PORTD", "PORTE", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "Disabled"
#else
	als_tks_names		= bits,		U08,	231,	[0:3], "INJFET", "SPECFET", "I259", "INVALID", "INVALID", "INVALID", "S259", "P259", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "Disabled"
#endif
	als_tks_bits		= bits,		U08,    231,	[4:7], "0","1","2","3","4","5","6","7","i0","i1","i2","i3","i4","i5","i6","i7"
	boost_conf			= scalar,	U08,	232,	"",	1.0,	0.0,	0.0,	255,	0
	boost_conf_target	= bits,		U08,	232,	[0:0],"boost-target", "MAP-target"
	boost_conf_pwm		= bits,		U08,	232,	[4:7],"8mS","16mS","24mS","32mS","40mS","48mS(Default)","56mS","64mS","72mS","80mS","88mS","96mS","104mS","112mS","120mS","128mS"
	boost_conf_refpos	= bits,		U08,	232,	[2:3], "1/5","2/5","3/5","4/5"
	boost_targetoffs	= scalar,	U08,	233,	"",	2.0,	0.0,	0.0,	510,	0
	boost_minpressure	= scalar,	U08,	234,	"kPa",	2.0,	0.0,	0.0,	510,	0
	boost_pid_kp		= scalar,	U08,	235,	"",	1.0,	0.0,	0.0,	255,	0
	boost_pid_ki		= scalar,	U08,	236,	"",	1.0,	0.0,	0.0,	255,	0
	boost_pid_kd		= scalar,	U08,	237,	"",	1.0,	0.0,	0.0,	255,	0
	boost_pid_ilimit	= scalar,	U08,	238,	"",	1.0,	0.0,	0.0,	255,	0
	boost_channel		= scalar,	U08,	239,	"",	1.0,	0.0,	0.0,	255,	0
	boost_channel_enable	= bits,		U08,	239,	[3:3], "Enabled", "Disabled"
#if VER2
	boost_channel_names	= bits,		U08,	239,	[0:3], "PORTA", "PORTB", "PORTC", "INVALID", "INVALID", "INVALID", "PORTD", "PORTE", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "Disabled"
#else
	boost_channel_names	= bits,		U08,	239,	[0:3], "INJFET", "SPECFET", "I259", "INVALID", "INVALID", "INVALID", "S259", "P259", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "Disabled"
#endif
	boost_channel_bits	= bits,		U08,	239,	[4:7], "0","1","2","3","4","5","6","7","i0","i1","i2","i3","i4","i5","i6","i7"
#if CELSIUS
	water_pump_temp		= scalar,	U08,	240,	"°C",	0.555,	-72,	-40,	102.0,	0
	water_pump_hyst		= scalar,	U08,	243,	"°C",	0.555,	0.0,	0.0,	141.525,	0
#else
	water_pump_temp		= scalar,	U08,	240,	"°F",	1.0,	-40,   -40,   215.0,	0
	water_pump_hyst		= scalar,	U08,	243,	"°F",	1.0,	0.0,	0.0,	255,	0
#endif
	hybrid_rpm_a		= scalar,	U08,	241,	"rpm",	100,	0.0,	0.0,	25500,	0
	hybrid_rpm_m		= scalar,	U08,	242,	"rpm",	100,	0.0,	0.0,	25500,	0
	water_pump_channel	= scalar,	U08,	244,	"",	1.0,	0.0,	0.0,	255,	0
	water_pump_channel_enable	= bits,		U08,	244,	[3:3], "Enabled", "Disabled"
#if VER2
	water_pump_channel_names	= bits,		U08,	244,	[0:3], "PORTA", "PORTB", "PORTC", "INVALID", "INVALID", "INVALID", "PORTD", "PORTE", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "Disabled"
#else
	water_pump_channel_names	= bits,		U08,	244,	[0:3], "INJFET", "SPECFET", "I259", "INVALID", "INVALID", "INVALID", "S259", "P259", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "Disabled"
#endif
	water_pump_channel_bits		= bits,		U08,	244,	[4:7], "0","1","2","3","4","5","6","7","i0","i1","i2","i3","i4","i5","i6","i7"
	toothrel_normal		= scalar,	U08,	245,	"",	1.0,	0.0,	0.0,	255,	0
	toothrel_missing	= scalar,	U08,	246,	"",	1.0,	0.0,	0.0,	255,	0
#if HIGHBOOST
	fuelcut_min_kpa		= scalar,	U08,	247,	"kPa",	2.0,	0.0,	0.0,	510,	0
	fuelcut_max_kpa		= scalar,	U08,	248,	"kPa",	2.0,	0.0,	0.0,	510,	0
#else
	fuelcut_min_kpa		= scalar,	U08,	247,	"kPa",	1.0,	0.0,	0.0,	255,	0
	fuelcut_max_kpa		= scalar,	U08,	248,	"kPa",	1.0,	0.0,	0.0,	255,	0
#endif
	tach_channel		= scalar,	U08,	249,	"",	1.0,	0.0,	0.0,	255,	0
	tach_channel_enable	= bits,		U08,	249,	[3:3], "Enabled", "Disabled"
#if VER2
	tach_channel_names	= bits,		U08,	249,	[0:3], "PORTA", "PORTB", "PORTC", "INVALID", "INVALID", "INVALID", "PORTD", "PORTE", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "Disabled"
#else
	tach_channel_names	= bits,		U08,	249,	[0:3], "INJFET", "SPECFET", "I259", "INVALID", "INVALID", "INVALID", "S259", "P259", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "Disabled"
#endif
	tach_channel_bits	= bits,		U08,	249,	[4:7], "0","1","2","3","4","5","6","7","i0","i1","i2","i3","i4","i5","i6","i7"
	tach_divider		= scalar,	U08,	250,	"",	1.0,	0.0,	0.0,	255,	0
	shiftcut_conf		= scalar,	U08,	251,	"",	1.0,	0.0,	0.0,	255,	0 ; bit 1: cut spark bit 0: cut fuel
	shiftcut_conf_fuel	= bits,		U08,	251,	[4:4], "Disabled", "Enabled"
	shiftcut_conf_spark_rev= bits,	U08,	251,	[0:0], "Disabled", "Enabled"
	shiftcut_conf_spark	= bits,		U08,	251,	[1:1], "Disabled", "Enabled"
	shiftcut_input		= scalar,	U08,	252,	"0-7",	1.0,	0.0,	0.0,	255,	0 ;todo implement digital/analog in, FF is disable
	shiftcut_time		= scalar,	U08,	253,	"mS",	4.0,	0.0,	0.0,	1020,	0 
	softrpm_rpm			= scalar,	U08,	254,	"rpm",	100,	0.0,	0.0,	25500,	0

;-------------------------------------------------------------------------------

[Menu]

	;----------------------------------------------------------------------------
	;  There are five pre-defined values that may be used to define your menus.
	;  The first four allow access to the "standard" dialog boxes, the last one
	;  merely draws a separator (horizontal line) in the menu.
	;
	;     std_constants
	;     std_enrichments
	;     std_realtime
	;     std_warmup
	;
	;     std_separator
	;
	;  If you use any of the std_constants, std_enrichments or std_warmup
	;  editors, they may be optionally suffixed with a page number (only
	;  useful for multi-page code variants), which causes them to edit the
	;  specified page.  If you leave off the page specifier, they edit logical
	;  page one as specified in the Constants section.
	; 
	;  There are four special menu names, which when used append to the standard
	;  menus of the same name instead of creating a new one.  The menu names
	;  are "File", "Communications", "Tools" and "Help".
	; 
	;----------------------------------------------------------------------------

menu = "&Settings"
	subMenu = veTableTbl,	"&VE Table"
	subMenu = sparkTbl,		"&Spark Table"
	subMenu = lambdaTbl,	"&Lambda Table"
	subMenu = std_separator
	subMenu = important,	"Basic Settings"
	subMenu = constants,	"Constants"
	subMenu = std_separator
	subMenu = cltrange,		"Coolant Bins"
	subMenu = std_separator
	subMenu = injectors,	"Injector Settings"
	subMenu = hzero,		"Injector Outputs"
	subMenu = std_separator
	subMenu = ignition,		"Ignition Settings"
	subMenu = htwo,			"Ignition Outputs",0, {!ign_out_dual}
	subMenu = htwodual,		"Ignition Outputs Dual",0, {ign_out_dual}
	subMenu = std_separator
	subMenu = trigger,		"Primary Trigger Settings"
	subMenu = trigger2,		"Secondary trigger/ Cam Sync Settings"
	subMenu = std_separator
	subMenu = startup,		"Priming,Cranking,Afterstart"
	subMenu = wwu,			"Warmup Enrichments"
	subMenu = accenrichment,	"Acceleration Enrichment"
	subMenu = std_separator
	subMenu = egocontrol,	"EGO (lambda) Control"
	subMenu = velearn,		"VE Learning (Auto-Tune)"
	subMenu = wideband,		"Wideband Settings"
	subMenu = wideband_pid,	"Wideband Controller PID"

menu = "&Extras"
	subMenu = boostcontrol,	"Boost Controller Settings"
	subMenu = BoostCurve,	"Boost vs RPM Table"
	subMenu = boosttpsTbl,	"Boost vs TPS Scaling"
	subMenu = std_separator
	subMenu = idlecontrol,	"Idle Settings General"
	subMenu = ignidlecontrol,	"Idle Settings Advance/PID"
	subMenu = iacref,		"Idle PID Ref table, stepper", 0, {iac_type & iac_stepper}
	subMenu = iacrefpct,	"Idle PID Ref table, PWM", 0, {iac_type & !iac_stepper}
	subMenu = spark_idle,	"Spark-cut based idle control"
	subMenu = std_separator
	subMenu = outputs,		"MiscOutput Settings"
	subMenu = actuators,	"WOT / RPM actuators"
	subMenu = fan_pump,		"Fan / Waterpump / FuelPump"
	subMenu = std_separator
	subMenu = lcdsetup,		"LCD Settings"
	subMenu = tachsetup,	"Tachometer Output Settings"
	subMenu = std_separator
	subMenu = inputs,		"EGT/ Analog Input Settings"
	subMenu = std_separator
	subMenu = knock,		"Knock sampling"
	subMenu = knockact,		"Knock action"
	subMenu = std_separator
	subMenu = blending,		"Alpha-N/Speed-Density Blending"
	subMenu = staging,		"Injector Staging"
	subMenu = adv_als,		"Advanced ALS"
	subMenu = launch_dlg,	"Launch Control"
	subMenu = softrpm_dlg,	"RPM Limiters"
	subMenu = shiftcut,		"Shift-Cut Settings"

menu = "&Tuning"
	subMenu = std_realtime,	"&Realtime Display"
	subMenu = std_separator
	subMenu = veTableMap,	"&VE Table"
	subMenu = sparkMap,		"&Spark Map"
	subMenu = lambdaMap,	"&LAmbda Map"
	subMenu = std_separator
	subMenu = std_warmup,	"&Warmup Wizard"
	subMenu = std_accel,	"&Accel Wizard"

menu = "Advanced"
	subMenu = allchannels,	"All output channels on one page"
	subMenu = allchannels2,	"All output channels on one page 2"
	subMenu = std_separator
	subMenu = hone, "Reference tooth table"
menu = "T&ools"
	plugIn  = "%WORKING_DIR%/..\tools\VemsLogger.exe", "&VemsLogger Viewer"


;-------------------------------------------------------------------------------
; h-table, ve-table, lambda-table, ign-table,config
[TableEditor]
	;table_id,    map3d_id,    "title",       page
table = veTableTbl,  veTableMap,  "VE Table",    2
	;constant, variable
	xBins = rpmBins,  rpm
	yBins = mapBins,  map
	zBins = veTable
	gridHeight  = 2.0
	upDownLabel = "(Richer)", "(Leaner)"
	;table_id,    map3d_id,    "title",       page
table = sparkTbl,    sparkMap,    "Spark Table", 4
	;constant, variable
	xBins = rpmBinsS,  rpm
	yBins = mapBinsS,  map
	zBins = sparkTable
	gridHeight = 3.0
	upDownLabel = ("Advance"), "(Retard)"
table = lambdaTbl, lambdaMap, "Target Lambda Table",3
	xBins = rpmBinsA, rpm
	yBins = mapBinsA, map
	zBins = lambdaTable
	gridHeight = 1.2
	upDownLabel = "(RICHER)", "(LEANER)"

;-------------------------------------------------------------------------------

[CurveEditor]
curve = BoostCurve, "Boost target vs RPM table"
	topicHelp   = "http://www.vems.se"
	columnLabel = "RPM", "Boost Target"
#if HIGHBOOST
#if 12X12
	xAxis	= 0, 10000, 12
	yAxis	= 100,  510,12
#else
	xAxis	= 0, 10000, 8
	yAxis	= 100,  510,8
#endif
#else
#if 12X12
	xAxis	= 0, 10000, 12
	yAxis	= 100,  255,12
#else
	xAxis	= 0, 10000, 8
	yAxis	= 100,  255,8
#endif
#endif
	xBins	= rpmBins, rpm
	yBins	= boostTable
	gauge	= mapGauge

;-------------------------------------------------------------------------------
[AutoTune] 
table = veTableMap ; Should be the map3d_id of a TableEditor entry. 
	allowAutoTune	= off 
	corrector		= egoCorrection 

	; Vertex tolerance parameters 
	xRadius		= 200 ; rpm (probably) 
	yRadius		=   7 ; map (probably) 

	; Tuning block parameters 
	xLimits		= 1500, 8000 ; rpm (probably) 
	yLimits		=   20,   90 ; map (probably) 
	zLimits		=   10,  200 ; VE  (probably) 

	; Controller parameters 
	initialStartupInterval	= 1.0 ; seconds 
	updateInterval			= 1.0 ; seconds 
	proportionalGain		= 0.5 
	lumpiness				= 5   ; percent

[GaugeConfigurations]
	
	;-------------------------------------------------------------------------------
	;  Notes on some of the gauges.
	;
	;  The accelEnrichGauge is now a composite of both acceleration enrichment
	;  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
	; display that gauge in a particular position.
	;
	; Name  = Case-sensitive, user-defined name for this gauge configuration.
	; Var   = Case-sensitive name of variable to be displayed, see the
	;         OutputChannels block in this file for possible values.
	; Title = Title displayed at the top of the gauge.
	; Units = Units displayed below value on gauge.
	; Lo    = Lower scale limit of gauge.
	; Hi    = Upper scale limit of gauge.
	; LoD   = Lower limit at which danger color is used for gauge background.
	; LoW   = Lower limit at which warning color is used.
	; HiW   = Upper limit at which warning color is used.
	; HiD   = Upper limit at which danger color is used.
	; vd    = Decimal places in displayed value
	; ld    = Label decimal places for display of <Lo and Hi, above.

	;Name				  Var 			  Title				Units		Lo	Hi     LoD    LoW   HiW   HiD vd ld
	
#if NARROW_BAND_EGO
	egoGauge			= egoVoltage,	"Exhaust Gas Oxygen", "volts",   0,   1.0,    0.2,   0.3,  0.6,  0.8, 2, 2
#else
	egoGauge			= egoVoltage,	"Exhaust Gas Oxygen", "volts", 0.5,   4.5,    0.0,   0.0,  5.0,  5.0, 2, 2
#endif
	lambdaGauge			= lambda,		"lambda",             "lambda",      0.6,   1.4,    0.8,   0.85,    1.0,  1.1, 2, 2
	lambdatgtGauge		= lambdatarget,	"lambdaTarget",    "lambda",      0.6,   1.4,    0.8,   0.85,    1.0,  1.1, 2, 2

	accelEnrichGauge	= accDecEnrich,	"Accel Enrich",       "%",      50,   150,     -1,    -1,  999,  999, 0, 0
	afrGauge			= afr,			"Air:Fuel Ratio",     "",       10,  19.4,     12,    13,   15,   16, 2, 2
	clockGauge			= secl,			"Clock",              "Seconds", 0,   255,     10,    10,  245,  245, 0, 0
	deadGauge			= deadValue,	"---",                "",        0,     1,     -1,    -1,    2,    2, 0, 0
	dutyCycleGauge		= dutyCycle,	"Duty Cycle",         "%",       0,   100,     -1,    -1,   85,   90, 1, 1
	egoCorrGauge		= egoCorrection, "EGO Correction",     "%",      50,   150,     90,    99,  101,  110, 0, 0

	gammaEnrichGauge	= gammaEnrich,	"Gamma Enrichment",   "%",      50,   150,     -1,    -1,  151,  151, 0, 0
	mapGauge			= map,			"Engine MAP",         "kPa",     0,   512,      0,    20,  200,  245, 1, 1
	pulseWidthGauge		= pulseWidth,	"Pulse Width",        "mSec",    0,  25.5,    1.0,   1.2,   20,   25, 1, 1
	tachometer			= rpm,			"Engine Speed",       "RPM",     0,  8000,    300,   600, 3000, 5000, 0, 0
	throttleGauge		= throttle,		"Throttle Position",  "%TPS",    0,   100,     -1,     1,   90,  100, 0, 0
	veBucketGauge		= veTuneValue,	"VE Value",           "%",       0,   120,     -1,    -1,  999,  999, 0, 0
	veGauge				= veCurr,		"VE Current",         "%",       0,   120,     -1,    -1,  999,  999, 0, 0
	voltMeter			= batteryVoltage,"Battery Voltage",    "volts",   7,    21,      8,     9,   15,   16, 2, 2
	warmupEnrichGauge	= warmupEnrich,  "Warmup Enrichment",  "%",     100,   150,     -1,    -1,  101,  105, 0, 0

#if CELSIUS
	cltGauge			= coolant,		"Coolant Temp",       "%TEMP", -40,   110,    -15,     0,   95,  105, 0, 0
	matGauge			= mat,			"Manifold Air Temp",  "%TEMP", -40,   110,    -15,     0,   95,  100, 0, 0
#else
	cltGauge			= coolant,		"Coolant Temp",       "%TEMP", -40,   215,      0,    30,  200,  220, 0, 0
	matGauge			= mat,			"Manifold Air Temp",  "%TEMP", -40,   215,      0,    30,  200,  210, 0, 0
#endif
	;sparkGauge		= spark,			"Spark Angle",		"Deg",	0,	 55,	  3,	4,   50,    55,  0, 0
	sparkGauge			= spark,		"Spark Angle",		"Deg",	-20,	 64,	  0,	20,   40, 50, 2, 2
	dwellGauge			= dwell,		"Ignition Dwell"	"mS",	0,	255,	 10,	20, 50,55,2,2
	egt1Gauge			= egt1,			"Exhaust temp #1"	"%TEMP",0,	1200,	0,	0,650,900,0,0
	egt2Gauge			= egt2,			"Exhaust temp #2"	"%TEMP",0,	1200,	0,	0,650,900,0,0
	ebpGauge			= ebp,			"Exhaust Pressure"	"V",	0.5,   4.5,    0.0,   0.0,  5.0,  5.0, 2, 2
	fpGauge				= fp,			"Fuel Pressure"		"V",	0.5,   4.5,    0.0,   0.0,  5.0,  5.0, 2, 2
	misc1Gauge			= misc1,		"Misc 1"			"V",	0.5,   4.5,    0.0,   0.0,  5.0,  5.0, 2, 2
	misc2Gauge			= misc2,		"Misc 2"			"V",	0.5,   4.5,    0.0,   0.0,  5.0,  5.0, 2, 2
	misc3Gauge			= misc3,		"Misc 3"			"V",	0.5,   4.5,    0.0,   0.0,  5.0,  5.0, 2, 2
	misc4Gauge			= misc4,		"Misc 4"			"V",	0.5,   4.5,    0.0,   0.0,  5.0,  5.0, 2, 2
	knock_cyl_0_adjust_Gauge= knock_cyl_0_adjust,			"Knock Adv. Adjust",		"Deg",	0,	 55,	  3,	4,   50,    55,  0, 0
	knock_cyl_0_diff_Gauge= knock_cyl_0_diff, "Knock Diff",			"",        0,   255,     -1,    -1,  256,  256, 0, 0

	;Name				  Var 			  Title			Units	Lo		Hi		LoD		LoW		HiW		HiD   vd ld
	l_100kmGauge		= l_100km,		"consumption"	"l/100km",	0.0,   30.0,    0.0,   0.0,		17.0,	25.0, 1, 1
	lphrGauge			= lphr,			"consumption"	"l / h",	1.0,   50.0,    0.0,   0.0,		20.0,	30.0, 1, 1
	speedGauge			= roadSpeed,	"road speed"	"km/h",		0.0,  200.0,    0.0,   0.0,	   120.0,  160.0, 1, 1

;-------------------------------------------------------------------------------

[FrontPage]
#if NARROW_BAND_EGO
	egoLEDs         = 0.0, 1.0, 0.5 ; NB settings.
#else
	; If you reverse these range values as you see below, then the LED
	; bar will work as you expect, high on the right, low on the left.
	egoLEDs         = 4.0, 1.0, 2.5 ; WB settings.
#endif

	; Gauges are numbered left to right, top to bottom.
	;
	;    1  2  3  4
	;    5  6  7  8
	gauge1 = tachometer
	gauge2 = throttleGauge
	gauge3 = sparkGauge
	gauge4 = pulseWidthGauge
	gauge5 = mapGauge
	gauge6 = matGauge
	gauge7 = cltGauge
	gauge8 = voltMeter

	indicator = {status1 & 0b10000000}, "ALS Off", "ALS Sw On", white, black, blue, black
	indicator = {status1 & 0b01000000}, "Launch Off", "Launch Sw On", white, black, blue, black
	indicator = {status1 & 0b00100000}, "Shift-cut Off", "Shift-cut Sw On", white, black, blue, black
	indicator = {status1 & 0b00010000}, "---", "Soft Igncut Idle", white , black, red, black
	indicator = {status1 & 0b00001000}, "IAC Off", "IAC On", white, black, green, black
	indicator = {status1 & 0b00000100}, "EGO off", "EGO On", white, black, green, black
	indicator = {status1 & 0b00000010}, "---", "Trigger Errors", white, black, red, black
	indicator = {status1 & 0b00000001}, "---", "ALS Active", white, black, red, black
	;indicator = {coolant > fan_temp}, "Puhallin OFF", "Puhallin ON", white, black, red, black
	
	;indicator = {knock_cyl_0_state & 1}, "No Knock Detected", "Knocking", white, black, red, black

;-------------------------------------------------------------------------------

[RunTime]
	barHysteresis = 2.5 ; Seconds
#if CELSIUS
	coolantBar    = -40,	102
	matBar        = -40,	102
#else
	coolantBar    = -40,	215
	matBar        = -40,	215
#endif

	batteryBar    =   6,	15
	dutyCycleBar  =   0,	100
#if NARROW_BAND_EGO
	egoBar        =   0,	1.0
#else
	egoBar        =   0,	5.0
#endif
	gammaEBar     =   0,	200
	mapBar        =   0,	255
	pulseWidthBar =   0,	25.5
	rpmBar        =   0,	8000
	throttleBar   =   0,	100

	egoCorrBar    =   0,	200
	baroCorrBar   =   0,	200
	warmupCorrBar =   0,	200
	airdenCorrBar =   0,	200
	veCorrBar     =   0,	200
	accCorrBar    =   0,	100

;-------------------------------------------------------------------------------

[Tuning]
;#if   NARROW_BAND_EGO
;   egoLEDs         =  0.0, 1.0,  0.5 ; Voltage settings.
;#elif LAMBDA
;   egoLEDs         =  1.5, 0.5,  1.0 ; Lambda settings.
;#else
;   egoLEDs         = 19.7, 9.7, 14.7 ; Afr settings.
;#endif
	egoLEDs         = 4.0, 1.0, 2.5 ; WB settings.

	font            = "Courier", 14
	spotDepth       =   2 ; 0 = no indicators, 1 = Z only, 2 = XYZ indicators.
	cursorDepth     =   2 ; Same as spot depth.

	;font            = "Lucida Console", 12
	;font            = "Courier", 14
	;spotDepth       =   2 ; 0 = no indicators, 1 = Z only, 2 = XYZ indicators.
	;cursorDepth     =   2 ; Same as spot depth.

	; The four radio buttons on the tuning screen select a "page" of six
	; gauges.  The gauge numbering is the same as the front page, across
	; then down.
	;             1  2
	;             3  4
	;             5  6
	;
	; gaugeColumns allows you to hide or show gauges in column 2 (i.e.,
	; gauges 2, 4 and 6).

	gaugeColumns = 2 ; Only 1 or 2 are valid.

	;----------------------------------------------------------------------------
	; Notes on tuning screen gauges:
	;   pageButtons = Labels for radio buttons at bottom of tuning dialog.
	;
	;   Gauge 2 previously switched automatically to be tpsGauge when alpha-n
	;   was enabled, but you need to do it manually now.
	;----------------------------------------------------------------------------
	;				Page 1			Page 2			Page 3			Page 4
	pageButtons	= "&VE",           "&Ign",			"&Knock",		"Duty"
	gauge1		= tachometer,		tachometer,		tachometer		tachometer
	gauge2		= mapGauge,			mapGauge,		mapGauge,		mapGauge
	gauge3		= lambdaGauge,		lambdaGauge,	lambdaGauge,	dutyCycleGauge
	gauge4		= lambdatgtGauge,	sparkGauge,		egt1Gauge,		pulseWidthGauge
	gauge5		= egt1Gauge,		egt1Gauge,		knock_cyl_0_diff_Gauge,	sparkGauge
	gauge6		= pulseWidthGauge,	dwellGauge,		knock_cyl_0_adjust_Gauge,lambdaGauge

;-------------------------------------------------------------------------------




[UserDefined]
; lineN = label, offset-in-constants

;
; Wideband controller general
;
dialog = wideband, "Wideband Controller",5
	field = "General"
		field = "WBO2 edgetime correction", wbo2_edgetime_corr
		field = "WBO2 edgetime min", wbo2_edgetime_min
		field = "WBO2 Ri confidence scale", wbo2_ri_confidence_scale
	field = "Calibration"
		field = "Pump zero pw", wbo2_pump_pw_zero
		field = "WBO2 calibration constant", wbo2_calibration
	field = "Warmup"
		field = "Warmup ramp", wbo2_warmup_ramp
		field = "Warmpup abs limit", wbo2_abs_limit
		field = "Max time spent at abs_limit", wbo2_limit_maxt
		field = "fallback V after maxt [1c=10V ff=30V]", wbo2_fallback
		field = "Retry after", wbo2_retry_t

;
; Wideband controller PID
;
dialog = wideband_pid, "Wideband Controller PID", 5
	field = "Heater PID"
		field = "Heater PID Ri target", wbo2_ri_target
		field = "Heater KP", wbo2_heater_pid_kp
		field = "Heater KI", wbo2_heater_pid_ki
		field = "Heater KD", wbo2_heater_pid_kd
		field = "Heater PID intergral limit", wbo2_heater_pid_ilimit
	field = "Pump PID" 
		field = "Pump PID nernst target", wbo2_nernstdc_target
		field = "Pump KP", wbo2_pump_pid_kp
		field = "Pump KI", wbo2_pump_pid_ki
		field = "Pump KD", wbo2_pump_pid_kd
		field = "Pump PID intergral limit", wbo2_pump_pid_ilimit

;
; Standard constants
;
dialog = constants, "Standard constants",5
	field = "Constants"
		field = "Number of cylinders",	nCylinders
		field = "Two/Four stroke", twoStroke
		field = "Injection type", injType
		;field = "MAP type", mapType
		;field = "clt type", cltType
		;field = "mat type", matType
		;field = "Number of injectors", nInjectors
		field = "Engine type", engineType
		field = "EGO type", egoType
		field = "Constant for RPM calc", rpmk
		field = "Battery Calibration", batt_cal
		field = "MAP multiplication", loadmult
	field = "Barometric correction"
		field = "Active", baroCorr
		field = "Max difference in barometric pressure", dbaro
		field = "Fake airdensity low limit (0=disable)", airden_ignore

;
; Primary Trigger Settings 
;
dialog = trigger, "Primary Trigger Settings", 5
	topicHelp = triggerhelp
	field = "Primary trigger"
		field = "Edge", primary_trig0,
		field = "Type", primary_trig1,
		field = "Filtering", primary_trig2
		field = "Advanced Filtering (usually Disabled)", primary_trig3
		field = "Special N-1" , primary_trig4
		field = "Fiat Stilo", primary_trig5
		field = "Nissan Special trigger", primary_trig6
		field = "Bit 7 not in use", primary_trig7
		field = "TDC after the trigger",	ign_tdcdelay
		field = "Number of teeth on wheel", tooth_wheel
		field = "Trigger tooth", trigger_tooth {!primary_trig1}
		field = "Next trigger tooth", another_trigger_tooth {!primary_trig1}
		field = "Crank min. period", crank_minper
		field = "Angular width of tooth", tooth_wheel_twidth1
		field = "Tooth Relation Normal (see F1 Help)",toothrel_normal
		field = "Tooth Relation Missing (see F1 Help)",toothrel_missing
		field = "Angular width of missing tooth", tooth_wheel_twidth2
		field = "Engine phase, when to reset", reset_engphase_after

;
; Secondary Trigger Settings 
;
dialog = trigger2, "Secondary trigger / Cam sync Settings", 5
	field = "TODO! should be 0x02 when disabled!", secondary_trigger
	field = "Secondary trigger"
		field = "Active", secondary_trig1
		field = "Edge", secondary_trig0, {!secondary_trig1}
		field = "Edge while cranking", secondary_trig5, {!secondary_trig1}
		field = "Filtering", secondary_trig2, {!secondary_trig1}
		field = "Type", secondary_trig3, {!secondary_trig1}
		field = "Use", secondary_trig4, {!secondary_trig1}
	field = "CAM sync, engine phase at next primary trigger"
		field = "Rising edge", cam_sync_r_edge_phase, {!secondary_trig1}
		field = "Falling edge", cam_sync_f_edge_phase, {!secondary_trig1}

;
; Ignition settings 
;
dialog = ignition, "Ignition settings", 5
	field = "General"
		field = "Ignition outputs in use in h[2]", ignchmax
		field = "Ignition driver type", ign_out_type
		field = "Invert driver output", ign_out_inv
		field = "Dual Output Mode (see manual)", ign_out_dual
	field = "Dwell settings"
		field = "Coil chargetime @14V", ign_dwell14
		field = "Coil chargetime added @6V", ign_dwell6

;
; Injector settings 
;
dialog = injectors, "Injector Settings",5
	field = "Injector opening"
		field = "Inj open time @13.2V", injopen
		field = "Inj effective rampup", injocfuel
		field = "injrampup_battfac", injrampup_battfac
		field = "battfac", battfac
		field = "Injpwm DC", injpwm
		field = "Injpwm peak time", injpwmt
	field = "Injector firing"
		field = "Divider", divider
		field = "Alternate banks from h[0]", alternateCyl
		field = "Fire banks while cranking", alternateCrank

;
; Priming, cranking & Afterstart Settings
;
dialog = startup, "Priming, cranking & Afterstart Settings", 5
	field = "Priming"
		field = "Primepulse", primePulse
		field = "Hot start primep temp scaling", primep_temp_scaling 
	field = "Cranking"
#if CELSIUS
		field = "Crank Cold PW (-40C)", crankCold
		field = "Crank Warm PW (77C)", crankHot
#else
		field = "Crank Cold PW (-40F)", crankCold
		field = "Crank Warm PW (170F)", crankHot
#endif
		field = "Cranking threshold", cranking_thres
		field = "Crank Advance", ign_crank_advance
	field = "Afterstart settings"
		field = "Afterstart enrichment, added value", asePct
#if CELSIUS
		field = "Afterstart enrichment scaling at 77C", awev_temp_scaling
#else	
		field = "Afterstart enrichment scaling at 170F", awev_temp_scaling
#endif	
		field = "Afterstart duration, number of engine cycles", aseCount

;
; Basic settings
;
dialog = important, "Basic Settings", 5
	topicHelp = Bhelp1
		field = "Req Fuel", req_fuel
	field = "TPS Settings"
		field = "TPS High", tps_high
		field = "TPS Low", tps_low
	field = "MAP Settings"
		field = "MAP Sensor range",	kpafac
		field = "MAP Sensor offset", kpaoffs
		field = "!MapRangeUnit",kpafac_unit
		field = "!Table kPa unit", kpa_config_resolution
	field = "Fuel cut"
		field = "Rev limit", rev_limit
		field = "Rev limit Cut Spark (Press F1 for more)",shiftcut_conf_spark_rev 
		field = "Fuelcut under", fuelcut_min_kpa
		field = "Fuelcut above", fuelcut_max_kpa
		field = "overrun_fuelcut", overrun_fuelcut
		field = "overrun_fuelresume", overrun_fuelresume 
	field = "!Red lines,Restart MegaTune and choose the correct profile"
	field = "!after changing these settings"

;
; Ego settings
;
dialog = egocontrol,"EGO settings",5
	field = "Control settings"
		field = "Lean limit", ego_lean_limit
		field = "Rich limit", ego_rich_limit
		field = "Step Size", ego_delta
		field = "Speed Limit (or PID kp)", ego_pid_kp
		field = "Engine cycles before changing correction", ego_lag
	field = "Conditions for enabling"
		field = "Warmup time", ego_warmup
		field = "Max TPS", ego_maxtps
		field = "Min RPM", ego_minrpm
		field = "Max RPM", ego_maxrpm
		field = "Max MAP", ego_maxmap
		field = "Min Temperature", ego_coolant
	field = "Narrowband O2 only"
		field = "EGO NBO2 connected", ego_conf_nbo2
		field = "EGO NBO2 PID config", ego_conf_pid
		field = "Target Voltage", ego_target,{!egoType}
		field = "PID Window", ego_pid_window ,{!egoType}

;
; VE learning settings
;
dialog = velearn, "VE Learning (Auto-tune)",5
		field = "VE Learning", ve_learn_on
		field = "Simulation", ve_learn_sim, {ve_learn_on}
		field = "2x2 (NOT Recommended)",ve_learn_2x2 , {ve_learn_on}
	field = "Conditions"
		field = "Min Coolant Temp ", ve_learn_coolant , {ve_learn_on}
		field = "Max Power", ve_learn_max_power, {ve_learn_on}
	field = "Scaling factors"
		field = "RPM", ve_learn_rpm_scale, {ve_learn_on}
		field = "KPA", ve_learn_kpa_scale, {ve_learn_on}
		field = "EGO", ve_learn_ego_scale, {ve_learn_on}
	field = "Settings"
		field = "Min. weight for modifying VE Entry", ve_learn_min_weight, {ve_learn_on} 
		field = "Speed of changes", ve_learn_speed, {ve_learn_on}
		field = "Max Deviation from reference table", ve_learn_limit, {ve_learn_on}

;
; Idle controller settings part1
;
dialog = idlecontrol,"Idle settings",5
;field = "Idle settings"
		field = "Control Type", iac_type
		field = "Fast idle temp", fastidle, {!iac_type}
		field = "Idle RPM cold engine", iac_cold_rpm, {iac_type}
		field = "Max temperature for cold idle speed", iac_cold_idle_temp, {iac_type}
		field = "Idle RPM warm engine", iac_warm_rpm, {iac_type}
		field = "Min temperature for warm idle speed", iac_warm_idle_temp, {iac_type}
		field = "Idle afterstart RPM, added value", iac_afterstart_rpm, {iac_type}
		field = "Idle afterstart duration", iac_afterstart_duration, {iac_type}
		field = "IAC actuator speed/pwm freq", iac_speed, {iac_type }
		field = "Max steps to extend", iac_max_steps, {iac_type }
		field = "TPS value for idle threshold", iac_tps_thres, {iac_type}
	field = "Iac Hardware setup"
		field = "Type", iac_stepper, {iac_type}
		field = "Idle solenoid channel", iac_sol_channel_names
		field = "Idle solenoid channel #", iac_sol_channel_bits, {!iac_sol_channel_enable}
		field = "Dual Solenoid", iac_dualsol, {!iac_stepper}
		field = "Power of stepper after steps", iac_power_off_stepper, {iac_stepper}
		field = "Halt stepper at low Vbatt", iac_low_power_halt, {iac_stepper}
		field = "Iac step sequence", iac_step_seq, {iac_stepper}
		;field = "Stepper speed (ms)", iac_speed, {iac_type & iac_stepper}
		field = "iac_conf RAW", iac_conf

;
; Idle controller settings part2
;
dialog = ignidlecontrol,"Idle settings Advance/PID",5
	field = "Ignition based Idle control"
		field = "Active", iac_advance
		field = "Advance Change max advance", iac_ign_advance_limit, {iac_advance}
		field = "Advance Change max retard", iac_ign_retard_limit, {iac_advance}
		field = "Advance rate of change", iac_ign_slope, {iac_advance}
		field = "Threshold for activating IAC", iac_ign_threshold, {iac_advance}
	field = "PID Idle Controller"
		field = "Asymmetric PID conf", iac_pid_conf_asym, {iac_type}
		field = "Idle control P", iac_kp, {iac_type}
		field = "Idle control I", iac_ki, {iac_type}
		field = "Idle control D", iac_kd, {iac_type}
		field = "integral decrease limit", iac_integral_limit_dec, {iac_type}
		field = "integral increase limit", iac_integral_limit_inc, {iac_type}
		field = "Integral deadband", iac_integral_deadband
		field = "IAC deadband", iac_deadband, {iac_type}
		field = "Seconds between overclosing", iac_overclose_interval

;
; Idle controller settings part3, iac ref table
;
dialog = iacref, "Idle control stepper reference table", 5
	field = "Idle control PID reference table, steps"
#if CELSIUS
	field = "-40.0°C", iac_ref_pos0
	field = "-28.8°C", iac_ref_pos1
	field = "-17.7°C", iac_ref_pos2
	field = "- 6.6°C", iac_ref_pos3
	field = "  4.4°C", iac_ref_pos4
	field = " 15.5°C", iac_ref_pos5
	field = " 26.6°C", iac_ref_pos6
	field = " 37.7°C", iac_ref_pos7
	field = " 54.4°C", iac_ref_pos8
	field = " 71.1°C", iac_ref_pos9
	field = "IAC position while starting"
	field = "Position at -40°C", iac_cold_start_pos
	field = "Position at 77°C", iac_warm_start_pos
#else
	field = "-40°F", iac_ref_pos0
	field = "-20°F", iac_ref_pos1
	field = "  0°F", iac_ref_pos2
	field = " 20°F", iac_ref_pos3
	field = " 40°F", iac_ref_pos4
	field = " 60°F", iac_ref_pos5
	field = " 80°F", iac_ref_pos6
	field = "100°F", iac_ref_pos7
	field = "130°F", iac_ref_pos8
	field = "160°F", iac_ref_pos9
	field = "IAC position while starting"
	field = "Position at -40°F", iac_cold_start_pos
	field = "Position at 170°F", iac_warm_start_pos
#endif

;
; Idle controller settings part3, iac ref table
;
dialog = iacrefpct, "Idle control PWM reference table", 5
field = "Idle control IAC position reference table"
#if CELSIUS
	field = "-40.0°C", iac_ref_pospct0
	field = "-28.8°C", iac_ref_pospct1
	field = "-17.7°C", iac_ref_pospct2
	field = "- 6.6°C", iac_ref_pospct3
	field = "  4.4°C", iac_ref_pospct4
	field = " 15.5°C", iac_ref_pospct5
	field = " 26.6°C", iac_ref_pospct6
	field = " 37.7°C", iac_ref_pospct7
	field = " 54.4°C", iac_ref_pospct8
	field = " 71.1°C", iac_ref_pospct9
	field = "IAC position while starting"
	field = "Position at -40°C", iac_cold_start_pct
	field = "Position at 77°C", iac_warm_start_pct
#else
	field = "-40°F", iac_ref_pospct0
	field = "-20°F", iac_ref_pospct1
	field = "  0°F", iac_ref_pospct2
	field = " 20°F", iac_ref_pospct3
	field = " 40°F", iac_ref_pospct4
	field = " 60°F", iac_ref_pospct5
	field = " 80°F", iac_ref_pospct6
	field = "100°F", iac_ref_pospct7
	field = "130°F", iac_ref_pospct8
	field = "160°F", iac_ref_pospct9
	field = "IAC position while starting"
	field = "Position at -40°F", iac_cold_start_pct
	field = "Position at 170°F", iac_warm_start_pct
#endif

;
; Idle controller settings part4, iac ref table
;
dialog = cltrange, "Coolant temperature bins", 5
field = "Modify default CLT bins"
#if CELSIUS
	field = "-40.0°C", warmup_clt_range0
	field = "-28.8°C", warmup_clt_range1
	field = "-17.7°C", warmup_clt_range2
	field = "- 6.6°C", warmup_clt_range3
	field = "  4.4°C", warmup_clt_range4
	field = " 15.5°C", warmup_clt_range5
	field = " 26.6°C", warmup_clt_range6
	field = " 37.7°C", warmup_clt_range7
	field = " 54.4°C", warmup_clt_range8
	field = " 71.1°C", warmup_clt_range9
#else
	field = "-40°F", warmup_clt_range0
	field = "-20°F", warmup_clt_range1
	field = "  0°F", warmup_clt_range2
	field = " 20°F", warmup_clt_range3
	field = " 40°F", warmup_clt_range4
	field = " 60°F", warmup_clt_range5
	field = " 80°F", warmup_clt_range6
	field = "100°F", warmup_clt_range7
	field = "130°F", warmup_clt_range8
	field = "160°F", warmup_clt_range9
#endif
	field = "!NOTE! These changes affect to all temperature"
	field = "related settings!"

;
; Warmup enrichment table
;
dialog = wwu, "Warmup enrichment table", 5
field = "Warmup enrichment, biased at 100"
#if CELSIUS
	field = "-40.0°C", warmup_clt0
	field = "-28.8°C", warmup_clt1
	field = "-17.7°C", warmup_clt2
	field = "- 6.6°C", warmup_clt3
	field = "  4.4°C", warmup_clt4
	field = " 15.5°C", warmup_clt5
	field = " 26.6°C", warmup_clt6
	field = " 37.7°C", warmup_clt7
	field = " 54.4°C", warmup_clt8
	field = " 71.1°C", warmup_clt9
	field = "RPM scaling"
	field = "% of warmup enrichment at highest RPM", warmup_rpm_scale
#else
	field = "-40°F", warmup_clt0
	field = "-20°F", warmup_clt1
	field = "  0°F", warmup_clt2
	field = " 20°F", warmup_clt3
	field = " 40°F", warmup_clt4
	field = " 60°F", warmup_clt5
	field = " 80°F", warmup_clt6
	field = "100°F", warmup_clt7
	field = "130°F", warmup_clt8
	field = "160°F", warmup_clt9
#endif

;
; Fan, Water and Fuelpump settings
;
dialog = fan_pump,"Fan, Water and Fuelpump settings",5
	field = "Coolant fan"
		field = "Start temperature", fan_temp
		field = "Hysteresis", fan_hyst
		field = "Coolant fan Channel", fan_channel_names
		field = "Coolant fan Channel", fan_channel_bits, {!fan_channel_enable}
	field = "Water pump"
		field = "Start temperature", water_pump_temp
		field = "Hysteresis", water_pump_hyst
		field = "Water pump Channel", water_pump_channel_names
		field = "Water pump Channel", water_pump_channel_bits {!water_pump_channel_enable}
	field = "Fuel pump"
		field = "Pump on after powerup", pump_on_mintime
		field = "Pump on after inactivity", engine_off_delay
		field = "Fuel pump Channel", fuelpump_channel_names
		field = "Fuel pump Channel", fuelpump_channel_bits {!fuelpump_channel_enable}

;
; Alpha-N / Speed-Density Blending
;
dialog = blending, "Alpha-N / Speed-Density Blending"
	field = "max RPM for Alpha-N", hybrid_rpm_a
	field = "min RPM for Speed Density", hybrid_rpm_m

;
; ALS
;
dialog = adv_als, "Advanced AntiLagSystem Control"
	field = "Global settings"
		field = "Input Channel used:",als_input
		field = "Low RPM", als_deact_rpm
		field = "Deactivation time (0 to disable)",  als_deact_time
		field = "Deactivation EGT (0 to disable)",  als_deact_egt
		field = "Reactivation minimum TPS",  als_react_tps
		field = "Fuel enrichment", als_enrich
		field = "Ignition offset (enables ATDC ALS timing)",ign_balance
		field = "!Ignition offset will decrease maximum timing"
	field = "Ignition Retarding"
		field = "Maximum retard",  als_retard
		field = "Decrease start TPS",  als_retard_mintps
		field = "Decrease end TPS",  als_retard_maxtps
	field = "Spark Cutting"
		field = "Maximum cut level",  als_max_cut
		field = "Decrease start TPS",  als_cut_mintps
		field = "Decrease end TPS",  als_cut_maxtps
	field = "Throttle kicker solenoid"
		field = "Enable", als_tks_enable
		field = "Facility",  als_tks_names, {!als_tks_enable}
		field = "Output channel",  als_tks_bits, {!als_tks_enable}

;
; Launch Control
;
dialog = launch_dlg, "Launch Control"
	field = "Launch Control"
		field = "Launch control max RPM", launch_rpm
		field = "Control range (shares with revlimit)", softrpm_range
		field = "Fuel based Launchcontrol RPMlimit, see ALS for other settings", als_rev_limit
	field = "Launch Antilag Settings"
		field = "Fuel enrichment", launch_enrich
		field = "Ignition Retard", launch_retard
		field = "Input channel used", launch_input
;
; Soft RPM Limiters
;
dialog = softrpm_dlg, "Soft RPM Limiters"
	field = "Redline RPM Control"
		field = "Minimum RPM", softrpm_rpm
		field = "Control range", softrpm_range
dialog = spark_idle, "Spark-cut based Idle Control"
		field = "Enable", softrpm_idle_enable
		field = "Minimum RPM", softrpm_idle_rpm, {softrpm_idle_enable}
		field = "Maximum TPS (also affects overrun)", softrpm_idle_tps, {softrpm_idle_enable}
		field = "Control range", softrpm_idle_range, {softrpm_idle_enable}

;
; Shift-Cut
;
dialog = shiftcut, "Shift-Cut Settings"
	field = "Cut Spark", shiftcut_conf_spark
	field = "Cut Fuel", shiftcut_conf_fuel
	field = "Input Channel", shiftcut_input
	field = "Deactivating  Time", shiftcut_time

;
; Injector staging
;
dialog = staging, "Injector staging"
	field = "Secondary injectors"
		field = "Rate to calculated pw [0.4%]", inj_stage2_rate
	field = "Secondary injectors open thresholds"
		field = "TPS position", inj_stage2_start_tps
		field = "MAP", inj_stage2_start_map

;
; Misc Output driver settings
;
dialog = outputs,"Misc Output driver settings",5
	field = "Misc1 output"
		field = "Minimum rpm [100 rpm]", misc1out_minrpm
		field = "Maximum rpm [100 rpm]", misc1out_maxrpm
		field = "Minimum tps position", misc1out_mintps
		field = "Maximum tps position", misc1out_maxtps
		field = "Minimum manifold pressure", misc1out_minmap
		field = "Maximum manifold pressure", misc1out_maxmap
		field = "Output channel selector", misc1out_channel_names
		field = "Output channel1", misc1out_channel_bits
	field = "Misc2 output"
		field = "Minimum rpm [100 rpm]", misc2out_minrpm
		field = "Maximum rpm [100 rpm]", misc2out_maxrpm
		field = "Minimum tps position", misc2out_mintps
		field = "Maximum tps position", misc2out_maxtps
		field = "Minimum manifold pressure", misc2out_minmap
		field = "Maximum manifold pressure", misc2out_maxmap
		field = "Output channel selector", misc2out_channel_names
		field = "Output channel2", misc2out_channel_bits

;
; EGT/ Analog Input Settings
;
dialog = inputs, "EGT/ Analog Input Settings",5
	field = "EGT #1 Calibration", egt1_cal

;
; Boost controller settings
;
dialog = boostcontrol, "Boost controller settings",5
		field = "Boost config (0 to disable)", boost_conf
		field = "PWM period ", boost_conf_pwm
		field = "Choose target", boost_conf_target
		field = "Boostcontrol Reference Position", boost_conf_refpos
		field = "Boostcontrol target offset", boost_targetoffs
		field = "actuator OFF below this pressure", boost_minpressure
	field = "PID settings"
		field = "Boost P", boost_pid_kp
		field = "Boost I", boost_pid_ki
		field = "Boost D", boost_pid_kd
		field = "Boostcontrol PID integral limit", boost_pid_ilimit
	field = "Output Channel"
		field = "Enable", boost_channel_enable
		field = "Channel", boost_channel_names, {!boost_channel_enable}
		field = "Channel", boost_channel_bits, {!boost_channel_enable}

dialog = boosttpsTbl, "Boost Scaling vs TPS", 6
	field = "Boost at 12.5% throttle", boosttps1
	field = "Boost at 25% throttle", boosttps2
	field = "Boost at 37.5% throttle", boosttps3
	field = "Boost at 50% throttle", boosttps4
	field = "Boost at 62.5% throttle", boosttps5
	field = "Boost at 75% throttle", boosttps6
	field = "Boost at 87.5% throttle", boosttps7
	field = "Boost at 100% throttle", boosttps8

;
; Acceleration enrichments
;
dialog = accenrichment, "Acceleration enrichments"
		field = "Type", tpsdot_kpadot_conf
	field = "Acceleration Bins"
		field = "[0]", tpsdt1
		field = "[1]", tpsdt2
		field = "[2]", tpsdt3
		field = "[3]", tpsdt4
	field = "Acceleration Amount"
		field = "[0]", tpsaq1
		field = "[1]", tpsaq2
		field = "[2]", tpsaq3
		field = "[3]", tpsaq4
	field = "Settings"
		field = "Acceleration duration", tpsasync
		field = "Acc Cold multiplication factor", acmult
#if CELSIUS
		field = "Cold acceleration added amount (-40°C)", tpsacold
#else
		field = "Cold acceleration added amount (-40°F)", tpsacold
#endif

;
; h[0] table, Injector outputs
;		
dialog = hzero, "h[0] table, Injector outputs"
	topicHelp = Hhelp0
	field = "!Must not be changed with running engine"
	field = "Injector outputs, please press F1 for help"
	field = "0", h00
	field = "1", h01
	field = "2", h02
	field = "3", h03
	field = "4", h04
	field = "5", h05
	field = "6", h06
	field = "7", h07
dialog = hone, "h[1], reference tooth, related to h[2], ignition outputs
	field = "0", h10
	field = "1", h11, {ignchmax > 0}
	field = "2", h12, {ignchmax > 1}
	field = "3", h13, {ignchmax > 2}
	field = "4", h14, {ignchmax > 3}
	field = "5", h15, {ignchmax > 4}
	field = "6", h16, {ignchmax > 5}
	field = "7", h17, {ignchmax > 6}
;
; h[2] table, Ignition outputs
;		
dialog = htwo, "h[2] table, Ignition outputs"
	field = "!Must not be changed with running engine"
	field = "Ignition drivers (traversed backwards)"
	field = "Ignition outputs in use in h[2]", ignchmax
	field = "0", h20
	field = "1", h21, {ignchmax > 0}
	field = "2", h22, {ignchmax > 1}
	field = "3", h23, {ignchmax > 2}
	field = "4", h24, {ignchmax > 3}
	field = "5", h25, {ignchmax > 4}
	field = "6", h26, {ignchmax > 5}
	field = "7", h27, {ignchmax > 6}
dialog = htwodual, "h[2] table, Ignition outputs"
	field = "Ignition drivers (traversed backwards)"
	field = "!Must not be changed with running engine"
	field = "!Watch out, no collissions here allowed"
	field = "0", h2d0
	field = "1", h2d1 , {ignchmax > 0 }
	field = "2", h2d2 , {ignchmax > 1 }
	field = "3", h2d3 , {ignchmax > 2 }
	field = "4", h2d4 , {ignchmax > 3 }
	field = "5", h2d5 , {ignchmax > 4 }
	field = "6", h2d6 , {ignchmax > 5 }
	field = "7", h2d7 , {ignchmax > 6 }

;
; WOT / RPM Actuators
;		
dialog = actuators, "WOT / RPM Actuators"
	field = "WOT actuator"
		field = "Activation", act_wot_rpm
		field = "Activation", act_wot_channel_enable
		field = "channel", act_wot_channel_names, {!act_wot_channel_enable}
		field = "channel", act_wot_channel_bits, {!act_wot_channel_enable}
	field = "RPM actuator"
		field = "Activation", act_rpm_rpm
		field = "enabled", act_rpm_channel_enable
		field = "channel", act_rpm_channel_names, {!act_rpm_channel_enable}
		field = "channel", act_rpm_channel_bits, {!act_rpm_channel_enable}

;
; All Output Channels
;
dialog = allchannels, "All Output Channels",5
		field = "WOT actuator channel", act_wot_channel_names
		field = "WOT actuator channel", act_wot_channel_bits, {!act_wot_channel_enable}
		
		field = "RPM actuator channel", act_rpm_channel_names
		field = "RPM actuator channel", act_rpm_channel_bits, {!act_rpm_channel_enable}
		
		field = "Boost Channel", boost_channel_names 
		field = "Boost Channel", boost_channel_bits, {!boost_channel_enable}
		
		field = "Tachometer Channel", tach_channel_names
		field = "Tachometer Channel", tach_channel_bits, {!tach_channel_enable}
		
		field = "Fuel pump Channel", fuelpump_channel_names
		field = "Fuel pump Channel", fuelpump_channel_bits, {!fuelpump_channel_enable} 
		
		field = "Coolant fan Channel", fan_channel_names
		field = "Coolant fan Channel", fan_channel_bits, {!fan_channel_enable}
		
;
; All Output Channels 2
;
dialog = allchannels2, "All Output Channels 2",5
		field = "Water pump Channel", water_pump_channel_names
		field = "Water pump Channel", water_pump_channel_bits, {!water_pump_channel_enable}
		
		field = "Misc1 Channel", misc1out_channel_names
		field = "Misc1 channel", misc1out_channel_bits, {!misc1out_channel_enable}
		
		field = "Idle solenoid channel", iac_sol_channel_names
		field = "Idle solenoid channel", iac_sol_channel_bits, {!iac_sol_channel_enable}
		field = "Idle solenoid dual channel", iac_sol_dualchannel, {iac_dualsol}
		
		field = "Throttle kicker channel",  als_tks_names 
		field = "Throttle kicker channel",  als_tks_bits, {!als_tks_enable} 
		
		field = "Misc2 channel", misc2out_channel_names
		field = "Misc2 channel", misc2out_channel_bits, {!misc2out_channel_enable}

;
; Knock control
;		
dialog = knock, "Knock sampling settings"
	field = "Knock sampling"
		field = "Enable", knock_conf_enable
		field = "Channel", knock_conf_channel, {!knock_conf_enable}
		field = "Window length", knock_sampling_window, {!knock_conf_enable}
	field = "Channel 1"
		field = "Band-Pass Frequency (kHz)", knock1_frequency, {!knock_conf_enable}
		field = "Gain (multiplier)", knock1_gain, {!knock_conf_enable}
		field = "Integrator time constant (uS)", knock1_integrator, {!knock_conf_enable}
	field = "Channel 2"
		field = "Band-Pass Frequency (kHz)", knock2_frequency, {!knock_conf_enable}
		field = "Gain (multiplier)", knock2_gain, {!knock_conf_enable}
		field = "Integrator time constant (uS)", knock2_integrator, {!knock_conf_enable}
		field = "Approx. knocking freqency is calculated by:"
		field = "frequency (kHz) = 900 / (pi * 0.5 * <bore in mm>)"
		field = "Then choose the nearest value in the dropdown"

dialog = knockact, "Knock control action"
	field = "Knock action"
		field = "Threshold", knock_threshold
		field = "Noise scale factor", knock_noise_scale
		field = "Max retard", knock_max_retard
		field = "Default retard", knock_default_retard
		field = "Retard step", knock_retard_step
		field = "Retard delay", knock_retard_delay
		field = "Advance step", knock_advance_step
		field = "Advance delay", knock_advance_delay
		field = "Min engine speed", knock_minrpm
		field = "Max engine speed", knock_maxrpm

;
; LCD setup
;
dialog = lcdsetup, "LCD settings"
		field = "Default view page", lcd_default_view
		field = "Backlight", lcd_backlight
	field = "LCD cable length delays"
		field = "Delay before ENable", lcd_delay_before
		field = "Delay ENable", lcd_delay_en
	field = "LCD control"
		field = "Busy polling", lcd_c0_busypoll
		field = "Force goto after data", lcd_c0_easygoto
		field = "Reinitialize after startup", lcd_c0_reinit
		field = "PWM Brightness", lcd_c0_pwm_brightness
		field = "Software Brightness", lcd_c0_sw_brightness

;
; Tach out setup
;
dialog = tachsetup, "Tachometer Output"
	topicHelp = tachHelp
	field = "Tachometer output, press F1 for help"
		field = "Tachometer Channel", tach_channel_names
		field = "Tachometer Channel", tach_channel_bits {!tach_channel_enable}
		field = "Tachometer Divider", tach_divider



help = Bhelp1, "Basic Settings"
	text = "Req Fuel - info about calculation can be found here: <br>"
	text = "http://www.vems-group.org/wiki/index.php?page=GenBoard%2FManual%2FConfig%2FInjectorOpening<br>"
	text = "TPS High/Low - Has to be calibrated, the menu under tools does not work<br>"
	text = "MAP Sensor range - Has to be adjusted for your sensor (default 250kpa) <br>"
	text = "MAP Sensor offset - Has to be calibrated to show correct pressure with engine off<br>"
	text = "Rev Limiter Spark cut is enabled 200 RPM under the configured revlimit"	
help = Hhelp0, "Injector Outputs"
	text = "This screen will setup which output pins that relates to each injectors output<br>"
	text = "The table will be traversed backwards, according to the 'Injector Settings' screen<br>"
	text = "For each table entry, choose which injector outputs you want to fire<br>"
	text = "Injector output A, add +1<br>"
	text = "Injector output B, add +2<br>"
	text = "Injector output C, add +4<br>"
	text = "Injector output D, add +8<br>"
	text = "Injector output E, add +16<br>"
	text = "Injector output F, add +32<br>"
	text = "Injector output G, add +64<br>"
	text = "Injector output H, add +128<br>"
	text = "In most installs, only 1 output is choosen for each table entry."
help = tachHelp, "Tachometer output"
	text = "Most GenBoard outputs is only pulling the output low (0 volts) <br>"
	text = "If your tachometer wants 12V or 5V signals, wire up a external pullup resistor"
	text = "use Tachometer Divider if you want a lower frequency to your tachometer"
help = triggerhelp, "Trigger settings"
	text = "For tooth Relation settings (advanced filtering)"
	text = "x-1 trigger, Normal=121, missing=00"
	text = "x-2 trigger, Normal=122, missing=181"
[OutputChannels] 
	; The number of bytes MegaTune should expect as a result
	; of sending the "A" command to MegaSquirt is determined
	; by the value of ochBlockSize, so be very careful when
	; you change it.
	deadValue		= { 0 } ; Convenient unchanging value.

	ochBlockSize	= 49
	ochGetCommand	= "A" 

	secl			= scalar, U08,  0, "sec",	1.000, 0.000
	squirt			= scalar, U08,  1, "bits",	1.000, 0.000
	engine			= scalar, U08,  2, "bits",	1.000, 0.000
	barometer		= scalar, U08,  3, "ADC",	1.000, 0.000
	mapADC			= scalar, U16,  4, "Pa",	1.000, 0.000
	matADC			= scalar, U08,  6, "ADC",	1.000, 0.000
	cltADC			= scalar, U08,  7, "ADC",	1.000, 0.000
	tpsADC			= scalar, U08,  8, "ADC",	1.000, 0.000
	batADC			= scalar, U08,  9, "ADC",	1.000, 0.000
	egoADC			= scalar, U08, 10, "ADC",	1.000, 0.000
	egoCorrection	= scalar, U08, 11, "%",		1.000, 0.000
	airCorrection	= scalar, U08, 12, "%",		1.000, 0.000
	warmupEnrich	= scalar, U08, 13, "%",		1.000, 0.000
	rpmVHR			= scalar, U16  14, "rpm",	1.000, 0.000
	pulseWidth		= scalar, U08, 16, "ms",	0.100, 0.000
	accelEnrich		= scalar, U08, 17, "%",		1.000, 0.000
	baroCorrection	= scalar, U08, 18, "%",		1.000, 0.000
	gammaEnrich		= scalar, U08, 19, "%",		1.000, 0.000
	veCurr			= scalar, U08, 20, "%",		1.000, 0.000
	INTdwell		= scalar, U08, 21, "mS",	1.000, 0.000
	INTspark		= scalar, U08, 22, "",		1.000, 0.000
	iacPos			= scalar, U08, 23, "%",		1.000, 0.000
	egt1ADC			= scalar, U16, 24, "Deg",	1.000, 0.000
	egt2ADC			= scalar, U16, 26, "Deg",	1.000, 0.000
	ebpADC			= scalar, U16, 28, "Deg",	1.000, 0.000
	fpADC			= scalar, U16, 30, "Deg",	1.000, 0.000
	misc1ADC		= scalar, U16, 32, "Deg",	1.000, 0.000
	misc2ADC		= scalar, U16, 34, "Deg",	1.000, 0.000
	misc3ADC		= scalar, U16, 36, "Deg",	1.000, 0.000
	misc4ADC		= scalar, U16, 38, "Deg",	1.000, 0.000
	latgtADC		= scalar, U08, 40, "",		1.000, 0.000
	knock_cyl_0_knock_val=scalar, U16, 41, "",	1.000, 0.000
	knock_cyl_0_noise_val=scalar, U16, 43, "",	1.000, 0.000
	knock_cyl_0_adjust=scalar, U08, 45, "Deg",	0.250, 0.000
	knock_cyl_0_state = scalar, U08, 46, "",		1.000, 0.000
	status1 		= scalar, U08, 47, "",		1.000, 0.000 	

   ; Computed output channels.  See "megatuneExamples.ini" for all the
   ; pre-defined variables, search for "???" and you'll see them.
  
	accDecEnrich	= { accelEnrich }
	batteryVoltage	= { batADC / 255.0 * 30.0 } 			; Current MS power supply voltage.
#if CELSIUS
	coolant			= {((5/9) * (cltADC)) - ((5/9) * (40+32)) }	; c = 5/9 * t - 5/9 * (40+32)
#else
	coolant			= { cltADC - 40}
#endif
	egoVoltage		= { egoADC / 255.0 * 5.0  } 			; EGO sensor voltage.
#if CELSIUS
	mat				= {((5/9) * (matADC)) - ((5/9) * (40+32)) } 	; c = 5/9 * t - 5/9 * (40+32)
#else
	mat 			= { matADC - 40}
#endif
	rpm				= { rpmVHR }						; True RPM.
	time			= { timeNow  } 						; "timeNow" is a parameterless built-in function.
	spark			= { (INTspark >> 1) - ign_balance } 				; Spark Angle
	dwell			= { INTdwell * 0.064 }
	idleDC			= { (iacPos * 100) / 255 }			; IAC valve position
	egt1 			= {  (egt1ADC * egt1_cal) >> 8 }
	egt2 			= {  (egt2ADC * egt1_cal)  >> 8 }
	ebp				= { (5/4096) * ebpADC}
	fp				= { (5/4096) * fpADC}
	misc1			= { (5/4096) * misc1ADC}
	misc2			= { (5/4096) * misc2ADC}
	misc3			= { (5/4096) * misc3ADC}
	misc4			= { (5/4096) * misc4ADC}
	
#if NARROW_BAND_EGO
	afr				= { table(egoADC, "NBafr100.inc") / 100.0 }
	lambda			= { afr    / 14.7 }
#else
	lambda			= { table(egoADC, "WBlambda100MOT.inc") / 100.0 }
	afr				= { lambda * 14.7 }
#endif
	lambdatarget 	= { (latgtADC + 71) * 0.00390625}
; David Hooke's list of shortcuts:
;  Another way of doing it for the Tech Edge linear output:
;  afr = { 9.0 + 0.039216 * egoADC } ; WBLIN, Mot ADC
;  afr = { 9.0 + 0.039063 * egoADC } ; WBLIN, AVR ADC
;
;  For the Lambdaboy thingy, the three points given
;  (11=2.05, 14.7=4.21, 16=4.98) are damn close to a straight line.
;  Without seeing a graph or table of it, I'd guess it's a linear
;  output from AFR of 7.5 to 16 (0V to 5V), which gives:
;  afr = { 7.5 + 0.0335875 * egoADC } ; LBoy, MOT ADC
;  afr = { 7.5 + 0.0334563 * egoADC } ; LBoy, AVR ADC
;
; http://www.plxdevices.com/M-Series_productinfo.htm
; afr = { 10.0 + 0.039216 * egoADC } ; PLX WB, Mot ADC
	map				= { mapADC / 4 }
	throttle		= {(100/256) * tpsADC}
	altDiv			= { alternate ? 2 : 1                            }
	cycleTime		= { 60000.0 / rpm * (2.0-twoStroke)              }
	nSquirts		= { nCylinders/divider                           }
	dutyCycle		= { 100.0*pulseWidth/(cycleTime)   }
; TPS&MAP dots
	tpsDOTTY		= { mapProportion ? 0 : (tpsADC) }
	mapDOTTY		= { mapProportion ? (mapADC) : 0 }
; Only display positive or it gets confusing to read
	tpsDOT			= { tpsDOTTY < 0 ? 0 : tpsDOTTY }
	mapDOT			= { mapDOTTY < 0 ? 0 : mapDOTTY }
	knock_cyl_0_diff = {knock_cyl_0_knock_val / knock_cyl_0_noise_val}

; Fuel consumption:
; rpm * nCyl / [2/4 stroke ? 1 : 2] * pulseWidth[ms]/1000 * ccMin

; Injector flow
	ccMin			= { 440.0 }
; assume 3000rpm @ 120km/h, adjust according to gear ratios, usable only with one gear
	roadSpeed		= { rpm / 25 }
; Appr fuel concumption/h, injector opening etc. not taken into account
	ccPhr			= { (rpm * nCylinders / ( twoStroke ? 1 : 2 ) * pulseWidth * ccMin) / 1000.0 }
	lphr			= { ccPhr / 1000.0 }
	l_100km			= { lphr * roadSpeed / 100.0 }

;-------------------------------------------------------------------------------

[Datalog]
   ; Full datalog.
   ;
   ; Default user-defined log emulates the full datalog.
   ;
   ; The entries are saved in the datalog file in the order in
   ; which they appear in the list below.
   ;
   ;   Channel - Case sensitive name of output channel to be logged.
   ;   Label   - String written to header line of log.  Be careful
   ;             about changing these, as programs like MSLVV and
   ;             MSTweak key off specific column names.
   ;   Type    - Data type of output, converted before writing.
   ;   Format  - C-style output format of data.
   ;
   ;       Channel          Label          Type   Format
   ;       --------------   ----------     -----   ------
   entry = time,            "Time",        float,  "%.3f"
   entry = secl,            "SecL",        int,    "%d"
   entry = rpmVHR,          "RPM",         int,    "%d"
   entry = map,             "MAP",         float,  "%.1f"
   entry = throttle,        "TP",          int,    "%d"
   entry = lambda,          "lambda",      float,  "%.3f"
   entry = mat,             "MAT",         float,  "%.1f"
   entry = coolant,         "CLT",         float,  "%.1f"
   entry = engine,          "Engine",      int,    "%d"
   entry = egoCorrection,   "Gego",        int,    "%d"
   entry = airCorrection,   "Gair",        int,    "%d"
   entry = warmupEnrich,    "Gwarm",       int,    "%d"
   entry = baroCorrection,  "Gbaro",       int,    "%d"
   entry = gammaEnrich,     "Gammae",      int,    "%d"
   entry = accDecEnrich,    "TPSacc",      int,    "%d"
   entry = veCurr,          "Gve",         int,    "%d"
   entry = pulseWidth,      "PW",          float,  "%.1f"
   entry = idleDC,           "IacDC",       int,    "%d"
   entry = dutyCycle,       "DutyCycle1",  float,  "%.1f"
   entry = lambdatarget,    "lambdaTarget",   float,    "%.3f"
   entry = spark,           "Spark",       float,    "%.1f"
   entry = dwell,			"Dwell",	    float,	"%.2f"
   entry = egt1,			"EGT #1",	    int,	"%d"
   entry = egt2,			"EGT #2",	    int,	"%d"
   entry = batteryVoltage,	"Vbatt",	    float,	"%.2f"
   entry = ebp,			"Exhaust Pressure",	    float,	"%.2f"
   entry = fp,			"Fuel Pressure",	    float,	"%.2f"
   entry = misc1,			"Misc 1",	    float,	"%.2f"
   entry = misc2,			"Misc 2" ,	    float,	"%.2f"
   entry = misc3,			"Misc 3",	    float,	"%.2f"
   entry = misc4,			"Misc 4",	    float,	"%.2f"
   entry = knock_cyl_0_diff, 		"Knock Diff", 	float,	"%.3f"
   entry = knock_cyl_0_adjust, 		"Knock Adjust", float, 	"%.2f"
   entry = status1,			"StatusBits", int, "%d"