;-------------------------------------------------------------------------------
; $Id: ms3.ini,v 1.68.2.32 2011/11/14 00:06:00 jsmcortina Exp $
;
; This ini file is Copyright 2007,2008,2009,2010 James Murray and Kenneth Culver.
; It is only to be used with a genuine B&G MS3.

;
; Original author(s) uncertain. Contains work of Eric Fahlgren
; Re-written to support MS3
;
;
; configuration defines
;Normally these next lines should be UNset

;This enables the "full" CAN/serial commands so this INI can be used anywhere on the CAN network.
#unset CAN_COMMANDS

#unset EXPANDED_CLT_TEMP   ; change this line to SET if you want to use the extended range
#unset INI_VERSION_2 ; this is set by TunerStudio, but needs to be unset for Megatune to work

#set MPH       ; unset for kph
#set METRES    ;unset for inches in wheel size
#unset INTERNAL_LOG_FIELDS
#unset USE_CRC_DATA_CHECK
#unset PW_4X

[MegaTune]
   MTversion      = 2.25 ; MegaTune itself; needs to match exec version.

#if CAN_COMMANDS
   versionInfo    = "r\x00\x0e\x00\x00\x00\x3c"  ; Title bar
   queryCommand   = "r\x00\x0f\x00\x00\x00\x14"  ; Verify against signature.
#else
   versionInfo    = "S"  ; Put this in the title bar.
   queryCommand   = "Q"  ; Verify against signature.
#endif
   signature      = "MS3 Format 0095.005" ; MS-II sends a null at 20th byte.
                   ; 123456789.123456789.
;Updated ini file for NB egoV1gauge 20 Mar 2012
;----------------------------------------------------------------------------
#if INI_VERSION_2
; ok
#else
 #error Megatune cannot be used with MS3 - please upgrade to TunerStudio
#endif
;----------------------------------------------------------------------------
; Temperature Limits and Settings Reference
; contributed by Mike Soultanian
;----------------------------------------------------------------------------
;
; Below is a listing of all of the temperature ranges used throughout the INI
; for the MegaSquirt.
;
; CELSIUS (Expanded/Normal):
;     Low limit: -40C/-40C
;     High limit: 230C/150C
;     Low danger: 65C/10C
;     Low warning: 93C/65C
;     High warning: 162C/93C
;     High danger: 176C/104C
;
; FAHRENHEIT (Expanded/Normal):
;     Low Limit: -40F/-40F
;     High limit: 450F/300F
;     Low danger: 150F/50F
;     Low warning: 200F/150F
;     High warning: 325F/200F
;     High danger: 350F/220F (also used for curve editor limits)
;----------------------------------------------------------------------------

[ReferenceTables]

    tableWriteCommand 	= "t" ; 
    
    referenceTable = mafTableBurner, "Calibrate MAF Table..."
    	;topicHelp = "http://www.megamanual.com/mt28.htm#??"
        tableIdentifier = 003, "MAF Table"
        adcCount 	= 1024 	; length of the table
        bytesPerAdc 	= 2 	; using words
        scale		= 1 ; scale before sending to controller
        ;tableGenerator	= Generator Type, 		Label, xUnits, yUnits,  xLow, xHi,  yLow, yHi ; lows and Hi's are just default values, they will be user editable
    	;tableGenerator	= linearGenerator, "Custom Linear WB", "Volts","AFR",    1,   4,   9.7,  18.7
    	solutionsLabel	= "MAF Sensor"
    	solution	= "Default", 	{ table(adcValue, "maffactor.inc") }
    	solution	= "Ford V8", 	{ table(adcValue, "maffactor.inc") }

[SettingGroups]
   ; the referenceName will over-ride previous, so if you are creating a 
   ; settingGroup with a reference name of lambdaSensor, it will replace the 
   ; setting group defined in the settingGroups.xml of the TunerStudio config
   ; folder. If is is an undefined referenceName, it will be added.
   ; keyword    =  referenceName,  DisplayName

    settingGroup = lambdaSensor, "Oxygen Sensor / Display" 
    settingOption = NARROW_BAND_EGO, "Narrowband Sensor - Volts"
    settingOption = LAMBDA, "Wideband - Lambda"
    settingOption = DEFAULT, "WideBand - AFR" ; DEFAULT will be over looked and this will fall into the #else block of the statement.

    settingGroup = lambdaDisplay, "" ; Hide this settingGroup option
    settingOption = DEFAULT, "" ;

[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 (fastIdleTemp).
   ;
   ; 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 cltType and matType
   ; will end up with identical lists).
   ;
   ;----------------------------------------------------------------------------

; updated from Phil Tobin, 2nd Jan 2010 + 24 Oct 2011
   pageActivationDelay = 100 ; Milliseconds delay after burn command
   blockReadTimeout    = 100 ; total timeout for reading page.
   writeBlocks = 	off
   interWriteDelay = 	0 ; delay between each byte written

;Relationship between TS pages and MS3 pages
;MT  MS3 internal
;MS3 internal pages 0-3 are sensor lookup tables
;1     4
;2     5
;MS3 internal pages 6,7 are outpc,txbuf
;3     8
;4     9
;5     10
;6     11
;7     12
;8     13
;9     18
;10    19
;11    21
;12    22
;13    23
;14    24

   endianness          = big
   nPages              = 14
   pageSize            = 1024,                1024,                1024,                1024,		     1024,	                1024,	                1024,	                1024, 1024, 1024, 1024, 1024, 1024, 1024
   pageIdentifier      = "\x00\x04",          "\x00\x05",          "\x00\x08",          "\x00\x09",	     "\x00\x0a",            "\x00\x0b",            "\x00\x0c",            "\x00\x0d", "\x00\x12", "\x00\x13", "\x00\x15", "\x00\x16", "\x00\x17", "\x00\x18"
   burnCommand         = "b\x00\x04",         "b\x00\x05",         "b\x00\x08",         "b\x00\x09",         "b\x00\x0a",       "b\x00\x0b",       "b\x00\x0c",       "b\x00\x0d",       "b\x00\x12",       "b\x00\x13",       "b\x00\x15",       "b\x00\x16",       "b\x00\x17",       "b\x00\x18"
   pageReadCommand     = "r\x00\x04%2o%2c",   "r\x00\x05%2o%2c",   "r\x00\x08%2o%2c",   "r\x00\x09%2o%2c",   "r\x00\x0a%2o%2c", "r\x00\x0b%2o%2c", "r\x00\x0c%2o%2c", "r\x00\x0d%2o%2c", "r\x00\x12%2o%2c", "r\x00\x13%2o%2c", "r\x00\x15%2o%2c", "r\x00\x16%2o%2c", "r\x00\x17%2o%2c", "r\x00\x18%2o%2c"
   pageValueWrite      = "w\x00\x04%2o%2c%v", "w\x00\x05%2o%2c%v", "w\x00\x08%2o%2c%v", "w\x00\x09%2o%2c%v", "w\x00\x0a%2o%2c%v","w\x00\x0b%2o%2c%v","w\x00\x0c%2o%2c%v","w\x00\x0d%2o%2c%v","w\x00\x12%2o%2c%v","w\x00\x13%2o%2c%v","w\x00\x15%2o%2c%v","w\x00\x16%2o%2c%v","w\x00\x17%2o%2c%v","w\x00\x18%2o%2c%v"
   pageChunkWrite      = "w\x00\x04%2o%2c%v", "w\x00\x05%2o%2c%v", "w\x00\x08%2o%2c%v", "w\x00\x09%2o%2c%v", "w\x00\x0a%2o%2c%v", "w\x00\x0b%2o%2c%v", "w\x00\x0c%2o%2c%v" , "w\x00\x0d%2o%2c%v", "w\x00\x12%2o%2c%v", "w\x00\x13%2o%2c%v", "w\x00\x15%2o%2c%v", "w\x00\x16%2o%2c%v", "w\x00\x17%2o%2c%v", "w\x00\x18%2o%2c%v"
#if USE_CRC_DATA_CHECK
   crc32CheckCommand   = "k\x00\x04\x00\x00\x00\x04",   "k\x00\x05\x00\x00\x00\x04",   "k\x00\x08\x00\x00\x00\x04",   "k\x00\x09\x00\x00\x00\x04",   "k\x00\x0a\x00\x00\x00\x04", "k\x00\x0b\x00\x00\x00\x04", "k\x00\x0c\x00\x00\x00\x04", "k\x00\x0d\x00\x00\x00\x04", "k\x00\x12\x00\x00\x00\x04", "k\x00\x13\x00\x00\x00\x04", "k\x00\x15\x00\x00\x00\x04", "k\x00\x16\x00\x00\x00\x04", "k\x00\x17\x00\x00\x00\x04", "k\x00\x18\x00\x00\x00\x04"
#endif

   page = 1
   ;  name            = class,  type, offset,      shape,  units,       scale, translate,    lo,      hi, digits
      nCylinders      = bits,    U08,      0,      [0:4], "INVALID","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID"
      no_skip_pulses  = scalar,  U08,      1,             "",         1.00000,   0.00000,  1.00,  10.00,      0 ; * (  1 byte)
      ICIgnCapture    = bits,    U08,      2,      [0:0], "Falling Edge", "Rising Edge"                          ; *
      engineType      = bits,    U08,      2,      [3:3], "Even fire", "Odd fire"
      spkout_hi_lo    = bits,    U08,      2,      [4:4], "Going Low (Normal)", "Going High (Inverted)"          ; *
      injctl          = bits,    U08,      2,      [5:5], "Off","On"
      max_coil_dur    = scalar,  U08,      3,             "ms",       0.1000,   0.00000,  1.00,    8.00,      1 ; * (  1 byte)
      max_spk_dur     = scalar,  U08,      4,             "ms",       0.1000,   0.00000,  0.00,   25.50,      1 ; * (  1 byte)

      dwellAcc        = scalar,  U08,      5,             "ms",       0.1000,   0.00000,  0.00,   25.50,      0 ; * (  1 byte)
      crankingRPM     = scalar,  S16,     6,             "RPM",      1.00000,   0.00000,  0.00,  3000.0,      0 ; * (  2 bytes)
      triggerOffset   = scalar,  S16,     8,             "deg",      0.10000,   0.00000, -90.0,  180.00,      2 ; * (  2 bytes)
      TpsBypassCLTRevlim = scalar, S16,   10,             "TPS %",    0.10000,   0.00000, 0,      100,         1 ; * (  2 bytes)
      RevLimRpm2      = scalar,  S16,     12,             "RPM",      1.00000,   0.00000,  0.00,15000.00,      0 ; * (  2 bytes)
      map0            = scalar,  S16,    14,             "%",      0.10000,   0.00000, -100.0, 3276.7,      1 ; * (  2 bytes)
      mapmax          = scalar,  S16,    16,             "%",      0.10000,   0.00000, -100.0, 3276.7,      1 ; * (  2 bytes)
#if CELSIUS
      clt0            = scalar,  S16,    18,             "°C",       0.05555,  -320.000, -100.0,  500.0,      1 ; * (  2 bytes)
      cltmult         = scalar,  S16,    20,             "%",        1.00000,   0.00000, -200.0,  200.0,      0 ; * (  2 bytes)
      mat0            = scalar,  S16,    22,             "°C",       0.05555,  -320.000, -100.0,  500.0,      1 ; * (  2 bytes)
#else
      clt0            = scalar,  S16,    18,             "°F",       0.10000,   0.00000, -100.0,  500.0,      1
      cltmult         = scalar,  S16,    20,             "%",        1.00000,   0.00000, -200.0,  200.0,      0
      mat0            = scalar,  S16,    22,             "°F",       0.10000,   0.00000, -100.0,  500.0,      1
#endif
      matmult         = scalar,  S16,    24,             "%",        1.00000,   0.00000, -200.0,  200.0,      0 ; * (  2 bytes)

      tpsMin          = scalar,  S16,    26,             "ADC",      1.00000,   0.00000,    0.0, 1023.0,      0 ; * (  2 bytes)
      tpsMax          = scalar,  S16,    28,             "ADC",      1.00000,   0.00000,    0.0, 1023.0,      0 ; * (  2 bytes)
      batt0           = scalar,  S16,    30,             "V",        0.10000,   0.00000,    0.0, 3276.7,      1 ;   (  2 bytes)
      battmax         = scalar,  S16,    32,             "V",        0.10000,   0.00000,-3276.8, 3276.7,      1 ;   (  2 bytes)
      ego0            = scalar,  S16,    34,             "afr",      0.10000,   0.00000,-3276.8, 3276.7,      1 ;   (  2 bytes)
      egomult         = scalar,  S16,    36,             "%",        1.00000,   0.00000, -200.0,  200.0,      0 ;   (  2 bytes)

      baro0           = scalar,  S16,    38,             "kPa",      0.10000,   0.00000,-3276.8, 3276.7,      1 ; * (  2 bytes)
      baromax         = scalar,  S16,    40,             "kPa",      0.10000,   0.00000,-3276.8, 3276.7,      1 ; * (  2 bytes)
      bcor0           = scalar,  S16,    42,             "%",        1.00000,   0.00000,-3276.8, 3276.7,      1 ; * (  2 bytes)
      bcormult        = scalar,  S16,    44,             "%",        1.00000,   0.00000, -200.0,  200.0,      0 ; * (  2 bytes)
      Xknock0          = scalar,  S16,    46,             "V",        0.01000,   0.00000,    0.0,    5.0,      1 ; * (  2 bytes)
      Xknockmax        = scalar,  S16,    48,             "V",        0.01000,   0.00000,    0.0,    5.0,      1 ; * (  2 bytes)
      crankTolerance  = scalar,  U08,    50,             "%",        1.00000,   0.00000,  0.00,  255.00,      0 ; * (  1 byte)
      asTolerance     = scalar,  U08,    51,             "%",        1.00000,   0.00000,  0.00,  255.00,      0 ; * (  1 byte)
      pulseTolerance  = scalar,  U08,    52,             "%",        1.00000,   0.00000,  0.00,  255.00,      0 ; * (  1 byte)
      IdleCtl         = bits  ,  U08,    53,      [0:3], "None", "On/Off valve", "IAC Stepper Moving Only", "IAC Stepper Always On", "PWM Warmup", "15-Minute IAC", "PWM Closed-loop", "IAC Closed-loop moving only", "IAC Closed-loop always-on", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" ; *
      IdleCtl_vss     = bits  ,  U08,    53,      [4:4], "Standard", "Use VSS"
      IACtstep        = scalar,  U08,    54,             "ms",       0.128,   0.00000,  0.00,   25.50,      1 ; * (  1 byte) changed to be 0.128 ticks
      IAC_tinitial_step=scalar,  U08,    55,             "ms",  0.128,   0.00000,  0.00,   25.50,      1 ; * (  1 byte)
      IACminstep      = scalar,  U08,    56,             "steps",         1.00000,   0.00000,  0.00,  255.00,      0 ; * (  1 byte)
      dwellduty       = scalar,  U08,    57,             "%",        0.39,      0.0,      0,     100,0
      IACStart        = scalar,  S16,    58,             "",         1.00000,   0.00000,  0.00, 4000.00,      0 ; * (  1 byte)
#if CELSIUS
	#if EXPANDED_CLT_TEMP
      IdleHyst        = scalar,  S16,    60,             "°C",       0.05555,   0.00000, -40.0,  230.0,       1 ; * (  2 bytes)
      IACcoldtmp      = scalar,  S16,    66,             "°C",       0.05555,  -320.000, -40.0,  230.0,       1 ; * (  2 bytes)
	#else
      IdleHyst        = scalar,  S16,    60,             "°C",       0.05555,   0.00000, -40.0,  150.0,       1 ; * (  2 bytes)
      IACcoldtmp      = scalar,  S16,    66,             "°C",       0.05555,  -320.000, -40.0,  150.0,       1 ; * (  2 bytes)
	#endif
#else
	#if EXPANDED_CLT_TEMP
      IdleHyst        = scalar,  S16,    60,             "°F",       0.10000,   0.00000, -40.0,  450.0,       1
      IACcoldtmp      = scalar,  S16,    66,             "°F",       0.10000,   0.00000,-40.00,  450.00,      1
	#else
      IdleHyst        = scalar,  S16,    60,             "°F",       0.10000,   0.00000, -40.0,  300.0,       1
      IACcoldtmp      = scalar,  S16,    66,             "°F",       0.10000,   0.00000,-40.00,  300.00,      1
	#endif
#endif
      IACcrankpos     = scalar,  S16,    62,             "steps",    1.00000,   0.00000,  0.00, 4000.00,      0 ; * (  2 bytes)
      IACcrankxt      = scalar,  S16,    64,             "sec",      1.00000,   0.00000,  0.00,32767.00,      0 ; * (  2 bytes)
;coldtemp above to save IF clauses
      IACcoldpos      = scalar,  S16,    68,             "steps",    1.00000,   0.00000,  0.00, 4000.00,      0 ; * (  2 bytes)
      IACcoldxt       = scalar,  S16,    70,             "sec",      1.00000,   0.00000,  0.00,32767.00,      0 ; * (  2 bytes)
      OverBoostKpa2   = scalar,  S16,    72,             "kPa",      0.10000,   0.00000,  0.00,  1000,        1
      fc_rpm_lower    = scalar,  U16,    74,             "rpm",      1.00000,       0.0,   0.0,     15000,    0 ; * (  1 byte)
      OverBoostOption = bits,    U08,    76,     [0:1],  "None",    "Fuel Cut", "Spark Cut", "Both"
      hardware_spk    = bits,    U08,    77,     [0:2],   "JS10 spark", "LEDs spark", "MS3X spark", "INVALID", "Tacho", "INVALID", "INVALID", "INVALID"
      hardware_cam    = bits,    U08,    77,     [3:3],   "JS10", "MS3X Cam in"
      hardware_fuel   = bits,    U08,    77,     [4:4],   "Std fuel", "MS3X fuel"
      OverBoostKpa    = scalar,  S16,    78,             "kPa",      0.10000,   0.00000,  0.00,  1000,        1
      OverBoostHyst   = scalar,  S16,    80,             "kPa",      0.10000,   0.00000,  0.00,  100,         1
      overboostcutx   = scalar,  U08,    82,             "",         1, 0, 0, 255, 0
      overboostcuty   = scalar,  U08,    83,             "",         1, 0, 0, 255, 0 
      tpsThresh       = scalar,  S16,    84,             "%/s",      0.10000,   0.00000,  0.00,  1000.0,      1 ; * (  2 byte)
      mapThresh       = scalar,  S16,    86,             "kPa/s",    1.00000,   0.00000,  0.00,  1000.0,      0 ; * (  2 byte) threshold for MAE
      taeColdA        = scalar,  U08,    88,             "%ReqFuel",       1,   0.00000,  0.00,  255,      0 ; * (  1 byte)
      taeColdM        = scalar,  U08,    89,             "%",        1.00000,   0.00000,  0.00,  255.00,      0 ; * (  1 byte)
      taeTime         = scalar,  U08,    90,             "s",        0.10000,   0.00000,  0.00,   25.50,      1 ; * (  1 byte)
      tdePct          = scalar,  U08,    91,             "",         1.00000,   0.00000,  0.00,  255.00,      0 ; * (  1 byte)
      floodClear      = scalar,  S16,    92,             "%",        0.10000,   0.00000,  0.00,  100.00,      1 ; * (  2 bytes)
      TPSOXLimit      = scalar,  S16,    94,             "%",        0.10000,   0.00000,  0.00,  300.00,      1 ; * (  2 bytes)
      tpsProportion   = scalar,  U08,    96,             "%",        1.00000,   0.00000,  0.00,  100.00,      0 ; * (  1 byte)
      baroCorr        = bits  ,  U08,    97,      [0:1], "None", "Initial MAP Reading", "Two Independent Sensors", "INVALID"; BaroOption
      egoType         = bits  ,  U08,    98,      [0:1], "Disabled", "Narrow Band", "Wide Band", "INVALID"                  ; egoOption
      egoCount        = scalar,  U08,    99,             "",         1.00000,   0.00000,  0.00,  255.00,      0 ; * (  1 byte)
      egoDelta        = scalar,  U08,    100,             "%",        1.00000,   0.00000,  0.00,  255.00,      0 ; * (  1 byte)
      oldegoLimit     = scalar,  U08,    101,             "%",        1.00000,   0.00000,  0.00,  255.00,      0 ; * (  1 byte)
      EGOVtarget       = scalar,  U08,    102,             "Volts",     0.00489,   0.00000,  0.00,   1,     3 
      tempUnits       = bits  ,  U08,    103,      [0:0], "Coolant/MAT Tables in °F", "Coolant/MAT Tables in °C" ; * (  1 byte)
      egonum          = scalar,  U08,    104,               "",         1, 0, 0, 8, 0
;pad
#if CELSIUS
	#if EXPANDED_CLT_TEMP
      fastIdleT       = scalar,  S16,    106,             "°C",       0.05555,  -320.000,-40.00,  230.00,      1 ; * (  2 bytes)
      egoTemp         = scalar,  S16,    108,             "°C",       0.05555,  -320.000,-40.00,  230.00,      1 ; * (  2 bytes)
	#else
      fastIdleT       = scalar,  S16,    106,             "°C",       0.05555,  -320.000,-40.00,  150.00,      1 ; * (  2 bytes)
      egoTemp         = scalar,  S16,    108,             "°C",       0.05555,  -320.000,-40.00,  150.00,      1 ; * (  2 bytes)
	#endif	  
#else
	#if EXPANDED_CLT_TEMP
      fastIdleT       = scalar,  S16,    106,             "°F",       0.10000,   0.00000,-40.00,  450.00,      1
      egoTemp         = scalar,  S16,    108,             "°F",       0.10000,   0.00000,-40.00,  450.00,      1
	#else
      fastIdleT       = scalar,  S16,    106,             "°F",       0.10000,   0.00000,-40.00,  300.00,      1
      egoTemp         = scalar,  S16,    108,             "°F",       0.10000,   0.00000,-40.00,  300.00,      1
	#endif
#endif
      egoRPM          = scalar,  S16,    110,             "RPM",      1.00000,   0.00000,  0.00, 15000.0,      0 ; * (  2 bytes)
#if PW_4X
      reqFuel         = scalar,  U16,    112,             "ms",       0.004,   0.00000,  0.00,  262.143,      2 ; * (  2 bytes)
#else
      reqFuel         = scalar,  U16,    112,             "ms",       0.001,   0.00000,  0.00,  65.535,      2 ; * (  2 bytes)
#endif
      divider         = scalar,  U08,    114,             "",         1.00000,   0.00000,  0.00,     255,      0 ; * (  1 byte)
      alternate       = bits,    U08,    115,      [0:0], "Simultaneous", "Alternating"                          ; * (  1 byte)
      altcrank        = bits,    U08,    115,      [1:1], "Every event", "Alternate events"
      injPwmT         = scalar,  U08,    116,             "ms",       0.12800,   0.128,  0.00,   32.64,      1 ; * (  1 byte)
      injPwmPd        = scalar,  U08,    117,             "us",       1.00000,   0.00000, 40.00,  100.00,      0 ; * (  1 byte)
      injPwmP         = scalar,  U08,    118,             "%",        1.00000,   0.00000,  0.00,  100.00,      0 ; * (  1 byte)
      twoStroke       = bits,    U08,    119,      [0:0], "Four-stroke",    "Two-stroke"                         ; *
      injType         = bits,    U08,    120,      [0:0], "Port Injection", "Throttle Body"                      ; *
      nInjectors      = bits,    U08,    121,      [0:4], "INVALID", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID"
      OddFireang      = scalar,  U16,    122,             "",         0.10000,   0.00000,  0.00,  720.00,      0 ; * (  2 byte)
      rpmLF           = scalar,  U08,    124,             "",         1.00000,   0.00000,  0.00,  255.00,      0 ; * (  1 byte)
      mapLF           = scalar,  U08,    125,             "",         1.00000,   0.00000,  0.00,  255.00,      0 ; * (  1 byte)
      tpsLF           = scalar,  U08,    126,             "",         1.00000,   0.00000,  0.00,  255.00,      0 ; * (  1 byte)
      egoLF           = scalar,  U08,    127,             "",         1.00000,   0.00000,  0.00,  255.00,      0 ; * (  1 byte)
      adcLF           = scalar,  U08,    128,             "",         1.00000,   0.00000,  0.00,  255.00,      0 ; * (  1 byte)
     XknkLF           = scalar,  U08,    129,             "",         1.00000,   0.00000,  0.00,  255.00,      0 ; * (  1 byte)
      AMCOption       = bits,    U08,    130,      [0:1], "Disabled", "RAM Update", "FLASH Update", "INVALID"    ; * (  1 byte)
    UNUSED_1_131      = bits,    U08,    131,      [0:0], "Single Table", "Dual Table"                           ; *
      algorithm       = bits,    U08,    132,      [0:2], "INVALID", "Speed Density", "Percent Baro", "Alpha-N", "MAFMAP", "MAF", "ITB", "INVALID" ; *
      algorithm2      = bits,    U08,    132,      [4:6], "Disabled", "Speed Density", "Percent Baro", "Alpha-N", "MAFMAP", "MAF", "ITB", "INVALID"
      IgnAlgorithm    = bits,    U08,    133,      [0:2], "INVALID", "Speed Density", "Percent Baro", "Alpha-N", "MAFMAP", "INVALID", "ITB", "INVALID"
      IgnAlgorithm2   = bits,    U08,    133,      [4:6], "Disabled", "Speed Density", "Percent Baro", "Alpha-N", "MAFMAP", "INVALID", "ITB", "INVALID"
      AfrAlgorithm    = scalar,  U08,    134,             "",         1.00000,   0.00000,  0.00,  255.00,      0 ; U (  1 byte) UNUSED
      dwelltime       = scalar,  U08,    135,             "ms",       0.10000,       0,        0.1,     25.5, 1
      trigret_ang     = scalar,  U16,    136,    "deg", 0.1, 0, 5, 180,1
      RevLimOption_retard = bits,U08,    138,      [0:1], "Off", "Progressive retard", "Fixed angle", "INVALID"
      RevLimOption_spkcut = bits,U08,    138,      [2:2], "Off", "On"
      RevLimCLTbased  = bits,    U08,    138,      [3:3], "Normal", "CLT based"
      RevLimMaxRtd    = scalar,  U08,    139,             "deg",      0.10000,   0.00000,0,   25.5,      0 ; * (  1 byte)
      ego_startdelay  = scalar,  U08,    140,             "sec",      1, 0, 0, 120, 0
      can_poll2_ego   = bits,    U08,    141, [0:0], "Disable", "Enable"
      opt142_rtc      = bits,    U08,    142, [0:1], "Off", "On-board", "CAN", "INVALID"
      injPwmT2        = scalar,  U08,    143,             "ms",       0.12800,   0.12800,  0.00,   32.64,      1 ; * (  1 byte)
      injPwmPd2       = scalar,  U08,    144,             "us",       1.00000,   0.00000, 40.00,  100.00,      0 ; * (  1 byte)
      injPwmP2        = scalar,  U08,    145,             "%",        1.00000,   0.00000,  0.00,  100.00,      0 ; * (  1 byte)
      can_ego_id      = scalar,  U08,    146,            "",        1.00000,   0.00000,  0.00,  14,      0 ;
	  can_ego_table   = scalar,  U08,    147,             "",         1.00000,   0.00000,     0,     15,       0 ; * (  1 byte)
	  can_ego_offset  = scalar,  U16,    148,             "bytes",    1.00000,   0.00000,     0,   4095,       0
      baro_upper      = scalar,  S16,    150,             "kPa",      0.10000,   0.00000,  0.00,  400.00,      1 ;
      baro_lower      = scalar,  S16,    152,             "kPa",      0.10000,   0.00000,  0.00,  400.00,      1 ;
      baro_default    = scalar,  S16,    154,             "kPa",      0.10000,   0.00000,  0.00,  400.00,      1 ;
      RevLimTPSbypassRPM = scalar, S16,  156,             "RPM",      1.00000,   0.00000,  0.00,  16000,       0 ;
      RevLimNormal1 =   scalar,  S16,    158,             "RPM",      1.00000,   0.00000,  0.00,  16000,       0 ;
      RevLimNormal2 =   scalar,  S16,    160,             "RPM",      1.00000,   0.00000,  0.00,  16500,       0 ;
      hw_latency      = scalar,  U08,    162,      "usec", 1.0, 0.00000, 0.00, 255.00, 0
      loadCombine     = bits,    U08,    163,      [0:0], "additive", "multiplicitive"
      loadMult	      = bits,    U08,    163,      [2:2], "don't multiply", "multiply"
      loadStoich      = bits,    U08,    163,      [3:3], "don't include AFRtarget", "include AFRtarget"
      baud            = scalar,  U32,    164             "",         1.00000,   0.00000,9600.0,115200.0,      0 ; x (  4 bytes)
      MAPOXLimit      = scalar,  S16,    168,             "%",      0.10000,   0.00000,  0.00,  300.00,      2 ; * (  2 bytes)

      can_poll_id_rtc = scalar,  U08,    170,            "",        1.00000,   0.00000,  0.00,  14,      0 ;
      mycan_id        = scalar,  U08,    171,            "",        1.00000,   0.00000,  0.00,  14,      0 ;

      mapsample_percent = scalar, U08,   172,            "%",       1.00000,   0.00000,  0.00,  50,       0
      can_poll_id_ports = scalar,  U08,    173,            "",        1.00000,   0.00000,  0.00,  14,      0 ;
      can_poll_id     = scalar,  U08,    174,            "",        1.00000,   0.00000,  0.00,  14,      0 ;
      aeTaperTime     = scalar,  U08,    175,             "s",        0.10000,   0.00000,  0.00,   25.50,      1 ; * (  1 byte)
      aeEndPW         = scalar,  S16,    176,             "%ReqFuel",       1,   0.00000,  0.00, 100,      0 ; * tpsaccel2

      egoAlgorithm    = bits  ,  U08,    178,      [0:1], "Simple", "INVALID", "PID", "No correction" ; * (  1 byte)
      egoKP           = scalar,  U08,    179,             "%",        1.00000,   0.00000,  0.00,  200.00,      0 ; * (  1 byte)
      egoKI           = scalar,  U08,    180,             "%",        1.00000,   0.00000,  0.00,  200.00,      0 ; * (  1 byte)
      egoKD           = scalar,  U08,    181,             "%",        1.00000,   0.00000,  0.00,  200.00,      0 ; * (  1 byte)

#if MPH
      ac_idleup_vss_offpoint = scalar,  U16,    182,      "MPH",      0.22369,   0.00000,  0.00,   200,      0 ; * (  2 bytes)
      ac_idleup_vss_hyst     = scalar,  U16,    184,      "MPH",      0.22369,   0.00000,  0.00,   200,      0 ; * (  2 bytes)
#else
      ac_idleup_vss_offpoint = scalar,  U16,    182,      "KPH",      0.3600,    0.00000,  0.00,   300,      0  
      ac_idleup_vss_hyst =     scalar,  U16,    184,      "KPH",      0.3600,    0.00000,  0.00,   300,      0
#endif

      flexFuel        = bits  ,  U08,    186,      [0:0], "Disabled", "Enabled"                                  ; * (  1 byte)
      flexport        = bits,    U08,    186,      [1:2], "PE0/JS7", "JS11", "Flex input", "INVALID";  (1 byte )
      fuelFreq        = array ,  U08,    187,    [    2], "Hz",       1.00000,   0.00000,  0.00,     255,      0 ; * (  2 bytes)
         fuelFreq0    = scalar,  U08,    187,             "Hz",       1.00000,   0.00000,  0.00,     255,      0
         fuelFreq1    = scalar,  U08,    188,             "Hz",       1.00000,   0.00000,  0.00,     255,      0
      fuelCorr        = array ,  U08,    189,    [    2], "%",        1.00000,   0.00000,  0.00,     255,      0 ; * (  2 bytes)
         fuelCorr0    = scalar,  U08,    189,             "%",        1.00000,   0.00000,  0.00,     255,      0
         fuelCorr1    = scalar,  U08,    190,             "%",        1.00000,   0.00000,  0.00,     255,      0

      dwellmode       = bits  ,  U08,    191,  [0:1], "Standard Dwell", "Fixed Duty", "Time after Spark", "Charge at Trigger"
      pwmidle_shift_lower_rpm = scalar, U16, 192,        "rpm",       1.00000,   0.00000,  0.00,      16000,    0
      ac_idleup_tps_offpoint = scalar,  S16, 194,        "%",         0.10000,   0.00000,  0.00,      100.00,   1 
      ac_idleup_tps_hyst = scalar,      S16, 196,        "%",         0.10000,   0.00000,  0.00,      100.00,   1
      fan_idleup_tps_offpoint = scalar, S16, 198,        "%",         0.10000,   0.00000,  0.00,      150.00,   1
      fan_idleup_tps_hyst = scalar,     S16, 200,        "%",         0.10000,   0.00000,  0.00,      100.00,   1
#if MPH
      fan_idleup_vss_offpoint = scalar, U16, 202,        "MPH",       0.22369,   0.00000,  0.00,      200.00,   0
#else
      fan_idleup_vss_offpoint = scalar, U16, 202,        "KPH",       0.3600,    0.00000,  0.00,      300.00,   0
#endif

      knk_option       = bits ,  U08,    204,      [0:1], "Disabled", "Safe Mode", "Aggressive Mode", "INVALID"  ; * (  1 byte )
;     XXknkport         = bits,    U08,    204,      [2:2], "MS2 AD7/JS4", "MS2 AD6/JS5" 
      knkDirection    = bits  ,  U08,    204,      [4:4], "Low Input", "High Input"                   ; *
      knkpull         = bits  ,  U08,    204,      [5:6], "INVALID", "None", "Pull up", "INVALID"                   ; *
      knk_maxrtd      = scalar,  U08,    205,             "deg",      0.1,       0.0,      0.0,    25.5,       1 ; * (  1 byte )
      knk_step1       = scalar,  U08,    206,             "deg",      0.1,       0.0,      0.0,    25.5,       1 ; * (  1 byte )
      knk_step2       = scalar,  U08,    207,             "deg",      0.1,       0.0,      0.0,    25.5,       1 ; * (  1 byte )
      knk_trtd        = scalar,  U08,    208,             "sec",      0.1,       0.0,      0.0,    25.5,       1 ; * (  1 byte )
      knk_tadv        = scalar,  U08,    209,             "sec",      0.1,       0.0,      0.0,    25.5,       1 ; * (  1 byte )
      knk_dtble_adv   = scalar,  U08,    210,             "deg",      0.1,       0.0,      0.0,    25.5,       1 ; * (  1 byte )
      knk_ndet        = scalar,  U08,    211,             "knocks",   1.0,       0.0,      0.0,     255,       0 ; * (  1 byte )
      EAEOption       = bits  ,  U08,    212,      [0:2], "Off", "EAE", "INVALID", "X-tau", "X-tau with CLT correction", "INVALID", "INVALID", "INVALID"      ; * (  1 byte )
      knkport         = bits,    U08,    213, [0:3], "INVALID", "Tableswitch", "PE0/JS7", "PE1", "JS10", "JS11", "JS5 (ADC6)", "JS4 (ADC7)", "Nitrous In", "Launch in", "Datalog In", "EXT_MAP (ADC11)", "EGO2 (ADC12)", "Spare ADC (ADC13)","INVALID","INVALID" 
      knk_maxmap      = scalar,  U16,    214,             "kPa",      0.1,       0.0,      0.0,   300.0,       1 ; * (  2 bytes)
      knk_lorpm       = scalar,  U16,    216,             "rpm",      1.0,       0.0,      0.0,   10000,       0 ; * (  2 bytes)
      knk_hirpm       = scalar,  U16,    218,             "rpm",      1.0,       0.0,      0.0,   10000,       0 ; * (  2 bytes)


      triggerTeeth    = scalar,  U16,    220,             "teeth",    1.0,       0.0,      0.0,     512,       0 ; * (  2 bytes)
      No_Miss_Teeth   = scalar,  U08,    222,             "teeth",    1.0,       0.0,      0.0,     255,       0 ; * (  1 byte )
      pwmidle_shift_open_time = scalar, U08, 223,         "sec",      1.0,       0.0,      0.0,     20,        0 ; * (  1 byte )
      Miss_ang        = scalar,  U16,    224,             "deg BTDC",    0.1,       0.0,      0.0,     720,       1 ; * (  2 bytes )
      ICISR_tmask     = scalar,  U08,    226,             "ms",       0.1,       0.0,      0.0,    25.5,       1 ; * (  1 byte )
      ICISR_pmask     = scalar,  U08,    227,             "%",        1.0,       0.0,      0.0,     90,       0 ; * (  1 byte )

      ae_lorpm        = scalar,  U16,    228,             "rpm",      1.0,       0.0,      0.0,   10000,       0 ; * (  2 bytes)
      ae_hirpm        = scalar,  U16,    230,             "rpm",      1.0,       0.0,      0.0,   10000,       0 ; * (  2 bytes)

      fuelSpkDel      = array ,  S16,    232,    [    2], "deg",      0.10000,   0.00000,-45.00,   45.00,      1 ; * (  4 bytes)
         fuelSpkDel0  = scalar,  S16,    232,             "deg",      0.10000,   0.00000,-45.00,   45.00,      1
         fuelSpkDel1  = scalar,  S16,    234,             "deg",      0.10000,   0.00000,-45.00,   45.00,      1

      spk_conf2_gm    = bits  ,  U08,    236,      [0:0], "Off", "GM Bypass on SpkB"
      spk_conf2_tfi   = bits  ,  U08,    236,      [1:2], "Off", "TFI Non-signature", "INVALID", "TFI Signature PIP"
      spk_conf2_cam   = bits  ,  U08,    236,      [3:3], "Off", "On"
      spk_conf2_oddodd= bits  ,  U08,    236,      [4:4], "Alternate", "Paired"
      spk_conf2_dwell = bits  ,  U08,    236,      [5:5], "Off", "On"
      spk_conf2_ngc   = bits  ,  U08,    236,      [6:6], "Off", "Alternate"
;spk_config
      spk_config_campol   =bits, U08,    237,      [0:0], "Low", "High"
      spk_config_camcrank = bits, U08,   237,      [1:1], "Crank wheel", "Cam wheel"
      spk_config_trig2 =bits,    U08,    237,      [2:3], "INVALID", "Single wheel with missing tooth", "Dual wheel", "Dual wheel with missing tooth"
      spk_config_trig2l =bits,   U08,    237,      [4:5], "INVALID", "Rising edge", "Falling edge", "Poll level"
      spk_config_resetcam =bits, U08,    237,      [6:7], "Cam", "Crank", "Every cylinder", "INVALID"

 ; invalids in next line are spare and should be used
      spk_mode0       = bits  ,  U08,    238,      [0:5], "EDIS", "EDIS Multispk", "Basic trigger", "Trigger return",  "Toothed wheel", "420A/Neon", "36-2+2", "36-2-2-2", "Subaru 6/7", "Miata 99-00", "6g72", "IAW Weber", "CAS 4/1", "4G63", "Twin trigger", "Chrysler 2.2/2.5", "Renix 44-2-2", "Suzuki Swift", "Suzuki Vitara 2.0", "Daihatsu 3cyl", "Daihatsu 4cyl", "VTR1000", "Rover#1", "Rover#2", "Rover#3", "GM 7X", "Log crank", "Log crank&cam", "QR25DE", "Honda RC51", "Fiat 1.8 16V", "Fuel Only", "INVALID", "INVALID", "INVALID", "INVALID","INVALID", "INVALID", "INVALID", "INVALID","LS1", "YZF1000", "INVALID", "INVALID","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID","INVALID", "INVALID", "INVALID", "INVALID","INVALID", "INVALID", "INVALID", "INVALID","INVALID", "INVALID", "INVALID", "INVALID"
; Untested modes have been commented out, full list next.
;      spk_mode0       = bits  ,  U08,    238,      [0:5], "EDIS", "EDIS Multispk", "Basic trigger", "Trigger return",  "Toothed wheel", "420A/Neon", "36-2+2", "36-2-2-2", "Subaru 6/7", "Miata 99-00", "6g72", "IAW Weber", "CAS 4/1", "4G63", "Twin trigger", "Chrysler 2.2/2.5", "Renix 44-2-2", "Suzuki Swift", "Suzuki Vitara 2.0", "Daihatsu 3cyl", "Daihatsu 4cyl", "VTR1000", "Rover#1", "Rover#2", "Rover#3", "GM 7X", "Log crank", "Log crank&cam", "QR25DE", "Honda RC51", "Fiat 1.8 16V", "Fuel Only", "Optispark", "Nissan 16,12,8,4 leading", "CAS360-2", "CAS360-3","CAS360-4", "CAS360-5", "CAS360-6", "CAS360-7","LS1", "YZF1000", "INVALID", "INVALID","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID","INVALID", "INVALID", "INVALID", "INVALID","INVALID", "INVALID", "INVALID", "INVALID","INVALID", "INVALID", "INVALID", "INVALID"
      spk_mode3_trim  = bits,    U08,    239,      [0:0], "Off", "On"
      spk_mode3       = bits,    U08,    239,      [5:7], "Single coil", "INVALID", "Wasted spark", "Wasted COP", "Coil on plug", "INVALID", "Dual dizzy", "INVALID" ;  (1 byte )
;gap
      rtbaroport      = bits,   U08,  240, [0:4], "Mainboard", "JS5 (ADC6)", "JS4 (ADC7)", "EXT_MAP (ADC11)", "EGO2 (ADC12)", "Spare ADC (ADC13)", "INVALID", "INVALID", "CAN ADC01", "CAN ADC02", "CAN ADC03", "CAN ADC04", "CAN ADC05", "CAN ADC06", "CAN ADC07", "CAN ADC08", "CAN ADC09", "CAN ADC10", "CAN ADC11", "CAN ADC12", "CAN ADC13", "CAN ADC14", "CAN ADC15", "CAN ADC16", "CAN ADC17", "CAN ADC18", "CAN ADC19", "CAN ADC20", "CAN ADC21", "CAN ADC22", "CAN ADC23", "CAN ADC24"
      ego2port        = bits,   U08,  241, [0:4], "Off", "JS5 (ADC6)", "JS4 (ADC7)", "EXT_MAP (ADC11)", "EGO2 (ADC12)", "Spare ADC (ADC13)", "INVALID", "INVALID", "CAN ADC01", "CAN ADC02", "CAN ADC03", "CAN ADC04", "CAN ADC05", "CAN ADC06", "CAN ADC07", "CAN ADC08", "CAN ADC09", "CAN ADC10", "CAN ADC11", "CAN ADC12", "CAN ADC13", "CAN ADC14", "CAN ADC15", "CAN ADC16", "CAN ADC17", "CAN ADC18", "CAN ADC19", "CAN ADC20", "CAN ADC21", "CAN ADC22", "CAN ADC23", "CAN ADC24"
      mapport      = bits,   U08,  242, [0:4], "Mainboard", "JS5 (ADC6)", "JS4 (ADC7)", "EXT_MAP (ADC11)", "EGO2 (ADC12)", "Spare ADC (ADC13)", "INVALID", "INVALID", "CAN ADC01", "CAN ADC02", "CAN ADC03", "CAN ADC04", "CAN ADC05", "CAN ADC06", "CAN ADC07", "CAN ADC08", "CAN ADC09", "CAN ADC10", "CAN ADC11", "CAN ADC12", "CAN ADC13", "CAN ADC14", "CAN ADC15", "CAN ADC16", "CAN ADC17", "CAN ADC18", "CAN ADC19", "CAN ADC20", "CAN ADC21", "CAN ADC22", "CAN ADC23", "CAN ADC24"
      RevLimcutx      = scalar,  U08,    244,  "",     1, 0, 0, 255, 0
      RevLimcuty      = scalar,  U08,    245,  "",     1, 0, 0, 255, 0
;      feature4_0ftrig  = bits,   U08,    246,      [0:0], "Simple", "Advanced"
      feature4_0igntrig= bits,   U08,    246,      [1:1], "Off", "Ignition trigger indicator"
      feature4_0VEtblsize=bits,  U08,    246,      [2:2], "16x16","12x12"
      feature4_0maxdwl = bits,   U08,    246,      [3:3], "Off", "On"
      feature4_0ftrig = bits,    U08,    246,      [4:5], "Off", "INVALID", "Simple", "Advanced"
      feature4_0mindwl = bits,   U08,    246,      [6:6], "Off", "On"
      timing_flags    = bits,    U08,    247,	 [0:0], "Use Table", "Fixed timing";
      use_prediction  = bits,    U08,    247,    [1:1], "No Prediction", "1st Deriv Prediction";
      crank_dwell     = scalar,  U08,    248,     "ms", 0.1000,0.00000,1.00,8.00,1
      tsw_pin_f       = bits,    U08,    249,      [0:4], "INVALID", "Tableswitch", "PE0/JS7", "PE1", "JS10", "JS11", "JS5 (ADC6)", "JS4 (ADC7)", "Nitrous In", "Launch in", "Datalog In", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "CANIN1", "CANIN2", "CANIN3", "CANIN4", "CANIN5", "CANIN6", "CANIN7", "CANIN8", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID"
      crank_timing    = scalar,  S16,    250,     "degrees", 0.10000,0.00000,-10.00,90.00,1;
      fixed_timing    = scalar,  S16,    252,	  "degrees", 0.10000,0.00000,-10.00,90.00,1;
      tsf_rpm         = scalar,  U16,    254, "rpm", 1, 0, 0, 15000, 0
      tsf_kpa         = scalar,  S16,    256, "kPa", 0.1, 0, 0, 400, 1
      tsf_tps         = scalar,  S16,    258, "%", 0.10000,   0.00000,  0.00,  100.00,      1;
      tss_rpm         = scalar,  U16,    260, "rpm", 1, 0, 0, 15000, 0
      tss_kpa         = scalar,  S16,    262, "kPa", 0.1, 0, 0, 400, 1
      tss_tps         = scalar,  S16,    264, "%", 0.10000,   0.00000,  0.00,  100.00,      1;

;      feature5_0                        266
      OvrRunC        = bits  ,   U08,    266,      [0:0], "Off", "On"          ; * (  1 byte)
      f5_0_tsf       = bits  ,   U08,    266,      [1:1], "Off", "On"
      f5_0_tsf_opt   = bits  ,   U08,    266,      [2:3], "Hardware", "rpm", "kPa", "TPS"
      f5_0_tss       = bits  ,   U08,    266,      [4:4], "Off", "On"
      f5_0_tss_opt   = bits  ,   U08,    266,      [5:6], "Hardware", "rpm", "kPa", "TPS"

      tsw_pin_s       = bits,    U08,    267,      [0:4], "INVALID", "Tableswitch", "PE0/JS7", "PE1", "JS10", "JS11", "JS5 (ADC6)", "JS4 (ADC7)", "Nitrous In", "Launch in", "Datalog In", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "CANIN1", "CANIN2", "CANIN3", "CANIN4", "CANIN5", "CANIN6", "CANIN7", "CANIN8", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID"
      pwmidlecranktaper= scalar, U08,    268,     "s",        1.00000,   0.00000,  0.00,  100.00,      0
;pad
      fc_rpm          = scalar,  U16,    270, "rpm", 1, 0, 0, 15000, 0
      fc_kpa          = scalar,  S16,    272, "kPa", 0.1, 0, 0, 400, 1
      fc_tps          = scalar,  S16,    274, "%", 0.10000,   0.00000,  0.00,  100.00,      1;
#if CELSIUS
	#if EXPANDED_CLT_TEMP
      fc_clt          = scalar,   S16,    276,  "°C",       0.05555,  -320.000, -40.0,  230.0,      1 ; * (  2 bytes)
	#else
      fc_clt          = scalar,   S16,    276,  "°C",       0.05555,  -320.000, -40.0,  150.0,      1 ; * (  2 bytes)
	#endif
#else
	#if EXPANDED_CLT_TEMP
      fc_clt          = scalar,   S16,    276,  "°F",       0.10000,   0.00000, -40.0,  450.0,      1
	#else
      fc_clt          = scalar,   S16,    276,  "°F",       0.10000,   0.00000, -40.0,  300.0,      1
	#endif
#endif
      fc_delay        = scalar,  U08,    278,  "s",        0.1, 0, 0.5, 5.0, 1

      tacho_opt80     = bits,    U08,    279, [7:7], "Off", "On"
      tacho_opt40     = bits,    U08,    279, [6:6], "Normal", "Half speed"
      tacho_opt3f     = bits,    U08,    279, [0:4], "INVALID", "IAC1", "IAC2", "FIDLE", "D15", "Nitrous 1", "Nitrous 2", "Tacho", "Idle", "Boost", "VVT", "Inj Bank 1", "Inj Bank 2", "D14", "D16", "JS11", "Inj A", "Inj B", "Inj C", "Inj D", "Inj E", "Inj F", "Inj G", "Inj H", "PT4", "IGN (JS10)", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID"
      fc_ego_delay    = scalar,  U08,    280, "seconds", 1, 0, 0.00, 10, 0
      EAElagsource    = bits,    U08,    281, [0:0], "TPSdot", "MAPdot"
      EAElagthresh    = scalar,  S16,    282, "unit/sec",  1, 0, 0.00, 1000, 0
      EAElagRPMmax    = scalar,  U16,    284, "rpms", 1, 0, 0.00, 65535, 0

;     feature3_0      = bits,    U08,    286,       [0:0], "C", "ASM"
      feature3_1      = bits,    U08,    286,      [1:1], "Off", "On"
      feature3_3      = bits,    U08,    286,      [3:3], "Off", "On"
      feature3_pw4x   = bits,    U08,    286,      [4:4], "Normal", "4x"

;      XXlaunch_opt_pins = bits,    U08,    287,      [0:3], "INVALID", "Tableswitch", "PE0/JS7", "PE1", "JS10", "JS11", "JS5 (ADC6)", "JS4 (ADC7)", "Nitrous In", "Launch in", "Datalog In","INVALID","INVALID","INVALID","INVALID","INVALID"
      launch_opt_bank = bits,    U08,    287,      [4:5], "Off","Bank1", "Bank2", "Both"
      launch_opt_on   = bits,    U08,    287,      [6:7], "Off", "Launch","INVALID","Launch/Flatshift"
      launch_sft_lim  = scalar,  S16,    288,      "RPM",      1.00000,   0.00000,  0.00,  15000.0,      0 ; * (  2 bytes)
      launch_sft_deg  = scalar,  S16,    290,             "deg",      0.10000,   0.00000, -90.0,  180.00,      2 ; * (  2 bytes)
      launch_hrd_lim  = scalar,  S16,    292,             "RPM",      1.00000,   0.00000,  0.00,  15000.0,      0 ; * (  2 bytes)
      launch_tps      = scalar,  S16,    294,  "%",       0.10000,   0.00000,   0.0,  100.00,      0 ;
      launchlimopt    = bits  ,  U08,    296,      [0:1], "None", "Spark Cut", "Fuel Cut", "Spark and fuel"         ; * (  1 byte)
      launchcutx      = scalar,  U08,    297,  "",     1, 0, 0, 255, 0
      launchcuty      = scalar,  U08,    298,  "",     1, 0, 0, 255, 0
      launch_opt_pins = bits,  U08,    299,  [0:4], "INVALID", "Tableswitch", "PE0/JS7", "PE1", "JS10", "JS11", "JS5 (ADC6)", "JS4 (ADC7)", "Nitrous In", "Launch in", "Datalog In", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "CANIN1", "CANIN2", "CANIN3", "CANIN4", "CANIN5", "CANIN6", "CANIN7", "CANIN8", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID"
      flats_arm       = scalar,  S16,    300,      "RPM",      1.00000,   0.00000,  0.00,  5000.0,      0
      flats_sft       = scalar,  S16,    302,      "RPM",      1.00000,   0.00000,  0.00,  15000.0,      0 ; * (  2 bytes)
      flats_deg       = scalar,  S16,    304,      "deg",      0.10000,   0.00000, -90.0,  180.00,      2 ; * (  2 bytes)
      flats_hrd       = scalar,  S16,    306,      "RPM",      1.00000,   0.00000,  0.00,  15000.0,      0 ; * (  2 bytes)
      staged_pri_size = scalar,  U16,    308,      "cc",       1.00000, 0.00000, 0.0000, 15000.0,      0 ; * ( 2 bytes)
      staged_sec_size = scalar,  U16,    310,      "cc",       1.00000, 0.00000, 0.0000, 15000.0,      0 ; * ( 2 bytes)
      staged_first_param = bits, U08,   312,   [0:2], "Off", "RPM", "MAP", "TPS", "Duty", "Table", "INVALID", "INVALID"
      staged_second_param = bits, U08, 312,    [3:5], "Off", "RPM", "MAP", "TPS", "Duty", "INVALID", "INVALID", "INVALID"
      staged_transition_on = bits, U08, 312,   [6:6], "Off", "On"
      staged_second_logic = bits, U08, 312,   [7:7], "OR", "AND"
      staged_pw1_0 = bits, U08, 312, [7:7], "Off", "On"
      staged_transition_events = scalar, U08, 313, "ign events", 1.00000, 0.00000, 0.00, 255.0,  0
      staged_param_1 = scalar,   S16,    314, "units", 1.00000, 0.00000, 0.00, 25500.0, 0
      staged_param_2 = scalar,   S16,    316, "units", 1.00000, 0.00000, 0.00, 25500.0, 0
      staged_hyst_1 = scalar,    S16,    318, "units", 1.00000, 0.00000, 0.00, 25500.0, 0
      staged_hyst_2 = scalar,    S16,    320, "units", 1.00000, 0.00000, 0.00, 25500.0, 0

; Nitrous System
      N2Oopt_01     = bits,     U08, 322,[0:1],"INVALID","Bank1", "Bank2", "Both"
      N2Oopt_2      = bits,     U08, 322,[2:2], "Off", "On"  ; enables stage 1
      N2Oopt_3      = bits,     U08, 322,[3:3], "Off", "On"  ; enables stage 2
      N2Oopt_4      = bits,     U08, 322,[4:4], "Off", "On"  ; use AFR2
;      XXN2Oopt_pins   = bits,     U08, 322,[4:7], "INVALID", "Tableswitch", "PE0/JS7", "PE1", "JS10", "JS11", "JS5 (ADC6)", "JS4 (ADC7)", "Nitrous In", "Launch in", "Datalog In","INVALID","INVALID","INVALID","INVALID","INVALID"
;input and output pins moved
      N2Oopt2_prog  = bits,     U08, 323,[0:0], "On/Off", "Progressive"
      N2Oopt2_prog_time= bits,  U08, 323,[1:1], "RPM-based", "Time-based"
      N2Oopt2_prog_freq= bits,  U08, 323,[2:4], "INVALID", "78Hz", "39Hz", "26Hz", "19.5Hz", "15.6Hz", "13Hz", "11.1Hz"
      N2ORpm        = scalar,   U16, 324, "RPM",   1, 0, 1000, 25000, 0
      N2ORpmMax     = scalar,   U16, 326, "RPM",   1, 0, 1000, 25000, 0
      N2OTps        = scalar,   S16, 328, "%", 0.10000,   0.00000,  0.00,  100.00,      1;

#if CELSIUS
	#if EXPANDED_CLT_TEMP
      N2OClt        = scalar, S16, 330,             "°C",       0.05555,  -320.000, -40.0,  230.0,      1 ; * (  2 bytes)
	#else
      N2OClt        = scalar, S16, 330,             "°C",       0.05555,  -320.000, -40.0,  150.0,      1 ; * (  2 bytes)
	#endif
#else
	#if EXPANDED_CLT_TEMP
      N2OClt        = scalar, S16, 330,             "°F",       0.10000,   0.00000, -40.0,  450.0,      1
	#else
      N2OClt        = scalar, S16, 330,             "°F",       0.10000,   0.00000, -40.0,  300.0,      1
	#endif
#endif

      N2OAngle      = scalar,    S16, 332,             "deg",      0.10000,   0.00000, 0,  50,      2 ; * (  2 bytes)
#if PW_4X
      N2OPWLo       = scalar,    S16, 334, "ms",  0.004, 0, -128, +128, 3
      N2OPWHi       = scalar,    S16, 336, "ms",  0.004, 0, -128, +128, 3
#else
      N2OPWLo       = scalar,    S16, 334, "ms",  0.001, 0, -32, +32, 3
      N2OPWHi       = scalar,    S16, 336, "ms",  0.001, 0, -32, +32, 3
#endif

;nitrous/launch
      N2Odel_launch = scalar, U08,   338,       "s",         0.01, 0, 0, 2.55, 2
      N2Odel_flat   = scalar, U08,   339,       "s",         0.01, 0, 0, 2.55, 2
      N2Oholdon     = scalar, U08,   340,       "s",         0.01, 0, 0, 2.55, 2
;nitrous stage 2
; Nitrous System
      N2O2delay     = scalar, U08, 341, "s", 0.01, 0, 0, 2.55,2
      N2O2Rpm       = scalar, U16, 342, "RPM",   1, 0, 1000, 25000, 0
      N2O2RpmMax    = scalar, U16, 344, "RPM",   1, 0, 1000, 25000, 0
      N2O2Angle     = scalar, S16, 346,             "deg",      0.10000,   0.00000, 0,  50,      2 ; * (  2 bytes)
#if PW_4X
      N2O2PWLo      = scalar, S16, 348, "ms",  0.004, 0, -128, +128, 3
      N2O2PWHi      = scalar, S16, 350, "ms",  0.004, 0, -128, +128, 3
#else
      N2O2PWLo      = scalar, S16, 348, "ms",  0.001, 0, -32, +32, 3
      N2O2PWHi      = scalar, S16, 350, "ms",  0.001, 0, -32, +32, 3
#endif
      RotarySplitModeFD = bits, U08, 352, [0:0], "FC mode", "FD mode"
      RotarySplitModeNeg = bits, U08, 352, [1:1], "Not Allowed", "Allowed"
      RotarySplitModeRX8 = bits, U08, 352, [2:2], "Disabled", "RX8 mode"
      RotarySplitModeOn  = bits, U08, 352, [5:5], "Rotary off", "Rotary on"
      dlyct          = scalar, U08, 353, "", 1,0,0,255,0
      dwelltime_trl  = scalar,  U08, 354,             "ms",       0.10000,       0,        0.1,     25.5, 1
      N2Oopt_pins   = bits,     U08, 355, [0:4], "INVALID", "Tableswitch", "PE0/JS7", "PE1", "JS10", "JS11", "JS5 (ADC6)", "JS4 (ADC7)", "Nitrous In", "Launch in", "Datalog In", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "CANIN1", "CANIN2", "CANIN3", "CANIN4", "CANIN5", "CANIN6", "CANIN7", "CANIN8", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID"
      RevLimRtdAng    = scalar,  S16, 356,             "deg",      0.10000,   0.00000,-10,   25.5,      1
      RevLimNormal3   = scalar,  S16, 358,             "RPM",      1.00000,   0.00000,  0.00,  16000,       0
      RevLimNormal2_hyst= scalar,S16, 360,             "RPM",      1.00000,   0.00000,  0.00,  16500,       0
      pwmidleset_inv           = bits,   U08, 362, [3:3], "Normal, 0%=off", "Inverted, 100%=off"
      trig_init      = scalar, U08, 363, "", 1,0,0,255,0
;pwmidle
      pwmidle_ms               = scalar, U16, 364, "ms", 1, 0.00000, 0, 500, 0
      pwmidle_close_delay      = scalar, U08, 366, "sec", 1, 0.00000, 0, 10, 0
      pwmidle_open_duty        = scalar, U08, 367, "%", 0.39063, 0.00000, 0, 100, 1 
      pwmidle_open_steps       = scalar, U08, 367, "steps", 1.00000, 0.00000, 0, 255, 0 ; same but steps
      pwmidle_closed_duty      = scalar, U08, 368, "%", 0.39063, 0.00000, 0, 100, 1 
      pwmidle_closed_steps     = scalar, U08, 368, "steps", 1.00000, 0.00000, 0, 255, 0 ; same but steps
      pwmidle_pid_wait_timer   = scalar, U08, 369, "sec", 1, 0.00000, 0, 10, 0

      pwmidle_min_duty         = scalar, U08, 370, "%", 0.39063, 0.00000, 0, 255, 1 
      pwmidle_min_steps        = scalar, U08, 370, "steps", 1.00000, 0.00000, 0, 255, 0 ; same but steps
      pwmidle_engage_rpm_adder = scalar, U16, 371, "rpm", 1, 0.00000, 0, 32000, 0
      pwmidle_tps_threshold    = scalar, U16, 373, "%", 0.1, 0.00000, 0, 1000, 1
      pwmidle_dp_adder         = scalar, U08, 375, "%", 0.39063, 0.00000, 0, 20, 1 
      pwmidle_dp_adder_steps   = scalar, U08, 375, "steps", 1.00000, 0.00000, 0, 20, 0 ; same but steps
      pwmidle_rpmdot_threshold = scalar, U16, 376, "rpm/sec", 10.0, 0.00000, 0, 1000, 0
      pwmidle_decelload_threshold=scalar,U16, 378, "%", 0.1, 0.00000, 0, 100, 1
      pwmidle_Kp               = scalar, U16, 380, "%", 0.1, 0.00000, 0, 200, 1 
      pwmidle_Ki               = scalar, U16, 382, "%", 0.1, 0.00000, 0, 200, 1 
      pwmidle_Kd               = scalar, U16, 384, "%", 0.1, 0.00000, 0, 200, 1 
      pwmidle_freq_scale       = bits,   U08, 386, [0:3], "INVALID", "780Hz", "390Hz", "260Hz", "195Hz", "156Hz", "130Hz", "111Hz", "95Hz", "85Hz", "76Hz", "69Hz", "63Hz", "59Hz", "54Hz", "50Hz"
      pwmidle_freq             = bits,   U08, 386, [4:4], "1.5kHz", "Use reduced"
      pwmidle_freq_pin         = bits,   U08, 386, [5:5], "FIDLE", "Idle"
      pwmidle_freq_pin3        = bits,   U08, 386, [6:7], "Off", "FIDLE", "Boost", "VVT"
      boost_ctl_settings_freq  = bits,   U08, 387, [0:2], "INVALID", "78Hz", "39Hz", "26Hz", "19.5Hz", "15.6Hz", "13Hz", "11.1Hz"
      boost_ctl_settings_on    = bits,   U08, 387, [3:3], "Off","On"
      boost_ctl_settings_cl    = bits,   U08, 387, [4:4], "Open-loop", "Closed-loop"
      boost_ctl_settings_invert= bits,   U08, 387, [5:5], "Normal", "Inverted"
      boost_ctl_pins_pwm       = bits,   U08, 388, [5:7], "Boost", "Idle", "VVT", "Nitrous1", "Nitrous2", "Fidle", "INVALID", "INVALID"
      boost_ctl_pins           = bits,   U08, 388, [0:4], "Off", "IAC1", "IAC2", "FIDLE", "D15", "Nitrous 1", "Nitrous 2", "Tacho", "Idle", "Boost", "VVT", "Inj Bank 1", "Inj Bank 2", "D14", "D16", "JS11", "Inj A", "Inj B", "Inj C", "Inj D", "Inj E", "Inj F", "Inj G", "Inj H", "PT4", "IGN (JS10)", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID"
      boost_ctl_Kp             = scalar, U08, 389, "%", 1, 0.00000, 0, 200, 0
      boost_ctl_Ki             = scalar, U08, 390, "%", 1, 0.00000, 0, 200, 0
      boost_ctl_Kd             = scalar, U08, 391, "%", 1, 0.00000, 0, 200, 0
      boost_ctl_closeduty      = scalar, U08, 392, "%", 1, 0.00000, 0, 100, 0
      boost_ctl_openduty       = scalar, U08, 393, "%", 1, 0.00000, 0, 100, 0
      boost_ctl_ms             = scalar, U16, 394, "ms", 1, 0.00000, 10, 500, 0
      boost_ctl_pwm_scale      = bits,   U08, 396, [0:3], "INVALID", "780Hz", "390Hz", "260Hz", "195Hz", "156Hz", "130Hz", "111Hz", "95Hz", "85Hz", "76Hz", "69Hz", "63Hz", "59Hz", "54Hz", "50Hz" 
      boost_ctl_pwm            = bits,   U08, 396, [4:5], "1.5kHz", "Mid","Slow", "INVALID"

      NoiseFilterOpts = bits, U08, 397, [0:0], "Off", "On"
      NoiseFilterOpts1 = bits, U08, 397, [1:1], "Off", "On"
      NoiseFilterOpts2 = bits, U08, 397, [2:2], "Off", "On"
      NoiseFilterOpts3 = bits, U08, 397, [3:3], "Off", "On"
      pwmidle_min_rpm = scalar, U16, 398, "rpm", 1, 0.00000, 0, 2000, 0
      pwmidle_max_rpm = scalar, U16, 400, "rpm", 1, 0.00000, 0, 4000, 0
      pwmidle_targ_ramptime = scalar, U08, 402, "sec", 1, 0.00000, 0, 10, 0
      inj_time_mask  = scalar, U08, 403, "", 1,0,0,100,0
;accel wizard mini tables moved here to keep on one page  
      taeBins         = array ,  U08,    404,    [    4], "%",       1,   0.00000,  0.00,   255,      0 ; * (  4 bytes)
      maeBins         = array ,  U08,    408,    [    4], "%",       1,   0.00000,  0.00,   255,      0 ; * (  4 bytes)
      taeRates        = array ,  S16,    412,    [    4], "%/s",      0.10000,   0.00000,  0.00, 2000.00,      1 ; * (  8 bytes) tpsDot bins used for AE: x for TAE interpolation
      maeRates        = array ,  S16,    420,    [    4], "kPa/s",    1.00000,   0.00000,  0.00, 32767.0,      0 ; * (  8 bytes) mapDot bins used for AE: x for MAE
      secondtrigopts  = bits,    U08,    428,     [0:0],  "Off", "On"
      secondtrigopts1 = bits,    U08,    428,     [1:1],  "Off", "On"
      secondtrigopts2 = bits,    U08,    428,     [2:2],  "Off", "On"
      secondtrigopts3 = bits,    U08,    428,     [3:3],  "Off", "On"

      TC5_required_width = scalar, U16,  429,             "uSec",     1.0,   0.00000,  0.00,  5000,        0 ;
      egoLimit =        scalar,  S16,    431,             "%",        0.10000,   0.00000,  0.00,  100,         0 ;
      stoich =          scalar,  S16,    433,             "AFR",      0.10000,   0.00000,  0.00,  25.5,        1 ;
      MAPOXMin        = scalar,  S16,    435,             "%",      0.10000,   0.00000,  0.00,  300.00,      2 ; * (  2 bytes)
      IC2ISR_tmask     = scalar,  U08,    437,             "ms",       0.1,       0.0,      0.0,    25.5,       1 ; * (  1 byte )
      IC2ISR_pmask     = scalar,  U08,    438,             "%",        1.0,       0.0,      0.0,     90,       0 ; * (  1 byte )
      afrload =          bits,    U08,    439, [0:2], "Use primary load (Algorithm)", "MAP", "% baro", "TPS", "MAFMAP", "INVALID", "ITB", "INVALID"
      eaeload =          bits,    U08,    439, [4:6], "Use primary load (Algorithm)", "MAP", "% baro", "TPS", "MAFMAP", "INVALID", "ITB", "INVALID"


      airden_scaling  = scalar, U08, 440, "%", 1,   0.00000,  50,  150.00,      0
#if MPH
      fan_idleup_vss_hyst = scalar, U16, 441, "MPH", 0.22369, 0, 0,  200,         0
#else
      fan_idleup_vss_hyst = scalar, U16, 441, "KPH", 0.3600,  0, 0,  300,         0
#endif
      log_style_led = bits, U08, 443, [0:5], "Off", "IAC1", "IAC2", "FIDLE", "D15", "Nitrous 1", "Nitrous 2", "Tacho", "Idle", "Boost", "VVT", "Inj Bank 1", "Inj Bank 2", "D14", "D16", "JS11", "Inj A", "Inj B", "Inj C", "Inj D", "Inj E", "Inj F", "Inj G", "Inj H", "PT4", "IGN (JS10)", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "CANOUT1", "CANOUT2", "CANOUT3", "CANOUT4", "CANOUT5", "CANOUT6", "CANOUT7", "CANOUT8", "CANOUT9", "CANOUT10", "CANOUT11", "CANOUT12", "CANOUT13", "CANOUT14", "CANOUT15", "CANOUT16"

#if PW_4X
    staged_secondary_enrichment = scalar, U16, 455, "ms", 0.004, 0, 0, 10, 3
#else
    staged_secondary_enrichment = scalar, U16, 455, "ms", 0.001, 0, 0, 10, 3
#endif
    staged_primary_delay = scalar, U08, 457, "ign events", 1, 0, 0, 30, 0

      idleadvance_on  = bits, U08, 459, [0:0], "Off", "On" ;
      idleve_on       = bits, U08, 459, [1:1], "Off", "On"
      idleadvance_tps = scalar, S16, 460, "%", 0.1, 0, 0, 100, 1
      idleadvance_rpm = scalar, S16, 462, "rpm", 1, 0, 0, 3000, 0
      idleadvance_load = scalar, S16, 464, "%", 0.1, 0, 0, 100, 0
#if CELSIUS
	#if EXPANDED_CLT_TEMP
      idleadvance_clt = scalar, S16, 466, "°C", 0.05555, -320, -40, 230.00, 1
	#else
      idleadvance_clt = scalar, S16, 466, "°C", 0.05555, -320, -40, 150.00, 1
	#endif
#else
	#if EXPANDED_CLT_TEMP
      idleadvance_clt = scalar, S16, 466, "°F", 0.10000, 0.00000, -40, 450, 1
	#else
      idleadvance_clt = scalar, S16, 466, "°F", 0.10000, 0.00000, -40, 300, 1
	#endif
#endif
      idleadvance_delay = scalar, U08, 468, "sec", 1, 0, 0, 5, 0
      idleadvance_curve = array, S16, 469, [ 4 ],  "deg", 0.10000, 0.00000, -10.00, 90.00, 1 
      idleadvance_loads = array, S16, 477, [ 4 ],  "%", 0.10000, 0.00000, 0, 100, 1

;SD datalogging
      log_style2_but = bits, U08, 485, [0:4], "INVALID", "Tableswitch", "PE0/JS7", "PE1", "JS10", "JS11", "JS5 (ADC6)", "JS4 (ADC7)", "Nitrous In", "Launch in", "Datalog In", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "CANIN1", "CANIN2", "CANIN3", "CANIN4", "CANIN5", "CANIN6", "CANIN7", "CANIN8", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID"

      log_style_block = bits, U08, 486, [0:1], "64 byte", "64 byte + stream", "INVALID", "INVALID"
;      log_style_led = bits, U08, 486, [2:4], "Off", "IAC1", "IAC2", "FIDLE", "D15 (Middle LED)", "Nitrous1", "Nitrous2", "Tacho"
      log_style_on = bits, U08, 486, [6:7], "Disabled", "Insertion", "Button", "Button+WTF"
;      XXlog_style2_but = bits, U08, 487, [0:2], "Log button", "TableSwitch", "PE0/JS7", "PE1", "JS10", "JS11", "JS5 (ADC6)", "JS4 (ADC7)"
      log_style2_samp = bits, U08, 487, [3:4], "Timed", "every tooth", "every cycle", "INVALID"
      log_style2_clg  = bits, U08, 487, [5:5], "Off", "On"
      log_style3_adc  = bits, U08, 488, [0:2], "INT_MAP", "JS5 (ADC6)", "JS4 (ADC7)", "EXT_MAP (ADC11)", "EGO2 (ADC12)", "Spare ADC (ADC13)", "INVALID", "INVALID"
      log_length    = scalar, U08, 489, "mins", 1, 0, 1, 255, 0
      log_int = scalar, U16, 490, "ms", 0.128,0,3,8388,0
      logFieldOffset  = array ,  U16,    492,    [   64], "",      1.0000,   0.00000,  0.00,  255.00,      0 ; * ( 64 bytes)
      logFieldLength  = array ,  U08,    620,    [   64], "",      1.0000,   0.00000,  0.00,  255.00,      0 ; * ( 64 bytes)

      firea = scalar, U08, 684, "", 1,0,0,8,0
      fireb = scalar, U08, 685, "", 1,0,0,8,0
      firec = scalar, U08, 686, "", 1,0,0,8,0
      fired = scalar, U08, 687, "", 1,0,0,8,0
      firee = scalar, U08, 688, "", 1,0,0,8,0
      firef = scalar, U08, 689, "", 1,0,0,8,0
      fireg = scalar, U08, 690, "", 1,0,0,8,0
      fireh = scalar, U08, 691, "", 1,0,0,8,0

;pad for 8 more 
      sequential = bits, U08, 700, [0:1], "Off", "Semi-sequential", "Fully Sequential", "INVALID"
      sequential_angle_spec = bits, U08, 700, [2:4], "INVALID", "End of squirt", "Middle of Squirt",  "INVALID", "Beginning of squirt", "INVALID", "INVALID", "INVALID"
      sequential_trim_on_off = bits, U08, 700, [5:5], "Off", "On"
;      sequential_bank_trim = bits, U08, 700, [6:6], "Off", "On" ; no longer used

      boost_launch_duty = scalar, U08, 701, "%", 1,0,0,100,0
      boost_launch_target = scalar, U16, 702, "kPa" 1,0,0,400,0
      boost_feats_tsw     = bits,    U08,    704,      [0:4], "Off", "Tableswitch", "PE0/JS7", "PE1", "JS10", "JS11", "JS5 (ADC6)", "JS4 (ADC7)", "Nitrous In", "Launch in", "Datalog In", "INVALID", "INVALID", "INVALID", "INVALID","Gear-based", "CANIN1", "CANIN2", "CANIN3", "CANIN4", "CANIN5", "CANIN6", "CANIN7", "CANIN8", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID"
      boost_feats_launch  = bits,    U08,    704,      [5:5], "Off", "On"
      boost_feats_timed   = bits,    U08,    704,      [6:6], "Off", "On"
;see lower for launch_var_on
      launch_3step_in      = bits,  U08,     705,      [0:4], "Off", "Tableswitch", "PE0/JS7", "PE1", "JS10", "JS11", "JS5 (ADC6)", "JS4 (ADC7)", "Nitrous In", "Launch in", "Datalog In", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "CANIN1", "CANIN2", "CANIN3", "CANIN4", "CANIN5", "CANIN6", "CANIN7", "CANIN8", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID"
      launch_var_low      = scalar, U16,     706, "rpm", 1,0,0,15000,0
      launch_var_up       = scalar, U16,     708, "rpm", 1,0,0,15000,0
      launch_var_sof      = scalar, U16,     710, "rpm", 1,0,0,15000,0
      launch_sft_lim3     = scalar, S16,     712,      "RPM",      1.00000,   0.00000,  0.00,  15000.0,      0 ; * (  2 bytes)
      launch_sft_deg3     = scalar, S16,     714,      "deg",      0.10000,   0.00000, -90.0,  180.00,      2 ; * (  2 bytes)
      launch_hrd_lim3     = scalar, S16,     716,      "RPM",      1.00000,   0.00000,  0.00,  15000.0,      0 ; * (  2 bytes)
      map_sample_duration = scalar, S16,     718,      "deg",      0.10000,   0.00000,  0,     30,         1 ; * ( 2 bytes )
      opentime_opt1_master = bits, U08, 720, [7:7], "Same", "Individual"
      opentime_opt1    = bits, U08, 720, [0:1], "Curve 1", "Curve 2", "Curve 3", "Curve 4"
      opentime_opt2    = bits, U08, 721, [0:1], "Curve 1", "Curve 2", "Curve 3", "Curve 4"
      opentime_opt3    = bits, U08, 722, [0:1], "Curve 1", "Curve 2", "Curve 3", "Curve 4"
      opentime_opt4    = bits, U08, 723, [0:1], "Curve 1", "Curve 2", "Curve 3", "Curve 4"
      opentime_opt5    = bits, U08, 724, [0:1], "Curve 1", "Curve 2", "Curve 3", "Curve 4"
      opentime_opt6    = bits, U08, 725, [0:1], "Curve 1", "Curve 2", "Curve 3", "Curve 4"
      opentime_opt7    = bits, U08, 726, [0:1], "Curve 1", "Curve 2", "Curve 3", "Curve 4"
      opentime_opt8    = bits, U08, 727, [0:1], "Curve 1", "Curve 2", "Curve 3", "Curve 4"
      opentime_opta    = bits, U08, 728, [0:1], "Curve 1", "Curve 2", "Curve 3", "Curve 4"
      opentime_opta_pwm= bits, U08, 728, [4:4], "Off", "On"
      opentime_optb    = bits, U08, 729, [0:1], "Curve 1", "Curve 2", "Curve 3", "Curve 4"
      opentime_optb_pwm= bits, U08, 729, [4:4], "Off", "On"
      opentime_optb_own= bits, U08, 729, [5:5], "Off", "On"
;next 8 not yet used
      opentime_opt11    = bits, U08, 730, [0:1], "Curve 1", "Curve 2", "Curve 3", "Curve 4"
      opentime_opt12    = bits, U08, 731, [0:1], "Curve 1", "Curve 2", "Curve 3", "Curve 4"
      opentime_opt13    = bits, U08, 732, [0:1], "Curve 1", "Curve 2", "Curve 3", "Curve 4"
      opentime_opt14    = bits, U08, 733, [0:1], "Curve 1", "Curve 2", "Curve 3", "Curve 4"
      opentime_opt15    = bits, U08, 734, [0:1], "Curve 1", "Curve 2", "Curve 3", "Curve 4"
      opentime_opt16    = bits, U08, 735, [0:1], "Curve 1", "Curve 2", "Curve 3", "Curve 4"
      opentime_opt17    = bits, U08, 736, [0:1], "Curve 1", "Curve 2", "Curve 3", "Curve 4"
      opentime_opt18    = bits, U08, 737, [0:1], "Curve 1", "Curve 2", "Curve 3", "Curve 4"

      smallpw_opt1_master = bits, U08, 738, [7:7], "Off", "On"
      smallpw_opt1    = bits, U08, 738, [0:1], "Curve 1", "Curve 2", "Curve 3", "Curve 4"
      smallpw_opt2    = bits, U08, 739, [0:1], "Curve 1", "Curve 2", "Curve 3", "Curve 4"
      smallpw_opt3    = bits, U08, 740, [0:1], "Curve 1", "Curve 2", "Curve 3", "Curve 4"
      smallpw_opt4    = bits, U08, 741, [0:1], "Curve 1", "Curve 2", "Curve 3", "Curve 4"
      smallpw_opt5    = bits, U08, 742, [0:1], "Curve 1", "Curve 2", "Curve 3", "Curve 4"
      smallpw_opt6    = bits, U08, 743, [0:1], "Curve 1", "Curve 2", "Curve 3", "Curve 4"
      smallpw_opt7    = bits, U08, 744, [0:1], "Curve 1", "Curve 2", "Curve 3", "Curve 4"
      smallpw_opt8    = bits, U08, 745, [0:1], "Curve 1", "Curve 2", "Curve 3", "Curve 4"
      smallpw_opta    = bits, U08, 746, [0:1], "Curve 1", "Curve 2", "Curve 3", "Curve 4"
      smallpw_optb    = bits, U08, 747, [0:1], "Curve 1", "Curve 2", "Curve 3", "Curve 4"
;next 8 not yet used
      smallpw_opt11   = bits, U08, 748, [0:1], "Curve 1", "Curve 2", "Curve 3", "Curve 4"
      smallpw_opt12   = bits, U08, 749, [0:1], "Curve 1", "Curve 2", "Curve 3", "Curve 4"
      smallpw_opt13   = bits, U08, 750, [0:1], "Curve 1", "Curve 2", "Curve 3", "Curve 4"
      smallpw_opt14   = bits, U08, 751, [0:1], "Curve 1", "Curve 2", "Curve 3", "Curve 4"
      smallpw_opt15   = bits, U08, 752, [0:1], "Curve 1", "Curve 2", "Curve 3", "Curve 4"
      smallpw_opt16   = bits, U08, 753, [0:1], "Curve 1", "Curve 2", "Curve 3", "Curve 4"
      smallpw_opt17   = bits, U08, 754, [0:1], "Curve 1", "Curve 2", "Curve 3", "Curve 4"
      smallpw_opt18   = bits, U08, 755, [0:1], "Curve 1", "Curve 2", "Curve 3", "Curve 4"

      maxafr_opt1_on = bits, U08, 756, [0:0], "Off", "On"
      maxafr_opt1_load= bits,U08, 756, [1:2], "MAP", "TPS", "INVALID", "INVALID"
;this next line has 17 options in the space for 16 ?!
      maxafr_opt1_led = bits,U08, 757, [0:5], "Off", "IAC1", "IAC2", "FIDLE", "D15", "Nitrous 1", "Nitrous 2", "Tacho", "Idle", "Boost", "VVT", "Inj Bank 1", "Inj Bank 2", "D14", "D16", "JS11", "Inj A", "Inj B", "Inj C", "Inj D", "Inj E", "Inj F", "Inj G", "Inj H", "PT4", "IGN (JS10)", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "CANOUT1", "CANOUT2", "CANOUT3", "CANOUT4", "CANOUT5", "CANOUT6", "CANOUT7", "CANOUT8", "CANOUT9", "CANOUT10", "CANOUT11", "CANOUT12", "CANOUT13", "CANOUT14", "CANOUT15", "CANOUT16"
      maxafr_en_load   = scalar, U16,    758,    "%",    0.10000, 0,       0,      400,   1
      maxafr_en_rpm    = scalar, U16,    760,    "rpm",  1,       0,       0,      65535, 0
      maxafr_en_time   = scalar, U16,    762,    "s",  0.001,     0,       0,      5.000, 1
      maxafr_spkcut_time=scalar, U16,    764,    "s",  0.001,     0,       0,      5.000, 2
      maxafr_ret_tps   = scalar, U16,    766,    "%",    0.10000, 0,       0,      110,   1
      maxafr_ret_map   = scalar, U16,    768,    "%",    0.10000, 0,       0,      410,   1
      maxafr_ret_rpm   = scalar, U16,    770,    "rpm",  1,       0,       0,      15000, 1
#if PW_4X
      launch_addfuel   = scalar, S16,    772,     "ms",  0.004,   0.0000,  -128,      +128, 3
#else
      launch_addfuel   = scalar, S16,    772,     "ms",  0.001,   0.0000,  -32,      +32, 3
#endif
#if METRES
      wheeldia1        = scalar,  U16,    774,     "m",   0.001, 0, 0.3, 2, 3
      wheeldia2        = scalar,  U16,    778,     "m",   0.001, 0, 0.3, 2, 3
#else ; inches
      wheeldia1        = scalar,  U16,    774,     "in",   0.039370, 0, 12, 79, 1
      wheeldia2        = scalar,  U16,    778,     "in",   0.039370, 0, 12, 79, 1
#endif
      fdratio1         = scalar,  U16,    776,      ":1",      0.01,   0.00000,  0.40,  6.0,      2 ; * (  2 bytes)
;not a gap
      vss1_pos         = bits,    U08,    780, [0:0], "Wheel", "Driveline"
      vss2_pos         = bits,    U08,    780, [1:1], "Wheel", "Driveline"
      launch_var_on      = bits,   U08,  781, [0:4], "Off", "JS5 (ADC6)", "JS4 (ADC7)", "EXT_MAP (ADC11)", "EGO2 (ADC12)", "Spare ADC (ADC13)", "INVALID", "INVALID", "CAN ADC01", "CAN ADC02", "CAN ADC03", "CAN ADC04", "CAN ADC05", "CAN ADC06", "CAN ADC07", "CAN ADC08", "CAN ADC09", "CAN ADC10", "CAN ADC11", "CAN ADC12", "CAN ADC13", "CAN ADC14", "CAN ADC15", "CAN ADC16", "CAN ADC17", "CAN ADC18", "CAN ADC19", "CAN ADC20", "CAN ADC21", "CAN ADC22", "CAN ADC23", "CAN ADC24"
      reluctorteeth1   = scalar,  U08,    782,      "",        1, 0,0,255,0
      reluctorteeth2   = scalar,  U08,    783,      "",        1, 0,0,255,0
      vss_opt1         = bits,    U08,    784, [0:3], "Off", "PH6 Tableswitch in", "PH7 Nitrous in", "PT4 Spare in", "PT6 Datalog in", "PT2 Cam in", "PT5 JS10", "PE0 JS7", "PE1", "PE2 Flex", "JS5 (ADC6)", "JS4 (ADC7)", "PK2 Launch in", "INVALID", "CAN VSS", "Use CAN PWMin"
      vss_opt2         = bits,    U08,    784, [4:7], "Off", "PH6 Tableswitch in", "PH7 Nitrous in", "PT4 Spare in", "PT6 Datalog in", "PT2 Cam in", "PT5 JS10", "PE0 JS7", "PE1", "PE2 Flex", "JS5 (ADC6)", "JS4 (ADC7)", "PK2 Launch in", "INVALID", "CAN VSS", "Use CAN PWMin"
      vss1_an          = bits,    U08,   785,[0:4], "Off", "JS5 (ADC6)", "JS4 (ADC7)", "EXT_MAP (ADC11)", "EGO2 (ADC12)", "Spare ADC (ADC13)", "INVALID", "INVALID", "CAN ADC01", "CAN ADC02", "CAN ADC03", "CAN ADC04", "CAN ADC05", "CAN ADC06", "CAN ADC07", "CAN ADC08", "CAN ADC09", "CAN ADC10", "CAN ADC11", "CAN ADC12", "CAN ADC13", "CAN ADC14", "CAN ADC15", "CAN ADC16", "CAN ADC17", "CAN ADC18", "CAN ADC19", "CAN ADC20", "CAN ADC21", "CAN ADC22", "CAN ADC23", "CAN ADC24"
      vss1_can_id      = scalar, U08,    786,            "",        1.00000,   0.00000,  0.00,  255,      0 ;
      tsw_pin_ob       = bits,   U08,    787,      [0:4], "Off", "Tableswitch", "PE0/JS7", "PE1", "JS10", "JS11", "JS5 (ADC6)", "JS4 (ADC7)", "Nitrous In", "Launch in", "Datalog In", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "CANIN1", "CANIN2", "CANIN3", "CANIN4", "CANIN5", "CANIN6", "CANIN7", "CANIN8", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID"
      vss1_can_offset  = scalar, U16,    788,            "",        1.00000,   0.00000,  0.00,  65535,      0 ;
      vss2_can_offset  = scalar, U16,    790,            "",        1.00000,   0.00000,  0.00,  65535,      0 ;
      MapThreshXTD     = scalar, U08,    792,    "-kpa/sec", 1.00000,   0.00000,  0.00,  255.00,      0  ;
      MapThreshXTD2    = scalar, U08,    793,    "-kpa/sec", 1.00000,   0.00000,  0.00,  255.00,      0  ;
      reluctorteeth3   = scalar, U08,    794,      "",        1, 0,0,255,0
      reluctorteeth4   = scalar, U08,    795,      "",        1, 0,0,255,0
      ss_opt1          = bits,   U08,    796, [0:3], "Off", "PH6 Tableswitch in", "PH7 Nitrous in", "PT4 Spare in", "PT6 Datalog in", "PT2 Cam in", "PT5 JS10", "PE0 JS7", "PE1", "PE2 Flex", "ADC6 JS5", "ADC7 JS4", "PK2 Launch in", "INVALID", "INVALID", "Poll CAN"
      ss_opt2          = bits,   U08,    796, [4:7], "Off", "PH6 Tableswitch in", "PH7 Nitrous in", "PT4 Spare in", "PT6 Datalog in", "PT2 Cam in", "PT5 JS10", "PE0 JS7", "PE1", "PE2 Flex", "ADC6 JS5", "ADC7 JS4", "PK2 Launch in", "INVALID", "INVALID", "Poll CAN"
      vss2_an          = bits,    U08,   797,[0:4], "Off", "JS5 (ADC6)", "JS4 (ADC7)", "EXT_MAP (ADC11)", "EGO2 (ADC12)", "Spare ADC (ADC13)", "INVALID", "INVALID", "CAN ADC01", "CAN ADC02", "CAN ADC03", "CAN ADC04", "CAN ADC05", "CAN ADC06", "CAN ADC07", "CAN ADC08", "CAN ADC09", "CAN ADC10", "CAN ADC11", "CAN ADC12", "CAN ADC13", "CAN ADC14", "CAN ADC15", "CAN ADC16", "CAN ADC17", "CAN ADC18", "CAN ADC19", "CAN ADC20", "CAN ADC21", "CAN ADC22", "CAN ADC23", "CAN ADC24"
      ss1_pwmseq   =   scalar,  U08,    798,      "",    1.00000,   0.00000,     1,   4,       0
      ss2_pwmseq   =   scalar,  U08,    799,      "",    1.00000,   0.00000,     1,   4,       0
      gear_can_offset   = scalar, U16,    800,            "",        1.00000,   0.00000,  0.00,  65535,      0 ;
      mapsample_opt1  = bits,    U08,    802,      [0:1], "1", "2", "4", "INVALID"
;pad
      n2o1n_pins       = bits,   U08, 804,[0:4], "INVALID", "IAC1", "IAC2", "FIDLE", "D15", "Nitrous 1", "Nitrous 2", "Tacho", "Idle", "Boost", "VVT", "Inj Bank 1", "Inj Bank 2", "D14", "D16", "JS11", "Inj A", "Inj B", "Inj C", "Inj D", "Inj E", "Inj F", "Inj G", "Inj H", "PT4", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID"
      n2o1f_pins       = bits,   U08, 805,[0:4], "Same", "IAC1", "IAC2", "FIDLE", "D15", "Nitrous 1", "Nitrous 2", "Tacho", "Idle", "Boost", "VVT", "Inj Bank 1", "Inj Bank 2", "D14", "D16", "JS11", "Inj A", "Inj B", "Inj C", "Inj D", "Inj E", "Inj F", "Inj G", "Inj H", "PT4", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" 
      n2o2n_pins       = bits,   U08, 806,[0:4], "INVALID", "IAC1", "IAC2", "FIDLE", "D15", "Nitrous 1", "Nitrous 2", "Tacho", "Idle", "Boost", "VVT", "Inj Bank 1", "Inj Bank 2", "D14", "D16", "JS11", "Inj A", "Inj B", "Inj C", "Inj D", "Inj E", "Inj F", "Inj G", "Inj H", "PT4", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" 
      n2o2f_pins       = bits,   U08, 807,[0:4], "Same", "IAC1", "IAC2", "FIDLE", "D15", "Nitrous 1", "Nitrous 2", "Tacho", "Idle", "Boost", "VVT", "Inj Bank 1", "Inj Bank 2", "D14", "D16", "JS11", "Inj A", "Inj B", "Inj C", "Inj D", "Inj E", "Inj F", "Inj G", "Inj H", "PT4", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID"
#if MPH
      vss1_an_max      = scalar, U16,   808, "MPH",        0.22369,   0.00000,  0.00,  1000,      0 
      vss2_an_max      = scalar, U16,   810, "MPH",        0.22369,   0.00000,  0.00,  1000,      0 
#else
      vss1_an_max      = scalar, U16,   808, "KPH",        0.3600,   0.00000,  0.00,  1600,      0 
      vss2_an_max      = scalar, U16,   810, "KPH",        0.3600,   0.00000,  0.00,  1600,      0 
#endif
      tsw_pin_rf       = bits,   U08,    812,      [0:4], "Off", "Tableswitch", "PE0/JS7", "PE1", "JS10", "JS11", "JS5 (ADC6)", "JS4 (ADC7)", "Nitrous In", "Launch in", "Datalog In", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "CANIN1", "CANIN2", "CANIN3", "CANIN4", "CANIN5", "CANIN6", "CANIN7", "CANIN8", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID"
      tsw_pin_afr      = bits,   U08,    813,      [0:4], "Off", "Tableswitch", "PE0/JS7", "PE1", "JS10", "JS11", "JS5 (ADC6)", "JS4 (ADC7)", "Nitrous In", "Launch in", "Datalog In", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "CANIN1", "CANIN2", "CANIN3", "CANIN4", "CANIN5", "CANIN6", "CANIN7", "CANIN8", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID"
      tsw_pin_stoich   = bits,   U08,    814,      [0:4], "Off", "Tableswitch", "PE0/JS7", "PE1", "JS10", "JS11", "JS5 (ADC6)", "JS4 (ADC7)", "Nitrous In", "Launch in", "Datalog In", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "CANIN1", "CANIN2", "CANIN3", "CANIN4", "CANIN5", "CANIN6", "CANIN7", "CANIN8", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID"
      boost_vss        = bits,   U08,    815,      [0:1], "Off", "VSS1", "VSS2", "INVALID"
#if PW_4X
      ReqFuel_alt      = scalar,  U16,    816,             "ms",       0.004,   0.00000,  0.00,  262.143,      2
#else
      ReqFuel_alt      = scalar,  U16,    816,             "ms",       0.001,   0.00000,  0.00,  65.535,      2
#endif
      stoich_alt       = scalar,  S16,    818,             "AFR",      0.10000,   0.00000,  0.00,  25.5,        1
      
      water_pins_pump  = bits,      U08, 820,[0:4], "Off", "IAC1", "IAC2", "FIDLE", "D15", "Nitrous 1", "Nitrous 2", "Tacho", "Idle", "Boost", "VVT", "Inj Bank 1", "Inj Bank 2", "D14", "D16", "JS11", "Inj A", "Inj B", "Inj C", "Inj D", "Inj E", "Inj F", "Inj G", "Inj H", "PT4", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID"
      water_pins_valve = bits,      U08, 821,[0:4], "Off", "IAC1", "IAC2", "FIDLE", "D15", "Nitrous 1", "Nitrous 2", "Tacho", "Idle", "Boost", "VVT", "Inj Bank 1", "Inj Bank 2", "D14", "D16", "JS11", "Inj A", "Inj B", "Inj C", "Inj D", "Inj E", "Inj F", "Inj G", "Inj H", "PT4", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID"
      water_pins_in_shut = bits,    U08, 822,[0:3], "Off", "Tableswitch", "PE0/JS7", "PE1", "JS10", "JS11", "JS5 (ADC6)", "JS4 (ADC7)", "Launch in", "Datalog in", "INVALID","INVALID","INVALID","INVALID","INVALID","INVALID"
      water_pins_in_on = bits,      U08, 822,[4:4], "Off", "On"
      water_pins_in_type= bits,     U08, 822,[5:6], "Off", "Fast", "Slow", "INVALID"
      water_freq        = bits,     U08, 823,[0:2], "INVALID", "78Hz", "39Hz", "26Hz", "19.5Hz", "15.6Hz", "13Hz", "11.1Hz"
      boost_vss_tps     = scalar,   U16, 824, "%", 0.1, 0, 0, 100, 0
      water_tps         = scalar,   U16, 826, "%", 0.1, 0, 0, 100, 0
      water_rpm         = scalar,   U16, 828, "RPM", 1, 0, 0, 15000, 0
      water_map         = scalar,   U16, 830, "kPa", 0.1, 0, 0, 400, 1
#if CELSIUS
      water_mat         = scalar,   S16, 832, "°C", 0.05555, -320, -40, 150.00, 1
#else
      water_mat         = scalar,   S16, 832, "°F", 0.10000, 0.00000, -40, 300, 1
#endif
      pwmidle_rpmdot_disablepid = scalar, S16, 834, "", 10.0000, 0.00000, 0, 1000, 0
      boost_ctl_lowerlimit =      scalar, S16, 836, "%",0.10000, 0.00000, 100, 400, 1

	  enable_pollADC =  bits,    U08,    838,      [0:0], "Disable", "Enable"
	  enable_pollPWM =  bits,    U08,    838,      [1:2], "Disable", "16bit", "32bit", "INVALID"
	  enable_pollports_digin = bits, U08,838,      [3:3], "Disable", "Enable"
	  enable_pollports_digout = bits,U08,838,      [4:5], "Disable", "One", "Two", "INVALID"
	  enable_pwmout           = bits,U08,838,      [6:6], "Disable", "Enable"
;	  enable_poll_rtc         = bits,U08,838,      [7:7], "Disable", "Enable"

	  poll_table_rtc =   scalar,  U08,    839,             "",         1.00000,   0.00000,     0,     15,       0
	  poll_tablePWM =   scalar,  U08,    840,             "",         1.00000,   0.00000,     0,     15,       0 ; * (  1 byte)
	  poll_tableports = scalar,  U08,    841,             "",         1.00000,   0.00000,     0,     15,       0 ; * (  1 byte)
	  poll_offset_rtc =  scalar,  S16,    842,             "bytes",    1.00000,   0.00000,     0,   4095,       0
	  poll_offsetPWM =  scalar,  S16,    844,             "bytes",    1.00000,   0.00000,     0,   4095,       0 ;
	  can_poll_digin_offset = scalar, S16, 846,             "bytes",    1.00000,   0.00000,     0,   4095,       0 ;
	  can_poll_digout_offset = scalar, S16, 848,             "bytes",    1.00000,   0.00000,     0,   4095,       0 ;

      egt_num =         bits,    U08,    850,      [0:3], "Off", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "INVALID", "INVALID", "INVALID"
      accXport       =   bits,  U08,    851,    [0:4], "Off", "JS5 (ADC6)", "JS4 (ADC7)", "EXT_MAP (ADC11)", "EGO2 (ADC12)", "Spare ADC (ADC13)", "INVALID", "INVALID", "CAN ADC01", "CAN ADC02", "CAN ADC03", "CAN ADC04", "CAN ADC05", "CAN ADC06", "CAN ADC07", "CAN ADC08", "CAN ADC09", "CAN ADC10", "CAN ADC11", "CAN ADC12", "CAN ADC13", "CAN ADC14", "CAN ADC15", "CAN ADC16", "CAN ADC17", "CAN ADC18", "CAN ADC19", "CAN ADC20", "CAN ADC21", "CAN ADC22", "CAN ADC23", "CAN ADC24"
      accYport       =   bits,  U08,    852,    [0:4], "Off", "JS5 (ADC6)", "JS4 (ADC7)", "EXT_MAP (ADC11)", "EGO2 (ADC12)", "Spare ADC (ADC13)", "INVALID", "INVALID", "CAN ADC01", "CAN ADC02", "CAN ADC03", "CAN ADC04", "CAN ADC05", "CAN ADC06", "CAN ADC07", "CAN ADC08", "CAN ADC09", "CAN ADC10", "CAN ADC11", "CAN ADC12", "CAN ADC13", "CAN ADC14", "CAN ADC15", "CAN ADC16", "CAN ADC17", "CAN ADC18", "CAN ADC19", "CAN ADC20", "CAN ADC21", "CAN ADC22", "CAN ADC23", "CAN ADC24"
      accZport       =   bits,  U08,    853,    [0:4], "Off", "JS5 (ADC6)", "JS4 (ADC7)", "EXT_MAP (ADC11)", "EGO2 (ADC12)", "Spare ADC (ADC13)", "INVALID", "INVALID", "CAN ADC01", "CAN ADC02", "CAN ADC03", "CAN ADC04", "CAN ADC05", "CAN ADC06", "CAN ADC07", "CAN ADC08", "CAN ADC09", "CAN ADC10", "CAN ADC11", "CAN ADC12", "CAN ADC13", "CAN ADC14", "CAN ADC15", "CAN ADC16", "CAN ADC17", "CAN ADC18", "CAN ADC19", "CAN ADC20", "CAN ADC21", "CAN ADC22", "CAN ADC23", "CAN ADC24"
      accXcal1       = scalar,  S16,    854,    "ADC", 1, 0, 0, 4095, 0
      accXcal2       = scalar,  S16,    856,    "ADC", 1, 0, 0, 4095, 0
      accYcal1       = scalar,  S16,    858,    "ADC", 1, 0, 0, 4095, 0
      accYcal2       = scalar,  S16,    860,    "ADC", 1, 0, 0, 4095, 0
      accZcal1       = scalar,  S16,    862,    "ADC", 1, 0, 0, 4095, 0
      accZcal2       = scalar,  S16,    864,    "ADC", 1, 0, 0, 4095, 0
      accxyzLF       = scalar,  U08,    866,    "%",   1, 0, 0,  100, 0
      egt1port       =   bits,  U08,    867,    [0:4], "Off", "JS5 (ADC6)", "JS4 (ADC7)", "EXT_MAP (ADC11)", "EGO2 (ADC12)", "Spare ADC (ADC13)", "INVALID", "INVALID", "CAN ADC01", "CAN ADC02", "CAN ADC03", "CAN ADC04", "CAN ADC05", "CAN ADC06", "CAN ADC07", "CAN ADC08", "CAN ADC09", "CAN ADC10", "CAN ADC11", "CAN ADC12", "CAN ADC13", "CAN ADC14", "CAN ADC15", "CAN ADC16", "CAN ADC17", "CAN ADC18", "CAN ADC19", "CAN ADC20", "CAN ADC21", "CAN ADC22", "CAN ADC23", "CAN ADC24"
      egt2port       =   bits,  U08,    868,    [0:4], "Off", "JS5 (ADC6)", "JS4 (ADC7)", "EXT_MAP (ADC11)", "EGO2 (ADC12)", "Spare ADC (ADC13)", "INVALID", "INVALID", "CAN ADC01", "CAN ADC02", "CAN ADC03", "CAN ADC04", "CAN ADC05", "CAN ADC06", "CAN ADC07", "CAN ADC08", "CAN ADC09", "CAN ADC10", "CAN ADC11", "CAN ADC12", "CAN ADC13", "CAN ADC14", "CAN ADC15", "CAN ADC16", "CAN ADC17", "CAN ADC18", "CAN ADC19", "CAN ADC20", "CAN ADC21", "CAN ADC22", "CAN ADC23", "CAN ADC24"
      egt3port       =   bits,  U08,    869,    [0:4], "Off", "JS5 (ADC6)", "JS4 (ADC7)", "EXT_MAP (ADC11)", "EGO2 (ADC12)", "Spare ADC (ADC13)", "INVALID", "INVALID", "CAN ADC01", "CAN ADC02", "CAN ADC03", "CAN ADC04", "CAN ADC05", "CAN ADC06", "CAN ADC07", "CAN ADC08", "CAN ADC09", "CAN ADC10", "CAN ADC11", "CAN ADC12", "CAN ADC13", "CAN ADC14", "CAN ADC15", "CAN ADC16", "CAN ADC17", "CAN ADC18", "CAN ADC19", "CAN ADC20", "CAN ADC21", "CAN ADC22", "CAN ADC23", "CAN ADC24"
      egt4port       =   bits,  U08,    870,    [0:4], "Off", "JS5 (ADC6)", "JS4 (ADC7)", "EXT_MAP (ADC11)", "EGO2 (ADC12)", "Spare ADC (ADC13)", "INVALID", "INVALID", "CAN ADC01", "CAN ADC02", "CAN ADC03", "CAN ADC04", "CAN ADC05", "CAN ADC06", "CAN ADC07", "CAN ADC08", "CAN ADC09", "CAN ADC10", "CAN ADC11", "CAN ADC12", "CAN ADC13", "CAN ADC14", "CAN ADC15", "CAN ADC16", "CAN ADC17", "CAN ADC18", "CAN ADC19", "CAN ADC20", "CAN ADC21", "CAN ADC22", "CAN ADC23", "CAN ADC24"
      egt5port       =   bits,  U08,    871,    [0:4], "Off", "JS5 (ADC6)", "JS4 (ADC7)", "EXT_MAP (ADC11)", "EGO2 (ADC12)", "Spare ADC (ADC13)", "INVALID", "INVALID", "CAN ADC01", "CAN ADC02", "CAN ADC03", "CAN ADC04", "CAN ADC05", "CAN ADC06", "CAN ADC07", "CAN ADC08", "CAN ADC09", "CAN ADC10", "CAN ADC11", "CAN ADC12", "CAN ADC13", "CAN ADC14", "CAN ADC15", "CAN ADC16", "CAN ADC17", "CAN ADC18", "CAN ADC19", "CAN ADC20", "CAN ADC21", "CAN ADC22", "CAN ADC23", "CAN ADC24"
      egt6port       =   bits,  U08,    872,    [0:4], "Off", "JS5 (ADC6)", "JS4 (ADC7)", "EXT_MAP (ADC11)", "EGO2 (ADC12)", "Spare ADC (ADC13)", "INVALID", "INVALID", "CAN ADC01", "CAN ADC02", "CAN ADC03", "CAN ADC04", "CAN ADC05", "CAN ADC06", "CAN ADC07", "CAN ADC08", "CAN ADC09", "CAN ADC10", "CAN ADC11", "CAN ADC12", "CAN ADC13", "CAN ADC14", "CAN ADC15", "CAN ADC16", "CAN ADC17", "CAN ADC18", "CAN ADC19", "CAN ADC20", "CAN ADC21", "CAN ADC22", "CAN ADC23", "CAN ADC24"
      egt7port       =   bits,  U08,    873,    [0:4], "Off", "JS5 (ADC6)", "JS4 (ADC7)", "EXT_MAP (ADC11)", "EGO2 (ADC12)", "Spare ADC (ADC13)", "INVALID", "INVALID", "CAN ADC01", "CAN ADC02", "CAN ADC03", "CAN ADC04", "CAN ADC05", "CAN ADC06", "CAN ADC07", "CAN ADC08", "CAN ADC09", "CAN ADC10", "CAN ADC11", "CAN ADC12", "CAN ADC13", "CAN ADC14", "CAN ADC15", "CAN ADC16", "CAN ADC17", "CAN ADC18", "CAN ADC19", "CAN ADC20", "CAN ADC21", "CAN ADC22", "CAN ADC23", "CAN ADC24"
      egt8port       =   bits,  U08,    874,    [0:4], "Off", "JS5 (ADC6)", "JS4 (ADC7)", "EXT_MAP (ADC11)", "EGO2 (ADC12)", "Spare ADC (ADC13)", "INVALID", "INVALID", "CAN ADC01", "CAN ADC02", "CAN ADC03", "CAN ADC04", "CAN ADC05", "CAN ADC06", "CAN ADC07", "CAN ADC08", "CAN ADC09", "CAN ADC10", "CAN ADC11", "CAN ADC12", "CAN ADC13", "CAN ADC14", "CAN ADC15", "CAN ADC16", "CAN ADC17", "CAN ADC18", "CAN ADC19", "CAN ADC20", "CAN ADC21", "CAN ADC22", "CAN ADC23", "CAN ADC24"
      egt9port       =   bits,  U08,    875,    [0:4], "Off", "JS5 (ADC6)", "JS4 (ADC7)", "EXT_MAP (ADC11)", "EGO2 (ADC12)", "Spare ADC (ADC13)", "INVALID", "INVALID", "CAN ADC01", "CAN ADC02", "CAN ADC03", "CAN ADC04", "CAN ADC05", "CAN ADC06", "CAN ADC07", "CAN ADC08", "CAN ADC09", "CAN ADC10", "CAN ADC11", "CAN ADC12", "CAN ADC13", "CAN ADC14", "CAN ADC15", "CAN ADC16", "CAN ADC17", "CAN ADC18", "CAN ADC19", "CAN ADC20", "CAN ADC21", "CAN ADC22", "CAN ADC23", "CAN ADC24"
      egt10port       =   bits,  U08,    876,    [0:4], "Off", "JS5 (ADC6)", "JS4 (ADC7)", "EXT_MAP (ADC11)", "EGO2 (ADC12)", "Spare ADC (ADC13)", "INVALID", "INVALID", "CAN ADC01", "CAN ADC02", "CAN ADC03", "CAN ADC04", "CAN ADC05", "CAN ADC06", "CAN ADC07", "CAN ADC08", "CAN ADC09", "CAN ADC10", "CAN ADC11", "CAN ADC12", "CAN ADC13", "CAN ADC14", "CAN ADC15", "CAN ADC16", "CAN ADC17", "CAN ADC18", "CAN ADC19", "CAN ADC20", "CAN ADC21", "CAN ADC22", "CAN ADC23", "CAN ADC24"
      egt11port       =   bits,  U08,    877,    [0:4], "Off", "JS5 (ADC6)", "JS4 (ADC7)", "EXT_MAP (ADC11)", "EGO2 (ADC12)", "Spare ADC (ADC13)", "INVALID", "INVALID", "CAN ADC01", "CAN ADC02", "CAN ADC03", "CAN ADC04", "CAN ADC05", "CAN ADC06", "CAN ADC07", "CAN ADC08", "CAN ADC09", "CAN ADC10", "CAN ADC11", "CAN ADC12", "CAN ADC13", "CAN ADC14", "CAN ADC15", "CAN ADC16", "CAN ADC17", "CAN ADC18", "CAN ADC19", "CAN ADC20", "CAN ADC21", "CAN ADC22", "CAN ADC23", "CAN ADC24"
      egt12port       =   bits,  U08,    878,    [0:4], "Off", "JS5 (ADC6)", "JS4 (ADC7)", "EXT_MAP (ADC11)", "EGO2 (ADC12)", "Spare ADC (ADC13)", "INVALID", "INVALID", "CAN ADC01", "CAN ADC02", "CAN ADC03", "CAN ADC04", "CAN ADC05", "CAN ADC06", "CAN ADC07", "CAN ADC08", "CAN ADC09", "CAN ADC10", "CAN ADC11", "CAN ADC12", "CAN ADC13", "CAN ADC14", "CAN ADC15", "CAN ADC16", "CAN ADC17", "CAN ADC18", "CAN ADC19", "CAN ADC20", "CAN ADC21", "CAN ADC22", "CAN ADC23", "CAN ADC24"
      egt_conf_action = bits,    U08,    879,  [0:0], "Off", "On"
      egt_conf_shutdown = bits,  U08,    879,  [1:1], "Off", "On"
      egt_conf_bank     = bits,  U08,    879,  [2:3], "INVALID", "Bank 1", "Bank 2", "Both"
      egt_conf_led = bits,U08, 879, [3:7], "Off", "IAC1", "IAC2", "FIDLE", "D15", "Nitrous 1", "Nitrous2", "Tacho", "Idle", "Boost", "VVT", "Inj Bank 1", "Inj Bank 2", "Inj A", "Inj B", "Inj C", "Inj D", "Inj E", "Inj F", "Inj G", "Inj H", "D14", "D16", "JS11", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID"

      UNUSED_1_880  =   scalar,  S16,    880,    "ADC", 1, 0, 0, 4095, 0
      UNUSED_1_882  =   scalar,  S16,    882,    "ADC", 1, 0, 0, 4095, 0
;EGT calibration
#if CELSIUS
      egtcal_temp0  =   scalar,  S16,    884,     "°C",  0.05555, -320, -40,  1500,      0
      egtcal_tempmax=   scalar,  S16,    886,     "°C",  0.05555, -320, -40,  1500,      0
      egt_warn      =   scalar,  S16,    888,     "°C",  0.05555, -320, -40,  1500,      0
      egt_max       =   scalar,  S16,    890,     "°C",  0.05555, -320, -40,  1500,      0
#else
      egtcal_temp0  =   scalar,  S16,    884,     "°F",  0.1,        0, -40,  2700,      0
      egtcal_tempmax=   scalar,  S16,    886,     "°F",  0.1,        0, -40,  2700,      0
      egt_warn      =   scalar,  S16,    888,     "°F",  0.1,        0, -40,  2700,      0
      egt_max       =   scalar,  S16,    890,     "°F",  0.1,        0, -40,  2700,      0
#endif
      egt_time      =   scalar,  U16,    892,     "s",   0.001,       0,   0,  10,        2
      vss1_can_scale=   scalar,  U16,    894,     "%",   0.1,        0,   0,  10000,       1
      vss2_can_scale=   scalar,  U16,    896,     "%",   0.1,        0,   0,  10000,       1
      vss1_pwmseq   =   scalar,  U08,    898,      "",    1.00000,   0.00000,     1,   4,       0
      vss2_pwmseq   =   scalar,  U08,    899,      "",    1.00000,   0.00000,     1,   4,       0
      MAFOption     =   bits,   U08,  900, [0:4], "Off", "JS5 (ADC6)", "JS4 (ADC7)", "EXT_MAP (ADC11)", "EGO2 (ADC12)", "Spare ADC (ADC13)", "INVALID", "INVALID", "CAN ADC01", "CAN ADC02", "CAN ADC03", "CAN ADC04", "CAN ADC05", "CAN ADC06", "CAN ADC07", "CAN ADC08", "CAN ADC09", "CAN ADC10", "CAN ADC11", "CAN ADC12", "CAN ADC13", "CAN ADC14", "CAN ADC15", "CAN ADC16", "CAN ADC17", "CAN ADC18", "CAN ADC19", "CAN ADC20", "CAN ADC21", "CAN ADC22", "CAN ADC23", "CAN ADC24"
      CID           =   scalar,  U16,    901,    "ci",   1.00000,    0.00000,     0,   1000,    0
      vssout_opt    =   bits,    U08,    903,[0:4], "Off", "IAC1", "IAC2", "FIDLE", "D15", "Nitrous 1", "Nitrous 2", "Tacho", "Idle", "Boost", "VVT", "Inj Bank 1", "Inj Bank 2", "D14", "D16", "JS11", "Inj A", "Inj B", "Inj C", "Inj D", "Inj E", "Inj F", "Inj G", "Inj H", "PT4", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID"
    vssout_scale  =   scalar,  U16,    904,    "ms", 0.05, 0, 0, 3276, 0
    vss1_can_size    =   bits,    U08,    906, [0:0], "8bit", "16bit"
    vss2_can_size    =   bits,    U08,    906, [1:1], "8bit", "16bit"
    canpwm_clk  =   scalar,  U08,    907, "MHz", 1,0,0,100,0
    canpwm_pre  =   scalar,  U08,    908, "", 1,0,0,255,0
    canpwm_div  =   scalar,  U08,    909, "", 1,0,0,255,0
    vss1_can_table = scalar, U08,  910, "", 1,0,0,255,0
   UNUSED_1_911   = scalar, U08,  911, "", 1,0,0,255,0
    vss1LF         = scalar, U08,  912, "", 1,0,10,100,0
    vss2LF         = scalar, U08,  913, "", 1,0,10,100,0
    ss1LF          = scalar, U08,  914, "", 1,0,10,100,0
    ss2LF          = scalar, U08,  915, "", 1,0,10,100,0
#if PW_4X
    egt_addfuel    = scalar, U16,  916,             "ms",       0.004,   0.00000,  0.00,  262.143,      2
#else
    egt_addfuel    = scalar, U16,  916,             "ms",       0.001,   0.00000,  0.00,  65.535,      2
#endif
    launch_fcut_rpm= scalar, U16,  918, "RPM", 1, 0, 1000, 20000, 0
;gear ratios
    gear1ratio    = scalar,  U16,      920,      ":1",      0.01,   0.00000,  0.40,  5.0,      2 ; * (  2 bytes)
    gear2ratio    = scalar,  U16,      922,      ":1",      0.01,   0.00000,  0.40,  5.0,      2 ; * (  2 bytes)
    gear3ratio    = scalar,  U16,      924,      ":1",      0.01,   0.00000,  0.40,  5.0,      2 ; * (  2 bytes)
    gear4ratio    = scalar,  U16,      926,      ":1",      0.01,   0.00000,  0.40,  5.0,      2 ; * (  2 bytes)
    gear5ratio    = scalar,  U16,      928,      ":1",      0.01,   0.00000,  0.40,  5.0,      2 ; * (  2 bytes)
    gear6ratio    = scalar,  U16,      930,      ":1",      0.01,   0.00000,  0.40,  5.0,      2 ; * (  2 bytes)
    gear_method   = bits, U08, 932, [0:1], "Off", "VSS/RPM", "Analogue", "CAN Gear#"
    gear_port_an  = bits, U08, 933, [0:4], "Off", "JS5 (ADC6)", "JS4 (ADC7)", "EXT_MAP (ADC11)", "EGO2 (ADC12)", "Spare ADC (ADC13)", "INVALID", "INVALID", "CAN ADC01", "CAN ADC02", "CAN ADC03", "CAN ADC04", "CAN ADC05", "CAN ADC06", "CAN ADC07", "CAN ADC08", "CAN ADC09", "CAN ADC10", "CAN ADC11", "CAN ADC12", "CAN ADC13", "CAN ADC14", "CAN ADC15", "CAN ADC16", "CAN ADC17", "CAN ADC18", "CAN ADC19", "CAN ADC20", "CAN ADC21", "CAN ADC22", "CAN ADC23", "CAN ADC24"
    gear0v        = scalar,  U16,      934,      "V",      0.01,   0.00000,  0.00,  5.0,      2 ; * (  2 bytes)
    gear1v        = scalar,  U16,      936,      "V",      0.01,   0.00000,  0.00,  5.0,      2 ; * (  2 bytes)
    gear2v        = scalar,  U16,      938,      "V",      0.01,   0.00000,  0.00,  5.0,      2 ; * (  2 bytes)
    gear3v        = scalar,  U16,      940,      "V",      0.01,   0.00000,  0.00,  5.0,      2 ; * (  2 bytes)
    gear4v        = scalar,  U16,      942,      "V",      0.01,   0.00000,  0.00,  5.0,      2 ; * (  2 bytes)
    gear5v        = scalar,  U16,      944,      "V",      0.01,   0.00000,  0.00,  5.0,      2 ; * (  2 bytes)
    gear6v        = scalar,  U16,      946,      "V",      0.01,   0.00000,  0.00,  5.0,      2 ; * (  2 bytes)
    gear_no       = scalar,  U08,      948,      "",        1, 0, 1, 6, 0
    vssdotLF      = scalar,  U08,      949, "", 1,0,10,100,0
    vssdot_int    = scalar,  U08,      950,      "ms",     10,   0      ,  10,  2000,     0
    ac_idleup_io_in = bits, U08,       951, [0:4], "INVALID", "Tableswitch", "PE0/JS7", "PE1", "JS10", "JS11", "JS5 (ADC6)", "JS4 (ADC7)", "Nitrous In", "Launch in", "Datalog In", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "CANIN1", "CANIN2", "CANIN3", "CANIN4", "CANIN5", "CANIN6", "CANIN7", "CANIN8", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID"
    ac_idleup_settings = bits, U08,    951, [7:7], "Off", "On"
    ac_idleup_io_out = bits, U08,      952, [0:5], "Off", "IAC1", "IAC2", "FIDLE", "D15", "Nitrous 1", "Nitrous 2", "Tacho", "Idle", "Boost", "VVT", "Inj Bank 1", "Inj Bank 2", "D14", "D16", "JS11", "Inj A", "Inj B", "Inj C", "Inj D", "Inj E", "Inj F", "Inj G", "Inj H", "PT4", "IGN (JS10)", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "CANOUT1", "CANOUT2", "CANOUT3", "CANOUT4", "CANOUT5", "CANOUT6", "CANOUT7", "CANOUT8", "CANOUT9", "CANOUT10", "CANOUT11", "CANOUT12", "CANOUT13", "CANOUT14", "CANOUT15", "CANOUT16"
    ac_idleup_delay = scalar, U16,     953,      "ms",     1.0000, 0.00000, 0.00, 1000, 0
    ac_idleup_adder_duty = scalar, U08,     955,      "%",      0.39063, 0.00000, 0, 100, 1
    ac_idleup_adder_steps = scalar, U08,    955,      "steps",  1, 0, 0, 255, 0
    fanctl_settings_on = bits, U08, 956, [7:7], "Off", "On"
    fanctl_settings_idleup = bits, U08, 956, [6:6], "No", "Yes"
    fanctl_settings_pin = bits, U08, 956, [0:5], "INVALID", "IAC1", "IAC2", "FIDLE", "D15", "Nitrous 1", "Nitrous 2", "Tacho", "Idle", "Boost", "VVT", "Inj Bank 1", "Inj Bank 2", "D14", "D16", "JS11", "Inj A", "Inj B", "Inj C", "Inj D", "Inj E", "Inj F", "Inj G", "Inj H", "PT4", "IGN (JS10)", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "CANOUT1", "CANOUT2", "CANOUT3", "CANOUT4", "CANOUT5", "CANOUT6", "CANOUT7", "CANOUT8", "CANOUT9", "CANOUT10", "CANOUT11", "CANOUT12", "CANOUT13", "CANOUT14", "CANOUT15", "CANOUT16"
    fanctl_idleup_delay = scalar, U16,  957, "ms",       1.0000, 0.00000, 0.00, 1000, 0
    fanctl_idleup_adder_duty = scalar, U08,  959, "%",     0.39063, 0.00000, 0, 100, 1
    fanctl_idleup_adder_steps = scalar, U08, 959, "steps", 1.000, 0.00000, 0, 255, 0
#if CELSIUS
    fanctl_ontemp =scalar,  S16, 960,  "°C",   0.05555,  -320.000,-40.00,  150.00,      1 
    fanctl_offtemp =scalar,  S16, 962,  "°C",   0.05555,  -320.000,-40.00,  150.00,      1
#else
    fanctl_ontemp =scalar,  S16, 960,  "°F",       0.10000,   0.00000,-40.00,  300.00,      1
    fanctl_offtemp =scalar,  S16, 962,  "°F",       0.10000,   0.00000,-40.00,  300.00,      1
#endif
    canadc_opt1 = bits, U08, 964, [0:0], "Off", "On"
    canadc_opt2 = bits, U08, 964, [1:1], "Off", "On"
    canadc_opt3 = bits, U08, 964, [2:2], "Off", "On"
    canadc_opt4 = bits, U08, 964, [3:3], "Off", "On"
    canadc_opt5 = bits, U08, 964, [4:4], "Off", "On"
    canadc_opt6 = bits, U08, 964, [5:5], "Off", "On"
    fanctl_opt2_engineoff = bits, U08, 965, [0:0], "No", "Yes"
    canadc_id1  = scalar, U08,  966, "", 1, 0, 0, 14, 0, 0
    canadc_id2  = scalar, U08,  967, "", 1, 0, 0, 14, 0, 0
    canadc_id3  = scalar, U08,  968, "", 1, 0, 0, 14, 0, 0
    canadc_id4  = scalar, U08,  969, "", 1, 0, 0, 14, 0, 0
    canadc_id5  = scalar, U08,  970, "", 1, 0, 0, 14, 0, 0
    canadc_id6  = scalar, U08,  971, "", 1, 0, 0, 14, 0, 0
    canadc_tab1 = scalar, U08,  972, "", 1, 0, 0, 31, 0, 0
    canadc_tab2 = scalar, U08,  973, "", 1, 0, 0, 31, 0, 0
    canadc_tab3 = scalar, U08,  974, "", 1, 0, 0, 31, 0, 0
    canadc_tab4 = scalar, U08,  975, "", 1, 0, 0, 31, 0, 0
    canadc_tab5 = scalar, U08,  976, "", 1, 0, 0, 31, 0, 0
    canadc_tab6 = scalar, U08,  977, "", 1, 0, 0, 31, 0, 0
    canadc_off1 = scalar, U16,  978, "", 1, 0, 0, 1023, 0, 0
    canadc_off2 = scalar, U16,  980, "", 1, 0, 0, 1023, 0, 0
    canadc_off3 = scalar, U16,  982, "", 1, 0, 0, 1023, 0, 0
    canadc_off4 = scalar, U16,  984, "", 1, 0, 0, 1023, 0, 0
    canadc_off5 = scalar, U16,  986, "", 1, 0, 0, 1023, 0, 0
    canadc_off6 = scalar, U16,  988, "", 1, 0, 0, 1023, 0, 0
    egoport1    = bits,   U08,  990, [0:4], "Normal EGO", "JS5 (ADC6)", "JS4 (ADC7)", "EXT_MAP (ADC11)", "EGO2 (ADC12)", "Spare ADC (ADC13)", "INVALID", "CAN EGO", "CAN ADC01", "CAN ADC02", "CAN ADC03", "CAN ADC04", "CAN ADC05", "CAN ADC06", "CAN ADC07", "CAN ADC08", "CAN ADC09", "CAN ADC10", "CAN ADC11", "CAN ADC12", "CAN ADC13", "CAN ADC14", "CAN ADC15", "CAN ADC16", "CAN ADC17", "CAN ADC18", "CAN ADC19", "CAN ADC20", "CAN ADC21", "CAN ADC22", "CAN ADC23", "CAN ADC24"
    egoport2    = bits,   U08,  991, [0:4], "Off", "JS5 (ADC6)", "JS4 (ADC7)", "EXT_MAP (ADC11)", "EGO2 (ADC12)", "Spare ADC (ADC13)", "INVALID", "CAN EGO", "CAN ADC01", "CAN ADC02", "CAN ADC03", "CAN ADC04", "CAN ADC05", "CAN ADC06", "CAN ADC07", "CAN ADC08", "CAN ADC09", "CAN ADC10", "CAN ADC11", "CAN ADC12", "CAN ADC13", "CAN ADC14", "CAN ADC15", "CAN ADC16", "CAN ADC17", "CAN ADC18", "CAN ADC19", "CAN ADC20", "CAN ADC21", "CAN ADC22", "CAN ADC23", "CAN ADC24"
    egoport3    = bits,   U08,  992, [0:4], "Off", "JS5 (ADC6)", "JS4 (ADC7)", "EXT_MAP (ADC11)", "EGO2 (ADC12)", "Spare ADC (ADC13)", "INVALID", "CAN EGO", "CAN ADC01", "CAN ADC02", "CAN ADC03", "CAN ADC04", "CAN ADC05", "CAN ADC06", "CAN ADC07", "CAN ADC08", "CAN ADC09", "CAN ADC10", "CAN ADC11", "CAN ADC12", "CAN ADC13", "CAN ADC14", "CAN ADC15", "CAN ADC16", "CAN ADC17", "CAN ADC18", "CAN ADC19", "CAN ADC20", "CAN ADC21", "CAN ADC22", "CAN ADC23", "CAN ADC24"
    egoport4    = bits,   U08,  993, [0:4], "Off", "JS5 (ADC6)", "JS4 (ADC7)", "EXT_MAP (ADC11)", "EGO2 (ADC12)", "Spare ADC (ADC13)", "INVALID", "CAN EGO", "CAN ADC01", "CAN ADC02", "CAN ADC03", "CAN ADC04", "CAN ADC05", "CAN ADC06", "CAN ADC07", "CAN ADC08", "CAN ADC09", "CAN ADC10", "CAN ADC11", "CAN ADC12", "CAN ADC13", "CAN ADC14", "CAN ADC15", "CAN ADC16", "CAN ADC17", "CAN ADC18", "CAN ADC19", "CAN ADC20", "CAN ADC21", "CAN ADC22", "CAN ADC23", "CAN ADC24"
    egoport5    = bits,   U08,  994, [0:4], "Off", "JS5 (ADC6)", "JS4 (ADC7)", "EXT_MAP (ADC11)", "EGO2 (ADC12)", "Spare ADC (ADC13)", "INVALID", "CAN EGO", "CAN ADC01", "CAN ADC02", "CAN ADC03", "CAN ADC04", "CAN ADC05", "CAN ADC06", "CAN ADC07", "CAN ADC08", "CAN ADC09", "CAN ADC10", "CAN ADC11", "CAN ADC12", "CAN ADC13", "CAN ADC14", "CAN ADC15", "CAN ADC16", "CAN ADC17", "CAN ADC18", "CAN ADC19", "CAN ADC20", "CAN ADC21", "CAN ADC22", "CAN ADC23", "CAN ADC24"
    egoport6    = bits,   U08,  995, [0:4], "Off", "JS5 (ADC6)", "JS4 (ADC7)", "EXT_MAP (ADC11)", "EGO2 (ADC12)", "Spare ADC (ADC13)", "INVALID", "CAN EGO", "CAN ADC01", "CAN ADC02", "CAN ADC03", "CAN ADC04", "CAN ADC05", "CAN ADC06", "CAN ADC07", "CAN ADC08", "CAN ADC09", "CAN ADC10", "CAN ADC11", "CAN ADC12", "CAN ADC13", "CAN ADC14", "CAN ADC15", "CAN ADC16", "CAN ADC17", "CAN ADC18", "CAN ADC19", "CAN ADC20", "CAN ADC21", "CAN ADC22", "CAN ADC23", "CAN ADC24"
    egoport7    = bits,   U08,  996, [0:4], "Off", "JS5 (ADC6)", "JS4 (ADC7)", "EXT_MAP (ADC11)", "EGO2 (ADC12)", "Spare ADC (ADC13)", "INVALID", "CAN EGO", "CAN ADC01", "CAN ADC02", "CAN ADC03", "CAN ADC04", "CAN ADC05", "CAN ADC06", "CAN ADC07", "CAN ADC08", "CAN ADC09", "CAN ADC10", "CAN ADC11", "CAN ADC12", "CAN ADC13", "CAN ADC14", "CAN ADC15", "CAN ADC16", "CAN ADC17", "CAN ADC18", "CAN ADC19", "CAN ADC20", "CAN ADC21", "CAN ADC22", "CAN ADC23", "CAN ADC24"
    egoport8    = bits,   U08,  997, [0:4], "Off", "JS5 (ADC6)", "JS4 (ADC7)", "EXT_MAP (ADC11)", "EGO2 (ADC12)", "Spare ADC (ADC13)", "INVALID", "CAN EGO", "CAN ADC01", "CAN ADC02", "CAN ADC03", "CAN ADC04", "CAN ADC05", "CAN ADC06", "CAN ADC07", "CAN ADC08", "CAN ADC09", "CAN ADC10", "CAN ADC11", "CAN ADC12", "CAN ADC13", "CAN ADC14", "CAN ADC15", "CAN ADC16", "CAN ADC17", "CAN ADC18", "CAN ADC19", "CAN ADC20", "CAN ADC21", "CAN ADC22", "CAN ADC23", "CAN ADC24"
    egomap1     = bits,   U08,  998, [0:2], "EGO1", "EGO2", "EGO3", "EGO4", "EGO5", "EGO6", "EGO7", "EGO8"
    egomap2     = bits,   U08,  999, [0:2], "EGO1", "EGO2", "EGO3", "EGO4", "EGO5", "EGO6", "EGO7", "EGO8"
    egomap3     = bits,   U08, 1000, [0:2], "EGO1", "EGO2", "EGO3", "EGO4", "EGO5", "EGO6", "EGO7", "EGO8"
    egomap4     = bits,   U08, 1001, [0:2], "EGO1", "EGO2", "EGO3", "EGO4", "EGO5", "EGO6", "EGO7", "EGO8"
    egomap5     = bits,   U08, 1002, [0:2], "EGO1", "EGO2", "EGO3", "EGO4", "EGO5", "EGO6", "EGO7", "EGO8"
    egomap6     = bits,   U08, 1003, [0:2], "EGO1", "EGO2", "EGO3", "EGO4", "EGO5", "EGO6", "EGO7", "EGO8"
    egomap7     = bits,   U08, 1004, [0:2], "EGO1", "EGO2", "EGO3", "EGO4", "EGO5", "EGO6", "EGO7", "EGO8"
    egomap8     = bits,   U08, 1005, [0:2], "EGO1", "EGO2", "EGO3", "EGO4", "EGO5", "EGO6", "EGO7", "EGO8"
    egomap9     = bits,   U08, 1006, [0:2], "EGO1", "EGO2", "EGO3", "EGO4", "EGO5", "EGO6", "EGO7", "EGO8"
    egomap10    = bits,   U08, 1007, [0:2], "EGO1", "EGO2", "EGO3", "EGO4", "EGO5", "EGO6", "EGO7", "EGO8"
    egomap1t    = bits,   U08,  998, [4:4], "1", "2"
    egomap2t    = bits,   U08,  999, [4:4], "1", "2"
    egomap3t    = bits,   U08, 1000, [4:4], "1", "2"
    egomap4t    = bits,   U08, 1001, [4:4], "1", "2"
    egomap5t    = bits,   U08, 1002, [4:4], "1", "2"
    egomap6t    = bits,   U08, 1003, [4:4], "1", "2"
    egomap7t    = bits,   U08, 1004, [4:4], "1", "2"
    egomap8t    = bits,   U08, 1005, [4:4], "1", "2"
;    egomap9t    = bits,   U08, 1006, [4:4], "1", "2"
;    egomap10t   = bits,   U08, 1007, [4:4], "1", "2"
    boost_gear_switch = scalar, U08,  1008, "gear", 1, 0, 1, 7, 0
    staged_extended_opts_use_v3 = bits, U08, 1009, [0:0], "Use MS3x (if possible)", "Use V3"
    staged_extended_opts_simult = bits, U08, 1009, [1:1], "Alternating (2 squirts)", "Simultaneous (1 squirt)"
    staged_extended_opts_pw1off = bits, U08, 1009, [2:2], "Off", "On"

    can_pwmout_id     = scalar, U08, 1010,             "",         1.00000,   0.00000,     0,     15,       0 ; * (  1 byte)
    can_pwmout_tab    = scalar, U08, 1011,             "",         1.00000,   0.00000,     0,     15,       0 ; * (  1 byte)
    can_pwmout_offset = scalar, S16, 1012,             "bytes",    1.00000,   0.00000,     0,   4095,       0 ;
    idleve_tps =        scalar, S16, 1014,             "%",        0.10000,   0.00000,     0,   100,        1 
    idleve_rpm =        scalar, U16, 1016,             "rpm",      1.00000,   0.00000,     0,   65535,      0
    idleve_load =       scalar, S16, 1018,             "%",        0.10000,   0.00000,     0,   400,        1
#if CELSIUS
	#if EXPANDED_CLT_TEMP
    idleve_clt = scalar, S16, 1020, "°C", 0.05555, -320, -40, 230.00, 1
	#else
    idleve_clt = scalar, S16, 1020, "°C", 0.05555, -320, -40, 150.00, 1
	#endif
#else
	#if EXPANDED_CLT_TEMP
    idleve_clt = scalar, S16, 1020, "°F", 0.10000, 0.00000, -40, 450, 1
	#else
    idleve_clt = scalar, S16, 1020, "°F", 0.10000, 0.00000, -40, 300, 1
	#endif
#endif 
    idleve_delay = scalar, U08, 1022, "sec", 1.00000, 0.0000, 0, 10, 0
    ac_idleup_cl_lockout_mapadder = scalar, U08, 1023, "%", 0.10000, 0.00000, 0, 25.5, 0

;pad

page = 2
      testmodelock = scalar, U16, 0, "", 1,0,0,65535,0, noLocalUpdate
      testop_coil = bits, U08, 2, [0:1], "Off", "One", "Sequence", "INVALID"
      testop_fp   = bits, U08, 2, [4:4], "Off", "On"
      testop_inj  = bits, U08, 2, [5:6], "Off", "One", "Sequence", "All"
      testop_pwm  = bits, U08, 2, [7:7], "Standard", "As below"

      testdwell    = scalar, U08, 3, "ms", 0.1,0,0,25.5,1
      testint      = scalar, U16, 4, "ms", 0.128,0,0,8388,1
      testmode     = bits,   U08, 6, [0:1],  "Off", "Coils", "Injectors", "INVALID"
#if PW_4X
      testpw       = scalar, U16, 7,             "ms",       0.004,   0.00000,  0,   262.143,      3
#else
      testpw       = scalar, U16, 7,             "ms",       0.001,   0.00000,  0,   65.535,      3
#endif
      testinjcnt   = scalar, U16, 9, "", 1,0,0,65535,0

      testinjPwmT     = scalar,  U08,    11,             "ms",       0.12800,   0.12800,  0.00,   32.64,      1
      testinjPwmPd    = scalar,  U08,    12,             "us",       1.00000,   0.00000, 40.00,  100.00,      0
      testinjPwmP     = scalar,  U08,    13,             "%",        1.00000,   0.00000,  0.00,  100.00,      0
      testsel_inj     = bits,  U08,    14, [0:3], "InjA", "InjB", "InjC", "InjD", "InjE", "InjF", "InjG", "InjH", "Inj1", "Inj2","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID"
      testsel_coil     = bits, U08,     14, [4:6], "CoilA", "CoilB", "CoilC", "CoilD", "CoilE", "CoilF", "CoilG", "CoilH"

      iacpostest  = scalar, U16, 15, "steps", 1,0,0,65535,0
      dbgtooth    = scalar, U08, 17, "tooth", 1,0,0,255,0
      iachometest      = scalar, U16, 18, "steps", 1,0,0,65535,0
      iactest         = bits, U08, 20, [0:0], "run", "home" ; // home the valve
      iactestlock     = bits, U08, 20, [1:1], "Off", "On" ; // Enable

      flashlock       = bits, U08, 21, [0:0], "Locked", "Unlocked" ; tables 0-3
;      XXminve1          = scalar, U16, 22, "%",        0.100000,   0.00000,  0.00,  10.00,      1

; big pad
;pad1 @ 661
;misc sensors
    sensor01_source = bits,   U08,  662, [0:4], "Off", "JS5 (ADC6)", "JS4 (ADC7)", "EXT_MAP (ADC11)", "EGO2 (ADC12)", "Spare ADC (ADC13)", "INVALID", "INVALID", "CAN ADC01", "CAN ADC02", "CAN ADC03", "CAN ADC04", "CAN ADC05", "CAN ADC06", "CAN ADC07", "CAN ADC08", "CAN ADC09", "CAN ADC10", "CAN ADC11", "CAN ADC12", "CAN ADC13", "CAN ADC14", "CAN ADC15", "CAN ADC16", "CAN ADC17", "CAN ADC18", "CAN ADC19", "CAN ADC20", "CAN ADC21", "CAN ADC22", "CAN ADC23", "CAN ADC24"
    sensor02_source = bits,   U08,  663, [0:4], "Off", "JS5 (ADC6)", "JS4 (ADC7)", "EXT_MAP (ADC11)", "EGO2 (ADC12)", "Spare ADC (ADC13)", "INVALID", "INVALID", "CAN ADC01", "CAN ADC02", "CAN ADC03", "CAN ADC04", "CAN ADC05", "CAN ADC06", "CAN ADC07", "CAN ADC08", "CAN ADC09", "CAN ADC10", "CAN ADC11", "CAN ADC12", "CAN ADC13", "CAN ADC14", "CAN ADC15", "CAN ADC16", "CAN ADC17", "CAN ADC18", "CAN ADC19", "CAN ADC20", "CAN ADC21", "CAN ADC22", "CAN ADC23", "CAN ADC24"
    sensor03_source = bits,   U08,  664, [0:4], "Off", "JS5 (ADC6)", "JS4 (ADC7)", "EXT_MAP (ADC11)", "EGO2 (ADC12)", "Spare ADC (ADC13)", "INVALID", "INVALID", "CAN ADC01", "CAN ADC02", "CAN ADC03", "CAN ADC04", "CAN ADC05", "CAN ADC06", "CAN ADC07", "CAN ADC08", "CAN ADC09", "CAN ADC10", "CAN ADC11", "CAN ADC12", "CAN ADC13", "CAN ADC14", "CAN ADC15", "CAN ADC16", "CAN ADC17", "CAN ADC18", "CAN ADC19", "CAN ADC20", "CAN ADC21", "CAN ADC22", "CAN ADC23", "CAN ADC24"
    sensor04_source = bits,   U08,  665, [0:4], "Off", "JS5 (ADC6)", "JS4 (ADC7)", "EXT_MAP (ADC11)", "EGO2 (ADC12)", "Spare ADC (ADC13)", "INVALID", "INVALID", "CAN ADC01", "CAN ADC02", "CAN ADC03", "CAN ADC04", "CAN ADC05", "CAN ADC06", "CAN ADC07", "CAN ADC08", "CAN ADC09", "CAN ADC10", "CAN ADC11", "CAN ADC12", "CAN ADC13", "CAN ADC14", "CAN ADC15", "CAN ADC16", "CAN ADC17", "CAN ADC18", "CAN ADC19", "CAN ADC20", "CAN ADC21", "CAN ADC22", "CAN ADC23", "CAN ADC24"
    sensor05_source = bits,   U08,  666, [0:4], "Off", "JS5 (ADC6)", "JS4 (ADC7)", "EXT_MAP (ADC11)", "EGO2 (ADC12)", "Spare ADC (ADC13)", "INVALID", "INVALID", "CAN ADC01", "CAN ADC02", "CAN ADC03", "CAN ADC04", "CAN ADC05", "CAN ADC06", "CAN ADC07", "CAN ADC08", "CAN ADC09", "CAN ADC10", "CAN ADC11", "CAN ADC12", "CAN ADC13", "CAN ADC14", "CAN ADC15", "CAN ADC16", "CAN ADC17", "CAN ADC18", "CAN ADC19", "CAN ADC20", "CAN ADC21", "CAN ADC22", "CAN ADC23", "CAN ADC24"
    sensor06_source = bits,   U08,  667, [0:4], "Off", "JS5 (ADC6)", "JS4 (ADC7)", "EXT_MAP (ADC11)", "EGO2 (ADC12)", "Spare ADC (ADC13)", "INVALID", "INVALID", "CAN ADC01", "CAN ADC02", "CAN ADC03", "CAN ADC04", "CAN ADC05", "CAN ADC06", "CAN ADC07", "CAN ADC08", "CAN ADC09", "CAN ADC10", "CAN ADC11", "CAN ADC12", "CAN ADC13", "CAN ADC14", "CAN ADC15", "CAN ADC16", "CAN ADC17", "CAN ADC18", "CAN ADC19", "CAN ADC20", "CAN ADC21", "CAN ADC22", "CAN ADC23", "CAN ADC24"
    sensor07_source = bits,   U08,  668, [0:4], "Off", "JS5 (ADC6)", "JS4 (ADC7)", "EXT_MAP (ADC11)", "EGO2 (ADC12)", "Spare ADC (ADC13)", "INVALID", "INVALID", "CAN ADC01", "CAN ADC02", "CAN ADC03", "CAN ADC04", "CAN ADC05", "CAN ADC06", "CAN ADC07", "CAN ADC08", "CAN ADC09", "CAN ADC10", "CAN ADC11", "CAN ADC12", "CAN ADC13", "CAN ADC14", "CAN ADC15", "CAN ADC16", "CAN ADC17", "CAN ADC18", "CAN ADC19", "CAN ADC20", "CAN ADC21", "CAN ADC22", "CAN ADC23", "CAN ADC24"
    sensor08_source = bits,   U08,  669, [0:4], "Off", "JS5 (ADC6)", "JS4 (ADC7)", "EXT_MAP (ADC11)", "EGO2 (ADC12)", "Spare ADC (ADC13)", "INVALID", "INVALID", "CAN ADC01", "CAN ADC02", "CAN ADC03", "CAN ADC04", "CAN ADC05", "CAN ADC06", "CAN ADC07", "CAN ADC08", "CAN ADC09", "CAN ADC10", "CAN ADC11", "CAN ADC12", "CAN ADC13", "CAN ADC14", "CAN ADC15", "CAN ADC16", "CAN ADC17", "CAN ADC18", "CAN ADC19", "CAN ADC20", "CAN ADC21", "CAN ADC22", "CAN ADC23", "CAN ADC24"
    sensor09_source = bits,   U08,  670, [0:4], "Off", "JS5 (ADC6)", "JS4 (ADC7)", "EXT_MAP (ADC11)", "EGO2 (ADC12)", "Spare ADC (ADC13)", "INVALID", "INVALID", "CAN ADC01", "CAN ADC02", "CAN ADC03", "CAN ADC04", "CAN ADC05", "CAN ADC06", "CAN ADC07", "CAN ADC08", "CAN ADC09", "CAN ADC10", "CAN ADC11", "CAN ADC12", "CAN ADC13", "CAN ADC14", "CAN ADC15", "CAN ADC16", "CAN ADC17", "CAN ADC18", "CAN ADC19", "CAN ADC20", "CAN ADC21", "CAN ADC22", "CAN ADC23", "CAN ADC24"
    sensor10_source = bits,   U08,  671, [0:4], "Off", "JS5 (ADC6)", "JS4 (ADC7)", "EXT_MAP (ADC11)", "EGO2 (ADC12)", "Spare ADC (ADC13)", "INVALID", "INVALID", "CAN ADC01", "CAN ADC02", "CAN ADC03", "CAN ADC04", "CAN ADC05", "CAN ADC06", "CAN ADC07", "CAN ADC08", "CAN ADC09", "CAN ADC10", "CAN ADC11", "CAN ADC12", "CAN ADC13", "CAN ADC14", "CAN ADC15", "CAN ADC16", "CAN ADC17", "CAN ADC18", "CAN ADC19", "CAN ADC20", "CAN ADC21", "CAN ADC22", "CAN ADC23", "CAN ADC24"
    sensor11_source = bits,   U08,  672, [0:4], "Off", "JS5 (ADC6)", "JS4 (ADC7)", "EXT_MAP (ADC11)", "EGO2 (ADC12)", "Spare ADC (ADC13)", "INVALID", "INVALID", "CAN ADC01", "CAN ADC02", "CAN ADC03", "CAN ADC04", "CAN ADC05", "CAN ADC06", "CAN ADC07", "CAN ADC08", "CAN ADC09", "CAN ADC10", "CAN ADC11", "CAN ADC12", "CAN ADC13", "CAN ADC14", "CAN ADC15", "CAN ADC16", "CAN ADC17", "CAN ADC18", "CAN ADC19", "CAN ADC20", "CAN ADC21", "CAN ADC22", "CAN ADC23", "CAN ADC24"
    sensor12_source = bits,   U08,  673, [0:4], "Off", "JS5 (ADC6)", "JS4 (ADC7)", "EXT_MAP (ADC11)", "EGO2 (ADC12)", "Spare ADC (ADC13)", "INVALID", "INVALID", "CAN ADC01", "CAN ADC02", "CAN ADC03", "CAN ADC04", "CAN ADC05", "CAN ADC06", "CAN ADC07", "CAN ADC08", "CAN ADC09", "CAN ADC10", "CAN ADC11", "CAN ADC12", "CAN ADC13", "CAN ADC14", "CAN ADC15", "CAN ADC16", "CAN ADC17", "CAN ADC18", "CAN ADC19", "CAN ADC20", "CAN ADC21", "CAN ADC22", "CAN ADC23", "CAN ADC24"
    sensor13_source = bits,   U08,  674, [0:4], "Off", "JS5 (ADC6)", "JS4 (ADC7)", "EXT_MAP (ADC11)", "EGO2 (ADC12)", "Spare ADC (ADC13)", "INVALID", "INVALID", "CAN ADC01", "CAN ADC02", "CAN ADC03", "CAN ADC04", "CAN ADC05", "CAN ADC06", "CAN ADC07", "CAN ADC08", "CAN ADC09", "CAN ADC10", "CAN ADC11", "CAN ADC12", "CAN ADC13", "CAN ADC14", "CAN ADC15", "CAN ADC16", "CAN ADC17", "CAN ADC18", "CAN ADC19", "CAN ADC20", "CAN ADC21", "CAN ADC22", "CAN ADC23", "CAN ADC24"
    sensor14_source = bits,   U08,  675, [0:4], "Off", "JS5 (ADC6)", "JS4 (ADC7)", "EXT_MAP (ADC11)", "EGO2 (ADC12)", "Spare ADC (ADC13)", "INVALID", "INVALID", "CAN ADC01", "CAN ADC02", "CAN ADC03", "CAN ADC04", "CAN ADC05", "CAN ADC06", "CAN ADC07", "CAN ADC08", "CAN ADC09", "CAN ADC10", "CAN ADC11", "CAN ADC12", "CAN ADC13", "CAN ADC14", "CAN ADC15", "CAN ADC16", "CAN ADC17", "CAN ADC18", "CAN ADC19", "CAN ADC20", "CAN ADC21", "CAN ADC22", "CAN ADC23", "CAN ADC24"
    sensor15_source = bits,   U08,  676, [0:4], "Off", "JS5 (ADC6)", "JS4 (ADC7)", "EXT_MAP (ADC11)", "EGO2 (ADC12)", "Spare ADC (ADC13)", "INVALID", "INVALID", "CAN ADC01", "CAN ADC02", "CAN ADC03", "CAN ADC04", "CAN ADC05", "CAN ADC06", "CAN ADC07", "CAN ADC08", "CAN ADC09", "CAN ADC10", "CAN ADC11", "CAN ADC12", "CAN ADC13", "CAN ADC14", "CAN ADC15", "CAN ADC16", "CAN ADC17", "CAN ADC18", "CAN ADC19", "CAN ADC20", "CAN ADC21", "CAN ADC22", "CAN ADC23", "CAN ADC24"
    sensor16_source = bits,   U08,  677, [0:4], "Off", "JS5 (ADC6)", "JS4 (ADC7)", "EXT_MAP (ADC11)", "EGO2 (ADC12)", "Spare ADC (ADC13)", "INVALID", "INVALID", "CAN ADC01", "CAN ADC02", "CAN ADC03", "CAN ADC04", "CAN ADC05", "CAN ADC06", "CAN ADC07", "CAN ADC08", "CAN ADC09", "CAN ADC10", "CAN ADC11", "CAN ADC12", "CAN ADC13", "CAN ADC14", "CAN ADC15", "CAN ADC16", "CAN ADC17", "CAN ADC18", "CAN ADC19", "CAN ADC20", "CAN ADC21", "CAN ADC22", "CAN ADC23", "CAN ADC24"
    sensor01_trans  = bits,   U08,  678, [0:2], "Raw", "Linear", "Same as MAP", "Same as CLT", "Same as MAT", "Same as EGO", "Same as MAF", "GM calibration"
    sensor02_trans  = bits,   U08,  679, [0:2], "Raw", "Linear", "Same as MAP", "Same as CLT", "Same as MAT", "Same as EGO", "Same as MAF", "GM calibration"
    sensor03_trans  = bits,   U08,  680, [0:2], "Raw", "Linear", "Same as MAP", "Same as CLT", "Same as MAT", "Same as EGO", "Same as MAF", "GM calibration"
    sensor04_trans  = bits,   U08,  681, [0:2], "Raw", "Linear", "Same as MAP", "Same as CLT", "Same as MAT", "Same as EGO", "Same as MAF", "GM calibration"
    sensor05_trans  = bits,   U08,  682, [0:2], "Raw", "Linear", "Same as MAP", "Same as CLT", "Same as MAT", "Same as EGO", "Same as MAF", "GM calibration"
    sensor06_trans  = bits,   U08,  683, [0:2], "Raw", "Linear", "Same as MAP", "Same as CLT", "Same as MAT", "Same as EGO", "Same as MAF", "GM calibration"
    sensor07_trans  = bits,   U08,  684, [0:2], "Raw", "Linear", "Same as MAP", "Same as CLT", "Same as MAT", "Same as EGO", "Same as MAF", "GM calibration"
    sensor08_trans  = bits,   U08,  685, [0:2], "Raw", "Linear", "Same as MAP", "Same as CLT", "Same as MAT", "Same as EGO", "Same as MAF", "GM calibration"
    sensor09_trans  = bits,   U08,  686, [0:2], "Raw", "Linear", "Same as MAP", "Same as CLT", "Same as MAT", "Same as EGO", "Same as MAF", "GM calibration"
    sensor10_trans  = bits,   U08,  687, [0:2], "Raw", "Linear", "Same as MAP", "Same as CLT", "Same as MAT", "Same as EGO", "Same as MAF", "GM calibration"
    sensor11_trans  = bits,   U08,  688, [0:2], "Raw", "Linear", "Same as MAP", "Same as CLT", "Same as MAT", "Same as EGO", "Same as MAF", "GM calibration"
    sensor12_trans  = bits,   U08,  689, [0:2], "Raw", "Linear", "Same as MAP", "Same as CLT", "Same as MAT", "Same as EGO", "Same as MAF", "GM calibration"
    sensor13_trans  = bits,   U08,  690, [0:2], "Raw", "Linear", "Same as MAP", "Same as CLT", "Same as MAT", "Same as EGO", "Same as MAF", "GM calibration"
    sensor14_trans  = bits,   U08,  691, [0:2], "Raw", "Linear", "Same as MAP", "Same as CLT", "Same as MAT", "Same as EGO", "Same as MAF", "GM calibration"
    sensor15_trans  = bits,   U08,  692, [0:2], "Raw", "Linear", "Same as MAP", "Same as CLT", "Same as MAT", "Same as EGO", "Same as MAF", "GM calibration"
    sensor16_trans  = bits,   U08,  693, [0:2], "Raw", "Linear", "Same as MAP", "Same as CLT", "Same as MAT", "Same as EGO", "Same as MAF", "GM calibration"
    sensor01_val0   = scalar, S16,  694,             "",      0.10000,   0.00000, -3276.7, 3276.7,      1 ; * (  2 bytes)
    sensor02_val0   = scalar, S16,  696,             "",      0.10000,   0.00000, -3276.7, 3276.7,      1 ; * (  2 bytes)
    sensor03_val0   = scalar, S16,  698,             "",      0.10000,   0.00000, -3276.7, 3276.7,      1 ; * (  2 bytes)
    sensor04_val0   = scalar, S16,  700,             "",      0.10000,   0.00000, -3276.7, 3276.7,      1 ; * (  2 bytes)
    sensor05_val0   = scalar, S16,  702,             "",      0.10000,   0.00000, -3276.7, 3276.7,      1 ; * (  2 bytes)
    sensor06_val0   = scalar, S16,  704,             "",      0.10000,   0.00000, -3276.7, 3276.7,      1 ; * (  2 bytes)
    sensor07_val0   = scalar, S16,  706,             "",      0.10000,   0.00000, -3276.7, 3276.7,      1 ; * (  2 bytes)
    sensor08_val0   = scalar, S16,  708,             "",      0.10000,   0.00000, -3276.7, 3276.7,      1 ; * (  2 bytes)
    sensor09_val0   = scalar, S16,  710,             "",      0.10000,   0.00000, -3276.7, 3276.7,      1 ; * (  2 bytes)
    sensor10_val0   = scalar, S16,  712,             "",      0.10000,   0.00000, -3276.7, 3276.7,      1 ; * (  2 bytes)
    sensor11_val0   = scalar, S16,  714,             "",      0.10000,   0.00000, -3276.7, 3276.7,      1 ; * (  2 bytes)
    sensor12_val0   = scalar, S16,  716,             "",      0.10000,   0.00000, -3276.7, 3276.7,      1 ; * (  2 bytes)
    sensor13_val0   = scalar, S16,  718,             "",      0.10000,   0.00000, -3276.7, 3276.7,      1 ; * (  2 bytes)
    sensor14_val0   = scalar, S16,  720,             "",      0.10000,   0.00000, -3276.7, 3276.7,      1 ; * (  2 bytes)
    sensor15_val0   = scalar, S16,  722,             "",      0.10000,   0.00000, -3276.7, 3276.7,      1 ; * (  2 bytes)
    sensor16_val0   = scalar, S16,  724,             "",      0.10000,   0.00000, -3276.7, 3276.7,      1 ; * (  2 bytes)
    sensor01_max    = scalar, S16,  726,             "",      0.10000,   0.00000, -3276.7, 3276.7,      1 ; * (  2 bytes)
    sensor02_max    = scalar, S16,  728,             "",      0.10000,   0.00000, -3276.7, 3276.7,      1 ; * (  2 bytes)
    sensor03_max    = scalar, S16,  730,             "",      0.10000,   0.00000, -3276.7, 3276.7,      1 ; * (  2 bytes)
    sensor04_max    = scalar, S16,  732,             "",      0.10000,   0.00000, -3276.7, 3276.7,      1 ; * (  2 bytes)
    sensor05_max    = scalar, S16,  734,             "",      0.10000,   0.00000, -3276.7, 3276.7,      1 ; * (  2 bytes)
    sensor06_max    = scalar, S16,  736,             "",      0.10000,   0.00000, -3276.7, 3276.7,      1 ; * (  2 bytes)
    sensor07_max    = scalar, S16,  738,             "",      0.10000,   0.00000, -3276.7, 3276.7,      1 ; * (  2 bytes)
    sensor08_max    = scalar, S16,  740,             "",      0.10000,   0.00000, -3276.7, 3276.7,      1 ; * (  2 bytes)
    sensor09_max    = scalar, S16,  742,             "",      0.10000,   0.00000, -3276.7, 3276.7,      1 ; * (  2 bytes)
    sensor10_max    = scalar, S16,  744,             "",      0.10000,   0.00000, -3276.7, 3276.7,      1 ; * (  2 bytes)
    sensor11_max    = scalar, S16,  746,             "",      0.10000,   0.00000, -3276.7, 3276.7,      1 ; * (  2 bytes)
    sensor12_max    = scalar, S16,  748,             "",      0.10000,   0.00000, -3276.7, 3276.7,      1 ; * (  2 bytes)
    sensor13_max    = scalar, S16,  750,             "",      0.10000,   0.00000, -3276.7, 3276.7,      1 ; * (  2 bytes)
    sensor14_max    = scalar, S16,  752,             "",      0.10000,   0.00000, -3276.7, 3276.7,      1 ; * (  2 bytes)
    sensor15_max    = scalar, S16,  754,             "",      0.10000,   0.00000, -3276.7, 3276.7,      1 ; * (  2 bytes)
    sensor16_max    = scalar, S16,  756,             "",      0.10000,   0.00000, -3276.7, 3276.7,      1 ; * (  2 bytes)
    sensor01LF      = scalar, U08,  758, "", 1,0,10,100,0
    sensor02LF      = scalar, U08,  759, "", 1,0,10,100,0
    sensor03LF      = scalar, U08,  760, "", 1,0,10,100,0
    sensor04LF      = scalar, U08,  761, "", 1,0,10,100,0
    sensor05LF      = scalar, U08,  762, "", 1,0,10,100,0
    sensor06LF      = scalar, U08,  763, "", 1,0,10,100,0
    sensor07LF      = scalar, U08,  764, "", 1,0,10,100,0
    sensor08LF      = scalar, U08,  765, "", 1,0,10,100,0
    sensor09LF      = scalar, U08,  766, "", 1,0,10,100,0
    sensor10LF      = scalar, U08,  767, "", 1,0,10,100,0
    sensor11LF      = scalar, U08,  768, "", 1,0,10,100,0
    sensor12LF      = scalar, U08,  769, "", 1,0,10,100,0
    sensor13LF      = scalar, U08,  770, "", 1,0,10,100,0
    sensor14LF      = scalar, U08,  771, "", 1,0,10,100,0
    sensor15LF      = scalar, U08,  772, "", 1,0,10,100,0
    sensor16LF      = scalar, U08,  773, "", 1,0,10,100,0
    sensor_temp     = bits, U08,  774, [0:0], "degF", "degC" 
;pad
#if PW_4X
    injOpen1         = scalar,  U16,    776,             "ms",       0.004,   0.00000,  0.00,   25.50,      3 ; * (  1 byte)
    injOpen2         = scalar,  U16,    778,             "ms",       0.004,   0.00000,  0.00,   25.50,      3 ; * (  1 byte)
    injOpen3         = scalar,  U16,    780,             "ms",       0.004,   0.00000,  0.00,   25.50,      3 ; * (  1 byte)
    injOpen4         = scalar,  U16,    782,             "ms",       0.004,   0.00000,  0.00,   25.50,      3 ; * (  1 byte)
    injOpen5         = scalar,  U16,    784,             "ms",       0.004,   0.00000,  0.00,   25.50,      3 ; * (  1 byte)
    injOpen6         = scalar,  U16,    786,             "ms",       0.004,   0.00000,  0.00,   25.50,      3 ; * (  1 byte)
    injOpen7         = scalar,  U16,    788,             "ms",       0.004,   0.00000,  0.00,   25.50,      3 ; * (  1 byte)
    injOpen8         = scalar,  U16,    790,             "ms",       0.004,   0.00000,  0.00,   25.50,      3 ; * (  1 byte)
    injOpena         = scalar,  U16,    792,             "ms",       0.004,   0.00000,  0.00,   25.50,      3 ; * (  1 byte)
    injOpenb         = scalar,  U16,    794,             "ms",       0.004,   0.00000,  0.00,   25.50,      3 ; * (  1 byte)
;next 8 not yet used
    injOpen11         = scalar,  U16,    796,             "ms",       0.004,   0.00000,  0.00,   25.50,      3
    injOpen12         = scalar,  U16,    798,             "ms",       0.004,   0.00000,  0.00,   25.50,      3
    injOpen13         = scalar,  U16,    800,             "ms",       0.004,   0.00000,  0.00,   25.50,      3
    injOpen14         = scalar,  U16,    802,             "ms",       0.004,   0.00000,  0.00,   25.50,      3
    injOpen15         = scalar,  U16,    804,             "ms",       0.004,   0.00000,  0.00,   25.50,      3
    injOpen16         = scalar,  U16,    806,             "ms",       0.004,   0.00000,  0.00,   25.50,      3
    injOpen17         = scalar,  U16,    808,             "ms",       0.004,   0.00000,  0.00,   25.50,      3
    injOpen18         = scalar,  U16,    810,             "ms",       0.004,   0.00000,  0.00,   25.50,      3
#else
    injOpen1         = scalar,  U16,    776,             "ms",       0.001,   0.00000,  0.00,   25.50,      3 ; * (  1 byte)
    injOpen2         = scalar,  U16,    778,             "ms",       0.001,   0.00000,  0.00,   25.50,      3 ; * (  1 byte)
    injOpen3         = scalar,  U16,    780,             "ms",       0.001,   0.00000,  0.00,   25.50,      3 ; * (  1 byte)
    injOpen4         = scalar,  U16,    782,             "ms",       0.001,   0.00000,  0.00,   25.50,      3 ; * (  1 byte)
    injOpen5         = scalar,  U16,    784,             "ms",       0.001,   0.00000,  0.00,   25.50,      3 ; * (  1 byte)
    injOpen6         = scalar,  U16,    786,             "ms",       0.001,   0.00000,  0.00,   25.50,      3 ; * (  1 byte)
    injOpen7         = scalar,  U16,    788,             "ms",       0.001,   0.00000,  0.00,   25.50,      3 ; * (  1 byte)
    injOpen8         = scalar,  U16,    790,             "ms",       0.001,   0.00000,  0.00,   25.50,      3 ; * (  1 byte)
    injOpena         = scalar,  U16,    792,             "ms",       0.001,   0.00000,  0.00,   25.50,      3 ; * (  1 byte)
    injOpenb         = scalar,  U16,    794,             "ms",       0.001,   0.00000,  0.00,   25.50,      3 ; * (  1 byte)
;next 8 not yet used
    injOpen11         = scalar,  U16,    796,             "ms",       0.001,   0.00000,  0.00,   25.50,      3
    injOpen12         = scalar,  U16,    798,             "ms",       0.001,   0.00000,  0.00,   25.50,      3
    injOpen13         = scalar,  U16,    800,             "ms",       0.001,   0.00000,  0.00,   25.50,      3
    injOpen14         = scalar,  U16,    802,             "ms",       0.001,   0.00000,  0.00,   25.50,      3
    injOpen15         = scalar,  U16,    804,             "ms",       0.001,   0.00000,  0.00,   25.50,      3
    injOpen16         = scalar,  U16,    806,             "ms",       0.001,   0.00000,  0.00,   25.50,      3
    injOpen17         = scalar,  U16,    808,             "ms",       0.001,   0.00000,  0.00,   25.50,      3
    injOpen18         = scalar,  U16,    810,             "ms",       0.001,   0.00000,  0.00,   25.50,      3
#endif

    shift_cut_on    = bits, U08, 812, [0:0], "Off", "On"
    shift_cut_auto  = bits, U08, 812, [1:1], "Button", "Auto"
    shift_cut_gear  = bits, U08, 812, [2:2], "Off", "On"
    shift_cut_in    = bits, U08, 813, [0:4], "INVALID", "Tableswitch", "PE0/JS7", "PE1", "JS10", "JS11", "JS5 (ADC6)", "JS4 (ADC7)", "Nitrous In", "Launch in", "Datalog In", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "CANIN1", "CANIN2", "CANIN3", "CANIN4", "CANIN5", "CANIN6", "CANIN7", "CANIN8", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID"
    shift_cut_out   = bits, U08, 814,[0:4], "INVALID", "IAC1", "IAC2", "FIDLE", "D15", "Nitrous 1", "Nitrous 2", "Tacho", "Idle", "Boost", "VVT", "Inj Bank 1", "Inj Bank 2", "D14", "D16", "JS11", "Inj A", "Inj B", "Inj C", "Inj D", "Inj E", "Inj F", "Inj G", "Inj H", "PT4", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID"
    shift_cut_rpm    = scalar, U16, 815, "RPM", 1, 0, 0, 15000, 0
    shift_cut_tps    = scalar, U16, 817, "%", 0.1, 0, 0, 100, 0
    shift_cut_delay  = scalar, U08, 819, "s", 0.01, 0, 0, 2.55, 2
    shift_cut_time   = scalar, U08, 820, "s", 0.01, 0, 0, 2.55, 2
    shift_cut_add12  = scalar, U08, 821, "s", 0.01, 0, 0, 2.55, 2
    shift_cut_add23  = scalar, U08, 822, "s", 0.01, 0, 0, 2.55, 2
    shift_cut_add34  = scalar, U08, 823, "s", 0.01, 0, 0, 2.55, 2
    shift_cut_add45  = scalar, U08, 824, "s", 0.01, 0, 0, 2.55, 2
    shift_cut_add56  = scalar, U08, 825, "s", 0.01, 0, 0, 2.55, 2
    shift_cut_soldelay=scalar, U08, 826, "s", 0.01, 0, 0, 2.55, 2
    shift_cut_rpm12  = scalar, U16, 827, "RPM", 1, 0, 0, 15000, 0
    shift_cut_rpm23  = scalar, U16, 829, "RPM", 1, 0, 0, 15000, 0
    shift_cut_rpm34  = scalar, U16, 831, "RPM", 1, 0, 0, 15000, 0
    shift_cut_rpm45  = scalar, U16, 833, "RPM", 1, 0, 0, 15000, 0
    shift_cut_rpm56  = scalar, U16, 835, "RPM", 1, 0, 0, 15000, 0
    shift_cut_reshift= scalar, U08, 837, "s", 0.01, 0, 0, 2.55, 2
;open-loop PWM. all arrays
    pwm_opt_on_a      = bits, U08, 838, [0:0], "Off", "On"
    pwm_opt_var_a     = bits, U08, 838, [1:1], "On-Off", "Variable"
    pwm_opt_freq_a    = bits, U08, 838, [2:4], "INVALID", "78Hz", "39Hz", "26Hz", "19.5Hz", "15.6Hz", "13Hz", "11.1Hz"
    pwm_opt_load_a    = bits, U08, 838, [5:7], "INVALID", "MAP", "% baro", "TPS", "MAFMAP", "CLT", "INVALID", "MAT" ; ITB hidden
    pwm_opt_on_b      = bits, U08, 839, [0:0], "Off", "On"
    pwm_opt_var_b     = bits, U08, 839, [1:1], "On-Off", "Variable"
    pwm_opt_freq_b    = bits, U08, 839, [2:4], "INVALID", "78Hz", "39Hz", "26Hz", "19.5Hz", "15.6Hz", "13Hz", "11.1Hz"
    pwm_opt_load_b    = bits, U08, 839, [5:7], "INVALID", "MAP", "% baro", "TPS", "MAFMAP", "CLT", "INVALID", "MAT"
    pwm_opt_on_c      = bits, U08, 840, [0:0], "Off", "On"
    pwm_opt_var_c     = bits, U08, 840, [1:1], "On-Off", "Variable"
    pwm_opt_freq_c    = bits, U08, 840, [2:4], "INVALID", "78Hz", "39Hz", "26Hz", "19.5Hz", "15.6Hz", "13Hz", "11.1Hz"
    pwm_opt_load_c    = bits, U08, 840, [5:7], "INVALID", "MAP", "% baro", "TPS", "MAFMAP", "CLT", "INVALID", "MAT"
    pwm_opt_on_d      = bits, U08, 841, [0:0], "Off", "On"
    pwm_opt_var_d     = bits, U08, 841, [1:1], "On-Off", "Variable"
    pwm_opt_freq_d    = bits, U08, 841, [2:4], "INVALID", "78Hz", "39Hz", "26Hz", "19.5Hz", "15.6Hz", "13Hz", "11.1Hz"
    pwm_opt_load_d    = bits, U08, 841, [5:7], "INVALID", "MAP", "% baro", "TPS", "MAFMAP", "CLT", "INVALID", "MAT"
    pwm_opt_on_e      = bits, U08, 842, [0:0], "Off", "On"
    pwm_opt_var_e     = bits, U08, 842, [1:1], "On-Off", "Variable"
    pwm_opt_freq_e    = bits, U08, 842, [2:4], "INVALID", "78Hz", "39Hz", "26Hz", "19.5Hz", "15.6Hz", "13Hz", "11.1Hz"
    pwm_opt_load_e    = bits, U08, 842, [5:7], "INVALID", "MAP", "% baro", "TPS", "MAFMAP", "CLT", "INVALID", "MAT"
    pwm_opt_on_f      = bits, U08, 843, [0:0], "Off", "On"
    pwm_opt_var_f     = bits, U08, 843, [1:1], "On-Off", "Variable"
    pwm_opt_freq_f    = bits, U08, 843, [2:4], "INVALID", "78Hz", "39Hz", "26Hz", "19.5Hz", "15.6Hz", "13Hz", "11.1Hz"
    pwm_opt_load_f    = bits, U08, 843, [5:7], "INVALID", "MAP", "% baro", "TPS", "MAFMAP", "CLT", "INVALID", "MAT"

    pwm_opt2_a        = bits, U08, 844, [0:5], "INVALID", "IAC1", "IAC2", "FIDLE", "D15", "Nitrous 1", "Nitrous 2", "Tacho", "Idle", "Boost", "VVT", "Inj Bank 1", "Inj Bank 2", "D14", "D16", "JS11", "Inj A", "Inj B", "Inj C", "Inj D", "Inj E", "Inj F", "Inj G", "Inj H", "PT4", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "CANPWM1", "CANPWM2", "CANPWM3", "CANPWM4", "CANPWM5", "CANPWM6", "CANPWM7", "CANPWM8", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID"
    pwm_opt2_b        = bits, U08, 845, [0:5], "INVALID", "IAC1", "IAC2", "FIDLE", "D15", "Nitrous 1", "Nitrous 2", "Tacho", "Idle", "Boost", "VVT", "Inj Bank 1", "Inj Bank 2", "D14", "D16", "JS11", "Inj A", "Inj B", "Inj C", "Inj D", "Inj E", "Inj F", "Inj G", "Inj H", "PT4", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "CANPWM1", "CANPWM2", "CANPWM3", "CANPWM4", "CANPWM5", "CANPWM6", "CANPWM7", "CANPWM8", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID"
    pwm_opt2_c        = bits, U08, 846, [0:5], "INVALID", "IAC1", "IAC2", "FIDLE", "D15", "Nitrous 1", "Nitrous 2", "Tacho", "Idle", "Boost", "VVT", "Inj Bank 1", "Inj Bank 2", "D14", "D16", "JS11", "Inj A", "Inj B", "Inj C", "Inj D", "Inj E", "Inj F", "Inj G", "Inj H", "PT4", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "CANPWM1", "CANPWM2", "CANPWM3", "CANPWM4", "CANPWM5", "CANPWM6", "CANPWM7", "CANPWM8", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID"
    pwm_opt2_d        = bits, U08, 847, [0:5], "INVALID", "IAC1", "IAC2", "FIDLE", "D15", "Nitrous 1", "Nitrous 2", "Tacho", "Idle", "Boost", "VVT", "Inj Bank 1", "Inj Bank 2", "D14", "D16", "JS11", "Inj A", "Inj B", "Inj C", "Inj D", "Inj E", "Inj F", "Inj G", "Inj H", "PT4", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "CANPWM1", "CANPWM2", "CANPWM3", "CANPWM4", "CANPWM5", "CANPWM6", "CANPWM7", "CANPWM8", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID"
    pwm_opt2_e        = bits, U08, 848, [0:5], "INVALID", "IAC1", "IAC2", "FIDLE", "D15", "Nitrous 1", "Nitrous 2", "Tacho", "Idle", "Boost", "VVT", "Inj Bank 1", "Inj Bank 2", "D14", "D16", "JS11", "Inj A", "Inj B", "Inj C", "Inj D", "Inj E", "Inj F", "Inj G", "Inj H", "PT4", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "CANPWM1", "CANPWM2", "CANPWM3", "CANPWM4", "CANPWM5", "CANPWM6", "CANPWM7", "CANPWM8", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID"
    pwm_opt2_f        = bits, U08, 849, [0:5], "INVALID", "IAC1", "IAC2", "FIDLE", "D15", "Nitrous 1", "Nitrous 2", "Tacho", "Idle", "Boost", "VVT", "Inj Bank 1", "Inj Bank 2", "D14", "D16", "JS11", "Inj A", "Inj B", "Inj C", "Inj D", "Inj E", "Inj F", "Inj G", "Inj H", "PT4", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "CANPWM1", "CANPWM2", "CANPWM3", "CANPWM4", "CANPWM5", "CANPWM6", "CANPWM7", "CANPWM8", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID"
    pwm_onabove_a     = scalar, U08, 850, "%", 1, 0, 0, 100, 0
    pwm_onabove_b     = scalar, U08, 851, "%", 1, 0, 0, 100, 0
    pwm_onabove_c     = scalar, U08, 852, "%", 1, 0, 0, 100, 0
    pwm_onabove_d     = scalar, U08, 853, "%", 1, 0, 0, 100, 0
    pwm_onabove_e     = scalar, U08, 854, "%", 1, 0, 0, 100, 0
    pwm_onabove_f     = scalar, U08, 855, "%", 1, 0, 0, 100, 0
    pwm_offbelow_a    = scalar, U08, 856, "%", 1, 0, 0, 100, 0
    pwm_offbelow_b    = scalar, U08, 857, "%", 1, 0, 0, 100, 0
    pwm_offbelow_c    = scalar, U08, 858, "%", 1, 0, 0, 100, 0
    pwm_offbelow_d    = scalar, U08, 859, "%", 1, 0, 0, 100, 0
    pwm_offbelow_e    = scalar, U08, 860, "%", 1, 0, 0, 100, 0
    pwm_offbelow_f    = scalar, U08, 861, "%", 1, 0, 0, 100, 0

    dualfuel_sw_on = bits,  U08, 862, [0:0], "Off", "On"
    dualfuel_sw_fuel = bits,U08, 862, [1:1], "Off", "On"
    dualfuel_sw_spk = bits, U08, 862, [2:2], "Off", "On"
    dualfuel_sw_afr = bits, U08, 862, [3:3], "Off", "On"
    dualfuel_sw_rf = bits,  U08, 862, [4:4], "Off", "On"
    dualfuel_sw_stoich=bits,U08, 862, [5:5], "Off", "On"
    dualfuel_sw_wue = bits, U08, 862, [6:6], "Off", "On"
    dualfuel_sw_ase = bits, U08, 862, [7:7], "Off", "On"
    dualfuel_sw2_prime=bits,U08, 863, [0:0], "Off", "On"
    dualfuel_sw2_crank=bits,U08, 863, [1:1], "Off", "On"
    dualfuel_sw2_injp =bits,U08, 863, [2:2], "Off", "On"
    dualfuel_sw2_smpw =bits,U08, 863, [3:3], "Off", "On"
    dualfuel_sw2_ob =bits  ,U08, 863, [4:4], "Off", "On"
    dualfuel_sw2_boosw=bits,U08, 863, [5:5], "Off", "On"
    opentime2_opt1_master = bits, U08, 864, [7:7], "Same", "Individual"
    opentime2_opt1    = bits, U08, 864, [0:1], "Curve 1", "Curve 2", "Curve 3", "Curve 4"
    opentime2_opt2    = bits, U08, 865, [0:1], "Curve 1", "Curve 2", "Curve 3", "Curve 4"
    opentime2_opt3    = bits, U08, 866, [0:1], "Curve 1", "Curve 2", "Curve 3", "Curve 4"
    opentime2_opt4    = bits, U08, 867, [0:1], "Curve 1", "Curve 2", "Curve 3", "Curve 4"
    opentime2_opt5    = bits, U08, 868, [0:1], "Curve 1", "Curve 2", "Curve 3", "Curve 4"
    opentime2_opt6    = bits, U08, 869, [0:1], "Curve 1", "Curve 2", "Curve 3", "Curve 4"
    opentime2_opt7    = bits, U08, 870, [0:1], "Curve 1", "Curve 2", "Curve 3", "Curve 4"
    opentime2_opt8    = bits, U08, 871, [0:1], "Curve 1", "Curve 2", "Curve 3", "Curve 4"
    opentime2_opta    = bits, U08, 872, [0:1], "Curve 1", "Curve 2", "Curve 3", "Curve 4"
    opentime2_opta_pwm= bits, U08, 872, [4:4], "Off", "On"
    opentime2_optb    = bits, U08, 873, [0:1], "Curve 1", "Curve 2", "Curve 3", "Curve 4"
    opentime2_optb_pwm= bits, U08, 873, [4:4], "Off", "On"
    opentime2_optb_own= bits, U08, 873, [5:5], "Off", "On"
;next 8 not yet used
    opentime2_opt11   = bits, U08, 874, [0:1], "Curve 1", "Curve 2", "Curve 3", "Curve 4"
    opentime2_opt12   = bits, U08, 875, [0:1], "Curve 1", "Curve 2", "Curve 3", "Curve 4"
    opentime2_opt13   = bits, U08, 876, [0:1], "Curve 1", "Curve 2", "Curve 3", "Curve 4"
    opentime2_opt14   = bits, U08, 877, [0:1], "Curve 1", "Curve 2", "Curve 3", "Curve 4"
    opentime2_opt15   = bits, U08, 878, [0:1], "Curve 1", "Curve 2", "Curve 3", "Curve 4"
    opentime2_opt16   = bits, U08, 879, [0:1], "Curve 1", "Curve 2", "Curve 3", "Curve 4"
    opentime2_opt17   = bits, U08, 880, [0:1], "Curve 1", "Curve 2", "Curve 3", "Curve 4"
    opentime2_opt18   = bits, U08, 881, [0:1], "Curve 1", "Curve 2", "Curve 3", "Curve 4"

    smallpw2_opt1_master = bits, U08, 864, [7:7], "Off", "On"
    smallpw2_opt1    = bits, U08, 882, [0:1], "Curve 1", "Curve 2", "Curve 3", "Curve 4"
    smallpw2_opt2    = bits, U08, 883, [0:1], "Curve 1", "Curve 2", "Curve 3", "Curve 4"
    smallpw2_opt3    = bits, U08, 884, [0:1], "Curve 1", "Curve 2", "Curve 3", "Curve 4"
    smallpw2_opt4    = bits, U08, 885, [0:1], "Curve 1", "Curve 2", "Curve 3", "Curve 4"
    smallpw2_opt5    = bits, U08, 886, [0:1], "Curve 1", "Curve 2", "Curve 3", "Curve 4"
    smallpw2_opt6    = bits, U08, 887, [0:1], "Curve 1", "Curve 2", "Curve 3", "Curve 4"
    smallpw2_opt7    = bits, U08, 888, [0:1], "Curve 1", "Curve 2", "Curve 3", "Curve 4"
    smallpw2_opt8    = bits, U08, 889, [0:1], "Curve 1", "Curve 2", "Curve 3", "Curve 4"
    smallpw2_opta    = bits, U08, 890, [0:1], "Curve 1", "Curve 2", "Curve 3", "Curve 4"
    smallpw2_optb    = bits, U08, 891, [0:1], "Curve 1", "Curve 2", "Curve 3", "Curve 4"
;next 8 not yet used
    smallpw2_opt11    = bits, U08, 892, [0:1], "Curve 1", "Curve 2", "Curve 3", "Curve 4"
    smallpw2_opt12    = bits, U08, 893, [0:1], "Curve 1", "Curve 2", "Curve 3", "Curve 4"
    smallpw2_opt13    = bits, U08, 894, [0:1], "Curve 1", "Curve 2", "Curve 3", "Curve 4"
    smallpw2_opt14    = bits, U08, 895, [0:1], "Curve 1", "Curve 2", "Curve 3", "Curve 4"
    smallpw2_opt15    = bits, U08, 896, [0:1], "Curve 1", "Curve 2", "Curve 3", "Curve 4"
    smallpw2_opt16    = bits, U08, 897, [0:1], "Curve 1", "Curve 2", "Curve 3", "Curve 4"
    smallpw2_opt17    = bits, U08, 898, [0:1], "Curve 1", "Curve 2", "Curve 3", "Curve 4"
    smallpw2_opt18    = bits, U08, 899, [0:1], "Curve 1", "Curve 2", "Curve 3", "Curve 4"

    dualfuel_pin     = bits, U08, 900, [0:4], "INVALID", "Tableswitch", "PE0/JS7", "PE1", "JS10", "JS11", "JS5 (ADC6)", "JS4 (ADC7)", "Nitrous In", "Launch in", "Datalog In", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "CANIN1", "CANIN2", "CANIN3", "CANIN4", "CANIN5", "CANIN6", "CANIN7", "CANIN8", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID"
    dualfuel_opt_temp= bits, U08, 901, [0:0], "Off", "On"
    dualfuel_opt_press=bits, U08, 901, [1:1], "Off", "On"
    dualfuel_opt_mode = bits,U08, 901, [2:2], "Switching",  "Dual table"
    dualfuel_opt_out = bits,U08, 901, [3:3], "Shared outputs+relay", "Different outputs"

#if PW_4X
    inj2Open1         = scalar,  U16,    902,             "ms",       0.004,   0.00000,  0.00,   25.50,      3 ; * (  1 byte)
    inj2Open2         = scalar,  U16,    904,             "ms",       0.004,   0.00000,  0.00,   25.50,      3 ; * (  1 byte)
    inj2Open3         = scalar,  U16,    906,             "ms",       0.004,   0.00000,  0.00,   25.50,      3 ; * (  1 byte)
    inj2Open4         = scalar,  U16,    908,             "ms",       0.004,   0.00000,  0.00,   25.50,      3 ; * (  1 byte)
    inj2Open5         = scalar,  U16,    910,             "ms",       0.004,   0.00000,  0.00,   25.50,      3 ; * (  1 byte)
    inj2Open6         = scalar,  U16,    912,             "ms",       0.004,   0.00000,  0.00,   25.50,      3 ; * (  1 byte)
    inj2Open7         = scalar,  U16,    914,             "ms",       0.004,   0.00000,  0.00,   25.50,      3 ; * (  1 byte)
    inj2Open8         = scalar,  U16,    916,             "ms",       0.004,   0.00000,  0.00,   25.50,      3 ; * (  1 byte)
    inj2Opena         = scalar,  U16,    918,             "ms",       0.004,   0.00000,  0.00,   25.50,      3 ; * (  1 byte)
    inj2Openb         = scalar,  U16,    920,             "ms",       0.004,   0.00000,  0.00,   25.50,      3 ; * (  1 byte)
;next 8 not yet used
    inj2Open11         = scalar,  U16,    922,             "ms",       0.004,   0.00000,  0.00,   25.50,      3
    inj2Open12         = scalar,  U16,    924,             "ms",       0.004,   0.00000,  0.00,   25.50,      3
    inj2Open13         = scalar,  U16,    926,             "ms",       0.004,   0.00000,  0.00,   25.50,      3
    inj2Open14         = scalar,  U16,    928,             "ms",       0.004,   0.00000,  0.00,   25.50,      3
    inj2Open15         = scalar,  U16,    930,             "ms",       0.004,   0.00000,  0.00,   25.50,      3
    inj2Open16         = scalar,  U16,    932,             "ms",       0.004,   0.00000,  0.00,   25.50,      3
    inj2Open17         = scalar,  U16,    934,             "ms",       0.004,   0.00000,  0.00,   25.50,      3
    inj2Open18         = scalar,  U16,    936,             "ms",       0.004,   0.00000,  0.00,   25.50,      3
#else
    inj2Open1         = scalar,  U16,    902,             "ms",       0.001,   0.00000,  0.00,   25.50,      3 ; * (  1 byte)
    inj2Open2         = scalar,  U16,    904,             "ms",       0.001,   0.00000,  0.00,   25.50,      3 ; * (  1 byte)
    inj2Open3         = scalar,  U16,    906,             "ms",       0.001,   0.00000,  0.00,   25.50,      3 ; * (  1 byte)
    inj2Open4         = scalar,  U16,    908,             "ms",       0.001,   0.00000,  0.00,   25.50,      3 ; * (  1 byte)
    inj2Open5         = scalar,  U16,    910,             "ms",       0.001,   0.00000,  0.00,   25.50,      3 ; * (  1 byte)
    inj2Open6         = scalar,  U16,    912,             "ms",       0.001,   0.00000,  0.00,   25.50,      3 ; * (  1 byte)
    inj2Open7         = scalar,  U16,    914,             "ms",       0.001,   0.00000,  0.00,   25.50,      3 ; * (  1 byte)
    inj2Open8         = scalar,  U16,    916,             "ms",       0.001,   0.00000,  0.00,   25.50,      3 ; * (  1 byte)
    inj2Opena         = scalar,  U16,    918,             "ms",       0.001,   0.00000,  0.00,   25.50,      3 ; * (  1 byte)
    inj2Openb         = scalar,  U16,    920,             "ms",       0.001,   0.00000,  0.00,   25.50,      3 ; * (  1 byte)
;next 8 not yet used
    inj2Open11         = scalar,  U16,    922,             "ms",       0.001,   0.00000,  0.00,   25.50,      3
    inj2Open12         = scalar,  U16,    924,             "ms",       0.001,   0.00000,  0.00,   25.50,      3
    inj2Open13         = scalar,  U16,    926,             "ms",       0.001,   0.00000,  0.00,   25.50,      3
    inj2Open14         = scalar,  U16,    928,             "ms",       0.001,   0.00000,  0.00,   25.50,      3
    inj2Open15         = scalar,  U16,    930,             "ms",       0.001,   0.00000,  0.00,   25.50,      3
    inj2Open16         = scalar,  U16,    932,             "ms",       0.001,   0.00000,  0.00,   25.50,      3
    inj2Open17         = scalar,  U16,    934,             "ms",       0.001,   0.00000,  0.00,   25.50,      3
    inj2Open18         = scalar,  U16,    936,             "ms",       0.001,   0.00000,  0.00,   25.50,      3
#endif

      inj2PwmT        = scalar,  U08,    938,             "ms",       0.12800,   0.128,  0.00,   32.64,      1 ; * (  1 byte)
      inj2PwmPd       = scalar,  U08,    939,             "us",       1.00000,   0.00000, 40.00,  100.00,      0 ; * (  1 byte)
      inj2PwmP        = scalar,  U08,    940,             "%",        1.00000,   0.00000,  0.00,  100.00,      0 ; * (  1 byte)
      inj2PwmT2       = scalar,  U08,    941,             "ms",       0.12800,   0.128,  0.00,   32.64,      1 ; * (  1 byte)
      inj2PwmPd2      = scalar,  U08,    942,             "us",       1.00000,   0.00000, 40.00,  100.00,      0 ; * (  1 byte)
      inj2PwmP2       = scalar,  U08,    943,             "%",        1.00000,   0.00000,  0.00,  100.00,      0 ; * (  1 byte)
    dualfuel_temp_sens =  bits, U08, 944, [0:3], "Sensor 1", "Sensor 2","Sensor 3","Sensor 4","Sensor 5","Sensor 6","Sensor 7","Sensor 8","Sensor 9","Sensor 10","Sensor 11","Sensor 12","Sensor 13","Sensor 14","Sensor 15","Sensor 16"
    dualfuel_press_sens = bits, U08, 945, [0:3], "Sensor 1", "Sensor 2","Sensor 3","Sensor 4","Sensor 5","Sensor 6","Sensor 7","Sensor 8","Sensor 9","Sensor 10","Sensor 11","Sensor 12","Sensor 13","Sensor 14","Sensor 15","Sensor 16"
;     unused variables for trans controller to adjust us
;      FuelAdj 946
;      SpkAdj, 948
;      IdleAdj, 950
;      SprAdj; 952
; more spares
    dualfuel_pri = bits, U08, 954, [0:1], "V3 inj1" "INVALID" "V3 inj1+2" "MS3X"
    dualfuel_sec = bits, U08, 955, [0:1],  "INVALID" "V3 inj2" "V3 inj1+2" "MS3X"
    ITB_load_mappoint = scalar, S16, 956, "% baro", 0.1000, 0, 30, 100.0, 1
    ITB_load_idletpsthresh = scalar, S16, 958, "%", 0.1000, 0, -10, 100, 0


   page = 3 ; 8
      boost_ctl_load_targets   = array,  S16, 0, [8x8], "%", 0.1, 0, 0, 400, 1
      boost_ctl_loadtarg_tps_bins=array, S16, 128, [8], "%", 0.1, 0, 0, 100, 1
      boost_ctl_loadtarg_rpm_bins=array, U16, 144, [8], "rpm", 1, 0, 0, 25500, 0
      boost_ctl_pwm_targets    = array,  U08, 160, [8x8], "%", 1, 0, 0, 100, 0
      boost_ctl_pwmtarg_tps_bins=array,  S16, 224, [8], "%", 0.1, 0, 0, 100, 1
      boost_ctl_pwmtarg_rpm_bins=array,  U16, 240, [8], "rpm", 1, 0, 0, 25500, 0
      primePWTable              =array,  S16, 256,    [   10], "ms",       0.10000,   0.00000,  0.00,   65.00,      1 ; * ( 20 bytes)
      crankPctTable             =array,  U16, 276,    [   10], "%",       1,   1,  1,   10000,      0 ; * ( 20 bytes)
      asePctTable               =array,  S16, 296,    [   10], "%",        1.00000,   0.00000,  0.00,  400.00,      0 ; * (  2 bytes)
      aseCntTable               =array,  S16, 316,    [   10], "cycles",   1.00000,   0.00000,  0.00, 2500.00,      0 ; * (  2 bytes)

#if CELSIUS
      matTemps                  =array,  S16, 336,    [    6], "°C",       0.05555,  -320.000,-40.00,  150.00,      1 ; * ( 12 bytes)
#else
      matTemps                  =array,  S16, 336,    [    6], "°F",       0.10000,   0.00000,-40.00,  300.00,      1
#endif
      matRetard                 =array,  U08, 348,    [    6], "deg",      0.10000,   0.00000,  0.00,    25.5,      1 ; * (  6 bytes)

      EAEAWCRPMbins   = array,   U16,    354,    [   12], "rpm",      1.00000,   0.00000,0,       25500,       0 ; * (24 bytes)
      EAESOCRPMbins   = array,   U16,    378,    [   12], "rpm",      1.00000,   0.00000,0,	  25500,       0 ; * (24 bytes)
      EAEAWCKPAbins   = array,   U16,    402,    [   12], "kpa",      0.10000,   0.00000,0,       255,         0 ; * (24 bytes)
      EAESOCKPAbins   = array,   U16,    426,    [   12], "kpa",      0.10000,   0.00000,0,       255,         0 ; * (24 bytes)
      EAEBAWC	      = array,   U08,    450,    [   12], "%",        1.00000,   0.00000,0,       100,         0 ; * (12 bytes)
      EAEBSOC	      = array,   U08,    462,    [   12], "%",        0.10000,   0.00000,0,       25.5,         1 ; * (12 bytes)
      EAEAWN	      = array,   U08,    474,    [   12], "%",        1.00000,   0.00000,0,       200,         0 ; * (12 bytes)
      EAESON	      = array,   U08,    486,    [   12], "%",        1.00000,   0.00000,0,	  200,         0 ; * (12 bytes)
      EAEAWW	      = array,   U08,    498,    [   12], "%",        1.00000,   0.00000,0,	  200,         0
      EAESOW	      = array,   U08,    510,    [   12], "%",        1.00000,   0.00000,0,	  200,         0

      ; Supplemental corrections for barometer and MAT.
      baroCorrVals    = array ,  S16,    522,    [    6], "kPa",      0.10000,   0.00000,  0.00,  400.00,      1 ; * ( 24 bytes)
#if CELSIUS
      matCorrTemps    = array ,  S16,    534,    [    6], "°C",       0.05555,  -320.000,-40.00,  150.00,      1 ; * ( 12 bytes)
#else
      matCorrTemps    = array ,  S16,    534,    [    6], "°F",       0.10000,   0.00000,-40.00,  300.00,      1
#endif
; moved later and to S16
;      XXXbaroCorrDelta   = array ,  S08,    546,    [    6], "%",        1.00000,   0.00000,-120.0,   120.0,      1 ; * (  6 bytes)
;      XXXmatCorrDelta    = array ,  S08,    552,    [    6], "%",        1.00000,   0.00000,-120.0,   120.0,      1 ; * (  6 bytes)

#if CELSIUS
	#if EXPANDED_CLT_TEMP
      temp_table_p5   = array,  S16,     558,    [   10], "°C",	      0.05555,   -320.000, -40.00, 230.00,     0
	#else
      temp_table_p5   = array,  S16,     558,    [   10], "°C",	      0.05555,   -320.000, -40.00, 150.00,     0
	#endif
#else
	#if EXPANDED_CLT_TEMP
      temp_table_p5   = array,  S16,     558,    [   10], "°F",       0.10000,   0.000,-40.00, 450.00,      1
	#else
      temp_table_p5   = array,  S16,     558,    [   10], "°F",       0.10000,   0.000,-40.00, 300.00,      1
	#endif
#endif

#if CELSIUS
	#if EXPANDED_CLT_TEMP
      EAEAWWCLTbins   = array,  S16,     578,    [   12], "deg",       0.05555,   -320.000, -40.00, 230.00,     0
      EAESOWCLTbins   = array,  S16,     602,    [   12], "deg",       0.05555,   -320.000, -40.00, 230.00,     0
	#else
      EAEAWWCLTbins   = array,  S16,     578,    [   12], "deg",       0.05555,   -320.000, -40.00, 150.00,     0
      EAESOWCLTbins   = array,  S16,     602,    [   12], "deg",       0.05555,   -320.000, -40.00, 150.00,     0
	#endif
#else
	#if EXPANDED_CLT_TEMP
      EAEAWWCLTbins   = array,  S16,     578,    [   12], "deg",       0.10000,   0.000,-40.00, 450.00,      1
      EAESOWCLTbins   = array,  S16,     602,    [   12], "deg",       0.10000,   0.000,-40.00, 450.00,      1
	#else
      EAEAWWCLTbins   = array,  S16,     578,    [   12], "deg",       0.10000,   0.000,-40.00, 300.00,      1
      EAESOWCLTbins   = array,  S16,     602,    [   12], "deg",       0.10000,   0.000,-40.00, 300.00,      1
	#endif
#endif

      pwmidle_target_rpms = array, U16, 626,    [ 8 ], "rpms",      1, 0.00000, 0.00, 2000, 0;
#if CELSIUS
	#if EXPANDED_CLT_TEMP
      pwmidle_clt_temps = array,  S16, 642,   [8],  "°C",   0.05555,  -320.000,-40.00,  230.00,      1 ;
	#else
      pwmidle_clt_temps = array,  S16, 642,   [8],  "°C",   0.05555,  -320.000,-40.00,  150.00,      1 ;
	#endif
#else
	#if EXPANDED_CLT_TEMP
      pwmidle_clt_temps = array,  S16, 642,   [8],  "°F",       0.10000,  0.00000,-40.00,  450.00,      1
	#else
      pwmidle_clt_temps = array,  S16, 642,   [8],  "°F",       0.10000,  0.00000,-40.00,  300.00,      1
	#endif
#endif

;padding 20
#if CELSIUS
	#if EXPANDED_CLT_TEMP
      RevLimLookup    = array ,  S16,    678,    [    8], "°C",       0.05555,  -320.000,-40.00,  230.00,      1 ; * ( 16 bytes) 
	#else
      RevLimLookup    = array ,  S16,    678,    [    8], "°C",       0.05555,  -320.000,-40.00,  150.00,      1 ; * ( 16 bytes)
	#endif
#else
	#if EXPANDED_CLT_TEMP
      RevLimLookup    = array ,  S16,    678,    [    8], "°F",       0.10000,   0.00000,-40.00,  450.00,      1 ; * ( 16 bytes) 
	#else
      RevLimLookup    = array ,  S16,    678,    [    8], "°F",       0.10000,   0.00000,-40.00,  300.00,      1 ; * ( 16 bytes) 
	#endif
#endif

      RevLimRpm1      = array ,  U16,    694,    [    8], "RPM",      1.00000,   0.00000,  0.00,15000.00,      0 ; * ( 16 bytes
;these are not presently used, but might re-appear
      Xknk_rpm         = array ,  U16,    710,    [    6], "rpm",      1.0,       0.0,      0.0,    6000,       0 ; * (  2 bytes)
      Xknk_thresh      = array ,  U16,    722,    [    6], "v",        0.01,      0.0,      0.0,    5.00,       2 ; * (  2 bytes)

      RotarySplitTable = array, S16,  734,    [8x8], "deg",  0.10000, 0.00000, -60, 20, 1
      RotarySplitLoad = array, U16,   862, [ 8 ], "%", 0.10000, 0.00000, 0, 65535, 0
      RotarySplitRPM = array, U16,  878, [ 8 ], "RPM", 1, 0.00000, 0, 65535, 0

      NoiseFilterRpm = array, U16, 894, [  4], "RPM",      1, 0.00000, 0.00, 65535,  0
      NoiseFilterLen = array, U16, 902, [  4], "usec",     1.0, 0.00000, 0.00, 43000, 1

      VariableLagTPSBins = array,  U08,  910, [4], "%/sec", 1, 0.000000, 0.00, 255.00, 0
      VariableLagMapLags = array,  U08,  914, [4], "Lag", 1, 0.000000, 0.00, 255.00, 0
      pwmidle_crank_dutyorsteps_duty = array, U16, 918, [4], "%", 0.39063, 0.00000, 0, 100, 1
      pwmidle_crank_dutyorsteps_steps = array, U16, 918, [4], "steps", 1, 0, 0, 512, 0

#if CELSIUS
	#if EXPANDED_CLT_TEMP
      pwmidle_crank_clt_temps = array, S16, 926, [4], "°C", 0.05555,  -320.000,-40.00,  230.00,      1
	#else
      pwmidle_crank_clt_temps = array, S16, 926, [4], "°C", 0.05555,  -320.000,-40.00,  150.00,      1
	#endif
#else
	#if EXPANDED_CLT_TEMP
      pwmidle_crank_clt_temps = array, S16, 926, [4], "°F",       0.10000,   0.00000,-40.00,  450.00,      1
	#else
      pwmidle_crank_clt_temps = array, S16, 926, [4], "°F",       0.10000,   0.00000,-40.00,  300.00,      1	
	#endif
#endif
      matclt_pct    = array, U16,    934,    [6],    "%",    0.010, 0,       0,      60,   1
      matclt_rpm    = array, U16,    946,    [6],    "rpm",  1,       0,       0,      15000, 0
      ;user defined
; these are not used by the code and are provided for users to use and learn from
; if you want to add more... you also have to make matching changes in ms2_extra.h
; and ms2_extra_main.c
; note that it you add an 'int' that two bytes are consumed and two of the following
; spare array will need to be removed!
    user_value1      = scalar, U16, 958, "",   1, 0, 0, 65535, 0
    user_value2      = scalar, U16, 960, "",   1, 0, 0, 65535, 0
    user_conf0       = bits, U08, 962, [0:0], "Off", "On"
    user_conf1       = bits, U08, 962, [1:2], "Mode 0", "Mode 1", "Mode 2", "Mode 3"
;spare 10 bytes
;end user defined
;pad1
      baroCorrDelta   = array ,  S16,    974,    [    6], "%",        0.10000,   0.00000,-120.0,   120.0,      1 ; * (  6 bytes)
      matCorrDelta    = array ,  S16,    986,    [    6], "%",        0.10000,   0.00000,-120.0,   120.0,      1 ; * (  6 bytes)
; space

page = 4 ; 9   - injector channel trims
      inj_trima   = array ,  S08,    000,    [6x6], "%",      0.10000,   0.00000, -12.7,   12.7,      1 ; * (36 bytes)
      inj_trimb   = array ,  S08,    036,    [6x6], "%",      0.10000,   0.00000, -12.7,   12.7,      1 ; * (36 bytes)
      inj_trimc   = array ,  S08,    072,    [6x6], "%",      0.10000,   0.00000, -12.7,   12.7,      1 ; * (36 bytes)
      inj_trimd   = array ,  S08,    108,    [6x6], "%",      0.10000,   0.00000, -12.7,   12.7,      1 ; * (36 bytes)
      inj_trime   = array ,  S08,    144,    [6x6], "%",      0.10000,   0.00000, -12.7,   12.7,      1 ; * (36 bytes)
      inj_trimf   = array ,  S08,    180,    [6x6], "%",      0.10000,   0.00000, -12.7,   12.7,      1 ; * (36 bytes)
      inj_trimg   = array ,  S08,    216,    [6x6], "%",      0.10000,   0.00000, -12.7,   12.7,      1 ; * (36 bytes)
      inj_trimh   = array ,  S08,    252,    [6x6], "%",      0.10000,   0.00000, -12.7,   12.7,      1 ; * (36 bytes)
      inj_trim1   = array ,  S08,    288,    [6x6], "%",      0.10000,   0.00000, -12.7,   12.7,      1 ; * (36 bytes)
      inj_trim2   = array ,  S08,    324,    [6x6], "%",      0.10000,   0.00000, -12.7,   12.7,      1 ; * (36 bytes)

      inj_trim_rpma = array, U16,    360,    [6], "rpm",      1,   0.00000, 0,   15000,      0 ; * (12 bytes)
      inj_trim_rpmb = array, U16,    372,    [6], "rpm",      1,   0.00000, 0,   15000,      0 ; * (12 bytes)
      inj_trim_rpmc = array, U16,    384,    [6], "rpm",      1,   0.00000, 0,   15000,      0 ; * (12 bytes)
      inj_trim_rpmd = array, U16,    396,    [6], "rpm",      1,   0.00000, 0,   15000,      0 ; * (12 bytes)
      inj_trim_rpme = array, U16,    408,    [6], "rpm",      1,   0.00000, 0,   15000,      0 ; * (12 bytes)
      inj_trim_rpmf = array, U16,    420,    [6], "rpm",      1,   0.00000, 0,   15000,      0 ; * (12 bytes)
      inj_trim_rpmg = array, U16,    432,    [6], "rpm",      1,   0.00000, 0,   15000,      0 ; * (12 bytes)
      inj_trim_rpmh = array, U16,    444,    [6], "rpm",      1,   0.00000, 0,   15000,      0 ; * (12 bytes)
      inj_trim_rpm1 = array, U16,    456,    [6], "rpm",      1,   0.00000, 0,   15000,      0 ; * (12 bytes)
      inj_trim_rpm2 = array, U16,    468,    [6], "rpm",      1,   0.00000, 0,   15000,      0 ; * (12 bytes)

      inj_trim_loada =array, U16,    480,    [6], "%",        0.1,   0.0000, 0,   400,        1 ; * (12 bytes)
      inj_trim_loadb =array, U16,    492,    [6], "%",        0.1,   0.0000, 0,   400,        1 ; * (12 bytes)
      inj_trim_loadc =array, U16,    504,    [6], "%",        0.1,   0.0000, 0,   400,        1 ; * (12 bytes)
      inj_trim_loadd =array, U16,    516,    [6], "%",        0.1,   0.0000, 0,   400,        1 ; * (12 bytes)
      inj_trim_loade =array, U16,    528,    [6], "%",        0.1,   0.0000, 0,   400,        1 ; * (12 bytes)
      inj_trim_loadf =array, U16,    540,    [6], "%",        0.1,   0.0000, 0,   400,        1 ; * (12 bytes)
      inj_trim_loadg =array, U16,    552,    [6], "%",        0.1,   0.0000, 0,   400,        1 ; * (12 bytes)
      inj_trim_loadh =array, U16,    564,    [6], "%",        0.1,   0.0000, 0,   400,        1 ; * (12 bytes)
      inj_trim_load1 =array, U16,    576,    [6], "%",        0.1,   0.0000, 0,   400,        1 ; * (12 bytes)
      inj_trim_load2 =array, U16,    588,    [6], "%",        0.1,   0.0000, 0,   400,        1 ; * (12 bytes)

      inj_timing = array, S16,       600,    [12x12], "deg",  0.10000, 0.00000, -360.0, 720.0, 1
      inj_timing_rpm = array, U16,   888,    [12],    "rpm",  1,       0,       0,      65535, 0
      inj_timing_load = array, S16,  912,    [12],    "%",    0.10000, 0,       0,      400,   1
      maxafr1_load   = array, U16,    936,    [6],    "%",    0.10000, 0,       0,      400,   1
      maxafr1_rpm    = array, U16,    948,    [6],    "rpm",  1,       0,       0,      65535, 0
#if LAMBDA
      maxafr1_diff    = array, U08,    960,    [6x6], "Lambda",  0.006803,   0.00000,  0.00,    0.14,      3
#else
      maxafr1_diff    = array, U08,    960,    [6x6], "AFR",      0.10000,   0.00000,  0.00,   2.00,      1
#endif
      dwellrpm_dwell = array, U08,    996,    [6], "ms", 0.1, 0, 1, 8, 1
      dwellrpm_rpm   = array, U16,   1002,    [6], "RPM", 1, 0, 0, 15000, 0

page = 5   ; 10
      boost_ctl_load_targets2   = array,  S16, 0, [8x8], "%", 0.1, 0, 0, 400, 1
      boost_ctl_loadtarg_tps_bins2=array, S16, 128, [8], "%", 0.1, 0, 0, 100, 1
      boost_ctl_loadtarg_rpm_bins2=array, U16, 144, [8], "rpm", 1, 0, 0, 25500, 0
      boost_ctl_pwm_targets2    = array,  U08, 160, [8x8], "%", 1, 0, 0, 100, 0
      boost_ctl_pwmtarg_tps_bins2=array,  S16, 224, [8], "%", 0.1, 0, 0, 100, 1
      boost_ctl_pwmtarg_rpm_bins2=array,  U16, 240, [8], "rpm", 1, 0, 0, 25500, 0
      boost_timed_pct = array,  U08,    256, [ 6 ], "%", 1, 0, 0, 100, 0 
      boost_timed_time= array,  U16,    262, [ 6 ], "s", 0.001, 0, 0, 15, 1
      boostvss_duty   = array,  U08,    274, [ 6 ], "%", 1, 0, 0, 100, 0
      boostvss_target = array,  U16,    280, [ 6 ], "kPa", 0.1, 0, 0, 400, 1
#if MPH
      boostvss_speed  = array,  U16,    292, [ 6 ], "MPH", 0.22369, 0, 0, 1000, 0
#else
      boostvss_speed  = array,  U16,    292, [ 6 ], "KPH", 0.3600, 0, 0, 1600, 0
#endif
      map_sample_rpms = array, U16, 304, [ 8 ], "rpm", 1, 0, 0, 16000, 0 
      map_sample_timing = array, S16, 320, [ 8 ], "deg", 0.10000, 0, -360, 720, 1
#if LAMBDA
      afrTable1       = array ,  U08,    336,    [12x12], "Lambda",  0.006803,   0.00000,  0.00,    2.00,      3 ; * (144 bytes)
      afrTable2       = array ,  U08,    480,    [12x12], "Lambda",  0.006803,   0.00000,  0.00,    2.00,      3 ; * (144 bytes)
#else
      afrTable1       = array ,  U08,    336,    [12x12], "AFR",      0.10000,   0.00000,  9.00,   20.00,      1
      afrTable2       = array ,  U08,    480,    [12x12], "AFR",      0.10000,   0.00000,  9.00,   20.00,      1
#endif
      wueBins         = array ,  U08,    624,    [   10], "%",        1.00000,   0.00000,  0.00,  255.00,      0 ; * ( 10 bytes)
;gap
      iacstepTable    = array ,  S16,    642,    [   10], "steps",    1.00000,   0.00000,  0.00,  500.00,      0 ; * ( 20 bytes)

      arpm_table1     = array ,  U16,    662,    [   12], "RPM",      1.00000,   0.00000,  0.00,15000.00,      0 ; * ( 24 bytes)
      arpm_table2     = array ,  U16,    686,    [   12], "RPM",      1.00000,   0.00000,  0.00,15000.00,      0 ; * ( 24 bytes)
      amap_table1     = array ,  S16,    710,    [   12], "%",      0.10000,   0.00000,  0.00,  400.00,      1 ; * ( 24 bytes)
      amap_table2     = array ,  S16,    734,    [   12], "%",      0.10000,   0.00000,  0.00,  400.00,      1 ; * ( 24 bytes)

#if CELSIUS
	#if EXPANDED_CLT_TEMP
      tempTable       = array ,  S16,    758,    [   10], "°C",       0.05555,  -320.000,-40.00,  230.00,      1 ; * ( 20 bytes) Temperature bins for cranking, cold AE and WUE
	#else
      tempTable       = array ,  S16,    758,    [   10], "°C",       0.05555,  -320.000,-40.00,  150.00,      1 ; * ( 20 bytes) Temperature bins for cranking, cold AE and WUE
	#endif
  #else
	#if EXPANDED_CLT_TEMP
      tempTable       = array ,  S16,    758,    [   10], "°F",       0.10000,   0.00000,-40.00,  450.00,      1
	#else
      tempTable       = array ,  S16,    758,    [   10], "°F",       0.10000,   0.00000,-40.00,  300.00,      1
	#endif
  #endif
;gap
      dwellvolts      = array ,  U08,    794,    [    6], "V",        0.10000,   0.00000,6,   18,      1 ; * (  6 bytes)
      dwellcorr       = array ,  U08,    800,    [    6], "%",       2,   0.00000,20,   512,      0 ; * (  6 bytes)
      cold_adv_table  = array ,  S16,    806,    [   10], "deg",      0.10000,   0.00000,-10.00,   10.00,      1 ; * ( 20 bytes)
      ipwmTable       = array ,  S16,    826,    [   10], "%",        0.39063,   0.00000,  0.00,  100.00,      1
;846
      opentimepct0       = array,   U16,    846,    [    6], "%",       0.1,   0.00000,  0.00,   500,      1
      opentimepct1       = array,   U16,    858,    [    6], "%",       0.1,   0.00000,  0.00,   500,      1
      opentimepct2       = array,   U16,    870,    [    6], "%",       0.1,   0.00000,  0.00,   500,      1
      opentimepct3       = array,   U16,    882,    [    6], "%",       0.1,   0.00000,  0.00,   500,      1
      opentimev       = array,   U16,    894,    [    6], "V",        0.100,   0.00000,  6,      19.2,     1

#if PW_4X
      smallpw0       = array,   U16,    906,    [    6], "ms",       0.004,   0.00000,  0.00,   2,      3
      smallpw1       = array,   U16,    918,    [    6], "ms",       0.004,   0.00000,  0.00,   2,      3
      smallpw2       = array,   U16,    930,    [    6], "ms",       0.004,   0.00000,  0.00,   2,      3
      smallpw3       = array,   U16,    942,    [    6], "ms",       0.004,   0.00000,  0.00,   2,      3
      smallpwpw      = array,   U16,    954,    [    6], "ms",       0.004,   0.00000,  0.00,   2,      3
#else
      smallpw0       = array,   U16,    906,    [    6], "ms",       0.001,   0.00000,  0.00,   2,      3
      smallpw1       = array,   U16,    918,    [    6], "ms",       0.001,   0.00000,  0.00,   2,      3
      smallpw2       = array,   U16,    930,    [    6], "ms",       0.001,   0.00000,  0.00,   2,      3
      smallpw3       = array,   U16,    942,    [    6], "ms",       0.001,   0.00000,  0.00,   2,      3
      smallpwpw      = array,   U16,    954,    [    6], "ms",       0.001,   0.00000,  0.00,   2,      3
#endif

      waterinj_rpm      = array,   U16,    966,    [    8], "RPM",      1,   0.00000,  0.00,   15000,      0
      waterinj_map      = array,   U16,    982,    [    4], "kPa",      0.1, 0.00000,  0.00,   400,        0
      waterinj_duty     = array,   U08,    990,    [8 x 4], "%",        1,   0,        0,      100,        0

page = 6 ; 11   - spark channel trims
      spk_trima   = array ,  S08,    000,    [6x6], "%",      0.10000,   0.00000, -12.7,   12.7,      1 ; * (36 bytes)
      spk_trimb   = array ,  S08,    036,    [6x6], "%",      0.10000,   0.00000, -12.7,   12.7,      1 ; * (36 bytes)
      spk_trimc   = array ,  S08,    072,    [6x6], "%",      0.10000,   0.00000, -12.7,   12.7,      1 ; * (36 bytes)
      spk_trimd   = array ,  S08,    108,    [6x6], "%",      0.10000,   0.00000, -12.7,   12.7,      1 ; * (36 bytes)
      spk_trime   = array ,  S08,    144,    [6x6], "%",      0.10000,   0.00000, -12.7,   12.7,      1 ; * (36 bytes)
      spk_trimf   = array ,  S08,    180,    [6x6], "%",      0.10000,   0.00000, -12.7,   12.7,      1 ; * (36 bytes)
      spk_trimg   = array ,  S08,    216,    [6x6], "%",      0.10000,   0.00000, -12.7,   12.7,      1 ; * (36 bytes)
      spk_trimh   = array ,  S08,    252,    [6x6], "%",      0.10000,   0.00000, -12.7,   12.7,      1 ; * (36 bytes)
      spk_trimi   = array ,  S08,    288,    [6x6], "%",      0.10000,   0.00000, -12.7,   12.7,      1 ; * (36 bytes)
      spk_trimj   = array ,  S08,    324,    [6x6], "%",      0.10000,   0.00000, -12.7,   12.7,      1 ; * (36 bytes)

      spk_trim_rpma = array, U16,    360,    [6], "rpm",      1,   0.00000, 0,   15000,      0 ; * (12 bytes)
      spk_trim_rpmb = array, U16,    372,    [6], "rpm",      1,   0.00000, 0,   15000,      0 ; * (12 bytes)
      spk_trim_rpmc = array, U16,    384,    [6], "rpm",      1,   0.00000, 0,   15000,      0 ; * (12 bytes)
      spk_trim_rpmd = array, U16,    396,    [6], "rpm",      1,   0.00000, 0,   15000,      0 ; * (12 bytes)
      spk_trim_rpme = array, U16,    408,    [6], "rpm",      1,   0.00000, 0,   15000,      0 ; * (12 bytes)
      spk_trim_rpmf = array, U16,    420,    [6], "rpm",      1,   0.00000, 0,   15000,      0 ; * (12 bytes)
      spk_trim_rpmg = array, U16,    432,    [6], "rpm",      1,   0.00000, 0,   15000,      0 ; * (12 bytes)
      spk_trim_rpmh = array, U16,    444,    [6], "rpm",      1,   0.00000, 0,   15000,      0 ; * (12 bytes)
      spk_trim_rpm1 = array, U16,    456,    [6], "rpm",      1,   0.00000, 0,   15000,      0 ; * (12 bytes)
      spk_trim_rpm2 = array, U16,    468,    [6], "rpm",      1,   0.00000, 0,   15000,      0 ; * (12 bytes)

      spk_trim_loada =array, U16,    480,    [6], "%",        0.1,   0.0000, 0,   400,        1 ; * (12 bytes)
      spk_trim_loadb =array, U16,    492,    [6], "%",        0.1,   0.0000, 0,   400,        1 ; * (12 bytes)
      spk_trim_loadc =array, U16,    504,    [6], "%",        0.1,   0.0000, 0,   400,        1 ; * (12 bytes)
      spk_trim_loadd =array, U16,    516,    [6], "%",        0.1,   0.0000, 0,   400,        1 ; * (12 bytes)
      spk_trim_loade =array, U16,    528,    [6], "%",        0.1,   0.0000, 0,   400,        1 ; * (12 bytes)
      spk_trim_loadf =array, U16,    540,    [6], "%",        0.1,   0.0000, 0,   400,        1 ; * (12 bytes)
      spk_trim_loadg =array, U16,    552,    [6], "%",        0.1,   0.0000, 0,   400,        1 ; * (12 bytes)
      spk_trim_loadh =array, U16,    564,    [6], "%",        0.1,   0.0000, 0,   400,        1 ; * (12 bytes)
      spk_trim_load1 =array, U16,    576,    [6], "%",        0.1,   0.0000, 0,   400,        1 ; * (12 bytes)
      spk_trim_load2 =array, U16,    588,    [6], "%",        0.1,   0.0000, 0,   400,        1 ; * (12 bytes)
      XAcc           =array, U16,    600,    [5], "%",  0.10000,   0.00000, 5.00, 90,        1 ; * ( 10 bytes)
      TauAcc         =array, U16,    610,    [5], "msec",1.00000,  0.00000, 2.00, 20000,     0 ; * ( 10 bytes)
      XDec           =array, U16,    620,    [5], "%",   0.10000,  0.00000, 5.00,    90,     1 ; * ( 10 bytes)
      TauDec         =array, U16,    630,    [5], "msec",1.00000,  0.00000, 2.00, 20000,     0 ; * ( 10 bytes)
      XTrpms         =array, U16,    640,    [5], "rpm",1.00000,   0.00000, 0.00, 10000,     0 ; * ( 10 bytes)
      XClt           =array, U16,    650,    [10], "%", 1.00000,   0.00000, 0.00,   600,     0 ; * ( 20 bytes)
      TauClt         =array, U16,    670,    [10], "%", 1.00000,   0.00000, 0.00,   600,     0 ; * ( 20 bytes)
#if CELSIUS
  #if EXPANDED_CLT_TEMP
      XClt_temps   = array,  S16,    690,    [   10], "°C",	   0.05555,   -320.000, -40.00, 230.00,     0
      TauClt_temps = array,  S16,    710,    [   10], "°C",	   0.05555,   -320.000, -40.00, 230.00,     0
  #else
      XClt_temps   = array,  S16,    690,    [   10], "°C",	   0.05555,   -320.000, -40.00, 150.00,     0
      TauClt_temps = array,  S16,    710,    [   10], "°C",	   0.05555,   -320.000, -40.00, 150.00,     0
  #endif
#else
  #if EXPANDED_CLT_TEMP
      XClt_temps   = array,  S16,    690,    [   10], "°F",      0.10000,   0.000,-40.00, 450.00,      1
      TauClt_temps = array,  S16,    710,    [   10], "°F",      0.10000,   0.000,-40.00, 450.00,      1
  #else
      XClt_temps   = array,  S16,    690,    [   10], "°F",      0.10000,   0.000,-40.00, 300.00,      1
      TauClt_temps = array,  S16,    710,    [   10], "°F",      0.10000,   0.000,-40.00, 300.00,      1
  #endif
#endif
;progressive nitrous tables
      n2o1_time     = array, U16,    730,    [6], "s", 0.001, 0, 0, 15, 2
      n2o1_rpm      = array, U16,    742,    [6], "RPM", 1, 0, 0, 15000, 0
      n2o1_duty     = array, U08,    754,    [6], "%", 1, 0, 0, 100, 1
#if PW_4X
      n2o1_pw       = array, S16,    760,    [6], "ms", 0.004, 0, -20, 80, 3
      n2o2_pw       = array, S16,    814,    [6], "ms", 0.004, 0, -20, 80, 3
#else
      n2o1_pw       = array, S16,    760,    [6], "ms", 0.001, 0, -5, 20, 3
      n2o2_pw       = array, S16,    814,    [6], "ms", 0.001, 0, -5, 20, 3
#endif
      n2o1_retard   = array, U16,    772,    [6], "deg", 0.1, 0, 0, 30, 1
      n2o2_time     = array, U16,    784,    [6], "s", 0.001, 0, 0, 15, 2
      n2o2_rpm      = array, U16,    796,    [6], "RPM", 1, 0, 0, 15000, 0
      n2o2_duty     = array, U08,    808,    [6], "%", 1, 0, 0, 100, 1
;      n2o2_pw       = array, S16,    814,    [6], "ms", 0.001, 0, -5, 20, 3
      n2o2_retard   = array, U16,    826,    [6], "deg", 0.1, 0, 0, 30, 1
; staged tables
      staged_percents=array, U08,    838,  [8x8], "%", 1, 0, 0, 100, 0
      staged_rpms   = array, U16,    902,  [8], "rpm", 1, 0, 0, 15000, 0
      staged_loads  = array, S16,    918,  [8], "%",   0.1, 0, 0, 250, 1
      MAFFlow       = array, U16,    934,  [12], "g/sec", 0.01000,   0.00000,  0.00,   650.0,      1
      MAFCor        = array, U08,    958,  [12], "%", 1.00000,   0.00000,  0.00,   255.0,      0  

page = 7 ; 12
      veTable1        = array ,  U16,    000,    [16x16], "%",        0.10000,   0.00000,  0.00,  255.00,      1 ; * (512 bytes)
      veTable2	      = array ,  U16,    512,    [16x16], "%",        0.10000,   0.00000,  0.00,  255.00,      1 ;

page = 8 ; 13
      advanceTable1   = array ,  S16,    000,    [16x16], "deg",      0.10000,   0.00000,-10.00,   90.00,      1 ; * (512 bytes)
      advanceTable2   = array ,  S16,    512,    [16x16], "deg",      0.10000,   0.00000,-10.00,   90.00,      1 ; * (512 bytes)

page = 9 ; 18
      veTable3	      = array ,  U16,    000,    [16x16], "%",        0.10000,   0.00000,  0.00,  255.00,      1 ;
      advanceTable3   = array ,  S16,    512,    [16x16], "deg",      0.10000,   0.00000,-10.00,   90.00,      1 ; * (288 bytes)

page = 10 ; 19
      frpm_table1     = array ,  U16,    000,    [   16], "RPM",      1.00000,   0.00000,  0.00,15000.00,      0 ; * ( 24 bytes)
      frpm_table2     = array ,  U16,    032,    [   16], "RPM",      1.00000,   0.00000,  0.00,15000.00,      0 ; * ( 24 bytes)
      frpm_table3     = array ,  U16,    064,    [   16], "RPM",      1.00000,   0.00000,  0.00,15000.00,      0 ; * ( 24 bytes)

      fmap_table1     = array ,  S16,    096,    [   16], "%",        0.10000,   0.00000,  0.00,  400.00,      1 ; * ( 24 bytes)
      fmap_table2     = array ,  S16,    128,    [   16], "%",        0.10000,   0.00000,  0.00,  400.00,      1 ; * ( 24 bytes)
      fmap_table3     = array ,  S16,    160,    [   16], "%",        0.10000,   0.00000,  0.00,  400.00,      1 ; * ( 24 bytes)

      srpm_table1     = array ,  U16,    192,    [   16], "RPM",      1.00000,   0.00000,  0.00,15000.00,      0 ; * ( 24 bytes)
      srpm_table2     = array ,  U16,    224,    [   16], "RPM",      1.00000,   0.00000,  0.00,15000.00,      0 ; * ( 24 bytes)
      srpm_table3     = array ,  U16,    256,    [   16], "RPM",      1.00000,   0.00000,  0.00,15000.00,      0 ; * ( 24 bytes)

      smap_table1     = array ,  S16,    288,    [   16], "%",        0.10000,   0.00000,  0.00,  400.00,      1 ; * ( 24 bytes)
      smap_table2     = array ,  S16,    320,    [   16], "%",        0.10000,   0.00000,  0.00,  400.00,      1 ; * ( 24 bytes)
      smap_table3     = array ,  S16,    352,    [   16], "%",        0.10000,   0.00000,  0.00,  400.00,      1 ; * ( 24 bytes)
      EAEAWCRPMbins2  = array,   U16,    384,    [   12], "rpm",      1.0000,    0.00000,  0.00,  16000,       0 ; * ( 24 bytes)
      EAESOCRPMbins2  = array,   U16,    408,    [   12], "rpm",      1.0000,    0.00000,  0.00,  16000,       0 ; * ( 24 bytes)
      EAEAWCKPAbins2  = array,   U16,    432,    [   12], "%",        0.1000,    0.00000,  0.00,  400.00,      1
      EAESOCKPAbins2  = array,   U16,    456,    [   12], "%",        0.1000,    0.00000,  0.00,  400.00,      1
      EAEBAWC2 = array,          U08,    480,    [   12], "%",        1.0000,    0.00000,  0.00,  100.00,      0
      EAEBSOC2 = array,          U08,    492,    [   12], "%",        0.10000,   0.00000,  0.00,  25.5,        1
      EAEAWN2      = array,   U08,       504,    [   12], "%",        1.00000,   0.00000,0,	  200,         0 ; * (12 bytes)
      EAESON2      = array,   U08,       516,    [   12], "%",        1.00000,   0.00000,0,	  200,         0
      EAEAWW2 =  array,          U08,    528,    [   12], "%",        1.0000,    0.00000,  0.00,  100,         0
      EAESOW2 =  array,          U08,    540,    [   12], "%",        1.0000,    0.00000,  0.00,  100,         0
#if CELSIUS
  #if EXPANDED_CLT_TEMP
      EAEAWWCLTbins2   = array,  S16,     552,    [   12], "deg",       0.05555,   -320.000, -40.00, 230.00,     0
      EAESOWCLTbins2   = array,  S16,     576,    [   12], "deg",       0.05555,   -320.000, -40.00, 230.00,     0
	#else
      EAEAWWCLTbins2   = array,  S16,     552,    [   12], "deg",       0.05555,   -320.000, -40.00, 150.00,     0
      EAESOWCLTbins2   = array,  S16,     576,    [   12], "deg",       0.05555,   -320.000, -40.00, 150.00,     0
	#endif
#else
	#if EXPANDED_CLT_TEMP
      EAEAWWCLTbins2   = array,  S16,     552,    [   12], "deg",       0.10000,   0.000,-40.00, 450.00,      1
      EAESOWCLTbins2   = array,  S16,     576,    [   12], "deg",       0.10000,   0.000,-40.00, 450.00,      1
	#else
      EAEAWWCLTbins2   = array,  S16,     552,    [   12], "deg",       0.10000,   0.000,-40.00, 300.00,      1
      EAESOWCLTbins2   = array,  S16,     576,    [   12], "deg",       0.10000,   0.000,-40.00, 300.00,      1
	#endif
#endif
      ITB_load_loadvals= array,  S16,     600,    [   12], "%",         0.10000,   0.000, 0,     100.00,      1
      ITB_load_switchpoints = array,S16,  624,  [   12], "%",         0.10000,   0.000, 0,     100.00,      1
      ITB_load_rpms = array,     U16,     648,    [   12], "rpm",       1.0000,    0.000, 0,     16000,       0 
      idleve_table1 = array,     U16,     672,  [4x4], "%",           0.10000,    0.000, 0,   200,    1
      idleve_table2 = array,     U16,     704,  [4x4], "%",           0.10000,    0.000, 0,   200,    1
      idleve_loads1 = array,     S16,     736,  [4 ],  "%",           0.10000,    0.000, 0,   255,    1
      idleve_loads2 = array,     S16,     744,  [4 ],  "%",           0.10000,    0.000, 0,   255,    1
      idleve_rpms1 = array,      U16,     752,  [4 ],  "rpm",         1.00000,    0.000, 0,   65535,  0
      idleve_rpms2 = array,      U16,     760,  [4 ],  "rpm",         1.00000,    0.000, 0,   65535,  0 


page = 11 ; 21
      pwm_rpms_a     = array,  U16, 0, [6], "rpm", 1, 0, 0, 25500, 0
      pwm_rpms_b     = array,  U16, 12, [6], "rpm", 1, 0, 0, 25500, 0
      pwm_rpms_c     = array,  U16, 24, [6], "rpm", 1, 0, 0, 25500, 0
      pwm_rpms_d     = array,  U16, 36, [6], "rpm", 1, 0, 0, 25500, 0
      pwm_rpms_e     = array,  U16, 48, [6], "rpm", 1, 0, 0, 25500, 0
      pwm_rpms_f     = array,  U16, 60, [6], "rpm", 1, 0, 0, 25500, 0
      pwm_loadvals_a = array,  S16, 72, [6], "%", 0.1, 0, 0, 1000, 1
      pwm_loadvals_b = array,  S16, 84, [6], "%", 0.1, 0, 0, 1000, 1
      pwm_loadvals_c = array,  S16, 96, [6], "%", 0.1, 0, 0, 1000, 1
      pwm_loadvals_d = array,  S16, 108, [6], "%", 0.1, 0, 0, 1000, 1
      pwm_loadvals_e = array,  S16, 120, [6], "%", 0.1, 0, 0, 1000, 1
      pwm_loadvals_f = array,  S16, 132, [6], "%", 0.1, 0, 0, 1000, 1
      pwm_duties_a   = array,  U08, 144, [6x6], "%", 1, 0, 0, 100, 0
      pwm_duties_b   = array,  U08, 180, [6x6], "%", 1, 0, 0, 100, 0
      pwm_duties_c   = array,  U08, 216, [6x6], "%", 1, 0, 0, 100, 0
      pwm_duties_d   = array,  U08, 252, [6x6], "%", 1, 0, 0, 100, 0
      pwm_duties_e   = array,  U08, 288, [6x6], "%", 1, 0, 0, 100, 0
      pwm_duties_f   = array,  U08, 324, [6x6], "%", 1, 0, 0, 100, 0
      primePWTable2  = array,  S16, 360,    [   10], "ms",       0.10000,   0.00000,  0.00,   65.00,      1 ; * ( 20 bytes)
      crankPctTable2 = array,  U16, 380,    [   10], "%",       1,   1,  1,   10000,      0 ; * ( 20 bytes)
      asePctTable2   = array,  S16, 400,    [   10], "%",        1.00000,   0.00000,  0.00,  400.00,      0 ; * (  2 bytes)
      aseCntTable2   = array,  S16, 420,    [   10], "cycles",   1.00000,   0.00000,  0.00, 2500.00,      0 ; * (  2 bytes)
      wueBins2       = array,  U08, 440,    [   10], "%",        1.00000,   0.00000,  0.00,  255.00,      0 ; * ( 10 bytes)
#if CELSIUS
	#if EXPANDED_CLT_TEMP
      temp_table_p21   = array,  S16,     450,    [   10], "°C",	      0.05555,   -320.000, -40.00, 230.00,     0
	#else
      temp_table_p21   = array,  S16,     450,    [   10], "°C",	      0.05555,   -320.000, -40.00, 150.00,     0
	#endif
#else
	#if EXPANDED_CLT_TEMP
      temp_table_p21   = array,  S16,     450,    [   10], "°F",       0.10000,   0.000,-40.00, 450.00,      1
	#else
      temp_table_p21   = array,  S16,     450,    [   10], "°F",       0.10000,   0.000,-40.00, 300.00,      1
	#endif
#endif
      frpm_table4     = array ,  U16,    470,    [   16], "RPM",      1.00000,   0.00000,  0.00,15000.00,      0 ; * ( 24 bytes)
      fmap_table4     = array ,  S16,    502,    [   16], "%",        0.10000,   0.00000,  0.00,  400.00,      1 ; * ( 24 bytes)
      srpm_table4     = array ,  U16,    534,    [   16], "RPM",      1.00000,   0.00000,  0.00,15000.00,      0 ; * ( 24 bytes)
      smap_table4     = array ,  S16,    566,    [   16], "%",        0.10000,   0.00000,  0.00,  400.00,      1 ; * ( 24 bytes)
#if CELSIUS
	#if EXPANDED_CLT_TEMP
      dualfuel_temp   = array,  S16,     598,    [   10], "°C",	      0.05555,   -320.000, -40.00, 230.00,     0
	#else
      dualfuel_temp   = array,  S16,     598,    [   10], "°C",	      0.05555,   -320.000, -40.00, 150.00,     0
	#endif
#else
	#if EXPANDED_CLT_TEMP
      dualfuel_temp   = array,  S16,     598,    [   10], "°F",       0.10000,   0.000,-40.00, 450.00,      1
	#else
      dualfuel_temp   = array,  S16,     598,    [   10], "°F",       0.10000,   0.000,-40.00, 300.00,      1
	#endif
#endif
      dualfuel_temp_adj=array,  S16,     618,    [   10], "%",       0.10000,   0.000,-200.00, 200.00,      1
      dualfuel_press  = array,  S16,     638,    [   10], "kPa",     0.10000,   0.000,   0.00, 200.00,      1
      dualfuel_press_adj=array, S16,     658,    [   10], "%",       0.10000,   0.000,-200.00, 200.00,      1
      inj_timing_sec=array, S16,         678,    [12x12], "deg",     0.10000,   0.000,   -360,    720,      1
      inj_timing_sec_load=array, S16,    966,    [   12], "%",       0.10000,   0.000,      0,    400,      1
      inj_timing_sec_rpm=array,  U16,    990,    [   12], "rpm",     1,         0,          0,  65535,      0

page = 12 ; 22
      veTable4	      = array ,  U16,    000,    [16x16], "%",        0.10000,   0.00000,  0.00,  200.00,      1 ;
      advanceTable4   = array ,  S16,    512,    [16x16], "deg",      0.10000,   0.00000,-10.00,   90.00,      1 ; * (288 bytes)

page = 13 ; 23
      ; Generic Spare Port Settings constants
      psEnabled       = array ,  U08,      0,    [   48], "on/off",   1.00000,   0.00000,   0.00,    1.00,     0,   noSizeMutation ; * (  2 bytes)
      psCondition     = array ,  U08,     48,    [ 48x2], "",         1.00000,   0.00000,-128.00,  127.00,     0,   noSizeMutation ; * (  2 bytes)
      psConnector     = array ,  U08,    144,    [   48], "",         1.00000,   0.00000,-128.00,  127.00,     0,   noSizeMutation ; * (  2 bytes)
      psInitValue     = array ,  U08,    192,    [   48], "",         1.00000,   0.00000,-128.00,  127.00,     0,   noSizeMutation ; * (  2 bytes)
      psPortValue     = array ,  U08,    240,    [   48], "",         1.00000,   0.00000,-128.00,  127.00,     0,   noSizeMutation ; * (  2 bytes)
      psOutSize       = array ,  U08,    288,    [ 48x2], "",         1.00000,   0.00000,-128.00,  127.00,     0,   noSizeMutation ; * (  2 bytes)
      psOutOffset     = array ,  U16,    384,    [ 48x2], "",         1.00000,   0.00000,   0.00, 32767.0,     0,   noSizeMutation ; * (  2 bytes)
      psThreshold     = array ,  U16,    576,    [ 48x2], "",         1.00000,   0.00000,-32768.0,32767.0,     0,   noSizeMutation ; * (  4 bytes)
      psHysteresis    = array ,  U16,    768,    [ 48x2], "",         1.00000,   0.00000,-32768.0,32767.0,     0,   noSizeMutation ; * (  4 bytes)
;next is 960

page = 14 ; 24
      dummy_14_0 = scalar, U08, 0, "", 1, 0, 0, 255, 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_accel
   ;
   ;     std_separator
   ;
   ;  Additionally, to support MegaSquirt-II firmware, there are two standard
   ;  dialogs to generate its three embedded tables.  The first of these acts
   ;  like Roger Enns' EasyTherm, but only works for MS-II.  The second one
   ;  generates the internal AFR table required for proper closed loop operation
   ;  in MS-II.  Use these without page numbers, as they will just be ignored
   ;  in any case.
   ;
   ;     std_ms2gentherm
   ;     std_ms2geno2
   ;
   ;  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".
   ;
   ;----------------------------------------------------------------------------

   menuDialog = main
      menu = "Basic/Load Settings"
        subMenu = base,   "Engine and sequential settings"
    	subMenu = generalsettings2,   "General Settings"
        subMenu = revlimiter2, "Rev Limiter"
        subMenu = std_separator
        subMenu = tacho,          "Tacho output"
        subMenu = fan_control,      "Fan Control"
        subMenu = std_separator
        subMenu = barometerCorr,   "Barometric Correction"
        subMenu = map_sample_dialog,  "MAP Sample Settings"
        subMenu = std_separator
        subMenu = ITBcombined, "ITB load settings", 0, { algorithm == 6 || algorithm2 == 6 || IgnAlgorithm == 6 || IgnAlgorithm2 == 6 || afrload == 6 || eaeload == 6 }
        subMenu = mafcombined,      "MAF Options", 0, { algorithm == 5 || algorithm2 == 5 }
        subMenu = std_separator
        subMenu = std_realtime,    "&Realtime Display"

      menu = "F&uel Settings"
        subMenu = injsettings,   "Injector Dead-time/PWM"
        subMenu = injsettings2,   "Injector Dead-time/PWM 2",    0, { (dualfuel_sw_on && dualfuel_sw2_injp) || staged_first_param }
        subMenu = smallpw, "Injector small pulsewidths"
        subMenu = smallpw2, "Injector small pulsewidths 2",   0, { (dualfuel_sw_on && dualfuel_sw2_smpw) || staged_first_param }
        subMenu = inj_timing_tbl,  "Injector Timing Table", 0, { sequential != 0 }
        subMenu = inj_timing_sec_tbl, "Secondary Injector Timing Table", 0, { sequential != 0 && (dualfuel_sw_on || staged_first_param) }
    	subMenu = stagedCombined,  "Staged Injection"
        subMenu = flexFuelSettings,"&Flex Fuel"
        subMenu = std_separator
        subMenu = egoControl,      "AFR/&EGO Control"
        subMenu = afrTable1Tbl,    "A&FR Table 1",         0
        subMenu = afrTable2Tbl,    "AF&R Table 2",         0, { (!dualfuel_sw_on && tsw_pin_afr) || (dualfuel_sw_on && dualfuel_sw_afr) || ( N2Oopt_2 && N2Oopt_4) }
        subMenu = maxafr, "AFR safety system"
        subMenu = std_separator
        subMenu = veTable1Tbl,     "Fuel VE Table &1", 0
        subMenu = veTable2Tbl,     "Fuel VE Table &2",          0, { (algorithm2 != 0) }
        subMenu = veTable3Tbl,     "Fuel VE Table 3", 0, { (!dualfuel_sw_on && f5_0_tsf) || (dualfuel_sw_on && dualfuel_sw_fuel) || (dualfuel_sw_on && dualfuel_opt_mode) }
        subMenu = veTable4Tbl,     "Fuel VE Table 4", 0, { ((!dualfuel_sw_on && f5_0_tsf) || (dualfuel_sw_on && dualfuel_sw_fuel) || (dualfuel_sw_on && dualfuel_opt_mode)) && (algorithm2 != 0) }
        subMenu = std_separator
        subMenu = tablesw,         "Table Switch/Dual Fuel"
        subMenu = dualfuel_temp_curve, "Temperature adjustment",   0, { (dualfuel_sw_on && dualfuel_opt_temp) }
        subMenu = dualfuel_press_curve, "Pressure adjustment",   0, { (dualfuel_sw_on && dualfuel_opt_press) }
        subMenu = std_separator
        subMenu = inj_trimaTbl, "Cyl 1 Trim", 7, { (hardware_fuel) && (sequential_trim_on_off != 0) && (sequential == 2) }
        subMenu = inj_trimbTbl, "Cyl 2 Trim", 7, { ((hardware_fuel) && (nInjectors > 1)) && (sequential_trim_on_off != 0) && (sequential == 2) }
        subMenu = inj_trimcTbl, "Cyl 3 Trim", 7, { ((hardware_fuel) && (nInjectors > 2)) && (sequential_trim_on_off != 0) && (sequential == 2) }
        subMenu = inj_trimdTbl, "Cyl 4 Trim", 7, { ((hardware_fuel) && (nInjectors > 3)) && (sequential_trim_on_off != 0) && (sequential == 2) }
        subMenu = inj_trimeTbl, "Cyl 5 Trim", 7, { ((hardware_fuel) && (nInjectors > 4)) && (sequential_trim_on_off != 0) && (sequential == 2) }
        subMenu = inj_trimfTbl, "Cyl 6 Trim", 7, { ((hardware_fuel) && (nInjectors > 5)) && (sequential_trim_on_off != 0) && (sequential == 2) }
        subMenu = inj_trimgTbl, "Cyl 7 Trim", 7, { ((hardware_fuel) && (nInjectors > 6)) && (sequential_trim_on_off != 0) && (sequential == 2) }
        subMenu = inj_trimhTbl, "Cyl 8 Trim", 7, { ((hardware_fuel) && (nInjectors > 7)) && (sequential_trim_on_off != 0) && (sequential == 2) }
        subMenu = inj_trim1Tbl, "Injector 1 Trim", 7, { ((hardware_fuel==0) && sequential_trim_on_off) }
        subMenu = inj_trim2Tbl, "Injector 2 Trim", 7, { ((hardware_fuel==0) && sequential_trim_on_off) }

      menu = "&Ignition Settings"
        subMenu = combinedignition, "Ignition Options/Wheel Decoder"
        subMenu = std_separator
        subMenu = dwellSettings,   "D&well battery correction", 0, { spk_mode0 != 31 }
        subMenu = dwellrpm_curve,  "Dwell vs rpm", 0, {spk_mode0 > 1 && dwellmode == 2 && spk_conf2_dwell}
        subMenu = std_separator
        subMenu = coldAdvance,     "&Cold Advance", 0, { spk_mode0 != 31 }
        subMenu = matBasedRetard,  "MAT-&Based Timing Retard", 0, { spk_mode0 != 31 }
        subMenu = std_separator
        subMenu = noisefiltering2,  "Noise Filtering", 0
        subMenu = knockSettings,   "&Knock Sensor Settings"
        subMenu = std_separator
        subMenu = ignitionTbl1,     "&Ignition Table1", 0, { (spk_mode0 != 31) }
        subMenu = ignitionTbl2,     "Ignition Table2", 0, { (IgnAlgorithm2 !=0) && (spk_mode0 != 31)}
        subMenu = ignitionTbl3,     "Ignition Table 3", 0, { (!dualfuel_sw_on && f5_0_tss) || (dualfuel_sw_on && dualfuel_sw_spk) }
        subMenu = ignitionTbl4,     "Ignition Table 4", 0, { (!dualfuel_sw_on && f5_0_tss) || (dualfuel_sw_on && dualfuel_sw_spk) }
        subMenu = std_separator
        subMenu = RotaryTrailingSettings, "Rotary Settings", 0, { (spk_mode0 != 31) }
        subMenu = RotarySplitTbl,  "Rotary Split Table", 0, { RotarySplitModeOn && (spk_mode0 != 31) }
        subMenu = std_separator
        subMenu = spk_trimaTbl, "Spark 1 Trim", 8, { spk_mode3_trim }
         subMenu = spk_trimbTbl, "Spark 2 Trim", 8, { spk_mode3_trim }
         subMenu = spk_trimcTbl, "Spark 3 Trim", 8, { spk_mode3_trim }
         subMenu = spk_trimdTbl, "Spark 4 Trim", 8, { spk_mode3_trim }
         subMenu = spk_trimeTbl, "Spark 5 Trim", 8, { spk_mode3_trim }
         subMenu = spk_trimfTbl, "Spark 6 Trim", 8, { spk_mode3_trim }
         subMenu = spk_trimgTbl, "Spark 7 Trim", 8, { spk_mode3_trim }
         subMenu = spk_trimhTbl, "Spark 8 Trim", 8, { spk_mode3_trim }

      menu = "&Startup/Idle"
        subMenu = crsettings,      "Cranking settings",  0
        subMenu = primingPW,       "Pri&ming Pulse",       0
        subMenu = primingPW2,       "Pri&ming Pulse 2",       0, { (dualfuel_sw_on && dualfuel_sw2_prime) }
        subMenu = crankingPW,      "Cra&nking Pulse",      0
        subMenu = crankingPW2,      "Cra&nking Pulse 2",      0, { (dualfuel_sw_on && dualfuel_sw2_crank) }
        subMenu = asePct,          "A&SE Percentage",      0
        subMenu = asePct2,          "A&SE Percentage 2",      0, { (dualfuel_sw_on && dualfuel_sw_ase) }
        subMenu = aseTaper,        "AS&E Taper",           0
        subMenu = aseTaper2,        "AS&E Taper 2",           0, { (dualfuel_sw_on && dualfuel_sw_ase) }
        subMenu = warmup_curve,      "&Warmup Enrichment",       0
        subMenu = warmup_curve2,    "&Warmup Enrichment 2",   0, { (dualfuel_sw_on && dualfuel_sw_wue) }
        subMenu = std_separator
        subMenu = combinedidle,     "I&dle Control"
        subMenu = pwmidle_crank_dutyorsteps_dutycurve, "PWM idle cranking duty", 0, {IdleCtl == 4 || IdleCtl == 6}
        subMenu = pwmidle_crank_dutyorsteps_stepscurve, "IAC idle cranking steps", 0, {IdleCtl == 2 || IdleCtl == 3 || IdleCtl == 5 || IdleCtl == 7 || IdleCtl == 8}
        subMenu = iacBins,         "I&dle Steps",          0, { IdleCtl == 2 || IdleCtl == 3 || IdleCtl == 5 }
        subMenu = ipwBins,         "I&dle PWM duty Table",0, { IdleCtl == 4 }
        subMenu = combinedCLidle, "Closed-loop idle settings", 0, { IdleCtl == 6 || IdleCtl == 7 || IdleCtl == 8 }
        subMenu = ac_idleup,        "Air Conditioning Idleup", 0
        subMenu = std_separator
        subMenu = idleAdvance,  "Idle Advance Settings"
        subMenu = idleVe,       "Idle VE Settings"

      menu = "Accel Enrich"
         subMenu = accelsettings,   "Accel Enrich settings"
         subMenu = std_accel,       "&Acceleration Wizard"
         subMenu = std_separator
         subMenu = EAEBAWCcurve,   "EAE Adhere-to-walls coefficient", 0, { EAEOption == 1 || EAEOption == 2 }
	 subMenu = EAEBSOCcurve,   "EAE Sucked-from-walls coefficient", 0, { EAEOption == 1 || EAEOption == 2 }
	 subMenu = EAEAWNcurve,   "EAE Adhere-to-walls rpm correction", 0, { EAEOption == 1  || EAEOption == 2 }
	 subMenu = EAESONcurve,   "EAE Sucked-from-walls rpm correction", 0, { EAEOption == 1 || EAEOption == 2 }
         subMenu = EAEAWWcurve,   "EAE Adhere-to-walls CLT correction", 0, { EAEOption == 1 || EAEOption == 2 }
         subMenu = EAESOWcurve,   "EAE Sucked-from-walls CLT correction", 0, { EAEOption == 1 || EAEOption == 2 }
         subMenu = std_separator
         subMenu = EAEBAWCcurve2,   "EAE Adhere-to-walls coefficient 2", 0, { (EAEOption == 1 || EAEOption == 2) && (staged_first_param ) }
	 subMenu = EAEBSOCcurve2,   "EAE Sucked-from-walls coefficient 2", 0, { (EAEOption == 1 || EAEOption == 2) && (staged_first_param ) }
	 subMenu = EAEAWNcurve2,   "EAE Adhere-to-walls rpm correction 2", 0, { (EAEOption == 1  || EAEOption == 2) && (staged_first_param ) }
	 subMenu = EAESONcurve2,   "EAE Sucked-from-walls rpm correction 2", 0, { (EAEOption == 1 || EAEOption == 2) && (staged_first_param ) }
         subMenu = EAEAWWcurve2,   "EAE Adhere-to-walls CLT correction 2", 0, { (EAEOption == 1 || EAEOption == 2) && (staged_first_param ) }
         subMenu = EAESOWcurve2,   "EAE Sucked-from-walls CLT correction 2", 0, { (EAEOption == 1 || EAEOption == 2) && (staged_first_param ) }
         subMenu = std_separator
         subMenu = XAccTable,     "Puddling Factors (&accel)",  0, { EAEOption == 3 || EAEOption == 4 }
         subMenu = XDecTable,       "Puddling Factors (&decel)",      0, { EAEOption == 3 || EAEOption == 4 }
         subMenu = TauAccTable,     "Time Factors (a&ccel)",          0, { EAEOption == 3 || EAEOption == 4 }
         subMenu = TauDecTable,     "Time Factors (d&ecel)",          0, { EAEOption == 3 || EAEOption == 4 }
         subMenu = XCltTable,       "&X (Puddling) Temp. Corrections",0, { EAEOption == 4 }    
         subMenu = TCltTable,       "&Tau (Time) Temp. Corrections",  0, { EAEOption == 4 }
         subMenu = xTauSettings,    "&MAPdot Settings",               0, { EAEOption == 3 || EAEOption == 4 }    

      menu = "Advanced Engine"
        subMenu = ms3_port_edit,   "&Output port Settings"
        subMenu = std_separator
        subMenu = boost, "Boost Control Settings"
	subMenu = boostctlDutys, "Boost Control Duty Table", 0, { (boost_ctl_settings_on) && (!boost_ctl_settings_cl)}
	subMenu = boostctlTargs, "Boost Control Target Table", 0, { (boost_ctl_settings_on == 1) && (boost_ctl_settings_cl == 1) }
	subMenu = boostctlDutys2, "Boost Control Duty Table 2", 0, { (boost_ctl_settings_on) && (!boost_ctl_settings_cl) && (boost_feats_tsw || dualfuel_sw2_boosw)}
	subMenu = boostctlTargs2, "Boost Control Target Table 2", 0, { (boost_ctl_settings_on == 1) && (boost_ctl_settings_cl == 1) && (boost_feats_tsw || dualfuel_sw2_boosw) }
        subMenu = boost_timed_curve, "Boost delay",0, { boost_ctl_settings_on && launch_opt_on && boost_feats_timed }
	subMenu = boostvss_duty_curve, "Boost Control vs Speed", 0, { (boost_ctl_settings_on) && (!boost_ctl_settings_cl) && boost_vss}
	subMenu = boostvss_target_curve, "Boost Control vs Speed", 0, { (boost_ctl_settings_on) && (boost_ctl_settings_cl)&& boost_vss}
        subMenu = std_separator
        subMenu = speedsensors, "Speed and gear Sensors"
        subMenu = egt, "EGT/Thermocouple settings"
        subMenu = sensors, "Generic Sensor inputs"
        subMenu = accelerometer, "Accelerometer parameters"
        subMenu = std_separator
        subMenu = manifoldTempCorr,"MAT Correction table", 0
        subMenu = MATCorrval,      "MAT Correction value", 0
        subMenu = matclt_curve,   "MAT/CLT correction", 0
        subMenu = std_separator
        subMenu = launch,          "Launch / 2-step / 3-step"
        subMenu = ShiftSettings, "Bike shift cut"
        subMenu = nitrous,    "&Nitrous System"
        subMenu = nitrous_curves_time,    "Nitrous - Time-based Progressive",0, {N2Oopt_2 && N2Oopt2_prog && N2Oopt2_prog_time}
        subMenu = nitrous_curves_rpm,    "Nitrous - RPM-based Progressive", 0, {N2Oopt_2 && N2Oopt2_prog && !N2Oopt2_prog_time}
        subMenu = waterinj,        "Water Injection"
        subMenu = std_separator
        subMenu = gen_pwm_a, "Generic PWM output A"
        subMenu = gen_pwm_b, "Generic PWM output B"
        subMenu = gen_pwm_c, "Generic PWM output C"
        subMenu = gen_pwm_d, "Generic PWM output D"
        subMenu = gen_pwm_e, "Generic PWM output E"
        subMenu = gen_pwm_f, "Generic PWM output F"
        subMenu = std_separator
        subMenu = injseq, "MS2/extra 2.x semi-seq settings", 0, { sequential == 0 }

      
;      subMenu = userdefined, "User defined menu" ; uncomment this line to enable

   menuDialog = main
      menu = "3D &Tuning Maps"
         subMenu = veTable1Map,     "Fuel VE Table &1",0 { (feature4_0VEtblsize==0) }
         subMenu = veTable2Map,     "Fuel VE Table &2",          0, { (algorithm2 != 0) }
         subMenu = veTable3Map,     "Fuel VE Table &3",          0, { (!dualfuel_sw_on && f5_0_tsf) || (dualfuel_sw_on && dualfuel_sw_fuel) || (dualfuel_sw_on && dualfuel_opt_mode) }
         subMenu = veTable4Map,     "Fuel VE Table &4",          0, { ((!dualfuel_sw_on && f5_0_tsf) || (dualfuel_sw_on && dualfuel_sw_fuel) || (dualfuel_sw_on && dualfuel_opt_mode)) && (algorithm2 != 0) }
         subMenu = afrTable1Map,    "A&FR Table 1",         0, { egoType > 1              }
         subMenu = afrTable2Map,    "AF&R Table 2",         0, { (egoType > 1) && ((!dualfuel_sw_on && tsw_pin_afr) || (dualfuel_sw_on && dualfuel_sw_afr)) }
         subMenu = std_separator    ;----------------------------------------------
         subMenu = ignitionMap1,     "&Ignition Map1", 0, {(spk_mode0 != 31)}
         subMenu = ignitionMap2,     "Ignition Map2", 0, { (IgnAlgorithm2 != 0) && (spk_mode0 != 31)}
         subMenu = ignitionMap3,     "Ignition Map3", 0, { (!dualfuel_sw_on && f5_0_tss) || (dualfuel_sw_on && dualfuel_sw_fuel) }
         subMenu = ignitionMap4,     "Ignition Map4", 0, { (!dualfuel_sw_on && f5_0_tss) || (dualfuel_sw_on && dualfuel_sw_fuel) }
	 subMenu = RotarySplitMap,   "Rotary Split Map", 0, {RotarySplitModeOn && (spk_mode0 != 31)}
	 subMenu = std_separator    ;----------------------------------------------
	 subMenu = boostctlDtyMap,   "Boost Control Duty Map", 0, {boost_ctl_settings_on && boost_ctl_settings_cl == 0}
	 subMenu = boostctlTargMap,  "Boost Control Target Map", 0, {boost_ctl_settings_on && boost_ctl_settings_cl}
	 subMenu = boostctlDtyMap2,   "Boost Control Duty Map 2", 0, {boost_ctl_settings_on && boost_ctl_settings_cl == 0}
	 subMenu = boostctlTargMap2,  "Boost Control Target Map 2", 0, {boost_ctl_settings_on && boost_ctl_settings_cl}
         subMenu = std_separator
         subMenu = inj_timing_map,  "Sequential Injector Timing Map", 0, { sequential != 0 }
         subMenu = inj_timing_sec_map, "Sequential Injector Secondary Timing Map", 0, { sequential != 0 && (dualfuel_sw_on || staged_first_param) }

       menu = "C&AN bus/Testmodes"
         subMenu = canparams, "CAN parameters"
         subMenu = canvss, "CAN VSS, gear, RTC"
         subMenu = std_separator    ;----------------------------------------------
         subMenu = codetest, "Code development"
         subMenu = outputtest, "Output test mode"
         subMenu = iactest, "Idle valve test"

   menuDialog = main
      menu = "T&ools"
         subMenu = sensorCal,       "Calibrate MAP/Baro"
         subMenu = battcalib,       "Calibrate Battery Voltage"
         subMenu = std_separator    ;----------------------------------------------
         subMenu = flash_unlock, "Un/Lock calibrations"
         subMenu = std_ms2gentherm, "Calibrate T&hermistor Tables", 0, {flashlock}
         subMenu = std_ms2geno2,    "Calibrate &AFR Table", 0, {flashlock}
          subMenu = mafTableBurner,  "Calibrate &MAF Table", 0, {flashlock}
         subMenu = std_separator    ;----------------------------------------------
         subMenu = std_trigwiz,     "Tri&gger Wizard"

      menu = "Data Logging"
          subMenu = sdcard_datalog, "SD Card Datalogging"

      menu = "Communications"
         subMenu = setbaud, "Megasquirt baud rate", 0

      menu = "Help"
         subMenu = helpGeneral,     "Megasquirt 3 Info"
;         subMenu = sensorHelp,      "Sensor Calibration"
;-------------------------------------------------------------------------------

[UserDefined]

    dialog = flash_unlock, "Un/Lock calibrations"
        field = "Sensor Calibrations", flashlock
        field = "Always re-lock after use"

    dialog = gen_pwm_left_a, ""
        field = "Enable generic PWM A", pwm_opt_on_a
        field = "Output port/pin", pwm_opt2_a, {pwm_opt_on_a}
        field = "On-off or variable", pwm_opt_var_a, {pwm_opt_on_a}
        field = "On above duty", pwm_onabove_a, {pwm_opt_on_a && !(pwm_opt_var_a)}
        field = "Off below duty", pwm_offbelow_a, {pwm_opt_on_a && !(pwm_opt_var_a)}
        field = "Frequency", pwm_opt_freq_a, {pwm_opt_on_a && pwm_opt_var_a}
        field = "Load Y axis", pwm_opt_load_a, {pwm_opt_on_a}
        field = "CLT/MAT units", sensor_temp, {0}

    dialog = gen_pwm_a, "Generic PWM A", border
        panel = gen_pwm_left_a, West
        panel = pwm_duties_Tbl_a, East

    dialog = gen_pwm_left_b, ""
        field = "Enable generic PWM B", pwm_opt_on_b
        field = "Output port/pin", pwm_opt2_b, {pwm_opt_on_b}
        field = "On-off or variable", pwm_opt_var_b, {pwm_opt_on_b}
        field = "On above duty", pwm_onabove_b, {pwm_opt_on_b && !(pwm_opt_var_b)}
        field = "Off below duty", pwm_offbelow_b, {pwm_opt_on_b && !(pwm_opt_var_b)}
        field = "Frequency", pwm_opt_freq_b, {pwm_opt_on_b && pwm_opt_var_b}
        field = "Load Y axis", pwm_opt_load_b, {pwm_opt_on_b}
        field = "CLT/MAT units", sensor_temp, {0}

    dialog = gen_pwm_b, "Generic PWM B", border
        panel = gen_pwm_left_b, West
        panel = pwm_duties_Tbl_b, East

    dialog = gen_pwm_left_c, ""
        field = "Enable generic PWM C", pwm_opt_on_c
        field = "Output port/pin", pwm_opt2_c, {pwm_opt_on_c}
        field = "On-off or variable", pwm_opt_var_c, {pwm_opt_on_c}
        field = "On above duty", pwm_onabove_c, {pwm_opt_on_c && !(pwm_opt_var_c)}
        field = "Off below duty", pwm_offbelow_c, {pwm_opt_on_c && !(pwm_opt_var_c)}
        field = "Frequency", pwm_opt_freq_c, {pwm_opt_on_c && pwm_opt_var_c}
        field = "Load Y axis", pwm_opt_load_c, {pwm_opt_on_c}
        field = "CLT/MAT units", sensor_temp, {0}

    dialog = gen_pwm_c, "Generic PWM C", border
        panel = gen_pwm_left_c, West
        panel = pwm_duties_Tbl_c, East

    dialog = gen_pwm_left_d, ""
        field = "Enable generic PWM D", pwm_opt_on_d
        field = "Output port/pin", pwm_opt2_d, {pwm_opt_on_d}
        field = "On-off or variable", pwm_opt_var_d, {pwm_opt_on_d}
        field = "On above duty", pwm_onabove_d, {pwm_opt_on_d && !(pwm_opt_var_d)}
        field = "Off below duty", pwm_offbelow_d, {pwm_opt_on_d && !(pwm_opt_var_d)}
        field = "Frequency", pwm_opt_freq_d, {pwm_opt_on_d && pwm_opt_var_d}
        field = "Load Y axis", pwm_opt_load_d, {pwm_opt_on_d}
        field = "CLT/MAT units", sensor_temp, {0}

    dialog = gen_pwm_d, "Generic PWM D", border
        panel = gen_pwm_left_d, West
        panel = pwm_duties_Tbl_d, East

    dialog = gen_pwm_left_e, ""
        field = "Enable generic PWM E", pwm_opt_on_e
        field = "Output port/pin", pwm_opt2_e, {pwm_opt_on_e}
        field = "On-off or variable", pwm_opt_var_e, {pwm_opt_on_e}
        field = "On above duty", pwm_onabove_e, {pwm_opt_on_e && !(pwm_opt_var_e)}
        field = "Off below duty", pwm_offbelow_e, {pwm_opt_on_e && !(pwm_opt_var_e)}
        field = "Frequency", pwm_opt_freq_e, {pwm_opt_on_e && pwm_opt_var_e}
        field = "Load Y axis", pwm_opt_load_e, {pwm_opt_on_e}
        field = "CLT/MAT units", sensor_temp, {0}

    dialog = gen_pwm_e, "Generic PWM E", border
        panel = gen_pwm_left_e, West
        panel = pwm_duties_Tbl_e, East

    dialog = gen_pwm_left_f, ""
        field = "Enable generic PWM F", pwm_opt_on_f
        field = "Output port/pin", pwm_opt2_f, {pwm_opt_on_f}
        field = "On-off or variable", pwm_opt_var_f, {pwm_opt_on_f}
        field = "On above duty", pwm_onabove_f, {pwm_opt_on_f && !(pwm_opt_var_f)}
        field = "Off below duty", pwm_offbelow_f, {pwm_opt_on_f && !(pwm_opt_var_f)}
        field = "Frequency", pwm_opt_freq_f, {pwm_opt_on_f && pwm_opt_var_f}
        field = "Load Y axis", pwm_opt_load_f, {pwm_opt_on_f}
        field = "CLT/MAT units", sensor_temp, {0}

    dialog = gen_pwm_f, "Generic PWM F", border
        panel = gen_pwm_left_f, West
        panel = pwm_duties_Tbl_f, East

    dialog = map_sample_dialog_south, "MAP sample general settings"
       field = "Map Sample Window",     map_sample_duration
       field = "No. sample events", mapsample_opt1

    dialog = map_sample_dialog, "MAP Sampling Settings", border
        panel = mapsample_curve, North
        panel = map_sample_dialog_south, South

   dialog = ShiftSettings, "Shifter System"
    field = "Shifter Spark cut system", shift_cut_on
    field = "Mode", shift_cut_auto, { shift_cut_on }
    field = "Button input", shift_cut_in, { shift_cut_on }
    field = "Solenoid output", shift_cut_out, { shift_cut_on }
    field = "RPM >", shift_cut_rpm, { shift_cut_on }	 
    field = "And TPS >", shift_cut_tps, { shift_cut_on }
    field = "Delay before spark cut", shift_cut_delay, { shift_cut_on }
    field = "Spark cut time (base)", shift_cut_time, { shift_cut_on }
    field = "Gear based delay", shift_cut_gear, { shift_cut_on }
    field = "Additional delay 1-2", shift_cut_add12, { shift_cut_on && shift_cut_gear }
    field = "Additional delay 2-3", shift_cut_add23, { shift_cut_on && shift_cut_gear }
    field = "Additional delay 3-4", shift_cut_add34, { shift_cut_on && shift_cut_gear }
    field = "Additional delay 4-5", shift_cut_add45, { shift_cut_on && shift_cut_gear }
    field = "Additional delay 5-6", shift_cut_add56, { shift_cut_on && shift_cut_gear }
    field = "Solenoid delay", shift_cut_soldelay,  { shift_cut_on && shift_cut_on}
    field = "Re-shift hold-off time", shift_cut_reshift
    field = "Automatic mode shift points"
    field = "Shift rpm 1-2", shift_cut_rpm12, { shift_cut_on && shift_cut_auto }
    field = "Shift rpm 2-3", shift_cut_rpm23, { shift_cut_on && shift_cut_auto && shift_cut_gear}
    field = "Shift rpm 3-4", shift_cut_rpm34, { shift_cut_on && shift_cut_auto && shift_cut_gear}
    field = "Shift rpm 4-5", shift_cut_rpm45, { shift_cut_on && shift_cut_auto && shift_cut_gear}
    field = "Shift rpm 5-6", shift_cut_rpm56, { shift_cut_on && shift_cut_auto && shift_cut_gear}

   dialog = fan_control, "Fan Control"
        field = "Fan Control On", fanctl_settings_on
        field = "Fan Control Idles up?", fanctl_settings_idleup, { fanctl_settings_on }
        field = "Output Pin", fanctl_settings_pin, { fanctl_settings_on }
        field = "Idleup Delay", fanctl_idleup_delay, { fanctl_settings_on && fanctl_settings_idleup }
        field = "Idleup Duty", fanctl_idleup_adder_duty, { fanctl_settings_on && fanctl_settings_idleup && (IdleCtl == 4 || IdleCtl == 6) }
        field = "Idleup Steps", fanctl_idleup_adder_steps, { fanctl_settings_on && fanctl_settings_idleup && (IdleCtl == 2 || IdleCtl == 3 || IdleCtl == 5 || IdleCtl == 7 || IdleCtl == 8) }
        field = "Fan On Temperature", fanctl_ontemp, { fanctl_settings_on }
        field = "Fan Off Temperature", fanctl_offtemp, { fanctl_settings_on }
        field = "Allow fan when engine off", fanctl_opt2_engineoff, { fanctl_settings_on }
        field = "Fan shutoff"
        field = "TPS shutoff", fan_idleup_tps_offpoint, { fanctl_settings_on }
        field = "TPS hysteresis", fan_idleup_tps_hyst, { fanctl_settings_on }
        field = "VSS shutoff", fan_idleup_vss_offpoint, { fanctl_settings_on && vss_opt1 }
        field = "VSS hyst", fan_idleup_vss_hyst, { fanctl_settings_on && vss_opt1 }

    dialog = ac_idleup, "Air Conditioning Idleup"
        field = "AC Idleup On", ac_idleup_settings
        field = "Idleup Output", ac_idleup_io_out, { ac_idleup_settings }
        field = "Idleup Input", ac_idleup_io_in, { ac_idleup_settings }
        field = "Idleup Delay", ac_idleup_delay, { ac_idleup_settings }
        field = "Idleup Duty", ac_idleup_adder_duty, { (IdleCtl == 4 || IdleCtl == 6) && ac_idleup_settings }
        field = "Idleup Steps", ac_idleup_adder_steps, { (IdleCtl == 2 || IdleCtl == 3 || IdleCtl == 5 || IdleCtl == 7 || IdleCtl == 8) && ac_idleup_settings }
        field = "Idleup CL max decel load adder", ac_idleup_cl_lockout_mapadder, { ac_idleup_settings && (IdleCtl == 6 || IdleCtl == 7 || IdleCtl == 8) }
        field = "AC compressor shutoff"
        field = "TPS shutoff", ac_idleup_tps_offpoint, { ac_idleup_settings }
        field = "TPS hysteresis", ac_idleup_tps_hyst, { ac_idleup_settings }
        field = "VSS shutoff", ac_idleup_vss_offpoint, { ac_idleup_settings && vss_opt1 }
        field = "VSS hysteresis", ac_idleup_vss_hyst, { ac_idleup_settings && vss_opt1 }

        dialog = sensor_source, "", yAxis
            field = "Sensor - source"
            field = "01", sensor01_source
            field = "02", sensor02_source
            field = "03", sensor03_source
            field = "04", sensor04_source
            field = "05", sensor05_source
            field = "06", sensor06_source
            field = "07", sensor07_source
            field = "08", sensor08_source

        dialog = sensor_sourceb, "", yAxis
            field = "Sensor - source"
            field = "09", sensor09_source
            field = "10", sensor10_source
            field = "11", sensor11_source
            field = "12", sensor12_source
            field = "13", sensor13_source
            field = "14", sensor14_source
            field = "15", sensor15_source
            field = "16", sensor16_source

        dialog = sensor_trans, "", yAxis
            field = "Transformation"
            field = "", sensor01_trans, {sensor01_source}
            field = "", sensor02_trans, {sensor02_source}
            field = "", sensor03_trans, {sensor03_source}
            field = "", sensor04_trans, {sensor04_source}
            field = "", sensor05_trans, {sensor05_source}
            field = "", sensor06_trans, {sensor06_source}
            field = "", sensor07_trans, {sensor07_source}
            field = "", sensor08_trans, {sensor08_source}

        dialog = sensor_transb, "", yAxis
            field = "Transformation"
            field = "", sensor09_trans, {sensor09_source}
            field = "", sensor10_trans, {sensor10_source}
            field = "", sensor11_trans, {sensor11_source}
            field = "", sensor12_trans, {sensor12_source}
            field = "", sensor13_trans, {sensor13_source}
            field = "", sensor14_trans, {sensor14_source}
            field = "", sensor15_trans, {sensor15_source}
            field = "", sensor16_trans, {sensor16_source}

        dialog = sensor_val0, "", yAxis
            field = "0V value"
            field = "", sensor01_val0, {sensor01_source && (sensor01_trans == 1)}
            field = "", sensor02_val0, {sensor02_source && (sensor02_trans == 1)}
            field = "", sensor03_val0, {sensor03_source && (sensor03_trans == 1)}
            field = "", sensor04_val0, {sensor04_source && (sensor04_trans == 1)}
            field = "", sensor05_val0, {sensor05_source && (sensor05_trans == 1)}
            field = "", sensor06_val0, {sensor06_source && (sensor06_trans == 1)}
            field = "", sensor07_val0, {sensor07_source && (sensor07_trans == 1)}
            field = "", sensor08_val0, {sensor08_source && (sensor08_trans == 1)}

        dialog = sensor_val0b, "", yAxis
            field = "0V value"
            field = "", sensor09_val0, {sensor09_source && (sensor09_trans == 1)}
            field = "", sensor10_val0, {sensor10_source && (sensor10_trans == 1)}
            field = "", sensor11_val0, {sensor11_source && (sensor11_trans == 1)}
            field = "", sensor12_val0, {sensor12_source && (sensor12_trans == 1)}
            field = "", sensor13_val0, {sensor13_source && (sensor13_trans == 1)}
            field = "", sensor14_val0, {sensor14_source && (sensor14_trans == 1)}
            field = "", sensor15_val0, {sensor15_source && (sensor15_trans == 1)}
            field = "", sensor16_val0, {sensor16_source && (sensor16_trans == 1)}

        dialog = sensor_max, "", yAxis
            field = "5V value"
            field = "", sensor01_max, {sensor01_source && (sensor01_trans == 1)}
            field = "", sensor02_max, {sensor02_source && (sensor02_trans == 1)}
            field = "", sensor03_max, {sensor03_source && (sensor03_trans == 1)}
            field = "", sensor04_max, {sensor04_source && (sensor04_trans == 1)}
            field = "", sensor05_max, {sensor05_source && (sensor05_trans == 1)}
            field = "", sensor06_max, {sensor06_source && (sensor06_trans == 1)}
            field = "", sensor07_max, {sensor07_source && (sensor07_trans == 1)}
            field = "", sensor08_max, {sensor08_source && (sensor08_trans == 1)}

        dialog = sensor_maxb, "", yAxis
            field = "5V value"
            field = "", sensor09_max, {sensor09_source && (sensor09_trans == 1)}
            field = "", sensor10_max, {sensor10_source && (sensor10_trans == 1)}
            field = "", sensor11_max, {sensor11_source && (sensor11_trans == 1)}
            field = "", sensor12_max, {sensor12_source && (sensor12_trans == 1)}
            field = "", sensor13_max, {sensor13_source && (sensor13_trans == 1)}
            field = "", sensor14_max, {sensor14_source && (sensor14_trans == 1)}
            field = "", sensor15_max, {sensor15_source && (sensor15_trans == 1)}
            field = "", sensor16_max, {sensor16_source && (sensor16_trans == 1)}

        dialog = sensor_lag, "", yAxis
            field = "Lag factor"
            field = "", sensor01LF, {sensor01_source}
            field = "", sensor02LF, {sensor02_source}
            field = "", sensor03LF, {sensor03_source}
            field = "", sensor04LF, {sensor04_source}
            field = "", sensor05LF, {sensor05_source}
            field = "", sensor06LF, {sensor06_source}
            field = "", sensor07LF, {sensor07_source}
            field = "", sensor08LF, {sensor08_source}

        dialog = sensor_lagb, "", yAxis
            field = "Lag factor"
            field = "", sensor09LF, {sensor09_source}
            field = "", sensor10LF, {sensor10_source}
            field = "", sensor11LF, {sensor11_source}
            field = "", sensor12LF, {sensor12_source}
            field = "", sensor13LF, {sensor13_source}
            field = "", sensor14LF, {sensor14_source}
            field = "", sensor15LF, {sensor15_source}
            field = "", sensor16LF, {sensor16_source}

        dialog = sensors_top, "Sensors 1-8", xAxis
           panel = sensor_source
           panel = sensor_trans
           panel = sensor_val0
           panel = sensor_max
           panel = sensor_lag

        dialog = sensors_btm, "Sensors 9-16", xAxis
           panel = sensor_sourceb
           panel = sensor_transb
           panel = sensor_val0b
           panel = sensor_maxb
           panel = sensor_lagb

        dialog = sensors_data, "", yAxis
           panel = sensors_top
           panel = sensors_btm

        dialog = sensors_temp, ""
           field = "CLT/MAT units", sensor_temp

        dialog = sensors, "Generic Sensor Input", border
           panel = sensors_data, North
           panel = sensors_temp, South

        dialog = ITB_settings, "ITB settings"
           field = "Percent Baro switchpoint", ITB_load_mappoint
           field = "Idle TPS threshold", ITB_load_idletpsthresh

        dialog = ITBcombined, "ITB load settings", border
           panel = ITB_settings, South 
           panel = ITB_load_switchpoint_curve, West 
           panel = ITB_load_loadvals_curve, East

        dialog = mafdialog, "MAF Settings"
            field = "MAF port", MAFOption
            field = "Engine size", CID

        dialog = mafcombined, "", border
            panel = mafdialog, West
            panel = MAFtable1, East 

        dialog = battcalib, "Battery Voltage Calibration"
            field = "Supply voltage at zero ADC count", batt0
            field = "Supply voltage at max ADC count", battmax
            field = ""
            field = "Typical values are 0.0V and 29.7V"

        dialog = waterinj_topl, ""
            field = "Enable water/meth injection", water_pins_in_on
            field = "Pump output", water_pins_pump, {water_pins_in_on}
            field = "Valve style", water_pins_in_type, {water_pins_in_on}
            field = "Frequency", water_freq, {water_pins_in_on && (water_pins_in_type ==2)}
            field = "Valve output", water_pins_valve, {water_pins_in_on && water_pins_in_type}
        dialog = waterinj_topr, ""
            field = "Enable when.."
            field = "TPS >", water_tps, {water_pins_in_on}
            field = "RPM >", water_rpm, {water_pins_in_on}
            field = "MAP >", water_map, {water_pins_in_on}
            field = "MAT >", water_mat, {water_pins_in_on}
            field = ""
            field = "Use maxAFR shutdown", water_pins_in_shut, {water_pins_in_on && maxafr_opt1_on}

    ; Trying to split like this confuses TS somewhat and the table grows all on its own
        dialog = waterinj_top, "", border
            panel = waterinj_topl, West
            panel = waterinj_topr, East

        dialog = waterinj, "Water Injection", border
            panel = waterinj_top, North
            panel = waterinjTbl, South

       dialog = vss1, "Vehicle speed sensor 1"
          field = "Analogue sensor", vss1_an
          field = "Full scale speed", vss1_an_max, {vss1_an}
          field = "Input", vss_opt1, {!vss1_an}
          field = "Wheel diameter", wheeldia1, {vss_opt1 && !vss1_an && (vss_opt1 != 14)}
          field = "VSS position", vss1_pos
    ;      field = "Final drive ratio", fdratio, {vss_opt1 && !vss1_an && (vss_opt1 != 14)}
          field = "Speed sensor #teeth", reluctorteeth1, {vss_opt1 && !vss1_an && (vss_opt1 != 14)}
          field = "PWM port", vss1_pwmseq, {vss_opt1 ==15 && !vss1_an}
          field = "Scaler", vss1_can_scale, {vss_opt1 ==14 && !vss1_an}
          field = "Smoothing lag factor", vss1LF ;, {(vss1_an) || (vss_opt1) }

       dialog = vss2, "Vehicle speed sensor 2"
          field = "Analogue sensor", vss2_an
          field = "Full scale speed", vss2_an_max, {vss2_an}
          field = "Input", vss_opt2, {!vss2_an}
          field = "Wheel diameter", wheeldia2, {vss_opt2 && !vss2_an && (vss_opt2 != 14)}
          field = "VSS position", vss2_pos
    ;      field = "Final drive ratio", fdratio2, {vss_opt2  && !vss2_an && (vss_opt2 != 14)}
          field = "Speed sensor #teeth", reluctorteeth2, {vss_opt2 && !vss2_an && (vss_opt2 != 14)}
          field = "PWM port", vss2_pwmseq, {vss_opt2 ==15 && !vss2_an}
          field = "Scaler", vss2_can_scale, {vss_opt2 ==14 && !vss1_an}
          field = "Smoothing lag factor", vss2LF ;, {(vss2_an) || (vss_opt2) }

       dialog = ss, "Shaft Speed Sensors"
          field = "Sensor 1", ss_opt1
          field = "Speed sensor #teeth", reluctorteeth3, {ss_opt1 && ss_opt1<15}
          field = "Smoothing lag factor", ss1LF ;, {ss_opt2 && ss_opt2<15}
    ;      field = "Remote CANid", ss1_can_id, {ss_opt1 ==15 &&0}
    ;      field = "Remote CAN offset", ss1_can_offset, {ss_opt1 ==15 &&0}
          field = ""
          field = ""
          field = "Sensor 2", ss_opt2
          field = "Speed sensor #teeth", reluctorteeth4, {ss_opt2 && ss_opt2<15}
          field = "Smoothing lag factor", ss2LF ;, {ss_opt2 && ss_opt2<15}

    ;      field = "Remote CANid", ss2_can_id, {ss_opt2 ==15 &&0}
    ;      field = "Remote CAN offset", ss2_can_offset, {ss_opt2 ==15 &&0}
          field = ""
          field = ""
          field = ""
          field = ""

       dialog = vssout, "VSS output"
        field = "VSS output", vssout_opt
        field = "Time factor", vssout_scale, { vssout_opt }

       dialog = vssdotlag, "VSSdot smoothing"
        field = "Sample interval", vssdot_int
        field = "Lag factor", vssdotLF

       dialog = gears, "Gear detection"
        field = "Final drive ratio", fdratio1
        field = "Method", gear_method
        field = "Number of gears", gear_no, {gear_method}
        field = "1st ratio", gear1ratio, { (gear_method == 1) }
        field = "2nd ratio", gear2ratio, { (gear_method == 1) && (gear_no > 1) } ; would be pretty pointless otherwise!
        field = "3rd ratio", gear3ratio, { (gear_method == 1) && (gear_no > 2) }
        field = "4th ratio", gear4ratio, { (gear_method == 1) && (gear_no > 3) }
        field = "5th ratio", gear5ratio, { (gear_method == 1) && (gear_no > 4) }
        field = "6th ratio", gear6ratio, { (gear_method == 1) && (gear_no > 5) }
        field = ""
        field = "Input port", gear_port_an, { (gear_method == 2) }
        field = "Neutral voltage",  gear0v, { (gear_method == 2) }
        field = "1st gear voltage", gear1v, { (gear_method == 2) }
        field = "2nd gear voltage", gear2v, { (gear_method == 2) && (gear_no > 1) }
        field = "3rd gear voltage", gear3v, { (gear_method == 2) && (gear_no > 2) }
        field = "4th gear voltage", gear4v, { (gear_method == 2) && (gear_no > 3) }
        field = "5th gear voltage", gear5v, { (gear_method == 2) && (gear_no > 4) }
        field = "6th gear voltage", gear6v, { (gear_method == 2) && (gear_no > 5) }

       dialog = ssnorth, "", border
            panel = vss1, West
            panel = vss2, East

       dialog = vssoutdot, "", border
            panel = vssout, North
            panel = vssdotlag, South

       dialog = sssouth, "", border
            panel = ss, West
            panel = vssoutdot, East

    ;   dialog = speedsensors, "Speed Sensors", border
       dialog = speedsensorsmain, "", yAxis
            panel = ssnorth
            panel = sssouth

       dialog = speedsensors, "Speed and Gear Sensors", border
            panel = speedsensorsmain, West
            panel = gears, East

       dialog = accelerometer, "Accelerometer input"
        field = "X input", accXport
        field = "Y input", accYport
        field = "Z input", accZport
        field = "X -1g calib.", accXcal1, { accXport }
        field = "X +1g calib.", accXcal2, { accXport }
        field = "Y -1g calib.", accYcal1, { accYport }
        field = "Y +1g calib.", accYcal2, { accYport }
        field = "Z -1g calib.", accZcal1, { accZport }
        field = "Z +1g calib.", accZcal2, { accZport }
        field = "Lag factor", accxyzLF

       dialog = xTauSettings, "X-Tau MAPdot Settings"
          topicHelp = "http://www.megamanual.com/mt28.htm#um"
          field = "#MAPdot Thresholds for transition to X, Tau Decel Tables"
          field = "Start Transition",  MapThreshXTD
          field = "Finish Transition",  MapThreshXTD2

       dialog = sdcard_top, ""
          field = "SD card logging:", log_style_on
          field = "Datalog button", log_style2_but, {log_style_on > 1}
          field = "LED indicator", log_style_led, {log_style_on}
          field = "Log data block size", log_style_block, {log_style_on}
          field = "Sampling", log_style2_samp, {(log_style_block != 1) && log_style_on }
          field = "Sample interval", log_int, {(log_style_block != 1) && log_style_on }
          field = "Log file max duration", log_length, {log_style_on}
          field = "Stream input", log_style3_adc, {log_style_block == 1}
    ;      field = "Glitch tooth logger enable", log_style2_clg

       dialog = sdcard_btm, ""
          logFieldSelector = dataLogFieldSelector, "Log Field Selection", logFieldOffset, logFieldLength, 55

       dialog = sdcard_datalog, "SD Card Datalogging", yAxis
          panel = sdcard_top
          panel = dataLogFieldSelector


       dialog = MATCorrval, "MAT correction value"
          field = "This value allows you to scale down the built in air"
          field = "density (MAT) correction. "
          field = "100% means that the PV=nRT ideal gas law is followed."
          field = "Lower values give less aggressive correction."
          field = "0% is not allowed as it ignores the physics completely."
          field = "(0% is interpreted as 100% for backwards compatability)"
          field = "This value and the table are used at the same time"
          field = "MAT correction scaling",              airden_scaling

       dialog = N2OSystem_topl, ""
          field = "Nitrous Control",                    N2Oopt_2
          field = "Enable N2O when above",              N2ORpm,         { N2Oopt_2 }
          field = "And Coolant Temp above",             N2OClt,         { N2Oopt_2 }
          field = "And TPS >",                          N2OTps,         { N2Oopt_2 }
          field = "Max RPM",                            N2ORpmMax,      { N2Oopt_2 }
          field = "Enrich which bank",     N2Oopt_01,      { N2Oopt_2 }

       dialog = N2OSystem_topr, ""
          field = "On/Off vs Progressive mode",         N2Oopt2_prog,   { N2Oopt_2 }
          field = "Time-based or RPM-based", N2Oopt2_prog_time, { N2Oopt_2 && N2Oopt2_prog }
          field = "Solenoid frequency", N2Oopt2_prog_freq, { N2Oopt_2 && N2Oopt2_prog }
          field = "AFR safety uses AFR2 targets", N2Oopt_4, { N2Oopt_2 }
          field = ""
          field = "READ THE MANUAL BEFORE USING NITROUS"

       dialog = N2OSystem1, "Nitrous System Stage 1"
          field = "Stage 1 output - nitrous",           n2o1n_pins,     { N2Oopt_2 }
          field = "Stage 1 output - fuel",              n2o1f_pins,     { N2Oopt_2 }
          field = "Enable input on:",                   N2Oopt_pins,    { N2Oopt_2 }
          field = "Additional Fuel PW @ N2O min rpm",   N2OPWLo,        { N2Oopt_2 && !N2Oopt2_prog}
          field = "Additional Fuel PW @ N2O Max RPM",   N2OPWHi,        { N2Oopt_2 && !N2Oopt2_prog }
          field = "Retard Ignition by",                 N2OAngle,       { N2Oopt_2 && !N2Oopt2_prog}
          field = "Nitrous delay after launch",         N2Odel_launch,  { N2Oopt_2 && launch_opt_on }
          field = "Nitrous delay after flat shift",     N2Odel_flat,    { N2Oopt_2 && launch_opt_on }
          field = ""
          field = ""
    ;not yet implemented field = "Nitrous fuel hold on",N2Oholdon,      { N2Oopt_2 }

       dialog = N2OSystem2, "Nitrous System Stage 2"
          field =   "Nitrous stage 2",                  N2Oopt_3,       { N2Oopt_2 }
          field = "Stage 2 output - nitrous",           n2o2n_pins,     { N2Oopt_2 && N2Oopt_3 }
          field = "Stage 2 output - fuel",              n2o2f_pins,     { N2Oopt_2 && N2Oopt_3 }
          field = "Enable stage 2 above",               N2O2Rpm,        { N2Oopt_2 && N2Oopt_3 && !N2Oopt2_prog }
          field = "Max RPM",                            N2O2RpmMax,     { N2Oopt_2 && N2Oopt_3 && !N2Oopt2_prog }
          field = "delay after stage1",                 N2O2delay,      { N2Oopt_2 && N2Oopt_3 && (!N2Oopt2_prog || !N2Oopt2_prog_time) }
          field = "Retard Ignition by",                 N2O2Angle,      { N2Oopt_2 && N2Oopt_3 && !N2Oopt2_prog }
          field = "Additional Fuel PW @ N2O min rpm",   N2O2PWLo,       { N2Oopt_2 && N2Oopt_3 && !N2Oopt2_prog }
          field = "Additional Fuel PW @ N2O Max RPM",   N2O2PWHi,       { N2Oopt_2 && N2Oopt_3 && !N2Oopt2_prog }

       dialog = N2OSystem_top, "", border
          panel = N2OSystem_topl, West
          panel = N2OSystem_topr, East

       dialog = N2OSystems, "", border
          panel = N2OSystem1, West
          panel = N2OSystem2, East

       dialog = nitrous, "Nitrous oxide control", border
          panel = N2OSystem_top, North
          panel = N2OSystems, South

       dialog = n2o1_curves_time, ""
          panel = n2o1_duty_time
          panel = n2o1_pw_time
          panel = n2o1_retard_time

       dialog = n2o2_curves_time, ""
          panel = n2o2_duty_time
          panel = n2o2_pw_time
          panel = n2o2_retard_time

       dialog = nitrous_curves_time, "Time-based Progressive Nitrous Oxide Charts", border
          panel = n2o1_curves_time, West
          panel = n2o2_curves_time, East

       dialog = n2o1_curves_rpm, ""
          panel = n2o1_duty_rpm
          panel = n2o1_pw_rpm
          panel = n2o1_retard_rpm

       dialog = n2o2_curves_rpm, ""
          panel = n2o2_duty_rpm
          panel = n2o2_pw_rpm
          panel = n2o2_retard_rpm

       dialog = nitrous_curves_rpm, "RPM-based Progressive Nitrous Oxide Charts", border
          panel = n2o1_curves_rpm, West
          panel = n2o2_curves_rpm, East

       dialog = overboost, "Overboost Protection"
       field = "Overboost protection", OverBoostOption
       field = "Maximum Boost",   OverBoostKpa, { OverBoostOption > 0 }
       field = "Hysteresis",      OverBoostHyst, { OverBoostOption > 0 }
       field = "Overboost switching", tsw_pin_ob, { OverBoostOption > 0 }
       field = "Alt. Maximum Boost",   OverBoostKpa2, { (tsw_pin_ob && (OverBoostOption > 0)) || dualfuel_sw2_ob }
       field = ""
       field = "Cut X sparks",    overboostcutx, { OverBoostOption > 1 }
       field = "From Y events",   overboostcuty, { OverBoostOption > 1 }

       dialog = boostfeat, ""
         field = "Boost Table Switching", boost_feats_tsw, {boost_ctl_settings_on}
         field = "Boost Table Switching Gear", boost_gear_switch, { boost_feats_tsw == 15 }
         field = ""
         field = "Boost timed from launch", boost_feats_timed, {boost_ctl_settings_on && launch_opt_on}
         field = ""
         field = "Specific Launch duty/target", boost_feats_launch, {boost_ctl_settings_on && launch_opt_on}
         field = "Launch boost duty", boost_launch_duty, {boost_ctl_settings_on && launch_opt_on && boost_feats_launch && boost_ctl_settings_cl == 0}
         field = "Launch boost target", boost_launch_target, {boost_ctl_settings_on && launch_opt_on && boost_feats_launch && boost_ctl_settings_cl}
         field = ""
         field = "Boost vs speed", boost_vss, {boost_ctl_settings_on}
         field = "Above TPS", boost_vss_tps, {boost_ctl_settings_on && boost_vss}
       

        dialog = boostctlSettings, "Boost Control Settings"
          field = "Boost control Enabled",		  boost_ctl_settings_on
          field = "Solenoid Freq. Range",       boost_ctl_pwm, {boost_ctl_settings_on}
          field = "Solenoid Frequency (mid)", boost_ctl_pwm_scale, { boost_ctl_settings_on && (boost_ctl_pwm == 1)}
          field = "Note, the mid frequency is shared with PWM idle"
          field = "Boost Control Pin (high,mid)",     boost_ctl_pins_pwm, {boost_ctl_settings_on && (boost_ctl_pwm < 2)}
          field = "Solenoid Frequency (slow)",		  boost_ctl_settings_freq, {boost_ctl_settings_on && (boost_ctl_pwm == 2)}
          field = "Boost Control Pin (slow)",                boost_ctl_pins, {boost_ctl_settings_on && (boost_ctl_pwm == 2)}
          field = "Output polarity",                  boost_ctl_settings_invert, {boost_ctl_settings_on}
          field = "Control Interval",                 boost_ctl_ms, {boost_ctl_settings_on}
          field = ""
          field = "Closed Duty",                      boost_ctl_closeduty, {boost_ctl_settings_on}
          field = "Open Duty",                        boost_ctl_openduty, {boost_ctl_settings_on}
          field = "Boost Control Lower Limit",        boost_ctl_lowerlimit, { boost_ctl_settings_cl }
          field = ""
          field = "Algorithm",			  boost_ctl_settings_cl, {boost_ctl_settings_on}
          field = "Proportional Gain",                boost_ctl_Kp, {boost_ctl_settings_cl}
          field = "Integral Gain",                    boost_ctl_Ki, {boost_ctl_settings_cl}
          field = "Differential Gain",                boost_ctl_Kd, {boost_ctl_settings_cl}

          dialog = boosteast, ""
           panel = overboost, North
           panel = boostfeat, South

          dialog = boost, "Boost Control", border
           panel = boostctlSettings, West
           panel = boosteast, East

       dialog = maxafrset, ""
          field = "Enable AFR Safety", maxafr_opt1_on
           field = "Warning output", maxafr_opt1_led, { maxafr_opt1_on || egt_conf_action }
           field = "Load axis", maxafr_opt1_load, { maxafr_opt1_on }
           field = "Check above load", maxafr_en_load, { maxafr_opt1_on }
           field = "Check above RPM", maxafr_en_rpm,   { maxafr_opt1_on }
           field = "Wait for", maxafr_en_time, { maxafr_opt1_on }
           field = "Kill spark for", maxafr_spkcut_time, { maxafr_opt1_on || egt_conf_action}
           field = "Then kill fuel until..." ;, "", { maxafr_opt1_on || egt_conf_action}
           field = "TPS below", maxafr_ret_tps, { maxafr_opt1_on || egt_conf_action}
           field = "MAP below", maxafr_ret_map, { maxafr_opt1_on || egt_conf_action}
           field = "RPM below", maxafr_ret_rpm, { maxafr_opt1_on || egt_conf_action}

       dialog = maxafrTbls, "AFR difference table", border
           panel = maxafr1Tbl, West

       dialog = maxafr, "Maximum AFR Safety System", border
           panel = maxafrset, West
           panel = maxafrTbls, East

         dialog = egtwestn, "Configuration"
           field = "No. EGT inputs", egt_num
           field = ""
           field = "Calibration - see documentation"
           field = "Temp at 0V", egtcal_temp0, {egt_num}
           field = "Temp at 5V", egtcal_tempmax, {egt_num}

         dialog = egtwests, "Actions"
           field = "EGT actions", egt_conf_action
           field = "Warning LED same as AFR safety"
           field = "Warn temperature", egt_warn, {egt_conf_action}
           field = "Added fuel", egt_addfuel, {egt_conf_action}
           field = "Add to", egt_conf_bank, {egt_conf_action}
           field = "Shutdown engine", egt_conf_shutdown, {egt_conf_action}
           field = "Time > warn temp", egt_time, {egt_conf_action && egt_conf_shutdown}
           field = "Max temperature", egt_max, {egt_conf_action && egt_conf_shutdown}
           field = "See AFR safety for shutdown options"

         dialog = egtwest, "", yAxis
           panel = egtwestn, North
           panel = egtwests, South

         dialog = egteast, "Data capture"
           field = "EGT 1 channel",  egt1port, { (egt_num > 0) }
           field = "EGT 2 channel",  egt2port, { (egt_num > 1) }
           field = "EGT 3 channel",  egt3port, { (egt_num > 2) }
           field = "EGT 4 channel",  egt4port, { (egt_num > 3) }
           field = "EGT 5 channel",  egt5port, { (egt_num > 4) }
           field = "EGT 6 channel",  egt6port, { (egt_num > 5) }
           field = "EGT 7 channel",  egt7port, { (egt_num > 6) }
           field = "EGT 8 channel",  egt8port, { (egt_num > 7) }
           field = "EGT 9 channel",  egt9port, { (egt_num > 8) }
           field = "EGT 10 channel", egt10port, { (egt_num > 9) }
           field = "EGT 11 channel", egt11port, { (egt_num > 10) }
           field = "EGT 12 channel", egt12port, { (egt_num > 11) }

         dialog = egt, "EGT / Thermocouple inputs", border
           panel = egtwest, West
           panel = egteast, East

         dialog = injseq, "Injector Sequence"
           field = "!FOR EXPERT USE ONLY"
           field = ""
           field = "Enable initial values", feature3_3
           field = "Injector sequence start", trig_init, {feature3_3 }
           field = "Injector time mask", inj_time_mask, {feature3_3 }

          dialog = canwest,  ""
           field = "My CAN ID",  mycan_id

               field = "Enable PWM polling", enable_pollPWM
           field = "Remote CAN Id", can_poll_id, { enable_pollPWM }
               field = "Remote table number for PWM data", poll_tablePWM, { enable_pollPWM }
               field = "Remote table offset for PWM data", poll_offsetPWM, { enable_pollPWM }
           field = "Remote clock", canpwm_clk, { enable_pollPWM }
           field = "Remote prescale", canpwm_pre, { enable_pollPWM }
           field = "Remote divider", canpwm_div, { enable_pollPWM }
           field = ""
           field = "Enable ADC polling", enable_pollADC

          dialog = caneast,  ""
           field = "Digital ports"
           field = "Remote CAN Id", can_poll_id_ports, { enable_pollports_digin || enable_pollports_digout}
               field = "Table", poll_tableports, { enable_pollports_digin || enable_pollports_digout}
           field = "Enable input port", enable_pollports_digin
               field = "Offset", can_poll_digin_offset, { enable_pollports_digin}
           field = "Enable output port", enable_pollports_digout
               field = "Offset", can_poll_digout_offset, { enable_pollports_digout}
           field = ""
           field = "Enable PWM outputs", enable_pwmout
           field = "Remote CAN Id", can_pwmout_id, { enable_pwmout }
               field = "Table", can_pwmout_tab, { enable_pwmout }
               field = "Offset", can_pwmout_offset, { enable_pwmout }

    ;CAN adcs
        dialog = canadc_opt, "", yAxis
            field = "CAN ADC group on/off"
            field = "CAN ADC  1- 4", canadc_opt1, { enable_pollADC }
            field = "CAN ADC  5- 8", canadc_opt2, { enable_pollADC }
            field = "CAN ADC  9-12", canadc_opt3, { enable_pollADC }
            field = "CAN ADC 13-16", canadc_opt4, { enable_pollADC }
            field = "CAN ADC 17-20", canadc_opt5, { enable_pollADC }
            field = "CAN ADC 21-24", canadc_opt6, { enable_pollADC }

        dialog = canadc_id, "", yAxis
            field = "CAN Id"
            field = "", canadc_id1, { canadc_opt1 && enable_pollADC }
            field = "", canadc_id2, { canadc_opt2 && enable_pollADC }
            field = "", canadc_id3, { canadc_opt3 && enable_pollADC }
            field = "", canadc_id4, { canadc_opt4 && enable_pollADC }
            field = "", canadc_id5, { canadc_opt5 && enable_pollADC }
            field = "", canadc_id6, { canadc_opt6 && enable_pollADC }

        dialog = canadc_tab, "", yAxis
            field = "Table"
            field = "", canadc_tab1, { canadc_opt1 && enable_pollADC }
            field = "", canadc_tab2, { canadc_opt2 && enable_pollADC }
            field = "", canadc_tab3, { canadc_opt3 && enable_pollADC }
            field = "", canadc_tab4, { canadc_opt4 && enable_pollADC }
            field = "", canadc_tab5, { canadc_opt5 && enable_pollADC }
            field = "", canadc_tab6, { canadc_opt6 && enable_pollADC }

        dialog = canadc_off, "", yAxis
            field = "Offset"
            field = "", canadc_off1, { canadc_opt1 && enable_pollADC }
            field = "", canadc_off2, { canadc_opt2 && enable_pollADC }
            field = "", canadc_off3, { canadc_opt3 && enable_pollADC }
            field = "", canadc_off4, { canadc_opt4 && enable_pollADC }
            field = "", canadc_off5, { canadc_opt5 && enable_pollADC }
            field = "", canadc_off6, { canadc_opt6 && enable_pollADC }

        dialog = canadcs, "CAN ADC selection", xAxis
            panel = canadc_opt
            panel = canadc_id
            panel = canadc_tab
            panel = canadc_off

          dialog = can_top, "", xAxis
            panel = canwest
            panel = caneast

          dialog = canparams, "CAN Parameters", border
            panel = can_top, North
            panel = canadcs, South

        dialog = canvss1, "CAN VSS and gear selection"
          field = "This is for polling the actual vehicle speed"
          field = "mph/kph from a remote device."
          field = "For a pulse input use the CAN PWM instead"
          field = "Remote CAN id", vss1_can_id
          field = "Remote CAN table", vss1_can_table
          field = ""
          field = "VSS1 offset", vss1_can_offset, {vss_opt1 == 0x0e}
          field = "Data size", vss1_can_size, {vss_opt1 == 0x0e}
          field = ""
          field = "VSS2 offset", vss2_can_offset, {vss_opt2 == 0x0e}
          field = "Data size", vss2_can_size, {vss_opt2 == 0x0e}
          field = ""
          field = "Gear# offset", gear_can_offset, {(gear_method & 0x03) == 0x03}

        dialog = canrtc, "Real time clock"
          field = "Enable real time clock", opt142_rtc
          field = "Remote CAN id", can_poll_id_rtc, {opt142_rtc == 2}
          field = "Table", poll_table_rtc, {opt142_rtc == 2 }
          field = "Offset", poll_offset_rtc, {opt142_rtc == 2}

        dialog = canego, "Innovate EGO data via CAN"
          field = "Fetch Innovate EGO data", can_poll2_ego
          field = "Remote CAN id", can_ego_id, {can_poll2_ego}
          field = "Table", can_ego_table, {can_poll2_ego}
          field = "Offset", can_ego_offset, {can_poll2_ego}

          dialog = canvss, "CAN VSS & RTC & EGO Parameters", yAxis
            panel = canvss1
            panel = canrtc
            panel = canego
     
          dialog = tablesw1, "Table Switching"
          field = "Fuel Table Switching",         f5_0_tsf, { !(dualfuel_sw_on && dualfuel_sw_fuel) }
          field = "Switch source",        f5_0_tsf_opt,  { f5_0_tsf && !(dualfuel_sw_on && dualfuel_sw_fuel)}
          field = "Input pin", tsw_pin_f, { f5_0_tsf && (f5_0_tsf_opt == 0) && !(dualfuel_sw_on && dualfuel_sw_fuel)}
          field = "rpm greater than",     tsf_rpm,  { f5_0_tsf && (f5_0_tsf_opt == 1) && !(dualfuel_sw_on && dualfuel_sw_fuel)}
          field = "kPa greater than",    tsf_kpa,  { f5_0_tsf && (f5_0_tsf_opt == 2) && !(dualfuel_sw_on && dualfuel_sw_fuel)}
          field = "TPS greater than",    tsf_tps,  { f5_0_tsf && (f5_0_tsf_opt == 3) && !(dualfuel_sw_on && dualfuel_sw_fuel)}
          field = ""
          field = "Spark Table Switching",         f5_0_tss, { !(dualfuel_sw_on && dualfuel_sw_spk) }
          field = "Switch source",        f5_0_tss_opt,  { f5_0_tss && !(dualfuel_sw_on && dualfuel_sw_spk)}
          field = "Input pin", tsw_pin_s, { f5_0_tss && (f5_0_tss_opt == 0) }
          field = "rpm greater than",     tss_rpm,  { f5_0_tss && (f5_0_tss_opt == 1) && !(dualfuel_sw_on && dualfuel_sw_spk)}
          field = "kPa greater than",    tss_kpa,  { f5_0_tss && (f5_0_tss_opt == 2) && !(dualfuel_sw_on && dualfuel_sw_spk)}
          field = "TPS greater than",    tss_tps,  { f5_0_tss && (f5_0_tss_opt == 3) && !(dualfuel_sw_on && dualfuel_sw_spk)}
          field = ""
          field = "Req Fuel Switching", tsw_pin_rf, { !(dualfuel_sw_on && dualfuel_sw_rf)}
          field = "Alternate ReqFuel (lower number)", ReqFuel_alt, { tsw_pin_rf || (dualfuel_sw_on && dualfuel_sw_rf)}
          field = ""
          field = "AFR table Switching", tsw_pin_afr, { !(dualfuel_sw_on && dualfuel_sw_afr)}
          field = ""
          field = "Stoich Switching", tsw_pin_stoich, { !(dualfuel_sw_on && dualfuel_sw_stoich)}
          field = "Alternate Stoich", stoich_alt, { tsw_pin_stoich || (dualfuel_sw_on && dualfuel_sw_stoich)}
          field = ""
          field = "Boost control table switching is on the boost control menu"

        dialog = dualfuel, "Dual Fuel switching"
            field = "Dual fuel enable", dualfuel_sw_on
            field = "Mode", dualfuel_opt_mode, { dualfuel_sw_on }
            field = "Outputs mode", dualfuel_opt_out, { dualfuel_sw_on && !dualfuel_opt_mode }
            field = "Secondary outputs", staged_extended_opts_use_v3, { dualfuel_sw_on && (dualfuel_opt_out || dualfuel_opt_mode) }
;was { ((dualfuel_opt_out || dualfuel_opt_mode) && hardware_fuel && ((nCylinders <= 4)) || ((nCylinders > 4) && (sequential == 1))) }
            field = "Secondary v3 alternate", staged_extended_opts_simult, { ((dualfuel_opt_out || dualfuel_opt_mode) && staged_extended_opts_use_v3) || ((nCylinders > 4) && (dualfuel_opt_out || dualfuel_opt_mode) && hardware_fuel && !(sequential & 0x1)) }
            field = "Input pin", dualfuel_pin, { dualfuel_sw_on && !dualfuel_opt_mode }
            field = "Alt. fuel tables", dualfuel_sw_fuel, { dualfuel_sw_on && !dualfuel_opt_mode }
            field = "Alt. spark tables", dualfuel_sw_spk, { dualfuel_sw_on && !dualfuel_opt_mode }
            field = "Alt. AFR tables", dualfuel_sw_afr, { dualfuel_sw_on && !dualfuel_opt_mode }
            field = "Alt. ReqFuel", dualfuel_sw_rf, { dualfuel_sw_on && !dualfuel_opt_mode }
            field = "Alt. Stoich", dualfuel_sw_stoich, { dualfuel_sw_on && !dualfuel_opt_mode }
            field = "Alt. warmup", dualfuel_sw_wue, { dualfuel_sw_on && !dualfuel_opt_mode }
            field = "Alt. afterstart", dualfuel_sw_ase, { dualfuel_sw_on && !dualfuel_opt_mode }
            field = "Alt. priming", dualfuel_sw2_prime, { dualfuel_sw_on && !dualfuel_opt_mode }
            field = "Alt. cranking pulse", dualfuel_sw2_crank, { dualfuel_sw_on && !dualfuel_opt_mode }
            field = "Alt. injector params", dualfuel_sw2_injp, { dualfuel_sw_on && !dualfuel_opt_mode }
            field = "Alt. small pulsewidths", dualfuel_sw2_smpw, { dualfuel_sw_on && !dualfuel_opt_mode }
            field = "Alt. overboost", dualfuel_sw2_ob, { dualfuel_sw_on && !dualfuel_opt_mode }
            field = "Alt. boost table", dualfuel_sw2_boosw, { dualfuel_sw_on && !dualfuel_opt_mode }
            field = ""
            field = "Enable Temperature Adjustment", dualfuel_opt_temp, { dualfuel_sw_on && !dualfuel_opt_mode }
            field = "Temperature on", dualfuel_temp_sens, { dualfuel_sw_on && dualfuel_opt_temp}
            field = "Enable Pressure Adjustment", dualfuel_opt_press, { dualfuel_sw_on && !dualfuel_opt_mode }
            field = "Gauge Pressure in kPa on", dualfuel_press_sens, { dualfuel_sw_on && dualfuel_opt_press}
            field = "Pressure used = Gauge + Baro - MAP"

        dialog = tablesw, "Table Switching and Dual Fuel", xAxis
            panel = tablesw1, West
            panel = dualfuel, East

          dialog = outputtest, "Output test modes"
           field = "Enter 12345, TAB, Burn", testmodelock
           field = "Only Burn once. Turn off power when finished"
           field = "-"
           field = "Fuel pump", testop_fp
           field = "Test mode", testmode
           field = "Output interval", testint
           field = "Coil testing mode", testop_coil, { testmode == 1 }
           field = "Coil output to test", testsel_coil, {testmode == 1}
           field = "Dwell", testdwell, { testmode == 1 }
           field = "Injector testing mode", testop_inj, { testmode == 2 }
           field = "Injector channel to test", testsel_inj, {testmode == 2}
           field = "Pulsewidth", testpw, { testmode == 2 }
           field = "Total number of injections", testinjcnt
           field = "-"
           field = "Note: The following only applies to Inj1 and Inj2"
           field = "Injector PWM parameters", testop_pwm, { testmode == 2 }
           field = "PWM Current Limit",          testinjPwmP, { testmode == 2 && testop_pwm }
           field = "PWM Time Threshold",         testinjPwmT, { testmode == 2 && testop_pwm }
           field = "Injector PWM Period",        testinjPwmPd , { testmode == 2 && testop_pwm }

          dialog = iactest, "Idle valve test"
           field = "Idle testing enable", iactestlock
           field = ""
           field = "Move to home position", iactest, {iactestlock}
           field = "iac home step", iachometest, {iactestlock && ( IdleCtl == 2 || IdleCtl == 3 || IdleCtl == 5 || IdleCtl == 7 || IdleCtl == 8 ) }
           field = "iac step", iacpostest
           field = "Set the steps before enabling testing"
           field = "For PWM valves enter 0-100, for stepper use 0-255"

          dialog = codetest, "Code dev test options"
           field = "iac pos test", iacpostest
           field = "tooth to debug", dbgtooth
           field = "Pulsewidth scaling", feature3_pw4x

          dialog = EAElagcomp, "EAE lag compensation"
           field = "Source",  EAElagsource
           field = "Threshold", EAElagthresh
           field = "Max RPM", EAElagRPMmax
     
      dialog = accelsettings, "Accel enrich settings"
          field = "#Accel enrich down-scaling with RPM"
          field = "Low RPM Threshold",       ae_lorpm
          field = "High RPM Threshold",      ae_hirpm
          field = ""
          field = "Enhanced Accel Enrichment",            EAEOption

;#if INI_VERSION_2
;    dialog = westEAE, "", yAxis
;        ;panel = EAEBAWCcurve
;        panel = accelsettings
;        panel = EAEBSOCcurve
;        
;    dialog = eastEAE, "", yAxis
;        panel = EAEAWNcurve
;        ;panel = EAESONcurve
;        panel = veTable1Tbl
;        
;    dialog = combineEAE, "Combined EAE",  border
;        panel = westEAE, West
;        panel = eastEAE, East
;        liveGraph = eaeGraph, "EAE Graph", South
;            graphLine = afr1
;            graphLine = tps, "%", 0, 100
;            graphLine = EAEFuelCorr1
;#endif

          dialog = RotaryTrailingSettings, "Rotary Settings"
          field = "Enable Rotary Mode", RotarySplitModeOn
          field = "See also Rotary Split Table"
          field = "Output mode", RotarySplitModeFD, { RotarySplitModeOn && !RotarySplitModeRX8 }
          field = "RX8 mode", RotarySplitModeRX8, { RotarySplitModeOn }
          field = "Allow negative split?", RotarySplitModeNeg, { RotarySplitModeOn }
          field = "Trailing Dwell time", dwelltime_trl, {RotarySplitModeOn && (spk_mode0 >1) && (dwellmode==0) }
          field = ""
          field = ""
          field = ""

    ;      dialog = RotaryTrailingSettings, "Rotary Settings", border
    ;        panel = RotaryTrailingSettingsmenu, West
    ;        panel = RotarySplitTbl, East


    ;      dialog = noisefiltering, "Noise filtering"
          dialog = noisefiltering, "", yAxis
          field = "See the web help for more information about noise filtering"
          field = "!GLOBAL TIMER NOISE FILTER DELAY"
          field = "Noise filter period", dlyct
    ; note that use of this depends on whether the wheel is single/double edged
          field = "!PRIMARY TACH (crank)"
          field = "Noise Filter Enabled", NoiseFilterOpts
          field = "Use noise filter curve to tune"
          field = "Tach period rejection", NoiseFilterOpts1
          field = "Tach interrupt masking", NoiseFilterOpts2, {NoiseFilterOpts == 0}
          field = "Time",                     ICISR_tmask, {NoiseFilterOpts1 || NoiseFilterOpts2}
          field = "Percentage",               ICISR_pmask, {NoiseFilterOpts1 || NoiseFilterOpts2}
    ;      field = "Polarity checking", NoiseFilterOpts3, {NoiseFilterOpts == 0}
    ; note that use of this depends on whether the wheel uses a cam and/or if it is single/double edged
          field = "!SECONDARY TACH (cam)"
          field = "Noise Filter Enabled",    secondtrigopts;
          field = "Noise Filter Time Period",      TC5_required_width, { secondtrigopts & 0x1 }
          field = "Tach period rejection", secondtrigopts1
          field = "Tach interrupt masking", secondtrigopts2, { secondtrigopts == 0 }
          field = "Time",                     IC2ISR_tmask, {secondtrigopts1 || secondtrigopts2}
          field = "Percentage",               IC2ISR_pmask, {secondtrigopts1 || secondtrigopts2}
    ;      field = "Polarity checking", secondtrigopts3, { secondtrigopts == 0 }

          dialog = noisefilterpad
          field = "Note, a power cycle is required after enabling/disabling"
          field = " the noise filters"
            field = ""
            field = ""
            field = ""
            field = ""

          dialog = Eastnoisefilter, "", yAxis
            panel = NoiseFiltercurve
           panel = noisefilterpad, South

          dialog = noisefiltering2, "Noise Filtering", xAxis
            panel = noisefiltering, West
            panel = Eastnoisefilter, East


          dialog = launchwest, ""
          field = "Launch control option:",        launch_opt_on
          field = ""
          field = "Input on:",  launch_opt_pins, { launch_opt_on >0 }
          field = "Launch retard above", launch_sft_lim, {launch_opt_on >0}
          field = "Retard to", launch_sft_deg, {launch_opt_on >0}
          field = "Launch fuel add/remove", launch_opt_bank, { launch_opt_on >0 }
          field = "Fuel addition", launch_addfuel, {launch_opt_bank && launch_opt_on >0}
          field = "Enable Launch when TPS above  ", launch_tps, { launch_opt_on >0}
          field = "Launch hard limit", launch_hrd_lim, {launch_opt_on >0}
          field = "Limiter method", launchlimopt, { launch_opt_on >0}
          field = "Cut X sparks", launchcutx, { (launchlimopt & 1) && (launch_opt_on >0) }
          field = "from Y events", launchcuty, { (launchlimopt & 1) && (launch_opt_on >0) }
          field = "Cut fuel above", launch_fcut_rpm, { (launchlimopt & 1) && (launch_opt_on >0) }
          field = "Flat shift arming rpm",          flats_arm,   { launch_opt_on >1 }
          field = "Flat shift mode retard above",   flats_sft,   { launch_opt_on >1 }
          field = "Retard to :  ",                  flats_deg,   { launch_opt_on >1 }
          field = "Flat shift hard rev limit",      flats_hrd,   { launch_opt_on >1 }

          dialog = launchnortheast, "Variable Launch"
          field = "Variable launch input",        launch_var_on, { launch_opt_on >0 }
          field = " -minimum setting", launch_var_low, {launch_var_on && launch_opt_on >0 }
          field = " -maximum setting", launch_var_up, {launch_var_on && launch_opt_on >0 }
          field = " -soft limit lower by", launch_var_sof, {launch_var_on && launch_opt_on >0 }

          dialog = launchsoutheast, "3-step / burnout limiter"
          field = "3-step input", launch_3step_in, {launch_opt_on >0 }
          field = " -Retard above", launch_sft_lim3, {launch_3step_in && launch_opt_on >0}
          field = " -Retard to", launch_sft_deg3, {launch_3step_in && launch_opt_on >0}
          field = " -Hard limit", launch_hrd_lim3, {launch_3step_in && launch_opt_on >0}

          dialog = launcheast, "", border
          panel = launchnortheast, North
          panel = launchsoutheast, South

          dialog = launch, "Launch control/ 2-step / 3-step", border
          panel = launchwest, West
          panel = launcheast, East

          dialog = tacho, "Tachometer output"
    ;      topicHelp = tachohelp
          field = "Tacho output enabled",         tacho_opt80
          field = ""
          field = "Output on:",  tacho_opt3f, { tacho_opt80 }
          field = "Speed", tacho_opt40, { tacho_opt80 }

          dialog = overrun, "Over Run Fuel Cut"
    ;      topicHelp = Chelp8
          field = "Over Run Fuel Cut",         OvrRunC
          field = "Cut fuel when:"
          field = "RPM greater than:",         fc_rpm,  { OvrRunC }
          field = "and KPa lower than:  ",     fc_kpa,  { OvrRunC }
          field = "and TPS lower than:  ",     fc_tps,  { OvrRunC }
          field = "and coolant greater than:", fc_clt,  { OvrRunC }
          field = "after delay",              fc_delay, { OvrRunC }
          field = ""
          field = "Delay EGO after fuel return:", fc_ego_delay, { OvrRunC }
          field = "Return fuel when RPM less than:"  fc_rpm_lower, { OvrRunC }

          dialog = staging, "Staged Injection"
          field = "!Staged injection first parameter", staged_first_param
          field = "!Primary injector size",     staged_pri_size, { staged_first_param }
          field = "!Secondary injector size",   staged_sec_size, { staged_first_param }
          field = "Transition fully to secondaries", staged_extended_opts_pw1off, { staged_first_param }
          field = "Secondary outputs",  staged_extended_opts_use_v3, { staged_first_param }
          field = "Secondary v3 alternate", staged_extended_opts_simult, { (staged_extended_opts_use_v3 && staged_first_param) || ((nCylinders > 4) && (staged_first_param) && (hardware_fuel) && !(sequential & 0x1)) }
          field = ""
          field = "Gradual transition", staged_transition_on, { staged_first_param && ((staged_first_param & 0x7) != 5) }
          field = "Transition events", staged_transition_events, { (staged_first_param && staged_transition_on) && ((staged_first_param & 0x7) != 5) }
          field = "Primary reduction delay", staged_primary_delay, { (staged_first_param && staged_transition_on) && ((staged_first_param & 0x7) != 5) }
          field = "Secondary enrichment", staged_secondary_enrichment, { (staged_first_param && staged_transition_on) && ((staged_first_param & 0x7) != 5) }
          field = ""
          field = "Primary staging threshold", staged_param_1, { staged_first_param && ((staged_first_param & 0x7) != 5) }
          field = "Primary staging hysteresis", staged_hyst_1, { staged_first_param && ((staged_first_param & 0x7) != 5) }
          field = ""
          field = "Second parameter", staged_second_param, { staged_first_param && ((staged_first_param & 0x7) != 5) }
          field = "Secondary staging threshold", staged_param_2, { staged_second_param }
          field = "Secondary staging hysteresis", staged_hyst_2, { staged_second_param }
          field = "Secondary staging logic", staged_second_logic, { staged_second_param }

       dialog = stagedCombined, "Staged Settings", border
          panel = staging, West
          panel = stagedTable, Center, { (staged_first_param & 0x7) == 5 }

       dialog = crsettings, "Cranking settings"
          field = "Cranking RPM",          crankingRPM
          field = ""
          field = "Flood clear TPS", floodClear
          field = "Above this throttle no fuel is injected"
          field = "Cranking fuel pulse rate ", altcrank
          field = ""
          field = "Engines with lots of cylinders such as V12 may find"
          field = "that the injecting fuel on every tach event gives"
          field = "difficult hot starting. This option allows the fuel"
          field = "to be injected on alternate events (with twice the"
          field = "pulse width)"


       dialog = generalSettings, "General Settings"
    ;      topicHelp = "http://www.megasquirt.info/megatune.htm#sg"

             field = "Barometric Correction", baroCorr
             field = "Realtime baro port",    rtbaroport, {baroCorr == 2}
             field = "Upper limit", baro_upper, {baroCorr == 1}
             field = "Lower limit", baro_lower, {baroCorr == 1}
             field = "Default baro", baro_default, {baroCorr < 2}
             field = "MAP sensor port", mapport
             field = "MegaView Temp. Units", tempUnits

          field = "#Input Smoothing Lag Factors"
             field = "MAP Averaging Lag Factor",    mapLF
             field = "RPM Averaging Lag Factor",    rpmLF
             field = "TPS Averaging Lag Factor",    tpsLF
             field = "Lambda Averaging Lag Factor", egoLF
             field = "CLT/MAT/Battery Lag Factor",  adcLF

          dialog = secondaryLoad, "Secondary load parameters"
          field = "Secondary Fuel Load",      algorithm2
          field = "Secondary Fuel",		  loadCombine, {algorithm2 != 0 }
          field = "Multiply MAP (caution!)",    loadMult
          field = "99% of installs should use Multiply"
          field = ""
          field = "Incorporate AFRTarget", loadStoich
          field = "Stoichiometric AFR", stoich ;, { loadStoich } needed for lambda calc even if not incl AFR
          field = ""
          field = "Primary Ignition Load",    IgnAlgorithm
          field = "Secondary Ignition Load",  IgnAlgorithm2
          field = "NOTE: secondary ignition table is always additive"
          field = ""
          field = "AFR table load", afrload
          field = "EAE curve load", eaeload

        dialog = eastgeneral, ""
          panel = secondaryLoad, North
          panel = overrun, South

       dialog = generalsettings2, "General settings", border
          panel = generalSettings, West
          panel = eastgeneral, East


       dialog = revlimiter, "Rev Limiter"
    ; NEW version that needs to be written
        field = "SPARK RETARD"
        field = "Mode",  RevLimOption_retard
        field = "Retard above",        RevLimNormal1, { RevLimOption_retard && (RevLimCLTbased == 0) }
        field = "Maximum Retard",        RevLimMaxRtd, { RevLimOption_retard == 1 }
        field = "Retard to",        RevLimRtdAng, { RevLimOption_retard == 2}
        field = ""
        field = "SPARK CUT"
        field = "Enable spark cut limiting", RevLimOption_spkcut
        field = "Spark cut above",        RevLimNormal3, { RevLimOption_spkcut }
        field = "Cut X sparks",    RevLimcutx, { RevLimOption_spkcut }
        field = "from Y events",         RevLimcuty, { RevLimOption_spkcut }
        field = ""
        field = "FUEL CUT"
        field = "Hard Fuel cut limit",        RevLimNormal2
        field = "Hysteresis",        RevLimNormal2_hyst
        field = ""
        field = "COOLANT TEMP LIMITER"
        field = "Rev Limiter CLT based", RevLimCLTbased 
        field = "Rev Limit Adder",       RevLimRpm2, { RevLimCLTbased & 1 }
        field = "Rev Limit TPS bypass",  TpsBypassCLTRevlim, { RevLimCLTbased & 1 }
        field = "RPM when in TPS bypass", RevLimTPSbypassRPM, { RevLimCLTbased & 1 }
        field = "Beyond upper temperature, nomal limits above are used"

       dialog = revlimiter2, "Rev limiter", xAxis
         panel = revlimiter
         panel = revlimiterBins

       dialog = flexFuelSettings, "Flex Fuel Settings"
    ;      topicHelp = "http://www.megasquirt.info/flexfuel.htm"
          field = "Flex Fuel Sensor",         flexFuel
          field = "Sensor port",              flexport,    { flexFuel > 0 }
          field = "Frequency (low)",          fuelFreq0,   { flexFuel > 0 }
          field = "Fuel Correction (low)",    fuelCorr0,   { flexFuel > 0 }
          field = "Timing Correction (low)",  fuelSpkDel0, { flexFuel > 0 }
          field = "Frequency (high)",         fuelFreq1,   { flexFuel > 0 }
          field = "Fuel Correction (high)",   fuelCorr1,   { flexFuel > 0 }
          field = "Timing Correction (high)", fuelSpkDel1, { flexFuel > 0 }

       dialog = sequentialOptions, "Sequential Fuel Injection"
            field = "Main fuel outputs",               hardware_fuel
            field = "Sequential On",               sequential
            field = "Angle specifies:",            sequential_angle_spec, { sequential != 0 }
            field = "Injector Trim",             sequential_trim_on_off

       dialog = firingorder, "Firing Order"
          field = "A.", firea  
          field = "B.", fireb, { nCylinders > 1}
          field = "C.", firec, { nCylinders > 2}
          field = "D.", fired, { nCylinders > 3}
          field = "E.", firee, { nCylinders > 4}
          field = "F.", firef, { nCylinders > 5}
          field = "G.", fireg, { nCylinders > 6}
          field = "H.", fireh, { nCylinders > 7}
    ;      field = "A.", firea  {(sequential && sequential_trim_on_off) || spk_mode3_trim  }
    ;      field = "B.", fireb, {((sequential && sequential_trim_on_off) || spk_mode3_trim ) && nInjectors > 1}
    ;      field = "C.", firec, {((sequential && sequential_trim_on_off) || spk_mode3_trim ) && nInjectors > 2}
    ;      field = "D.", fired, {((sequential && sequential_trim_on_off) || spk_mode3_trim ) && nInjectors > 3}
    ;      field = "E.", firee, {((sequential && sequential_trim_on_off) || spk_mode3_trim ) && nInjectors > 4}
    ;      field = "F.", firef, {((sequential && sequential_trim_on_off) || spk_mode3_trim ) && nInjectors > 5}
    ;      field = "G.", fireg, {((sequential && sequential_trim_on_off) || spk_mode3_trim ) && nInjectors > 6}
    ;      field = "H.", fireh, {((sequential && sequential_trim_on_off) || spk_mode3_trim ) && nInjectors > 7}
    ;      field = ""
    ;      field = ""
    ;      field = ""
    ;      field = ""
    ;      field = ""
    ;      field = ""
    ;      field = ""
    ;      field = ""

      dialog = seqfo, "", border
         panel = sequentialOptions, North
         panel = firingorder, South


      dialog = base, "Engine and Sequential Settings", border
         panel = std_injection, West
         panel = seqfo, East

       dialog = ot_ot2, "", yAxis
          field = "MS3X parameters"
          field = "Dead time"
          field = "@ 13.2V"
          field = "A", inj2Open1
          field = "B", inj2Open2, {opentime2_opt1_master}
          field = "C", inj2Open3, {opentime2_opt1_master}
          field = "D", inj2Open4, {opentime2_opt1_master}
          field = "E", inj2Open5, {opentime2_opt1_master}
          field = "F", inj2Open6, {opentime2_opt1_master}
          field = "G", inj2Open7, {opentime2_opt1_master}
          field = "H", inj2Open8, {opentime2_opt1_master}

       dialog = ot_curve2, "", yAxis
          field = "", opentime2_opt1_master
          field = "Voltage dead"
          field = "time curve"
          field = "", opentime2_opt1
          field = "", opentime2_opt2, {opentime2_opt1_master}
          field = "", opentime2_opt3, {opentime2_opt1_master}
          field = "", opentime2_opt4, {opentime2_opt1_master}
          field = "", opentime2_opt5, {opentime2_opt1_master}
          field = "", opentime2_opt6, {opentime2_opt1_master}
          field = "", opentime2_opt7, {opentime2_opt1_master}
          field = "", opentime2_opt8, {opentime2_opt1_master}

       dialog = injchar_ms3x_2, "MS3X Injectors", xAxis
          panel = ot_ot2
          panel = ot_curve2

       dialog = injchar_v3_2, "Mainboard Injectors", yAxis
          field = "BANK 1 Dead time @ 13.2V", inj2Opena
          field = "Correction curve", opentime2_opta
          field = "PWM current limiting", opentime2_opta_pwm
          field = "PWM Current Limit",          inj2PwmP, {opentime2_opta_pwm}
          field = "PWM Time Threshold",         inj2PwmT, {opentime2_opta_pwm}
          field = "Injector PWM Period",       inj2PwmPd, {opentime2_opta_pwm}
          field = ""
          field = "BANK 2 different settings", opentime2_optb_own
          field = "Dead time", inj2Openb, {opentime2_optb_own}
          field = "Correction curve", opentime2_optb, {opentime2_optb_own}
          field = "PWM current limiting", opentime2_optb_pwm, {opentime2_optb_own}
          field = "PWM Current Limit",          inj2PwmP2, {opentime2_optb_own && opentime2_optb_pwm}
          field = "PWM Time Threshold",         inj2PwmT2, {opentime2_optb_own && opentime2_optb_pwm}
          field = "Injector PWM Period",       inj2PwmPd2, {opentime2_optb_own && opentime2_optb_pwm}

       dialog = injCharswest2, "", yAxis
          panel = injchar_ms3x_2, North
          panel = injchar_v3_2, South

      dialog = injsettings2, "", border
         panel = injCharswest2, West

       dialog = ot_ot, "", yAxis
          field = "MS3X parameters"
          field = "Dead time"
          field = "@ 13.2V"
          field = "A", injOpen1
          field = "B", injOpen2, {opentime_opt1_master}
          field = "C", injOpen3, {opentime_opt1_master}
          field = "D", injOpen4, {opentime_opt1_master}
          field = "E", injOpen5, {opentime_opt1_master}
          field = "F", injOpen6, {opentime_opt1_master}
          field = "G", injOpen7, {opentime_opt1_master}
          field = "H", injOpen8, {opentime_opt1_master}

       dialog = ot_curve, "", yAxis
          field = "", opentime_opt1_master
          field = "Voltage dead"
          field = "time curve"
          field = "", opentime_opt1
          field = "", opentime_opt2, {opentime_opt1_master}
          field = "", opentime_opt3, {opentime_opt1_master}
          field = "", opentime_opt4, {opentime_opt1_master}
          field = "", opentime_opt5, {opentime_opt1_master}
          field = "", opentime_opt6, {opentime_opt1_master}
          field = "", opentime_opt7, {opentime_opt1_master}
          field = "", opentime_opt8, {opentime_opt1_master}

       dialog = injchar_ms3x, "MS3X Injectors", xAxis
          panel = ot_ot
          panel = ot_curve

       dialog = injchar_v3, "Mainboard Injectors", yAxis
          field = "BANK 1 Dead time @ 13.2V", injOpena
          field = "Correction curve", opentime_opta
          field = "PWM current limiting", opentime_opta_pwm
          field = "PWM Current Limit",          injPwmP, {opentime_opta_pwm}
          field = "PWM Time Threshold",         injPwmT, {opentime_opta_pwm}
          field = "Injector PWM Period",       injPwmPd, {opentime_opta_pwm}
          field = ""
          field = "BANK 2 different settings", opentime_optb_own
          field = "Dead time", injOpenb, {opentime_optb_own}
          field = "Correction curve", opentime_optb, {opentime_optb_own}
          field = "PWM current limiting", opentime_optb_pwm, {opentime_optb_own}
          field = "PWM Current Limit",          injPwmP2, {opentime_optb_own && opentime_optb_pwm}
          field = "PWM Time Threshold",         injPwmT2, {opentime_optb_own && opentime_optb_pwm}
          field = "Injector PWM Period",       injPwmPd2, {opentime_optb_own && opentime_optb_pwm}

       dialog = injCharswest, "", yAxis
          panel = injchar_ms3x, North
          panel = injchar_v3, South

      dialog = injcurveswest, "", border
         panel = opencurve0, North
         panel = opencurve2, South

      dialog = injcurveseast, "", border
         panel = opencurve1, North
         panel = opencurve3, South

      dialog = injcurves, "", border
         panel = injcurveswest, West
         panel = injcurveseast, East

      dialog = injsettings, "", border
         panel = injCharswest, West
         panel = injcurves, East

       dialog = smallpwwest2, ""
          field = "Enable non-linear small pulsewidths", smallpw2_opt1_master
          field = "!CAUTION!"
          field = "Unless you have specific injector data these"
          field = "'curves' must be a straight line from 0-2"
          field = "Ensure the start and end points are equal"
          field = "(e.g. 0.000, 0.000 and 2.000, 2.000)"
          field = "Select the pulsewidth curve for each injector"

          field = "MS3X injector A", smallpw2_opt1, { smallpw2_opt1_master }
          field = "MS3X injector B", smallpw2_opt2, { smallpw2_opt1_master }
          field = "MS3X injector C", smallpw2_opt3, { smallpw2_opt1_master }
          field = "MS3X injector D", smallpw2_opt4, { smallpw2_opt1_master }
          field = "MS3X injector E", smallpw2_opt5, { smallpw2_opt1_master }
          field = "MS3X injector F", smallpw2_opt6, { smallpw2_opt1_master }
          field = "MS3X injector G", smallpw2_opt7, { smallpw2_opt1_master }
          field = "MS3X injector H", smallpw2_opt8, { smallpw2_opt1_master }
          field = ""
          field = "Mainboard Bank 1", smallpw2_opta, { smallpw2_opt1_master }
          field = ""
          field = "Mainboard Bank 2", smallpw2_optb, { smallpw2_opt1_master }

      dialog = smallpw2, "Non-Linear small pulsewidths 2", border
         panel = smallpwwest2, West

       dialog = smallpwwest, ""
          field = "Enable non-linear small pulsewidths", smallpw_opt1_master
          field = "!CAUTION!"
          field = "Unless you have specific injector data these"
          field = "'curves' must be a straight line from 0-2"
          field = "Ensure the start and end points are equal"
          field = "(e.g. 0.000, 0.000 and 2.000, 2.000)"
          field = "Select the pulsewidth curve for each injector"

          field = "MS3X injector A", smallpw_opt1, { smallpw_opt1_master && ((hardware_fuel) ) }
          field = "MS3X injector B", smallpw_opt2, { smallpw_opt1_master && ((hardware_fuel) && (nInjectors > 1)) }
          field = "MS3X injector C", smallpw_opt3, { smallpw_opt1_master && ((hardware_fuel) && (nInjectors > 2)) }
          field = "MS3X injector D", smallpw_opt4, { smallpw_opt1_master && ((hardware_fuel) && (nInjectors > 3)) }
          field = "MS3X injector E", smallpw_opt5, { smallpw_opt1_master && ((hardware_fuel) && (nInjectors > 4)) }
          field = "MS3X injector F", smallpw_opt6, { smallpw_opt1_master && ((hardware_fuel) && (nInjectors > 5)) }
          field = "MS3X injector G", smallpw_opt7, { smallpw_opt1_master && ((hardware_fuel) && (nInjectors > 6)) }
          field = "MS3X injector H", smallpw_opt8, { smallpw_opt1_master && ((hardware_fuel) && (nInjectors > 7)) }
          field = ""
          field = "Mainboard Bank 1", smallpw_opta, { smallpw_opt1_master }
          field = ""
          field = "Mainboard Bank 2", smallpw_optb, { smallpw_opt1_master }

      dialog = smallcurveswest, "", border
         panel = smallcurve0, North
         panel = smallcurve2, South

      dialog = smallcurveseast, "", border
         panel = smallcurve1, North
         panel = smallcurve3, South

      dialog = smallcurves, "", border
         panel = smallcurveswest, West
         panel = smallcurveseast, East

      dialog = smallpw, "Non-Linear small pulsewidths", border
         panel = smallpwwest, West
         panel = smallcurves, East

    ;   dialog = egoControl, "EGO Control"
       dialog = egoControlright, ""
          field = "Algorithm",              egoAlgorithm,       { egoType }
          field = "Ignition Events per Step",  egoCount,        { egoType && (egoAlgorithm < 3) }
          field = "Controller Step Size",      egoDelta,        { egoType && (egoAlgorithm == 0) }
          field = "Controller Auth +/-",    egoLimit,           { egoType && (egoAlgorithm < 3) }
          field = "Active Above Coolant", egoTemp,              { egoType && (egoAlgorithm < 3) }
          field = "Active Above RPM",          egoRPM,          { egoType && (egoAlgorithm < 3) }
          field = "Active Below TPS",          TPSOXLimit,      { egoType && (egoAlgorithm < 3) }
          field = "Active Below Load",          MAPOXLimit,     { egoType && (egoAlgorithm < 3) }
          field = "Active Above Load",          MAPOXMin,       { egoType && (egoAlgorithm < 3) }
          field = "EGO delay after start",     ego_startdelay,  { egoType && (egoAlgorithm < 3) }
          field = "Narrowband EGO target",     EGOVtarget,      { (egoType == 1) && (egoAlgorithm < 3) }
          field = "PID Proportional Gain",  egoKP,              { egoType && (egoAlgorithm == 2) }
          field = "PID Integral",           egoKI,              { egoType && (egoAlgorithm == 2) }
          field = "PID Derivative",         egoKD,              { egoType && (egoAlgorithm == 2) }

        dialog = egoports, "",yAxis
          field = "EGO channel"
          field = "EGO 1 port", egoport1
          field = "EGO 2 port", egoport2, {egonum > 1}
          field = "EGO 3 port", egoport3, {egonum > 2}
          field = "EGO 4 port", egoport4, {egonum > 3}
          field = "EGO 5 port", egoport5, {egonum > 4}
          field = "EGO 6 port", egoport6, {egonum > 5}
          field = "EGO 7 port", egoport7, {egonum > 6}
          field = "EGO 8 port", egoport8, {egonum > 7}
     
       dialog = egoports_tgt "", yAxis
          field = "AFR target"
          field = "", egomap1t
          field = "", egomap2t, {egonum > 1}
          field = "", egomap3t, {egonum > 2}
          field = "", egomap4t, {egonum > 3}
          field = "", egomap5t, {egonum > 4}
          field = "", egomap6t, {egonum > 5}
          field = "", egomap7t, {egonum > 6}
          field = "", egomap8t, {egonum > 7}

        dialog = egoports2, "EGO ports", xAxis
           panel = egoports
    ;       panel = egoports_tgt

       dialog = egoControlleft, "", yAxis
          field = "EGO Sensor Type",           egoType
          field = "Number of sensors",         egonum, { egoType }
          field = "#Remember to Calibrate and set Project Properties"
            panel = egoports2

       dialog = egoControlmain, "", xAxis
            panel = egoControlright, West
            panel = egoControlleft, East


        dialog = egomap_inj, "", yAxis
          field = "Injector"
          field = "MS3X injA"
          field = "MS3X injB"
          field = "MS3X injC"
          field = "MS3X injD"
          field = "MS3X injE"
          field = "MS3X injF"
          field = "MS3X injG"
          field = "MS3X injH"
          field = "V3 inj1"
          field = "V3 inj2"

        dialog = egomap_ego, "", yAxis
          field = "Sensor"
          field = "", egomap1
          field = "", egomap2
          field = "", egomap3
          field = "", egomap4
          field = "", egomap5
          field = "", egomap6
          field = "", egomap7
          field = "", egomap8
          field = "", egomap9
          field = "", egomap10

        dialog = egomapping, "AFR / EGO sensor mapping", xAxis
           panel = egomap_inj
           panel = egomap_ego

       dialog = egoControl, "AFR / EGO Control", border
            panel = egoControlmain, West
            panel = egomapping, East

    ;   dialog = ignitionOptions, "Ignition Options"
       dialog = ignitionOptions, ""
    ;      field = "#General Ignition"
          field = "Spark mode(dizzy, EDIS,wheel)",                   spk_mode0  ; !
          field = "Trigger Angle/Offset",                triggerOffset, { spk_mode0 != 31 }
          ;, {spk_mode0 ==2 || spk_mode0 ==3 || spk_mode0 ==12 || spk_mode0 ==14}
          field = "Angle between main and return", trigret_ang, { spk_mode0 ==12}
          field = "Oddfire small angle",           OddFireang, { (engineType == 1) && (spk_mode0 < 31) };
          field = "GM HEI/DIS options",     spk_conf2_gm, {spk_mode0 ==2}
    ;      field = "Ford TFI options",              spk_conf2_tfi, {spk_mode0 ==3}
          field = "420A/NGC alternate cam",     spk_conf2_ngc, {(spk_mode0==6) && (nCylinders==4)}
          field = "Use cam signal if available*",     spk_conf2_cam
          field = "Oddfire phasing", spk_conf2_oddodd, { (engineType == 1) && (spk_mode0==4)}
          field = "Skip Pulses",                   no_skip_pulses
          field = "Ignition Input Capture",       ICIgnCapture  ; !
          field = "Spark Output",                 spkout_hi_lo, {spk_mode0 != 31} ; 
          field = "Number of coils", spk_mode3
          field = "Spark hardware in use", hardware_spk
          field = "Cam input (if used)", hardware_cam

    ;  dialog = moreIgnitionOptions, "More Ignition Options"
      dialog = moreIgnitionOptions, ""
          field = "Fixed Advance",		       timing_flags
    ;      field = "Use Prediction",                use_prediction, {spk_mode0 == 2}  ; only works for dizzy
          field = "Use Prediction",                use_prediction
          field = "Timing for Fixed Advance",      fixed_timing, { timing_flags == 1 };
          field = "Cranking Dwell",		       crank_dwell
          field = "Cranking Advance",	       crank_timing, {!(spk_mode0 == 2 && triggerOffset < 20) }
          field = ""
          field = "Dwell type",                    dwellmode
          field = "Use dwell vs rpm curve", spk_conf2_dwell, {dwellmode ==2}
          field = "Maximum Dwell Duration",        max_coil_dur, {(spk_mode0 >1) && (dwellmode==0) }
    ;      field = "Acceleration Compensation",     dwellAcc, {(spk_mode0 >1) && (dwellmode==0)}
          field = "Maximum Spark Duration",        max_spk_dur, {(spk_mode0 >1) && (dwellmode==0) }
          field = "Dwell time",                    dwelltime, {(spk_mode0 >1) && (dwellmode==2) && (spk_conf2_dwell==0)}
          field = "Dwell duty",                    dwellduty, {(spk_mode0 >1) && (dwellmode==1) }
          field = "NOTE: Spark hardware latency should ONLY be used if"
          field = "you notice spark retard with increasing rpms."
          field = "Spark Hardware Latency",               hw_latency
          field = "middle LED indicator",          feature4_0igntrig, { (spk_mode0 == 3) }
          field = "Overdwell protection",          feature4_0maxdwl
    ;      field = "Underdwell protection",         feature4_0mindwl
          field = ""
          field = "Spark trim", spk_mode3_trim
          field = ""
          field = "All settings on the left of this page require a power cycle"
          field = "Check them carefully as they are critical to ECU operation"

    ;  dialog = triggerWheel, "Trigger Wheel Settings"
      dialog = triggerWheel, ""
    ;      topicHelp = trighelp
          field = "Trigger wheel arrangement",     spk_config_trig2, { spk_mode0 == 4 }
          field = "Trigger Wheel Teeth",          triggerTeeth, { spk_mode0 == 4 }
          field = "Missing Teeth",                No_Miss_Teeth, {(spk_config_trig2 != 2) && spk_mode0 == 4}
          field = "Tooth #1 Angle",     Miss_ang, { spk_mode0 == 4 }
          field = "Main wheel speed",                   spk_config_camcrank, { spk_mode0 == 4 }
          field = "Second trigger active on",      spk_config_trig2l, {(spk_config_trig2 & 0x2) && spk_mode0 == 4}
          field = "Level for phase 1", spk_config_campol, {((spk_config_trig2l & 0x3) == 0x3) && (spk_mode0 == 4) && (spk_config_trig2 == 3)}
          field = "and every rotation of..", spk_config_resetcam, {((spk_config_trig2 & 0x3) == 0x2) && spk_mode0 == 4}

     dialog = padignition
            field = ""
            field = ""
            field = ""
            field = ""
            field = ""
            field = ""
            field = ""
            field = ""
            field = ""
            field = ""
            field = ""

     dialog = westIgnitionOptions, "", yAxis
            panel = ignitionOptions
            panel = triggerWheel

     dialog = eastIgnitionOptions, "", yAxis
            panel = moreIgnitionOptions
            panel = padignition

       dialog = combinedignition, "Combined Ignition Options", border
            panel = westIgnitionOptions, West
            panel = eastIgnitionOptions, East

       dialog = northwestidle, "", border
          field = "Algorithm",                     IdleCtl
    ;      field = ""

       dialog = northeastidle, "", border
          field = "Fast Idle Temperature",         fastIdleT,    { IdleCtl == 1 }
    ;      field = "Hysteresis",                    IdleHyst,     { IdleCtl == 1 }  ; adding this line causes one above to vanish

       dialog = westidle, "Stepper idle"
    ;      topicHelp = "http://www.megasquirt.info/megatune.htm#sd"
          field = "Time Step Size",                IACtstep,     { IdleCtl == 2 || IdleCtl == 3 || IdleCtl == 5 || IdleCtl == 7 || IdleCtl == 8 }
          field = "Initial Time Step Size",        IAC_tinitial_step,   { IdleCtl == 2 || IdleCtl == 7 }
          field = "Minimum # steps to move",       IACminstep,  { IdleCtl == 2 || IdleCtl == 3 || IdleCtl == 5 || IdleCtl == 7 || IdleCtl == 8 }
          field = "!Start Value",                  IACStart,     { IdleCtl > 1 && IdleCtl != 4 && IdleCtl != 6} ; !
          field = "Crank-to-Run Taper Time",       IACcrankxt,   { IdleCtl > 1 && IdleCtl != 4 && IdleCtl != 6 && IdleCtl != 7 && IdleCtl != 8 }
          field = "Hysteresis",                    IdleHyst,     { IdleCtl > 0 && IdleCtl != 4 && IdleCtl != 6 && IdleCtl != 7 && IdleCtl != 8 }
          field = "#Time-Based After Start"
          field = "   Cold Temperature",           IACcoldtmp,   { IdleCtl > 1 && IdleCtl != 4 && IdleCtl != 6 && IdleCtl != 7 && IdleCtl != 8 }
          field = "   Cold Position",              IACcoldpos,   { IdleCtl > 1 && IdleCtl != 4 && IdleCtl != 6 && IdleCtl != 7 && IdleCtl != 8 }
          field = "   Cold Taper Time",            IACcoldxt,    { IdleCtl > 1 && IdleCtl != 4 && IdleCtl != 6 && IdleCtl != 7 && IdleCtl != 8 }
          field = "!Red settings require an MS-II reboot!"


       dialog = eastidle, "PWM idle"
          field = "Warmup only mode"
          field = "Set duty vs. temp in the duty table"
          field = "Crank-to-Run Taper Time", pwmidlecranktaper, { (IdleCtl == 4) || (IdleCtl == 6) }
          field = ""
          field = "Valve mode",      pwmidleset_inv, { (IdleCtl == 4) || (IdleCtl == 6) }
          field = "Output port", pwmidle_freq_pin, { (IdleCtl == 1) || (IdleCtl == 4) || (IdleCtl == 6) }
          field = "3 wire mode", pwmidle_freq_pin3, { (IdleCtl == 4) || (IdleCtl == 6) }
          field = "Valve frequency selection", pwmidle_freq, { (IdleCtl == 4) || (IdleCtl == 6) }
          field = "Optional reduced frequency"
          field = "Reduced frequency", pwmidle_freq_scale, { pwmidle_freq && ((IdleCtl == 4) || (IdleCtl == 6)) }
          field = "This reduced frequency is shared with boost control"

       dialog = northidle, "", border
            panel = northwestidle, West
            panel = northeastidle, East

       dialog = southidle, "", border
            panel = westidle, West
            panel = eastidle, East

       dialog = combinedidle, "Idle Control", border
            panel = northidle, North
            panel = southidle, South

       dialog = pwmidle_closedloop, "Closed Loop Idle Valve Settings"
          field = "Idle Open Duty",                  pwmidle_open_duty, { IdleCtl == 6 }
          field = "Idle Open Steps",	         pwmidle_open_steps, { IdleCtl == 7 || IdleCtl == 8 } 
          field = "Idle Valve Closed Duty",          pwmidle_closed_duty, { IdleCtl == 6 }
          field = "Idle Valve Closed Steps",         pwmidle_closed_steps, { IdleCtl == 7 || IdleCtl == 8 }
          field = "Dashpot adder",  pwmidle_dp_adder, { IdleCtl == 6 }
          field = "Dashpot adder",  pwmidle_dp_adder_steps, { IdleCtl == 7 || IdleCtl == 8 }
          field = "NOTE: Close delay of 0 means do not close"
          field = "Close delay", pwmidle_close_delay
          field = "Shift Settings"
          field = "Leave valve closed above:", pwmidle_shift_lower_rpm, { pwmidle_close_delay > 0 }
          field = "For this number of seconds:", pwmidle_shift_open_time, { pwmidle_close_delay > 0 }

       dialog = pwmidle_PID_activation, "Closed Loop Idle PID activation Settings"
          field = "Use VSS to activate PID",         IdleCtl_vss
          field = "Idle Activation RPM adder",       pwmidle_engage_rpm_adder, { IdleCtl_vss != 1 }
          field = "Idle Activation TPS threshold",   pwmidle_tps_threshold

       dialog = pwmidle_PID_behavior, "Closed Loop Idle PID Delays and Behavior"
          field = "Min Duty for PID",     pwmidle_min_duty, { IdleCtl == 6 }
          field = "Min Steps for PID",    pwmidle_min_steps,  { IdleCtl == 7 || IdleCtl == 8 }
          field = "RPM with valve closed", pwmidle_min_rpm
          field = "RPM with valve open",   pwmidle_max_rpm
          field = "PID delay",            pwmidle_pid_wait_timer
          field = "Crank to run taper",   pwmidlecranktaper 
          field = "PID ramp to target time", pwmidle_targ_ramptime
          field = "PID Control Interval", pwmidle_ms
          field = "Use so that engaging clutch without throttle"
          field = "Does not leave PID running"
          field = "PID disable RPMdot", pwmidle_rpmdot_disablepid, { IdleCtl_vss != 1 }

       dialog = pwmidle_PID_gains, "Closed Loop Idle PID Gains"
          field = "Proportional Gain",    pwmidle_Kp
          field = "Integral Gain",        pwmidle_Ki
          field = "Derivative Gain",      pwmidle_Kd

       dialog = pwmidle_PID_lockout, "Closed Loop Idle PID Lockout detection"
          field = "PID lockout rpmDOT threshold", pwmidle_rpmdot_threshold, { IdleCtl_vss != 1 }
          field = "PID lockout max decel load", pwmidle_decelload_threshold, { IdleCtl_vss != 1 }

          dialog = pwmidle_west_panel, "", border
            panel = pwmidle_closedloop, North
            panel = pwmidle_PID_gains, Center 
            panel = pwmidle_PID_activation, South

         dialog = pwmidle_mid_panel, "", border
            panel = pwmidle_PID_behavior, North
            panel = pwmidle_PID_lockout, Center

          dialog = combinedCLidle, "Closed-loop Idle Control", border
            panel = pwmidle_target_curve, East
            panel = pwmidle_mid_panel, Center
            panel = pwmidle_west_panel, West

       dialog = sensorCal, "Calibrate MAP/Baro"
    ;      topicHelp = sensorHelp
#if INI_VERSION_2
          settingSelector = "Common Sensors"
             settingOption = "MPX4115",  map0=10.6, mapmax=121.7, baro0=10.6, baromax=121.7
             settingOption = "MPX4250",  map0=10,   mapmax=260,   baro0=10,   baromax=260
             settingOption = "MPXH6300", map0=1.1,  mapmax=315.5, baro0=1.1,  baromax=315.5
             settingOption = "GM 3-BAR", map0=1.1,  mapmax=315.5, baro0=1.1,  baromax=315.5
             settingOption = "MPXH6400", map0=3.5,  mapmax=416.5, baro0=3.5,  baromax=416.5
#endif
          field = "#MAP Sensor (F1 for common values)"
          field =    "Value at 0.0 volts",   map0
          field =    "Value at 5.0 volts",   mapmax
          field = "#Barometer Sensor (usually identical to MAP)"
          field =    "Value at 0.0 volts",   baro0
          field =    "Value at 5.0 volts",   baromax
          field = "#Barometric Correction"
          field =    "At total vacuum ",     bcor0
          field =    "Rate",                 bcormult

       dialog = knockSettings, "Knock Sensor Settings"
          field = "Knock Control",        knk_option
          field = "Knock input pin",      knkport, { knk_option >0 }
          field = "#Detection"
          field = "Knock indicated by:",  knkDirection,   { knk_option > 0 }
          field = "Pullup/down on input",  knkpull,   { knk_option > 0 }

    ;      field = "Threshold",            knock0
    ;      field = "Peak",                 knockmax
          field = "Knock Count",          knk_ndet,       { knk_option > 0 }
          field = "Knock Ignored Above MAP",   knk_maxmap,     { knk_option > 0 }
          field = "RPM window low",   knk_lorpm,      { knk_option > 0 }
          field = "RPM window high",   knk_hirpm,      { knk_option > 0 }
          field = "#Retarding"
          field = "Maximum Retard",       knk_maxrtd,     { knk_option > 0 }
          field = "Retard Check Time",    knk_trtd,       { knk_option > 0 }
          field = "Retard Step Size",     knk_step1,      { knk_option > 0 }
          field = "#Recovery"
          field = "Advance Check Time",   knk_tadv,       { knk_option > 0 }
          field = "Advance Step Size",    knk_step2,      { knk_option > 0 }
          field = "Recovery Advance",     knk_dtble_adv,  { knk_option == 1 }

        dialog = idleAdvancemenu, "Idle Advance Settings"
          field = "Idle advance on", idleadvance_on
          field = "Go to idle advance when:"
          field = "TPS is below:", idleadvance_tps, { idleadvance_on }
          field = "and RPM is below:", idleadvance_rpm, { idleadvance_on }
          field = "and load is above:", idleadvance_load, { idleadvance_on }
          field = "and CLT is above:", idleadvance_clt, { idleadvance_on }
          field = "and after delay:", idleadvance_delay, { idleadvance_on }

    dialog = idleAdvance, "Idle Advance", border
          panel = idleAdvancemenu, West
          panel = idleAdvance_curve, East

        dialog = idleVemenu,  "Idle VE settings"
           field = "Idle VE on", idleve_on
           field = "Go to idle VE when:"
           field = "TPS is below:" idleve_tps, { idleve_on }
           field = "and RPM is below:", idleve_rpm, { idleve_on }
           field = "and load is above:", idleve_load, { idleve_on }
           field = "and CLT is above:", idleve_clt, { idleve_on }
           field = "and after delay:", idleve_delay, { idleve_on }

         dialog = idleVeTables, "Idle VE Tables"
           panel = idleve1Tbl, North, { idleve_on }
           panel = idleve2Tbl, South, { idleve_on && dualfuel_sw_on }

         dialog = idleVe, "Idle VE", border 
           panel = idleVemenu, West 
           panel = idleVeTables, Center 

    dialog = setbaud, "Megasquirt baud rate"
          field = "#Advanced users only."
          field = "Megasquirt baud rate", baud
          field = "9600, 19200, 38400, 57600, 115200 only"
          field = "Set this, Burn"
          field = "Then adjust tuning software comms baud rate to match"
          field = "Then powercycle Megasquirt"

    dialog = userdefined, "user defined menu"
          field = "Feature enabled", user_conf0
          field = "Mode", user_conf1, { user_conf0 }  ; <---- this bit here greys the control out if the bit isn't set
          field = "Value 1", user_value1, { user_conf0 }
          field = "Value 2", user_value2, { user_conf0 }

       help = helpGeneral, "Megasquirt 3 General Help"
          webHelp = "http://www.ms3efi.com/"
          text = "For current documentation, click the Web Help button,"
          text = "or visit http://www.ms3efi.com/."

    ;-------------------------------------------------------------------------------
#if INI_VERSION_2
    [PortEditor]
        ; spare ports
        ; map the arrays and supply the labels. 
        ; all arrays are expected to be the same length in the first dimension
        ; thus a [ 7] array will be 7 ports in length and expect 7 labels
        ; The second dimension will drive the number of conditions per array.
        ; thus a [7x2] array will have 2 conditions joined by the conditionRelationship.
        ; a [7x3] will have up to 3 conditions.
        portEditor = ms3_port_edit, "Output port Settings"
            ; 1st the array constant, then the labels in the index order. 
            enabledPorts = psEnabled, "PM3 - Injection LED D14", "PM4 - Accel LED D16", "PM5 - Warmup LED D15", "PJ0 - IAC2", "PJ1 - IAC1", "PJ7 - JS11", "PP2 - Idle", "PP3 - Boost", "PP4 - Nitrous 1", "PP5 - Nitrous 2", "PP6 - VVT", "PP7 - Fidle", "PT1 - V3 Inj 1", "PT3 - V3 Inj 2", "PT5 - JS10", "PK0 - Tacho", "PA0 - Inj A", "PA1 - Inj B", "PA2 - Inj C", "PA3 - Inj D", "PA4 - Inj E", "PA5 - Inj F", "PA6 - Inj G", "PA7 - Inj H", "PB0 - Spk A", "PB1 - Spk B", "PB2 - Spk C", "PB3 - Spk D", "PB4 - Spk E", "PB5 - Spk F", "PB6 - Spk G", "PB7 - Spk H", "CANout01",  "CANout02", "CANout03", "CANout04", "CANout05", "CANout06", "CANout07", "CANout08", "CANout09", "CANout10", "CANout11", "CANout12", "CANout13", "CANout14", "CANout15", "CANout16"
            outputOffset = psOutOffset 
            outputSize   = psOutSize 
            operators    = psCondition, "<", "=", ">" ; the actual ASCII value of the operator will be sent to the controller
            threshold    = psThreshold
            hysteresis   = psHysteresis
            powerOnValue = psInitValue
            triggerValue = psPortValue
            conditionRelationship = psConnector, " ", "|", "&"
#endif
    ;-------------------------------------------------------------------------------

    [CurveEditor]
       curve = dualfuel_temp_curve, "Dual fuel temperature adjustment curve"
          columnLabel = "Temperature", "adj %"
          xAxis       = -40, 220, 9
          yAxis       =  -200, 200, 6
          xBins       = dualfuel_temp, df_temp
          yBins       = dualfuel_temp_adj
    ;      gauge       = deadGauge

       curve = dualfuel_press_curve, "Dual fuel temperature adjustment curve"
          columnLabel = "Pressure", "adj %"
          xAxis       = 0, 200, 9
          yAxis       =  -200, 200, 6
          xBins       = dualfuel_press, df_press
          yBins       = dualfuel_press_adj
    ;      gauge       = cltGauge

       curve = primingPW2, "Priming Pulsewidth 2"
          columnLabel = "Coolant", "Prime PW"
            #if EXPANDED_CLT_TEMP
          xAxis       = -40, 350, 9
            #else
          xAxis       = -40, 220, 9
            #endif
          yAxis       =   0,  20, 5
          xBins       = temp_table_p21, coolant, readonly
          yBins       = primePWTable2
          gauge       = cltGauge

       curve = crankingPW2, "Cranking Pulsewidth% 2"
          columnLabel = "Coolant", "Cranking PW%"
            #if EXPANDED_CLT_TEMP
          xAxis       = -40, 350, 9
            #else
          xAxis       = -40, 220, 9
            #endif
          yAxis       =   0,  500, 6
          xBins       = temp_table_p21, coolant
          yBins       = crankPctTable2
          gauge       = cltGauge

       curve = asePct2, "Afterstart Enrichment Percentage 2"
          columnLabel = "Coolant", "Afterstart"
            #if EXPANDED_CLT_TEMP
          xAxis       = -40, 350, 9
            #else
          xAxis       = -40, 220, 9
            #endif
          yAxis       =   0, 100, 6
          xBins       = temp_table_p21, coolant, readonly
          yBins       = asePctTable2
          gauge       = cltGauge

       curve = aseTaper2, "Afterstart Enrichment Taper 2"
          columnLabel = "Coolant", "Taper"
            #if EXPANDED_CLT_TEMP
          xAxis       = -40, 350, 9
            #else
          xAxis       = -40, 220, 9
            #endif
          yAxis       =   0, 500, 6
          xBins       = temp_table_p21, coolant, readonly
          yBins       = aseCntTable2
          gauge       = cltGauge


       curve = warmup_curve2, "Warmup Enrichment Curve 2"
          columnLabel = "Coolant", "WUE %"
            #if EXPANDED_CLT_TEMP
          xAxis       = -40, 350, 9
            #else
          xAxis       = -40, 220, 9
            #endif
          yAxis       =   0,  500, 6
          xBins       = temp_table_p21, coolant, readonly
          yBins       = wueBins2
          gauge       = cltGauge

       curve = MAFtable1, "MAF Correction Table (to alter default MAF curve)"
          columnLabel = "MAF Flow", "Correction"
          xAxis       =  0, 300, 11
          yAxis       =  0, 255, 11
          xBins       = MAFFlow, maf
          yBins       = MAFCor
          gauge       = mafGauge

       curve = dwellrpm_curve, "Dwell vs rpm"
          columnLabel = "RPM", "Dwell"
          xAxis       = 0, 7500, 6
          yAxis       = 0, 6, 6
          xBins       = dwellrpm_rpm
          yBins       = dwellrpm_dwell

       curve = boostvss_duty_curve, "Boost duty vs speed"
          columnLabel = "Speed", "Duty"
#if MPH
          xAxis       = 0, 200, 6
#else
          xAxis       = 0, 300, 6
#endif
          yAxis       = 0, 100, 6
          xBins       = boostvss_speed
          yBins       = boostvss_duty

       curve = boostvss_target_curve, "Boost target vs speed"
          columnLabel = "Speed", "kPa"
#if MPH
          xAxis       = 0, 200, 6
#else
          xAxis       = 0, 300, 6
#endif
          yAxis       = 0, 400, 6
          xBins       = boostvss_speed
          yBins       = boostvss_target

    ; nitrous 1 vs time
       curve = n2o1_duty_time, "Nitrous1 - Duty vs time"
          columnLabel = "s", "Duty"
          xAxis       = 0, 15, 6
          yAxis       = 0, 100, 6
          xBins       = n2o1_time
          yBins       = n2o1_duty

       curve = n2o1_pw_time, "Nitrous1 - Added fuel vs time"
          columnLabel = "s", "pw"
          xAxis       = 0, 15, 6
          yAxis       = -5, 20, 6
          xBins       = n2o1_time
          yBins       = n2o1_pw

       curve = n2o1_retard_time, "Nitrous1 - Retard vs time"
          columnLabel = "s", "Retard"
          xAxis       = 0, 15, 6
          yAxis       = 0, 30, 7
          xBins       = n2o1_time
          yBins       = n2o1_retard

    ; nitrous 2 vs time
       curve = n2o2_duty_time, "Nitrous2 - Duty vs time"
          columnLabel = "s", "Duty"
          xAxis       = 0, 15, 6
          yAxis       = 0, 100, 6
          xBins       = n2o2_time
          yBins       = n2o2_duty

       curve = n2o2_pw_time, "Nitrous2 - Added fuel vs time"
          columnLabel = "s", "pw"
          xAxis       = 0, 15, 6
          yAxis       = -5, 20, 6
          xBins       = n2o2_time
          yBins       = n2o2_pw

       curve = n2o2_retard_time, "Nitrous2 - Retard vs time"
          columnLabel = "s", "Retard"
          xAxis       = 0, 15, 6
          yAxis       = 0, 30, 7
          xBins       = n2o2_time
          yBins       = n2o2_retard

    ; nitrous 1 vs rpm
       curve = n2o1_duty_rpm, "Nitrous1 - Duty vs RPM"
          columnLabel = "RPM", "Duty"
          xAxis       = 0, 7500, 6
          yAxis       = 0, 100, 6
          xBins       = n2o1_rpm
          yBins       = n2o1_duty

       curve = n2o1_pw_rpm, "Nitrous1 - Added fuel vs RPM"
          columnLabel = "RPM", "pw"
          xAxis       = 0, 7500, 6
          yAxis       = -5, 20, 6
          xBins       = n2o1_rpm
          yBins       = n2o1_pw

       curve = n2o1_retard_rpm, "Nitrous1 - Retard vs RPM"
          columnLabel = "RPM", "Retard"
          xAxis       = 0, 7500, 6
          yAxis       = 0, 30, 7
          xBins       = n2o1_rpm
          yBins       = n2o1_retard

    ; nitrous 2 vs rpm
       curve = n2o2_duty_rpm, "Nitrous2 - Duty vs RPM"
          columnLabel = "RPM", "Duty"
          xAxis       = 0, 7500, 6
          yAxis       = 0, 100, 6
          xBins       = n2o2_rpm
          yBins       = n2o2_duty

       curve = n2o2_pw_rpm, "Nitrous2 - Added fuel vs RPM"
          columnLabel = "RPM", "pw"
          xAxis       = 0, 7500, 6
          yAxis       = -5, 20, 6
          xBins       = n2o2_rpm
          yBins       = n2o2_pw

       curve = n2o2_retard_rpm, "Nitrous2 - Retard vs RPM"
          columnLabel = "RPM", "Retard"
          xAxis       = 0, 7500, 6
          yAxis       = 0, 30, 7
          xBins       = n2o2_rpm
          yBins       = n2o2_retard

    ;mat/clt
       curve = matclt_curve, "%CLT used in MAT vs rpm"
          columnLabel = "rpm", "%CLT"
          xAxis       = 0, 7500, 5
          yAxis       = 0, 20, 5
          xBins       = matclt_rpm
          yBins       = matclt_pct

    ;small pulsewidths
       curve = smallcurve0, "Small Pulsewidth Curve 1"
          columnLabel = "Original", "New"
          xAxis       = 0, 2, 5
          yAxis       = 0, 2, 5
          xBins       = smallpwpw
          yBins       = smallpw0

       curve = smallcurve1, "Small Pulsewidth Curve 2"
          columnLabel = "Original", "New"
          xAxis       = 0, 2, 5
          yAxis       = 0, 2, 5
          xBins       = smallpwpw
          yBins       = smallpw1

       curve = smallcurve2, "Small Pulsewidth Curve 3"
          columnLabel = "Original", "New"
          xAxis       = 0, 2, 5
          yAxis       = 0, 2, 5
          xBins       = smallpwpw
          yBins       = smallpw2

       curve = smallcurve3, "Small Pulsewidth Curve 4"
          columnLabel = "Original", "New"
          xAxis       = 0, 2, 5
          yAxis       = 0, 2, 5
          xBins       = smallpwpw
          yBins       = smallpw3

       curve = opencurve0, "Dead Time Voltage % Curve 1"
          columnLabel = "Voltage", ""
          xAxis       = 7.2, 19.2, 7
          yAxis       = 0, 500, 6
          xBins       = opentimev, batteryVoltage
          yBins       = opentimepct0

       curve = opencurve1, "Injector Dead Time Curve 2"
          columnLabel = "Voltage", ""
          xAxis       = 7.2, 19.2, 7
          yAxis       = 0, 500, 6
          xBins       = opentimev, batteryVoltage
          yBins       = opentimepct1

       curve = opencurve2, "Injector Dead Time Curve 3"
          columnLabel = "Voltage", ""
          xAxis       = 7.2, 19.2, 7
          yAxis       = 0, 500, 6
          xBins       = opentimev, batteryVoltage
          yBins       = opentimepct2

       curve = opencurve3, "Injector Dead Time Curve 4"
          columnLabel = "Voltage", ""
          xAxis       = 7.2, 19.2, 7
          yAxis       = 0, 500, 6
          xBins       = opentimev, batteryVoltage
          yBins       = opentimepct3

       curve = boost_timed_curve, "Boost %age after launch"
          columnLabel = "Time", ""
          xAxis       = 0, 15, 6
          yAxis       = 0, 100, 6
          xBins       = boost_timed_time
          yBins       = boost_timed_pct

       curve = mapsample_curve, "MAP sample timing"
          columnLabel = "RPM", "deg"
          xAxis       = 0, 8000, 8
          yAxis       = 0, 180, 8
          xBins       = map_sample_rpms
          yBins       = map_sample_timing
          gauge       = tachometer

       curve = dwellSettings, "Dwell Battery Adjustment"
          columnLabel = "Voltage", "%age"
          xAxis       = 6, 16, 6
          yAxis       = 0, 500, 6
          xBins       = dwellvolts
          yBins       = dwellcorr

       curve = coldAdvance, "Cold Ignition Advance Offset"
    ;      topicHelp   = "http://www.megasquirt.info/megatune.htm#ac"
          columnLabel = "Coolant", "Offset"
            #if EXPANDED_CLT_TEMP
          xAxis       = -40, 350, 9
            #else
          xAxis       = -40, 220, 9
            #endif
          yAxis       = -10,  10, 5
          xBins       = tempTable, coolant, readonly
          yBins       = cold_adv_table
          gauge       = cltGauge

       curve = iacBins, "IAC Step Bins"
    ;      topicHelp   = "http://www.megasquirt.info/megatune.htm#ad"
          columnLabel = "Coolant", "IAC Steps"
            #if EXPANDED_CLT_TEMP
          xAxis       = -40, 350, 9
            #else
          xAxis       = -40, 220, 9
            #endif
          yAxis       =   0, 300, 7
          xBins       = tempTable, coolant, readonly
          yBins       = iacstepTable
          gauge       = cltGauge

       curve = ipwBins, "PWM Idle Duty Cycle"
    ;      topicHelp   = "http://www.megasquirt.info/megatune.htm#ap"
          columnLabel = "Coolant", "Idle PWM duty"
            #if EXPANDED_CLT_TEMP
          xAxis       = -40, 350, 9
            #else
          xAxis       = -40, 220, 9
            #endif
          yAxis       =   0, 100, 6
          xBins       = tempTable, coolant, readonly
          yBins       = ipwmTable
          gauge       = cltGauge

       curve = primingPW, "Priming Pulsewidth"
          columnLabel = "Coolant", "Prime PW"
            #if EXPANDED_CLT_TEMP
          xAxis       = -40, 350, 9
            #else
          xAxis       = -40, 220, 9
            #endif
          yAxis       =   0,  20, 5
          xBins       = temp_table_p5, coolant, readonly
          yBins       = primePWTable
          gauge       = cltGauge

       curve = crankingPW, "Cranking Pulsewidth%"
    ;     topicHelp   = "http://www.megasquirt.info/xxx"
          columnLabel = "Coolant", "Cranking PW%"
            #if EXPANDED_CLT_TEMP
          xAxis       = -40, 350, 9
            #else
          xAxis       = -40, 220, 9
            #endif
          yAxis       =   0,  500, 6
          xBins       = temp_table_p5, coolant
          yBins       = crankPctTable
          gauge       = cltGauge

       curve = asePct, "Afterstart Enrichment Percentage"
    ;     topicHelp   = "http://www.megasquirt.info/xxx"
          columnLabel = "Coolant", "Afterstart"
            #if EXPANDED_CLT_TEMP
          xAxis       = -40, 350, 9
            #else
          xAxis       = -40, 220, 9
            #endif
          yAxis       =   0, 100, 6
          xBins       = temp_table_p5, coolant, readonly
          yBins       = asePctTable
          gauge       = cltGauge

       curve = aseTaper, "Afterstart Enrichment Taper"
    ;     topicHelp   = "http://www.megasquirt.info/xxx"
          columnLabel = "Coolant", "Taper"
            #if EXPANDED_CLT_TEMP
          xAxis       = -40, 350, 9
            #else
          xAxis       = -40, 220, 9
            #endif
          yAxis       =   0, 500, 6
          xBins       = temp_table_p5, coolant, readonly
          yBins       = aseCntTable
          gauge       = cltGauge

       curve = matBasedRetard, "MAT-Based Timing Retard"
    ;     topicHelp   = "http://www.megasquirt.info/xxx"
          columnLabel = "MAT", "Retard"
    ;upper limits too high, but have to leave them there so data is visible in TS.
#if CELSIUS
          xAxis       = -40, 300, 9
#else
          xAxis       = -40, 300, 9
#endif
          yAxis       =   0,  15, 7
          xBins       = matTemps, mat
          yBins       = matRetard
          gauge       = matGauge

    ;   curve = knockThreshold, "Knock Threshold"
    ;;     topicHelp   = "http://www.megasquirt.info/xxx"
    ;      columnLabel = "RPM", "Threshold"
    ;      xAxis       =   0, 6000, 7
    ;      yAxis       =   0,  5.0, 6
    ;      xBins       = knk_rpm, rpm
    ;      yBins       = knk_thresh
    ;      gauge       = tachometer

       curve = barometerCorr, "Non-Linear Barometric Correction"
    ;     topicHelp   = "http://www.megasquirt.info/xxx"
          columnLabel = "Barometer", "Correction"
          xAxis       =  60, 120, 7
          yAxis       = -30,  30, 7
          xBins       = baroCorrVals, barometer
          yBins       = baroCorrDelta
          gauge       = barometerGauge

       curve = manifoldTempCorr, "Non-Linear MAT Correction"
    ;     topicHelp   = "http://www.megasquirt.info/xxx"
          columnLabel = "MAT", "Correction"
          xAxis       =  -40, 200, 9
          yAxis       =  -30,  30, 7
          xBins       = matCorrTemps, mat
          yBins       = matCorrDelta
          gauge       = matGauge

       curve = EAEBAWCcurve, "Enhanced Accel Enrichment Added-to-Walls coefficient"
          columnLabel = "%", "Correction"
          xAxis	  = 0, 255, 12
          yAxis       = 0, 100, 12
          xBins	  = EAEAWCKPAbins, eaeload1
          yBins	  = EAEBAWC
          gauge	  = EAEGauge1

       curve = EAEBSOCcurve, "Enhanced Accel Enrichment Sucked-from-Walls coefficient"
          columnLabel = "%", "Correction"
          xAxis	  = 0, 255, 12
          yAxis	  = 0, 25.5, 12
          xBins	  = EAESOCKPAbins, eaeload1
          yBins	  = EAEBSOC
          gauge	  = EAEGauge1

       curve = EAEAWNcurve, "Enhanced Accel Enrichment AWC RPM %"
          columnLabel = "RPM", "Correction"
          xAxis	  = 0, 8000, 12
          yAxis	  = 0, 200, 12
          xBins 	  = EAEAWCRPMbins, rpm
          yBins	  = EAEAWN
          gauge	  = EAEGauge1

       curve = EAESONcurve, "Enhanced Accel Enrichment SOC RPM %"
          columnLabel = "RPM", "Correction"
          xAxis       = 0, 8000, 12
          yAxis       = 0, 200, 12
          xBins	  = EAESOCRPMbins, rpm
          yBins       = EAESON
          gauge	  = EAEGauge1

       curve = EAESOWcurve, "Enhanced Accel Enrichment SOW CLT %"
          columnLabel = "CLT", "Correction"
            #if EXPANDED_CLT_TEMP
          xAxis       = 0, 350, 12
            #else
          xAxis       = 0, 220, 12	
            #endif
          yAxis       = 0, 200, 12
          xBins	  = EAESOWCLTbins, coolant
          yBins       = EAESOW
          gauge	  = EAEGauge1

       curve = EAEAWWcurve, "Enhanced Accel Enrichment AWW CLT %"
          columnLabel = "CLT", "Correction"
            #if EXPANDED_CLT_TEMP
          xAxis       = 0, 350, 12
            #else
          xAxis       = 0, 220, 12	
            #endif
          yAxis       = 0, 200, 12
          xBins	  = EAEAWWCLTbins, coolant
          yBins       = EAEAWW
          gauge	  = EAEGauge1

       curve = EAEBAWCcurve2, "Enhanced Accel Enrichment Added-to-Walls coefficient"
          columnLabel = "%", "Correction"
          xAxis	  = 0, 255, 12
          yAxis       = 0, 100, 12
          xBins	  = EAEAWCKPAbins2, fuelload
          yBins	  = EAEBAWC2
          gauge	  = EAEGauge1

       curve = EAEBSOCcurve2, "Enhanced Accel Enrichment Sucked-from-Walls coefficient"
          columnLabel = "%", "Correction"
          xAxis	  = 0, 255, 12
          yAxis	  = 0, 25.5, 12
          xBins	  = EAESOCKPAbins2, fuelload
          yBins	  = EAEBSOC2
          gauge	  = EAEGauge1

       curve = EAEAWNcurve2, "Enhanced Accel Enrichment AWC RPM %"
          columnLabel = "RPM", "Correction"
          xAxis	  = 0, 8000, 12
          yAxis	  = 0, 200, 12
          xBins 	  = EAEAWCRPMbins2, rpm
          yBins	  = EAEAWN2
          gauge	  = EAEGauge1

       curve = EAESONcurve2, "Enhanced Accel Enrichment SOC RPM %"
          columnLabel = "RPM", "Correction"
          xAxis       = 0, 8000, 12
          yAxis       = 0, 200, 12
          xBins	  = EAESOCRPMbins2, rpm
          yBins       = EAESON2
          gauge	  = EAEGauge1

       curve = EAESOWcurve2, "Enhanced Accel Enrichment SOW CLT %"
          columnLabel = "CLT", "Correction"
            #if EXPANDED_CLT_TEMP
          xAxis       = 0, 350, 12
            #else
          xAxis       = 0, 220, 12	
            #endif
          yAxis       = 0, 200, 12
          xBins	  = EAESOWCLTbins2, coolant
          yBins       = EAESOW2
          gauge	  = EAEGauge1

       curve = EAEAWWcurve2, "Enhanced Accel Enrichment AWW CLT %"
          columnLabel = "CLT", "Correction"
            #if EXPANDED_CLT_TEMP
          xAxis       = 0, 350, 12
            #else
          xAxis       = 0, 220, 12	
            #endif
          yAxis       = 0, 200, 12
          xBins	  = EAEAWWCLTbins2, coolant
          yBins       = EAEAWW2
          gauge	  = EAEGauge1

       curve = XAccTable, "X Accel Fuel Correction"
         topicHelp   = "http://www.megamanual.com/mt28.htm#ua"
          columnLabel = "RPM", "Correction"
          xAxis       =    0,  8000, 4
          yAxis       =    0,   120, 4
          xBins       = XTrpms, rpm
          yBins       = XAcc
          gauge       = EAEGauge1 
            
       curve = XDecTable, "X Decel Fuel Correction"
         topicHelp   = "http://www.megamanual.com/mt28.htm#ud"
          columnLabel = "RPM", "Correction"
          xAxis       =    0,  8000, 9
          yAxis       =    0,   120, 9
          xBins       = XTrpms, rpm
          yBins       = XDec
          gauge       = EAEGauge1
           
       curve = TauAccTable, "Tau Accel Fuel Correction"
         topicHelp   = "http://www.megamanual.com/mt28.htm#uc"
          columnLabel = "RPM", "time"
          xAxis       =    0,  8000, 9
          yAxis       =    0,  1000, 9
          xBins       = XTrpms, rpm
          yBins       = TauAcc
          gauge       = EAEGauge1
     
       curve = TauDecTable, "Tau Decel Correction"
         topicHelp   = "http://www.megamanual.com/mt28.htm#ue"
          columnLabel = "RPM", "time"
          xAxis       =    0,  8000, 9
          yAxis       =    0,  1000, 9
          xBins       = XTrpms, rpm
          yBins       = TauDec
          gauge       = EAEGauge1 
          
       curve = XCltTable, "X (Puddling) Temp. Correction Factors"
         topicHelp   = "http://www.megamanual.com/mt28.htm#ux"
          columnLabel = "Temperature", "Correction"
        #if EXPANDED_CLT_TEMP 
          xAxis       = -40, 600, 9
        #else 
          xAxis       = -40, 250, 9
        #endif
          yAxis       =    0,   600, 9
          xBins       = XClt_temps
          yBins       = XClt
          gauge       = cltGauge 
          
       curve = TCltTable, "Tau (Time) Temp. Correction Factors"
         topicHelp   = "http://www.megamanual.com/mt28.htm#ut"
          columnLabel = "Temperature", "time"
        #if EXPANDED_CLT_TEMP 
          xAxis       = -40, 600, 9
        #else 
          xAxis       = -40, 250, 9
        #endif
          yAxis       =    0,   600, 9
          xBins       = TauClt_temps
          yBins       = TauClt
          gauge       = cltGauge

       curve = NoiseFiltercurve, "Noise filter curve"
          columnLabel = "RPMS", "usec"
          xAxis	  = 0, 10000, 4
          yAxis	  = 0, 2000, 4
          xBins	  = NoiseFilterRpm
          yBins	  = NoiseFilterLen

       curve = warmup_curve, "Warmup Enrichment Curve"
          columnLabel = "Coolant", "WUE %"
            #if EXPANDED_CLT_TEMP
          xAxis       = -40, 350, 9
            #else
          xAxis       = -40, 220, 9
            #endif
          yAxis       =   0,  500, 6
          xBins       = tempTable, coolant
          yBins       = wueBins
          gauge       = cltGauge

       curve = idleAdvance_curve, "Idle Advance Timing"
          columnLabel = "Load %", "deg"
          xAxis = 0, 100, 4
          yAxis = -10, 90, 4
          xBins = idleadvance_loads, fuelload
          yBins = idleadvance_curve

       curve = pwmidle_target_curve, "Closed loop PWM idle target rpms"
          columnLabel = "CLT", "RPM"
          xAxis       = 0, 255, 8
          yAxis	  = 0, 2000, 8
          xBins	  = pwmidle_clt_temps, coolant
          yBins       = pwmidle_target_rpms

       curve = revlimiterBins, "Coolant Based Rev Limit" 
    ;      topicHelp   = "http://www.megasquirt.info/megatune.htm#ap" 
          columnLabel = "Coolant", "Rev limit" 
            #if EXPANDED_CLT_TEMP
          xAxis       = -40, 350, 8
            #else
          xAxis       = -40, 220, 8
            #endif
          yAxis		  =   0, 15000, 8 
          xBins       = RevLimLookup, coolant 
          yBins       = RevLimRpm1 
          gauge       = cltGauge

       curve = pwmidle_crank_dutyorsteps_dutycurve, "Coolant-based crank duty"
          columnLabel = "Coolant", "Duty %"
            #if EXPANDED_CLT_TEMP
          xAxis       = -40, 350, 4
            #else
          xAxis       = -40, 220, 4
            #endif
          yAxis       = 0, 100, 4
          xBins       = pwmidle_crank_clt_temps
          yBins       = pwmidle_crank_dutyorsteps_duty
          gauge       = cltGauge

       curve = pwmidle_crank_dutyorsteps_stepscurve, "Coolant-based crank steps"
          columnLabel = "Coolant", "Steps"
            #if EXPANDED_CLT_TEMP
          xAxis       = -40, 350, 4
            #else
          xAxis       = -40, 220, 4
            #endif
          yAxis       = 0, 512, 4
          xBins       = pwmidle_crank_clt_temps
          yBins       = pwmidle_crank_dutyorsteps_steps
          gauge       = cltGauge

        curve = ITB_load_loadvals_curve, "ITB load at TPS switchpoint"
          columnLabel = "RPM", "Load"
          xAxis       = 0, 9000, 12
          yAxis       = 0, 100, 12
          xBins       = ITB_load_rpms, rpm
          yBins       = ITB_load_loadvals

        curve = ITB_load_switchpoint_curve, "ITB load TPS switchpoints"
          columnLabel = "RPM", "TPS %"
          xAxis       = 0, 9000, 12
          yAxis       = 0, 100, 12
          xBins       = ITB_load_rpms, rpm
          yBins       = ITB_load_switchpoints

    [TableEditor]
       ;       table_id,    map3d_id,    "title",      page

       table = pwm_duties_Tbl_a, pwm_duties_map_a, "Generic PWM A", 11
          xBins       = pwm_rpms_a, rpm
          yBins	      = pwm_loadvals_a, pwma_load
          zBins       = pwm_duties_a
          upDownLabel = "HIGHER", "LOWER"
          gridHeight = 2.0
          gridOrient = 250, 0, 340

       table = pwm_duties_Tbl_b, pwm_duties_map_b, "Generic PWM B", 2
          xBins       = pwm_rpms_b, rpm
          yBins	      = pwm_loadvals_b, pwmb_load
          zBins       = pwm_duties_b
          upDownLabel = "HIGHER", "LOWER"
          gridHeight = 2.0
          gridOrient = 250, 0, 340

       table = pwm_duties_Tbl_c, pwm_duties_map_c, "Generic PWM C", 2
          xBins       = pwm_rpms_c, rpm
          yBins	      = pwm_loadvals_c, pwmc_load
          zBins       = pwm_duties_c
          upDownLabel = "HIGHER", "LOWER"
          gridHeight = 2.0
          gridOrient = 250, 0, 340

       table = pwm_duties_Tbl_d, pwm_duties_map_d, "Generic PWM D", 2
          xBins       = pwm_rpms_d, rpm
          yBins	      = pwm_loadvals_d, pwmd_load
          zBins       = pwm_duties_d
          upDownLabel = "HIGHER", "LOWER"
          gridHeight = 2.0
          gridOrient = 250, 0, 340

       table = pwm_duties_Tbl_e, pwm_duties_map_e, "Generic PWM E", 2
          xBins       = pwm_rpms_e, rpm
          yBins	      = pwm_loadvals_e, pwme_load
          zBins       = pwm_duties_e
          upDownLabel = "HIGHER", "LOWER"
          gridHeight = 2.0
          gridOrient = 250, 0, 340

       table = pwm_duties_Tbl_f, pwm_duties_map_f, "Generic PWM F", 2
          xBins       = pwm_rpms_f, rpm
          yBins	      = pwm_loadvals_f, pwmf_load
          zBins       = pwm_duties_f
          upDownLabel = "HIGHER", "LOWER"
          gridHeight = 2.0
          gridOrient = 250, 0, 340

       table = waterinjTbl, waterinjMap, "Water Injection Duty Table ", 1
          xBins       = waterinj_rpm, rpm
          yBins       = waterinj_map, map
          zBins       = waterinj_duty
          upDownLabel = "MORE", "LESS"
          gridHeight  = 2.0
          gridOrient  = 250,   0, 340 ; Space 123 rotation of grid in degrees.

#if LAMBDA
       table = maxafr1Tbl, maxafr1Map, "Max AFR 1 in Lambda", 1
          gridHeight  = 3.0
#else
       table = maxafr1Tbl, maxafr1Map, "Max AFR difference", 1
          gridHeight  = 1.0
#endif
          xBins       = maxafr1_rpm, rpm
          yBins       = maxafr1_load, fuelload
          zBins       = maxafr1_diff
          upDownLabel = "LEANER", "RICHER"
          gridOrient  = 250,   0, 340
    
   table = veTable1Tbl, veTable1Map, "VE Table 1", 4
          ;             constant,   variable
          xBins       = frpm_table1, rpm
          yBins       = fmap_table1, fuelload
          zBins       = veTable1

          upDownLabel = "RICHER", "LEANER"
          gridHeight  = 2.0
          gridOrient  = 250,   0, 340 ; Space 123 rotation of grid in degrees.

       table = veTable2Tbl, veTable2Map, "VE Table 2", 4
          xBins       = frpm_table2, rpm
          yBins       = fmap_table2, fuelload2
          zBins       = veTable2

          upDownLabel = "RICHER", "LEANER"
          gridHeight  = 2.0
          gridOrient  = 250,   0, 340

       table = veTable3Tbl, veTable3Map, "VE Table 3", 4
          ;             constant,   variable
          xBins       = frpm_table3, rpm
          yBins       = fmap_table3, fuelload
          zBins       = veTable3

          upDownLabel = "RICHER", "LEANER"
          gridHeight  = 2.0
          gridOrient  = 250,   0, 340 ; Space 123 rotation of grid in degrees.

       table = veTable4Tbl, veTable4Map, "VE Table 4", 4
          ;             constant,   variable
          xBins       = frpm_table4, rpm
          yBins       = fmap_table4, fuelload
          zBins       = veTable4

          upDownLabel = "RICHER", "LEANER"
          gridHeight  = 2.0
          gridOrient  = 250,   0, 340 ; Space 123 rotation of grid in degrees.

       table = idleve1Tbl, idleve1Map, "Idle VE table 1", 10
          xBins       = idleve_rpms1, rpm
          yBins       = idleve_loads1, fuelload
          zBins       = idleve_table1

          upDownLabel = "RICHER", "LEANER"
          gridHeight  = 2.0
          gridOrient  = 250,   0,  340

       table = idleve2Tbl, idleve2Map, "Idle VE table 2", 10 
          xBins       = idleve_rpms2, rpm
          yBins       = idleve_loads2, fuelload
          zBins       = idleve_table2

          upDownLabel = "RICHER", "LEANER"
          gridHeight  = 2.0
          gridOrient  = 250, 0, 340

       table = stagedTable, stagedMap, "Staged Injection table", 6
          xBins       = staged_rpms, rpm
          yBins       = staged_loads, fuelload
          zBins       = staged_percents

          upDownLabel = "MORE", "LESS"
          gridHeight  = 2.0
          gridOrient = 250, 0, 340

#if LAMBDA
       table = afrTable1Tbl, afrTable1Map, "Lambda Table 1", 1
          gridHeight  = 3.0
#else
       table = afrTable1Tbl, afrTable1Map, "AFR Table 1", 1
          gridHeight  = 1.0
#endif
          xBins       = arpm_table1, rpm
          yBins       = amap_table1, afrload1
          zBins       = afrTable1
          upDownLabel = "LEANER", "RICHER"
          gridOrient  = 250,   0, 340

#if LAMBDA
       table = afrTable2Tbl, afrTable2Map, "Lambda Table 2", 1
          gridHeight  = 3.0
#else
       table = afrTable2Tbl, afrTable2Map, "AFR Table 2", 1
          gridHeight  = 1.0
#endif
          xBins       = arpm_table2, rpm
          yBins       = amap_table2, fuelload
          zBins       = afrTable2
          upDownLabel = "LEANER", "RICHER"
          gridOrient  = 250,   0, 340

       table = ignitionTbl1, ignitionMap1, "Spark Advance Table1", 3
          xBins       = srpm_table1, rpm
          yBins       = smap_table1, ignload
          zBins       = advanceTable1
          upDownLabel = "ADVANCING", "RETARDING"
          gridHeight  = 3.0
          gridOrient  = 250,   0, 340

       table = ignitionTbl2, ignitionMap2, "Spark Advance Table2", 3
          xBins       = srpm_table2, rpm
          yBins       = smap_table2, ignload2
          zBins       = advanceTable2
          upDownLabel = "ADVANCING", "RETARDING"
          gridHeight  = 3.0
          gridOrient  = 250,   0, 340

       table = ignitionTbl3, ignitionMap3, "Spark Advance Table3", 4
          xBins       = srpm_table3, rpm
          yBins       = smap_table3, ignload
          zBins       = advanceTable3
          upDownLabel = "ADVANCING", "RETARDING"
          gridHeight  = 3.0
          gridOrient  = 250,   0, 340

       table = ignitionTbl4, ignitionMap4, "Spark Advance Table4", 4
          xBins       = srpm_table4, rpm
          yBins       = smap_table4, ignload
          zBins       = advanceTable4
          upDownLabel = "ADVANCING", "RETARDING"
          gridHeight  = 3.0
          gridOrient  = 250,   0, 340

       table = RotarySplitTbl, RotarySplitMap, "Rotary Split Table", 3
          xBins	  = RotarySplitRPM, rpm
          yBins       = RotarySplitLoad, ignload
          zBins	  = RotarySplitTable
          upDownLabel = "ADVANCING", "RETARDING"
          gridHeight = 3.0
          gridOrient = 250, 0, 340

       table = boostctlDutys, boostctlDtyMap, "Boost Control Duty 1", 2
          xBins       = boost_ctl_pwmtarg_rpm_bins, rpm
          yBins	  = boost_ctl_pwmtarg_tps_bins, throttle
          zBins       = boost_ctl_pwm_targets
          upDownLabel = "HIGHER", "LOWER"
          gridHeight = 2.0
          gridOrient = 250, 0, 340

       table = boostctlTargs, boostctlTargMap, "Boost Control Targets 1", 2
          xBins       = boost_ctl_loadtarg_rpm_bins, rpm
          yBins       = boost_ctl_loadtarg_tps_bins, throttle
          zBins       = boost_ctl_load_targets
          upDownLabel = "HIGHER", "LOWER"
          gridHeight  = 2.0
          gridOrient  = 250, 0, 340

       table = boostctlDutys2, boostctlDtyMap2, "Boost Control Duty 2", 2
          xBins       = boost_ctl_pwmtarg_rpm_bins2, rpm
          yBins	  = boost_ctl_pwmtarg_tps_bins2, throttle
          zBins       = boost_ctl_pwm_targets2
          upDownLabel = "HIGHER", "LOWER"
          gridHeight = 2.0
          gridOrient = 250, 0, 340

       table = boostctlTargs2, boostctlTargMap2, "Boost Control Targets 2", 2
          xBins       = boost_ctl_loadtarg_rpm_bins2, rpm
          yBins       = boost_ctl_loadtarg_tps_bins2, throttle
          zBins       = boost_ctl_load_targets2
          upDownLabel = "HIGHER", "LOWER"
          gridHeight  = 2.0
          gridOrient  = 250, 0, 340

    ;injector trims
       table = inj_trimaTbl, inj_trimaMap, "Cyl 1 fuel trim", 7
          ;             constant,   variable
          xBins       = inj_trim_rpma, rpm
          yBins       = inj_trim_loada, fuelload
          zBins       = inj_trima

          upDownLabel = "RICHER", "LEANER"
          gridHeight  = 2.0
          gridOrient  = 250,   0, 340 ; Space 123 rotation of grid in degrees.

       table = inj_trimbTbl, inj_trimbMap, "Cyl 2 fuel trim", 7
          ;             constant,   variable
          xBins       = inj_trim_rpmb, rpm
          yBins       = inj_trim_loadb, fuelload
          zBins       = inj_trimb

          upDownLabel = "RICHER", "LEANER"
          gridHeight  = 2.0
          gridOrient  = 250,   0, 340 ; Space 123 rotation of grid in degrees.

       table = inj_trimcTbl, inj_trimcMap, "Cyl 3 fuel trim", 7
          ;             constant,   variable
          xBins       = inj_trim_rpmc, rpm
          yBins       = inj_trim_loadc, fuelload
          zBins       = inj_trimc

          upDownLabel = "RICHER", "LEANER"
          gridHeight  = 2.0
          gridOrient  = 250,   0, 340 ; Space 123 rotation of grid in degrees.

       table = inj_trimdTbl, inj_trimdMap, "Cyl 4 fuel trim", 7
          ;             constant,   variable
          xBins       = inj_trim_rpmd, rpm
          yBins       = inj_trim_loadd, fuelload
          zBins       = inj_trimd

          upDownLabel = "RICHER", "LEANER"
          gridHeight  = 2.0
          gridOrient  = 250,   0, 340 ; Space 123 rotation of grid in degrees.

       table = inj_trimeTbl, inj_trimeMap, "Cyl 5 fuel trim", 7
          ;             constant,   variable
          xBins       = inj_trim_rpme, rpm
          yBins       = inj_trim_loade, fuelload
          zBins       = inj_trime

          upDownLabel = "RICHER", "LEANER"
          gridHeight  = 2.0
          gridOrient  = 250,   0, 340 ; Space 123 rotation of grid in degrees.

       table = inj_trimfTbl, inj_trimfMap, "Cyl 6 fuel trim", 7
          ;             constant,   variable
          xBins       = inj_trim_rpmf, rpm
          yBins       = inj_trim_loadf, fuelload
          zBins       = inj_trimf

          upDownLabel = "RICHER", "LEANER"
          gridHeight  = 2.0
          gridOrient  = 250,   0, 340 ; Space 123 rotation of grid in degrees.

       table = inj_trimgTbl, inj_trimgMap, "Cyl 7 fuel trim", 7
          ;             constant,   variable
          xBins       = inj_trim_rpmg, rpm
          yBins       = inj_trim_loadg, fuelload
          zBins       = inj_trimg

          upDownLabel = "RICHER", "LEANER"
          gridHeight  = 2.0
          gridOrient  = 250,   0, 340 ; Space 123 rotation of grid in degrees.

       table = inj_trimhTbl, inj_trimhMap, "Cyl 8 fuel trim", 7
          ;             constant,   variable
          xBins       = inj_trim_rpmh, rpm
          yBins       = inj_trim_loadh, fuelload
          zBins       = inj_trimh

          upDownLabel = "RICHER", "LEANER"
          gridHeight  = 2.0
          gridOrient  = 250,   0, 340 ; Space 123 rotation of grid in degrees.


       table = inj_trim1Tbl, inj_trim1Map, "Injector Trim 1", 7
          ;             constant,   variable
          xBins       = inj_trim_rpm1, rpm
          yBins       = inj_trim_load1, fuelload
          zBins       = inj_trim1

          upDownLabel = "RICHER", "LEANER"
          gridHeight  = 2.0
          gridOrient  = 250,   0, 340 ; Space 123 rotation of grid in degrees.

       table = inj_trim2Tbl, inj_trim2Map, "Injector Trim 2", 7
          ;             constant,   variable
          xBins       = inj_trim_rpm2, rpm
          yBins       = inj_trim_load2, fuelload
          zBins       = inj_trim2

          upDownLabel = "RICHER", "LEANER"
          gridHeight  = 2.0
          gridOrient  = 250,   0, 340 ; Space 123 rotation of grid in degrees.

       table = inj_timing_tbl, inj_timing_map, "Injector Timing", 7
          xBins       = inj_timing_rpm, rpm
          yBins       = inj_timing_load, fuelload
          zBins       = inj_timing
          upDownLabel = "ADVANCE", "RETARD"
          gridHeight  = 2.0
          gridOrient  = 250,  0, 340

       table = inj_timing_sec_tbl, inj_timing_sec_map, "Secondary Injector Timing", 7
          xBins       = inj_timing_sec_rpm, rpm
          yBins       = inj_timing_sec_load, fuelload
          zBins       = inj_timing_sec
          upDownLabel = "ADVANCE", "RETARD"
          gridHeight = 2.0
          gridOrient = 250, 0, 340


    ;spark trims
       table = spk_trimaTbl, spk_trimaMap, "Spark Trim 1", 8
          ;             constant,   variable
          xBins       = spk_trim_rpma, rpm
          yBins       = spk_trim_loada, ignload
          zBins       = spk_trima
          upDownLabel = "RICHER", "LEANER"
          gridHeight  = 2.0
          gridOrient  = 250,   0, 340 ; Space 123 rotation of grid in degrees.

       table = spk_trimbTbl, spk_trimbMap, "Spark Trim 2", 8
          ;             constant,   variable
          xBins       = spk_trim_rpmb, rpm
          yBins       = spk_trim_loadb, ignload
          zBins       = spk_trimb
          upDownLabel = "RICHER", "LEANER"
          gridHeight  = 2.0
          gridOrient  = 250,   0, 340 ; Space 123 rotation of grid in degrees.

       table = spk_trimcTbl, spk_trimcMap, "Spark Trim 3", 8
          ;             constant,   variable
          xBins       = spk_trim_rpmc, rpm
          yBins       = spk_trim_loadc, ignload
          zBins       = spk_trimc
          upDownLabel = "RICHER", "LEANER"
          gridHeight  = 2.0
          gridOrient  = 250,   0, 340 ; Space 123 rotation of grid in degrees.

       table = spk_trimdTbl, spk_trimdMap, "Spark Trim 4", 8
          ;             constant,   variable
          xBins       = spk_trim_rpmd, rpm
          yBins       = spk_trim_loadd, ignload
          zBins       = spk_trimd
          upDownLabel = "RICHER", "LEANER"
          gridHeight  = 2.0
          gridOrient  = 250,   0, 340 ; Space 123 rotation of grid in degrees.

       table = spk_trimeTbl, spk_trimeMap, "Spark Trim 5", 8
          ;             constant,   variable
          xBins       = spk_trim_rpme, rpm
          yBins       = spk_trim_loade, ignload
          zBins       = spk_trime
          upDownLabel = "RICHER", "LEANER"
          gridHeight  = 2.0
          gridOrient  = 250,   0, 340 ; Space 123 rotation of grid in degrees.

       table = spk_trimfTbl, spk_trimfMap, "Spark Trim 6", 8
          ;             constant,   variable
          xBins       = spk_trim_rpmf, rpm
          yBins       = spk_trim_loadf, ignload
          zBins       = spk_trimf
          upDownLabel = "RICHER", "LEANER"
          gridHeight  = 2.0
          gridOrient  = 250,   0, 340 ; Space 123 rotation of grid in degrees.

       table = spk_trimgTbl, spk_trimgMap, "Spark Trim 7", 8
          ;             constant,   variable
          xBins       = spk_trim_rpmg, rpm
          yBins       = spk_trim_loadg, ignload
          zBins       = spk_trimg
          upDownLabel = "RICHER", "LEANER"
          gridHeight  = 2.0
          gridOrient  = 250,   0, 340 ; Space 123 rotation of grid in degrees.

       table = spk_trimhTbl, spk_trimhMap, "Spark Trim 8", 8
          ;             constant,   variable
          xBins       = spk_trim_rpmh, rpm
          yBins       = spk_trim_loadh, ignload
          zBins       = spk_trimh
          upDownLabel = "RICHER", "LEANER"
          gridHeight  = 2.0
          gridOrient  = 250,   0, 340 ; Space 123 rotation of grid in degrees.


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

    [GaugeConfigurations]

       ;-------------------------------------------------------------------------------
       ; 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

    gaugeCategory = "Outputs 1"
       IACgauge          = iacstep,       "IAC position",       "steps",   0,   255,    -1,     -1,  999,  999, 0, 0
       dwellGauge        = dwell,         "Dwell",              "mSec",    0,    10,   0.5,    1.0,  6.0,  8.0, 1, 1
       dwelltrlGauge     = dwell_trl,     "Dwell (Trailing)",   "mSec",    0,    10,   0.5,    1.0,  6.0,  8.0, 1, 1
    ;  IAC step == idle pwm, when using pwm idle control.
       PWMIdlegauge      = idleDC,        "Idle PWM%",          "%",       0,   100,    -1,     -1,  999,   90, 1, 1
       pulseWidth1Gauge  = pulseWidth1,   "Pulse Width 1",      "mSec",    0,  25.5,    1.0,   1.2,   20,   25, 3, 1
       pulseWidth2Gauge  = pulseWidth2,   "Pulse Width 2",      "mSec",    0,  25.5,    1.0,   1.2,   20,   25, 3, 1
       pulseWidthSeq1Gauge  = pwseq1,   "Pulse Width Seq 1",    "mSec",    0,  25.5,    1.0,   1.2,   20,   25, 3, 1
       pulseWidthSeq2Gauge  = pwseq2,   "Pulse Width Seq 2",    "mSec",    0,  25.5,    1.0,   1.2,   20,   25, 3, 1
       pulseWidthSeq3Gauge  = pwseq3,   "Pulse Width Seq 3",    "mSec",    0,  25.5,    1.0,   1.2,   20,   25, 3, 1
       pulseWidthSeq4Gauge  = pwseq4,   "Pulse Width Seq 4",    "mSec",    0,  25.5,    1.0,   1.2,   20,   25, 3, 1
       pulseWidthSeq5Gauge  = pwseq5,   "Pulse Width Seq 5",    "mSec",    0,  25.5,    1.0,   1.2,   20,   25, 3, 1
       pulseWidthSeq6Gauge  = pwseq6,   "Pulse Width Seq 6",    "mSec",    0,  25.5,    1.0,   1.2,   20,   25, 3, 1
       pulseWidthSeq7Gauge  = pwseq7,   "Pulse Width Seq 7",    "mSec",    0,  25.5,    1.0,   1.2,   20,   25, 3, 1
       pulseWidthSeq8Gauge  = pwseq8,   "Pulse Width Seq 8",    "mSec",    0,  25.5,    1.0,   1.2,   20,   25, 3, 1
       pulseWidthSeq9Gauge  = pwseq9,   "Pulse Width V3 inj1",  "mSec",    0,  25.5,    1.0,   1.2,   20,   25, 3, 1
       pulseWidthSeq10Gauge = pwseq10,   "Pulse Width V3 inj2",  "mSec",    0,  25.5,    1.0,   1.2,   20,   25, 3, 1
       advdegGauge       = advance,       "Ignition Advance",   "degrees", 0,    50,    -1,     -1,  999,  999, 1, 1
       dutyCycle1Gauge   = dutyCycle1,    "Duty Cycle 1",       "%",       0,   100,     -1,    -1,   85,   90, 1, 1
       dutyCycle2Gauge   = dutyCycle2,    "Duty Cycle 2",       "%",       0,   100,     -1,    -1,   85,   90, 1, 1
       boostdutyGauge    = boostduty,     "Boost Duty",         "%",       0,    100,   -1,     -1,  100,  100, 1, 1

    gaugeCategory = "Outputs 2"
       nitrous_addfuel = n2o_addfuel, "Nitrous added fuel", "ms", -5, 20, 20, 20, 20, 20, 3, 3
       nitrous_retard = n2o_retard, "Nitrous retard", "deg", -5, 30, 30, 30, 30, 30, 1, 1
       nitrous1_duty = nitrous1_duty, "Nitrous 1 Duty", "%", 0, 100, 100, 100, 100, 100, 0 ,0
       nitrous2_duty = nitrous2_duty, "Nitrous 2 Duty", "%", 0, 100, 100, 100, 100, 100, 0 ,0
       nitrous_timer = nitrous_timer, "Nitrous Timer", "s", 0, 15, 15, 15, 15, 15, 3 ,3
       water_duty = water_duty, "Water Duty", "%", 0, 100, 100, 100, 100, 100, 0 ,0
       duty_pwm_a = duty_pwm_a, "Generic PWM A Duty", "%", 0, 100, 100, 100, 100, 100, 0 ,0
       duty_pwm_b = duty_pwm_b, "Generic PWM B Duty", "%", 0, 100, 100, 100, 100, 100, 0 ,0
       duty_pwm_c = duty_pwm_c, "Generic PWM C Duty", "%", 0, 100, 100, 100, 100, 100, 0 ,0
       duty_pwm_d = duty_pwm_d, "Generic PWM D Duty", "%", 0, 100, 100, 100, 100, 100, 0 ,0
       duty_pwm_e = duty_pwm_e, "Generic PWM E Duty", "%", 0, 100, 100, 100, 100, 100, 0 ,0
       duty_pwm_f = duty_pwm_f, "Generic PWM F Duty", "%", 0, 100, 100, 100, 100, 100, 0 ,0

    gaugeCategory = "Calculations 1"
       advBucketGauge    = veTuneValue,   "Advance Bucket",     "degrees", 0,    55,    -1,     -1,  999,  999, 1, 1
       accelEnrichGauge  = accDecEnrich,  "Accel Enrich",       "%",      50,   150,     -1,    -1,  999,  999, 0, 0
       clockGauge        = seconds,       "Clock",              "Seconds", 0,  65535,     10,    10,  65535,  65535, 0, 0
       gammaEnrichGauge  = gammaEnrich,   "Gamma Enrichment",   "%",      50,   150,     -1,    -1,  151,  151, 1, 1
       gammaairGauge     = airCorrection, "Gair/aircor",        "%",      50,   150,     -1,    -1,  151,  151, 1, 1
       Gwarmgauge = warmupEnrich,    "Gwarm",        "%",      50,   150,     -1,    -1,  151,  151, 1, 1
       Gbarogauge = baroCorrection,  "Gbaro",        "%",      50,   150,     -1,    -1,  151,  151, 1, 1
       WFGauge1 = wallfuel1, "Fuel on the walls 1", "", 0, 40000000, 0, 0, 40000000, 40000000, 0, 0
       WFGauge2 = wallfuel2, "Fuel on the walls 2", "", 0, 40000000, 0, 0, 40000000, 40000000, 0, 0
       EAEGauge1 = EAEFuelCorr1, "EAE Fuel Correction 1", "%",       0,   200,     40,    70,  130,  160, 0, 0
       EAEGauge2 = EAEFuelCorr2, "EAE Fuel Correction 2", "%",       0,   200,     40,    70,  130,  160, 0, 0
       fuelcorr  = fuelCorrection,"E85 Fuel Correction", "%",    100,   200,     99,    99,  164,  170, 0, 0 
       fuelcompsn= fuelComposition, "Ethanol Percentage","%",      0,   100,     -1,    -1,   85,  101, 0, 0

    gaugeCategory = "Calculations 2"
       knockGauge        = knockRetard    "Knock Retard",       "deg",     0,  25.0,     -1,    -1,  5.0, 10.0, 1, 1
       timingerrGauge = timing_err, "Timing pred err", "%", -127, 127, 255,255,255,0,0
       lostsyncGauge = synccnt, "Lost sync counter", "", 0, 255, 255, 255, 255, 255, 0, 0
       syncreasonGauge = syncreason, "Lost sync reason", "", 0, 255, 255, 255, 255, 255, 0, 0
       user0Gauge = user0, "User defined", "", 0, 65535, 65535, 65535, 65535, 65535, 0, 0
       veBucketGauge     = veTuneValue,   "VE Value",           "%",       0,   120,     -1,    -1,  999,  999, 0, 1
       veGauge1          = veCurr1,       "VE Current1",         "%",       0,   120,     -1,    -1,  999,  999, 1, 1
       veGauge2          = veCurr2,       "VE2 Current",         "%",       0,   120,     -1,    -1,  999,  999, 1, 1
       warmupEnrichGauge = warmupEnrich,  "Warmup Enrichment",  "%",     100,   150,     -1,    -1,  101,  105, 0, 0
       vss1dot = vss1dot, "VSS1 Acceleration", "ms-2", -25, 25, 65535, 65535, 65535, 65535, 0, 0 ; adjust to 50 if running top fuel
       vss2dot = vss2dot, "VSS2 Acceleration", "ms-2", -25, 25, 65535, 65535, 65535, 65535, 0, 0 ; adjust to 50 if running top fuel
       rpmdot = rpmdot, "rpmdot", "rpm/sec", -15000, 15000, 65535, 65535, 65535, 65535, 0, 0
       tpsdot = tpsDOT, "tpsdot", "%/sec", -15000, 15000, 65535, 65535, 65535, 65535, 0, 0
       mapdot = mapDOT, "mapdot", "kPa/sec", -15000, 15000, 65535, 65535, 65535, 65535, 0, 0

    gaugeCategory = "EGT inputs"
#if CELSIUS
       egtGauge1          = egt1,           "EGT 01",                   "C",    0,  1250, 0, 0,     1250,   1250, 0, 0
       egtGauge2          = egt2,           "EGT 02",                   "C",    0,  1250, 0, 0,     1250,   1250, 0, 0
       egtGauge3          = egt3,           "EGT 03",                   "C",    0,  1250, 0, 0,     1250,   1250, 0, 0
       egtGauge4          = egt4,           "EGT 04",                   "C",    0,  1250, 0, 0,     1250,   1250, 0, 0
       egtGauge5          = egt5,           "EGT 05",                   "C",    0,  1250, 0, 0,     1250,   1250, 0, 0
       egtGauge6          = egt6,           "EGT 06",                   "C",    0,  1250, 0, 0,     1250,   1250, 0, 0
       egtGauge7          = egt7,           "EGT 07",                   "C",    0,  1250, 0, 0,     1250,   1250, 0, 0
       egtGauge8          = egt8,           "EGT 08",                   "C",    0,  1250, 0, 0,     1250,   1250, 0, 0
       egtGauge9          = egt9,           "EGT 09",                   "C",    0,  1250, 0, 0,     1250,   1250, 0, 0
       egtGauge10         = egt10,          "EGT 10",                  "C",    0,  1250, 0, 0,     1250,   1250, 0, 0
       egtGauge11         = egt11,          "EGT 11",                  "C",    0,  1250, 0, 0,     1250,   1250, 0, 0
       egtGauge12         = egt12,          "EGT 12",                  "C",    0,  1250, 0, 0,     1250,   1250, 0, 0
#else
       egtGauge1          = egt1,           "EGT 01",                   "F",    0,  2280, 0, 0,     2280,   2280, 0, 0
       egtGauge2          = egt2,           "EGT 02",                   "F",    0,  2280, 0, 0,     2280,   2280, 0, 0
       egtGauge3          = egt3,           "EGT 03",                   "F",    0,  2280, 0, 0,     2280,   2280, 0, 0
       egtGauge4          = egt4,           "EGT 04",                   "F",    0,  2280, 0, 0,     2280,   2280, 0, 0
       egtGauge5          = egt5,           "EGT 05",                   "F",    0,  2280, 0, 0,     2280,   2280, 0, 0
       egtGauge6          = egt6,           "EGT 06",                   "F",    0,  2280, 0, 0,     2280,   2280, 0, 0
       egtGauge7          = egt7,           "EGT 07",                   "F",    0,  2280, 0, 0,     2280,   2280, 0, 0
       egtGauge8          = egt8,           "EGT 08",                   "F",    0,  2280, 0, 0,     2280,   2280, 0, 0
       egtGauge9          = egt9,           "EGT 09",                   "F",    0,  2280, 0, 0,     2280,   2280, 0, 0
       egtGauge10         = egt10,          "EGT 10",                  "F",    0,  2280, 0, 0,     2280,   2280, 0, 0
       egtGauge11         = egt11,          "EGT 11",                  "F",    0,  2280, 0, 0,     2280,   2280, 0, 0
       egtGauge12         = egt12,          "EGT 12",                  "F",    0,  2280, 0, 0,     2280,   2280, 0, 0
#endif

    gaugeCategory = "Sensor inputs1"

#if CELSIUS
            #if EXPANDED_CLT_TEMP
              cltGauge          = coolant,       "Coolant Temp",       "°C",    -40,   230,    -100,     -100,   170,  200, 0, 0
            #else
              cltGauge          = coolant,       "Coolant Temp",       "°C",    -40,   150,    -100,     -100,   95,  105, 0, 0
            #endif
       matGauge          = mat,           "Manifold Air Temp",  "°C",    -40,   110,    -15,     0,   95,  100, 0, 0
#else
            #if EXPANDED_CLT_TEMP
              cltGauge          = coolant,       "Coolant Temp",       "°F",    -40,   450,      -100,    -100,  350,  400, 0, 0
            #else
              cltGauge          = coolant,       "Coolant Temp",       "°F",    -40,   300,      -100,    -100,  200,  220, 0, 0
            #endif
       matGauge          = mat,           "Manifold Air Temp",  "°F",    -40,   215,      0,    30,  200,  210, 0, 0
#endif

       voltMeter         = batteryVoltage,"Battery Voltage",    "volts",   7,    21,      8,     9,   15,   16, 2, 2
       tachometer        = rpm,           "Engine Speed",       "RPM",     0,  8000,    300,   600, 3000, 5000, 0, 0
       throttleGauge     = throttle,      "Throttle Position",  "%",       0,   100,     -1,     1,   90,  100, 0, 0
       mapGauge          = map,           "Engine MAP",         "kPa",     0,   255,      0,    20,  200,  245, 1, 0
       barometerGauge    = barometer,     "Barometer",          "kPa",    60,   120,      0,    20,  200,  245, 1, 0
       fuelloadGauge      = fuelload,     "Fuel Load",          "%",     0,   255,      0,    20,  200,  245, 1, 0
       fuelload2Gauge    = fuelload2,     "Secondary Fuel Load", "%",    0,   255,      0,    20,  200,  245, 1, 0
       ignloadGauge      = ignload,       "Ign Load",           "%",     0,   255,      0,    20,  200,  245, 1, 0
       ignload2Gauge     = ignload2,      "Secondary Ign Load", "%",     0,   255,      0,    20,  200,  245, 1, 0
       eaeloadGauge      = eaeload1,       "EAE Load",           "%",     0,   255,      0,    20,  200,  245, 1, 0
       afrloadGauge      = afrload1,       "AFR Load",           "%",     0,   255,      0,    20,  200,  245, 1, 0
       mafGauge = maf,  "Mass Air Flow", "g/sec",   0,   650,      0,   200,  480,  550, 0, 0
       mafMapGauge = mafmap, "MAFMAP", "kPa",       0,   400,      -1,  -1,   999,  999, 0, 0
       boostbarGauge     = boostbar,      "Boost",         "bar",    -1,     3,      -1,    -1,    5,  5,  2, 2
       boostpsigGauge    = boostpsig,     "Boost",        "psig",    -14.7, 21,      -15,    -15,  30, 30, 1, 1

    gaugeCategory = "Sensor inputs2"
       adc6Gauge  = adc6,   "ADC 6",      "",    0,  1023,    1023, 1023,  1023,   1023,0, 0
       adc7Gauge  = adc7,   "ADC 7",      "",    0,  1023,    1023, 1023,  1023,   1023,0, 0
       stream_levelGauge = stream_level, "Stream Level", "", 0, 128, 128, 128, 128, 128, 0, 0
#if MPH
       vehiclespeed1     = vss1, "Vehicle Speed 1", "MPH", 0, 200, 1000, 1000, 1000, 1000, 0, 0
       vehiclespeed2     = vss2, "Vehicle Speed 2", "MPH", 0, 200, 1000, 1000, 1000, 1000, 0, 0
#else
   vehiclespeed1     = vss1, "Vehicle Speed 1", "KPH", 0, 300, 1600, 1600, 1600, 1600, 0, 0
   vehiclespeed2     = vss2, "Vehicle Speed 2", "KPH", 0, 300, 1600, 1600, 1600, 1600, 0, 0
#endif
   shaftspeed1     = ss1, "Shaft Speed 1", "RPM", 0, 10000, 10000, 10000, 10000, 10000, 0, 0
   shaftspeed2     = ss2, "Shaft Speed 2", "RPM", 0, 10000, 10000, 10000, 10000, 10000, 0, 0
   gear  = gear, "Gear", "", -1, 6, 6, 6, 6, 6, 0 ,0
   accelx = accelx, "Accel X", "ms-2", -59, 59, 59, 59, 59, 59, 2, 2 
   accely = accely, "Accel Y", "ms-2", -59, 59, 59, 59, 59, 59, 2, 2 
   accelz = accelz, "Accel Z", "ms-2", -59, 59, 59, 59, 59, 59, 2, 2 
;   accelx = accelx, "Accel X", "g", -6, 6, 6, 6, 6, 6, 3, 3 
;   accely = accely, "Accel Y", "g", -6, 6, 6, 6, 6, 6, 3, 3 
;   accelz = accelz, "Accel Z", "g", -6, 6, 6, 6, 6, 6, 3, 3 

gaugeCategory = "AFR/EGO inputs"
#if   NARROW_BAND_EGO
;
#elif LAMBDA
   lambda1Gauge      = lambda1,       "Lambda 1",             "",      0.5,   1.5,    0.5,   0.7,    2,  1.1, 2, 2
   lambda2Gauge      = lambda2,       "Lambda 2",             "",      0.5,   1.5,    0.5,   0.7,    2,  1.1, 2, 2
   lambda3Gauge      = lambda3,       "Lambda 3",             "",      0.5,   1.5,    0.5,   0.7,    2,  1.1, 2, 2
   lambda4Gauge      = lambda4,       "Lambda 4",             "",      0.5,   1.5,    0.5,   0.7,    2,  1.1, 2, 2
   lambda5Gauge      = lambda5,       "Lambda 5",             "",      0.5,   1.5,    0.5,   0.7,    2,  1.1, 2, 2
   lambda6Gauge      = lambda6,       "Lambda 6",             "",      0.5,   1.5,    0.5,   0.7,    2,  1.1, 2, 2
   lambda7Gauge      = lambda7,       "Lambda 7",             "",      0.5,   1.5,    0.5,   0.7,    2,  1.1, 2, 2
   lambda8Gauge      = lambda8,       "Lambda 8",             "",      0.5,   1.5,    0.5,   0.7,    2,  1.1, 2, 2
#else
   afr1Gauge         = afr1,          "Air:Fuel Ratio 1",     "",       10,  19.4,     12,    13,   15,   16, 2, 2
   afr2Gauge         = afr2,          "Air:Fuel Ratio 2",     "",       10,  19.4,     12,    13,   15,   16, 2, 2
   afr3Gauge         = afr3,          "Air:Fuel Ratio 3",     "",       10,  19.4,     12,    13,   15,   16, 2, 2
   afr4Gauge         = afr4,          "Air:Fuel Ratio 4",     "",       10,  19.4,     12,    13,   15,   16, 2, 2
   afr5Gauge         = afr5,          "Air:Fuel Ratio 5",     "",       10,  19.4,     12,    13,   15,   16, 2, 2
   afr6Gauge         = afr6,          "Air:Fuel Ratio 6",     "",       10,  19.4,     12,    13,   15,   16, 2, 2
   afr7Gauge         = afr7,          "Air:Fuel Ratio 7",     "",       10,  19.4,     12,    13,   15,   16, 2, 2
   afr8Gauge         = afr8,          "Air:Fuel Ratio 8",     "",       10,  19.4,     12,    13,   15,   16, 2, 2
#endif
   egoV1Gauge        = egov1,    "Exhaust Gas Oxygen 1", "volts",   0,   5,    5,   5,  5,  5, 2, 2
   egoV2Gauge        = egov2,    "Exhaust Gas Oxygen 2", "volts",   0,   5,    5,   5,  5,  5, 2, 2
   egoV3Gauge        = egov3,    "Exhaust Gas Oxygen 3", "volts",   0,   5,    5,   5,  5,  5, 2, 2
   egoV4Gauge        = egov4,    "Exhaust Gas Oxygen 4", "volts",   0,   5,    5,   5,  5,  5, 2, 2
   egoV5Gauge        = egov5,    "Exhaust Gas Oxygen 5", "volts",   0,   5,    5,   5,  5,  5, 2, 2
   egoV6Gauge        = egov6,    "Exhaust Gas Oxygen 6", "volts",   0,   5,    5,   5,  5,  5, 2, 2
   egoV7Gauge        = egov7,    "Exhaust Gas Oxygen 7", "volts",   0,   5,    5,   5,  5,  5, 2, 2
   egoV8Gauge        = egov8,    "Exhaust Gas Oxygen 8", "volts",   0,   5,    5,   5,  5,  5, 2, 2

gaugeCategory = "AFR/EGO calculations"
#if   NARROW_BAND_EGO
   afr1targetGauge   = afrtgt1,       "EgoV 1 Target",     "",       0,  1,     20,    20,   20,   20, 3, 3
   afr2targetGauge   = afrtgt2,       "EgoV 2 Target",     "",       0,  1,     20,    20,   20,   20, 3, 3
   afr1errGauge      = afr1err,       "EgoV 1 Error",     "",       -1,  +1,     12,    13,   15,   16, 3, 3
   afr2errGauge      = afr2err,       "EgoV 2 Error",     "",       -1,  +1,     12,    13,   15,   16, 3, 3
#elif LAMBDA
   afr1targetGauge   = afrtgt1,       "Lambda 1 Target",     "",       0.5,  1.5,     20,    20,   20,   20, 2, 2
   afr2targetGauge   = afrtgt2,       "Lambda 2 Target",     "",       0.5,  1.5,     20,    20,   20,   20, 2, 2
   afr1errGauge      = afr1err,       "Lambda 1 Error",     "",       -2,  +2,     12,    13,   15,   16, 2, 2
   afr2errGauge      = afr2err,       "Lambda 2 Error",     "",       -2,  +2,     12,    13,   15,   16, 2, 2
#else
   afr1targetGauge   = afrtgt1,       "AFR 1 Target",     "",       10,  19.4,     20,    20,   20,   20, 2, 2
   afr2targetGauge   = afrtgt2,       "AFR 2 Target",     "",       10,  19.4,     20,    20,   20,   20, 2, 2
   afr1errGauge      = afr1err,       "AFR 1 Error",     "",       -5,  +5,     12,    13,   15,   16, 2, 2
   afr2errGauge      = afr2err,       "AFR 2 Error",     "",       -5,  +5,     12,    13,   15,   16, 2, 2
#endif
   egoCorrGauge1     = egocor1, "EGO Correction 1",   "%",      50,   150,     90,    99,  101,  110, 1, 1
   egoCorrGauge2     = egocor2, "EGO Correction 2",   "%",      50,   150,     90,    99,  101,  110, 1, 1
   egoCorrGauge3     = egocor3, "EGO Correction 3",   "%",      50,   150,     90,    99,  101,  110, 1, 1
   egoCorrGauge4     = egocor4, "EGO Correction 4",   "%",      50,   150,     90,    99,  101,  110, 1, 1
   egoCorrGauge5     = egocor5, "EGO Correction 5",   "%",      50,   150,     90,    99,  101,  110, 1, 1
   egoCorrGauge6     = egocor6, "EGO Correction 6",   "%",      50,   150,     90,    99,  101,  110, 1, 1
   egoCorrGauge7     = egocor7, "EGO Correction 7",   "%",      50,   150,     90,    99,  101,  110, 1, 1
   egoCorrGauge8     = egocor8, "EGO Correction 8",   "%",      50,   150,     90,    99,  101,  110, 1, 1

gaugeCategory = "Generic sensor inputs"
   sensor01Gauge  = sensor01,   "Sensor 01",      "",    -3000,    3000, -3277,  -3277,  3277, 3277, 1, 1
   sensor02Gauge  = sensor02,   "Sensor 02",      "",    -3000,    3000, -3277,  -3277,  3277, 3277, 1, 1
   sensor03Gauge  = sensor03,   "Sensor 03",      "",    -3000,    3000, -3277,  -3277,  3277, 3277, 1, 1
   sensor04Gauge  = sensor04,   "Sensor 04",      "",    -3000,    3000, -3277,  -3277,  3277, 3277, 1, 1
   sensor05Gauge  = sensor05,   "Sensor 05",      "",    -3000,    3000, -3277,  -3277,  3277, 3277, 1, 1
   sensor06Gauge  = sensor06,   "Sensor 06",      "",    -3000,    3000, -3277,  -3277,  3277, 3277, 1, 1
   sensor07Gauge  = sensor07,   "Sensor 07",      "",    -3000,    3000, -3277,  -3277,  3277, 3277, 1, 1
   sensor08Gauge  = sensor08,   "Sensor 08",      "",    -3000,    3000, -3277,  -3277,  3277, 3277, 1, 1
   sensor09Gauge  = sensor09,   "Sensor 09",      "",    -3000,    3000, -3277,  -3277,  3277, 3277, 1, 1
   sensor10Gauge  = sensor10,   "Sensor 10",      "",    -3000,    3000, -3277,  -3277,  3277, 3277, 1, 1
   sensor11Gauge  = sensor11,   "Sensor 11",      "",    -3000,    3000, -3277,  -3277,  3277, 3277, 1, 1
   sensor12Gauge  = sensor12,   "Sensor 12",      "",    -3000,    3000, -3277,  -3277,  3277, 3277, 1, 1
   sensor13Gauge  = sensor13,   "Sensor 13",      "",    -3000,    3000, -3277,  -3277,  3277, 3277, 1, 1
   sensor14Gauge  = sensor14,   "Sensor 14",      "",    -3000,    3000, -3277,  -3277,  3277, 3277, 1, 1
   sensor15Gauge  = sensor15,   "Sensor 15",      "",    -3000,    3000, -3277,  -3277,  3277, 3277, 1, 1
   sensor16Gauge  = sensor16,   "Sensor 16",      "",    -3000,    3000, -3277,  -3277,  3277, 3277, 1, 1

gaugeCategory = "CAN board inputs/outputs"
   canin1_8Gauge   = canin1_8,    "CAN inputs 1-8",   "",    0,  255,    255, 255,  255,   255,0, 0
   canout1_8Gauge  = canout1_8,   "CAN outputs 1-8",  "",    0,  255,    255, 255,  255,   255,0, 0
   canout9_16Gauge = canout9_16,  "CAN outputs 9-16", "",    0,  255,    255, 255,  255,   255,0, 0
   canpwmin0Gauge  = canpwmin0,   "CAN PWMin 0",      "",    0,  65535,    65535, 65535,  65535,   65535,0, 0
   canpwmin1Gauge  = canpwmin1,   "CAN PWMin 1",      "",    0,  65535,    65535, 65535,  65535,   65535,0, 0
   canpwmin2Gauge  = canpwmin2,   "CAN PWMin 2",      "",    0,  65535,    65535, 65535,  65535,   65535,0, 0
   canpwmin3Gauge  = canpwmin3,   "CAN PWMin 3",      "",    0,  65535,    65535, 65535,  65535,   65535,0, 0

gaugeCategory = "X-Code dev"
    status1Gauge  = status1,   "Status 1",      "",    0,  255,    255, 255,  255,   255, 0, 0
    status2Gauge  = status2,   "Status 2",      "",    0,  255,    255, 255,  255,   255, 0, 0
    status3Gauge  = status3,   "Status 3",      "",    0,  255,    255, 255,  255,   255, 0, 0
    status4Gauge  = status4,   "Status 4",      "",    0,  255,    255, 255,  255,   255, 0, 0
    status5Gauge  = status5,   "Status 5",      "",    0,  65535,    65535, 65535,  65535,   65535,0, 0
    looptimeGauge = looptime,   "Mainloop time",      "us",    0,  10000,    -1, -1,  1000,   6000, 0, 0
    sd_filenum = sd_filenum, "SDcard file number", "", 0, 9999, 9999, 9999, 9999, 9999, 0 ,0
    sd_error = sd_error, "SDcard error", "", 0, 255, 255, 255, 255, 255, 0 ,0
    sd_status = sd_status, "SDcard status", "", 0, 255, 255, 255, 255, 255, 0 ,0
    sd_phase = sd_phase, "SDcard phase", "", 0, 255, 255, 255, 255, 255, 0 ,0
    deadGauge         = deadValue,     "---",                "",        0,     1,     -1,    -1,    2,    2, 0, 0
;------------------------------------------------------------------------------

[FrontPage]
#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

   ; Gauges are numbered left to right, top to bottom.
   ;
   ;    1  2  3  4
   ;    5  6  7  8

   gauge1 = tachometer
;   gauge2 = EAEGauge1
   gauge2 = throttleGauge
   gauge3 = pulseWidth1Gauge
   gauge4 = cltGauge
   gauge5 = advdegGauge
   gauge6 = fuelloadGauge
#if   NARROW_BAND_EGO
   gauge7 = egoV1Gauge
#elif LAMBDA
   gauge7 = lambda1Gauge
#else
   gauge7 = afr1Gauge
#endif
;   gauge7 = dwellGauge
   gauge8 = matGauge


   ;----------------------------------------------------------------------------
   ; Indicators
   ;               expr         off-label          on-label, off-bg, off-fg, on-bg, on-fg

   indicator = { ready              }, "Not Ready",    "Ready",       white, black, green, black
   indicator = { crank              }, "Not Cranking", "Cranking",    white, black, red,   black
   indicator = { startw             }, "ASE OFF",      "ASE",         white, black, red,   black
   indicator = { warmup             }, "WUE OFF",      "WUE",         white, black, green, black
   indicator = { tpsaccaen          }, "TPS Accel Enrich",    "TPS Accel Enrich",   white, black, green, black
   indicator = { mapaccaen          }, "MAP Accel Enrich",    "MAP Accel Enrich",   white, black, green, black
   indicator = { tpsaccden          }, "TPS Decel", "TPS Decel", white, black, green, black
   indicator = { mapaccden          }, "MAP Decel", "MAP Decel", white, black, green, black
;   indicator = { tps > floodClear && crank }, "", "FLOOD CLEAR", white, black, red,   black
;   indicator = { port0              }, "Port 0 Off",   "Port 0 On",   white, black, red,   black

   indicator = { status1 & 0b00000001}, "Need Burn",   "Need Burn",   white, black, red,   black
   indicator = { status1 & 0b00000010}, "Data Lost",   "Lost Data",   white, black, red,   black
   indicator = { status1 & 0b00000100}, "Config Error",   "Config Error",   white, black, red,   black
   indicator = { status1 & 0b00001000}, "Not synced", "Synced", red, black, green, black
   indicator = { status1 & 0b00100000}, "VE1/2", "VE3/4", white, black, green, black
   indicator = { status1 & 0b01000000}, "SPK1/2", "SPK3/4", white, black, green, black

   indicator = { status2 & 0b00000001}, "N2O 1 off", "N2O 1 on", white, black, green, black
   indicator = { status2 & 0b00000010}, "N2O 2 off", "N2O 2 on", white, black, green, black
   indicator = { status2 & 0b00000100}, "No rev lim", "Rev Lim", white, black, red, black
   indicator = { status2 & 0b00001000}, "No Launch", "Launch in", white, black, green, black
   indicator = { status2 & 0b00010000}, "No Flat shift", "Flat shift", white, black, green, black
   indicator = { status2 & 0b00100000}, "Spark cut", "Spark cut", white, black, red, black
   indicator = { status2 & 0b01000000}, "Over boost", "Over boost", white, black, red, black
   indicator = { status2 & 0b10000000}, "CL Idle off", "CL idle on", white, black, green, black

   indicator = { status3 & 0b00000001}, "No Fuel cut", "Fuel cut", white, black, red, black
   indicator = { status3 & 0b00000010}, "T-log", "T-log", white, black, red, black
   indicator = { status3 & 0b00000100}, "3 step off", "3 step on", white, black, green, black
;
   indicator = { status3 & 0b00010000}, "No 3 step", "3 step in", white, black, red, black
   indicator = { status3 & 0b00100000}, "No soft limit", "Soft limiter", white, black, red, black
   indicator = { status3 & 0b01000000}, "No bike shift", "Bike Shift", white, black, red, black
   indicator = { status3 & 0b10000000}, "Launch Off", "Launch on", white, black, red, black

   indicator = { status6 & 0b00000001}, "-", "EGT warn", white, black, red, black
   indicator = { status6 & 0b00000010}, "-", "EGT shutdown", white, black, red, black
   indicator = { status6 & 0b00000100}, "-", "AFR warn", white, black, red, black
   indicator = { status6 & 0b00001000}, "-", "AFR shutdown", white, black, red, black
   indicator = { status6 & 0b00010000}, "-", "Idle VE", white, black, green, black
   indicator = { status6 & 0b00100000}, "-", "Idle Adv", white, black, green, black
   indicator = { status6 & 0b01000000}, "-", "Fan", white, black, green, black

   indicator = { knock },               "No Knock", "Knock", white, black, red, black

   indicator = { sd_status & 0b00010000}, "SD Err", "SD Err", white, black, red, black
   indicator = { sd_status & 0b00001000}, "SD Log", "SD Log", white, black, red, black
   indicator = { sd_status & 0b00000100}, "SD ready", "SD ready", white, black, green, black
   indicator = { sd_status & 0b00000001}, "No SD", "SD in", white, black, green, black

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

[RunTime]
   barHysteresis = 2.5 ; Seconds
#if CELSIUS
	#if EXPANDED_CLT_TEMP
	  coolantBar    = -40,  230
	#else
	  coolantBar    = -40,  150
	#endif
   matBar        = -40,  100
#else
	#if EXPANDED_CLT_TEMP
	  coolantBar    = -40,  450
	#else
	  coolantBar    = -40,  300
	#endif
   matBar        = -40,  215
#endif

   batteryBar    =   6,   15
   dutyCycleBar  =   0,  100
#if   NARROW_BAND_EGO
   egoBar        = 0.0 ,  1.0
#elif LAMBDA
   egoBar        = 0.5,   1.5
#else
   egoBar        = 9.7,  19.7
#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

;  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.

   ;              Page 1            Page 2             Page 3            Page 4
   pageButtons  = "&EGO",           "&WUE",            "PW&1",           "PW&2"
   gauge1       = tachometer,       tachometer,        tachometer,       tachometer
   gauge2       = mapGauge,         mapGauge,          mapGauge,         mapGauge
#if   NARROW_BAND_EGO
   gauge3       = egoV1Gauge,         egoV1Gauge,          egoV1Gauge,         egoV1Gauge
#elif LAMBDA
   gauge3       = lambda1Gauge,     lambda1Gauge,      lambda1Gauge,     lambda1Gauge
#else
   gauge3       = afr1Gauge,        afr1Gauge,         afr1Gauge,        afr1Gauge
#endif
   gauge4       = egoCorrGauge1,     warmupEnrichGauge, pulseWidth1Gauge, pulseWidth2Gauge
   gauge5       = veBucketGauge,    veBucketGauge,     veBucketGauge,    veBucketGauge
   gauge6       = egoCorrGauge2, accelEnrichGauge,  dutyCycle1Gauge,  dutyCycle2Gauge

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

[AccelerationWizard]
   tpsDotBar = 0, 800
   mapDotBar = 0, 700

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

[BurstMode]
;   getCommand       = "a\x00\x06"
   getCommand       = "A"

[OutputChannels]
   deadValue        = { 0 } ; Convenient unchanging value.

#if CAN_COMMANDS
;full version that works anywhere - be sure to change the no. bytes requested
   ochGetCommand    = "r\x00\x07\x00\x00\x01\x28"
#else
; fast get via serial
   ochGetCommand       = "A"
#endif
   ochBlockSize     = 296 ;oi! check ochGetCommand as well ; SIZEOFTXBUF

   seconds          = scalar, U16,    0, "s",   1.000, 0.0
   secl = { seconds % 256 }, "s" ; For runtime screen.
#if PW_4X
   pulseWidth1      = scalar, U16,    2, "s",   0.004, 0.0
   pulseWidth2      = scalar, U16,    4, "s",   0.004, 0.0
#else
   pulseWidth1      = scalar, U16,    2, "s",   0.001, 0.0
   pulseWidth2      = scalar, U16,    4, "s",   0.001, 0.0
#endif
   pulseWidth       = { pulseWidth1 }, "s" ; For runtime screen.

   rpm              = scalar, U16,    6, "RPM", 1.000, 0.0
   advance          = scalar, S16,    8, "deg", 0.100, 0.0

   ; unsigned char squirt,engine,afrtgt1,afrtgt2;    // afrtgt in afr x 10
   squirt           = scalar, U08,   10, "bit", 1.000, 0.0
   ; Squirt Event Scheduling Variables - bit fields for "squirt" variable above
   ; inj1:    equ    3       ; 0 = no squirt         1 = squirt
   ; inj2:    equ    5       ; 0 = no squirt         1 = squirt
   ; sched1:  equ    2       ; 0 = nothing scheduled 1 = scheduled to squirt
   ; firing1: equ    0       ; 0 = not squirting     1 = squirting
   ; sched2:  equ    4
   ; firing2: equ    1
   firing1          = bits,   U08,   10, [0:0]
   firing2          = bits,   U08,   10, [1:1]
   sched1           = bits,   U08,   10, [2:2]
   inj1             = bits,   U08,   10, [3:3]
   sched2           = bits,   U08,   10, [4:4]
   inj2             = bits,   U08,   10, [5:5]

   engine           = scalar, U08,   11, "bit", 1.000, 0.0
   ; Engine Operating/Status variables - bit fields for "engine" variable above
   ; ready:  equ     0       ; 0 = engine not ready 1 = ready to run
   ; crank:  equ     1       ; 0 = engine not cranking 1 = engine cranking
   ; startw: equ     2       ; 0 = not in startup warmup 1 = in warmup enrichment
   ; warmup: equ     3       ; 0 = not in warmup 1 = in warmup
   ; tpsaen: equ     4       ; 0 = not in TPS acceleration mode 1 = TPS acceleration mode
   ; tpsden: equ     5       ; 0 = not in deacceleration mode 1 = in deacceleration mode
   ready            = bits,   U08,   11, [0:0]
   crank            = bits,   U08,   11, [1:1]
   startw           = bits,   U08,   11, [2:2]
   warmup           = bits,   U08,   11, [3:3]
   tpsaccaen        = bits,   U08,   11, [4:4]
   tpsaccden        = bits,   U08,   11, [5:5]
   mapaccaen	  = bits,   U08,   11, [6:6]
   mapaccden        = bits,   U08,   11, [7:7]

#if NARROW_BAND_EGO
   afrtgt1          = scalar, U08,   12, "Volts", 0.00489, 0.0
   afrtgt2          = scalar, U08,   13, "Volts", 0.00489, 0.0
#elif LAMBDA
   afrtgt1raw       = scalar, U08,   12, "Lambda", 0.1, 0.0
   afrtgt2raw       = scalar, U08,   13, "Lambda", 0.1, 0.0
#else
   afrtgt1          = scalar, U08,   12, "AFR", 0.1, 0.0
   afrtgt2          = scalar, U08,   13, "AFR", 0.1, 0.0
#endif
   ; unsigned char wbo2_en1,wbo2_en2; // from wbo2 - indicates whether wb afr valid
   wbo2_en1         = scalar, U08,   14, "",    1.000, 0.0
   wbo2_en2         = scalar, U08,   15, "",    1.000, 0.0

   ; int baro,map,mat,clt,tps,batt,ego1,ego2,knock, // baro   - kpa x 10
   ;                                                // map    - kpa x 10
   ;                                                // mat, clt deg(C/F)x 10
   ;                                                // tps    - % x 10
   ;                                                // batt   - vlts x 10
   ;                                                // ego1,2 - afr x 10
   ;                                                // knock  - volts x 10
   barometer        = scalar, S16,   16, "kPa", 0.100, 0.0
   map              = scalar, S16,   18, "kPa", 0.100, 0.0
#if CELSIUS
   mat              = scalar, S16,   20, "°C",  0.05555, -320.0
   coolant          = scalar, S16,   22, "°C",  0.05555, -320.0
#else
   mat              = scalar, S16,   20, "°F",  0.100, 0.0
   coolant          = scalar, S16,   22, "°F",  0.100, 0.0
#endif
   tps              = scalar, S16,   24, "%",   0.100, 0.0
;   tpsADC           = { tps*10.23 }, "ADC" ; Fake for calibrator and file indexing.
   throttle         = { tps }, "%"
   batteryVoltage   = scalar, S16,   26, "v",   0.100, 0.0
   afr1_old         = scalar, S16,   28, "AFR", 0.100, 0.0
   afr2_old         = scalar, S16,   30, "AFR", 0.100, 0.0
   knock            = scalar, S16,   32, "v",   0.100, 0.0

   ; egocor1,egocor2,aircor,warmcor,     // all in %
   egoCorrection1   = scalar, S16,   34, "%",   0.1000, 0.0
   egoCorrection = { ( egoCorrection1 + egoCorrection2) / 2 }, "%" ; Alias for old gauges.
   egoCorrection2   = scalar, S16,   36, "%",   0.1000, 0.0
   airCorrection    = scalar, S16,   38, "%",   0.1000, 0.0
   warmupEnrich     = scalar, S16,   40, "%",   1.000, 0.0

   ; tpsaccel,tpsfuelcut,barocor,gammae, // tpsaccel - acc enrich(.1 ms units)
   ;                                     // tpsfuelcut - %
   ;                                     // barcor,gammae - %
   accelEnrich      = scalar, S16,   42, "ms", 0.100, 0.0
   tpsfuelcut       = scalar, S16,   44, "%",   1.000, 0.0
   baroCorrection   = scalar, S16,   46, "%",   0.1000, 0.0
   gammaEnrich      = scalar, S16,   48, "%",   1.000, 0.0

   ;  vecurr1,vecurr2,iacstep,cold_adv_deg;           // vecurr - %
   ;                                                  // iacstep - steps
   ;                                                  // cold_adv_deg - deg x 10
   veCurr1          = scalar, S16,   50, "%",   0.1000, 0.0
   veCurr2          = scalar, S16,   52, "%",   0.1000, 0.0
   veCurr           = { veCurr1 }, "%" ; For runtime display.
   iacstep          = scalar, S16,   54, "",    1.000, 0.0
   idleDC           = scalar, S16,   54, "",    0.39063, 0.0
   coldAdvDeg       = scalar, S16,   56, "deg", 0.100, 0.0
   tpsDOT           = scalar, S16,   58, "%/s",   0.100, 0.0
   mapDOT           = scalar, S16,   60, "kPa/s", 1.000, 0.0
   dwell            = scalar, U16,   62, "ms",    0.1000, 0.0
   mafmap           = scalar, S16,   64, "?",     0.1000, 0.0
   fuelload         = scalar, S16,   66, "%",   0.100, 0.0 ; Blend of MAP and TPS, depends on algorithm
   fuelCorrection   = scalar, S16,   68, "%",     1.000, 0.0 ; Percent alcohol in fuel.

   portStatus       = scalar, U08,   70, "bit",   1.000, 0.0 ; Spare port status bits
   port0            = bits,   U08,   70, [0:0]
   port1            = bits,   U08,   70, [1:1]
   port2            = bits,   U08,   70, [2:2]
   port3            = bits,   U08,   70, [3:3]
   port4            = bits,   U08,   70, [4:4]
   port5            = bits,   U08,   70, [5:5]
   port6            = bits,   U08,   70, [6:6]

   knockRetard      = scalar, U08,   71, "deg",     0.1, 0.0
   EAEFuelCorr1	    = scalar, U16,   72, "%",  1.0, 0.0
   egoV             = scalar, S16,   74, "V", 0.01, 0.0 ; was omitted
   egoV2            = scalar, S16,   76, "V", 0.01, 0.0 ; was omitted
   status1          = scalar, U08,   78, "", 1.0, 0.0 ; status1
   status2          = scalar, U08,   79, "", 1.0, 0.0 ; status2
   status3          = scalar, U08,   80, "", 1.0, 0.0 ; status3
   status4          = scalar, U08,   81, "", 1.0, 0.0 ; status4
   looptime         = scalar, U16,   82, "us", 1.0, 0.0
   status5          = scalar, U16,   84, "us", 1, 0 ; istatus5
   tpsADC           = scalar, U16,   86, "ADC", 1, 0 ; REAL for calibrator and file indexing.
   fuelload2	    = scalar, U16,   88, "%",    0.100, 0.0
   ignload	    = scalar, S16,   90, "%",    0.100, 0.0
   ignload2	    = scalar, S16,   92, "%",    0.100, 0.0

   synccnt         = scalar,  U08,     94, "", 1, 0
   timing_err       = scalar, S08,   95, "%", 1, 0 ; accuracy of timing prediction
;   deltaT           = scalar, S32,  96, "uS",    1.000, 0.0 ; Normalized time between trigger pulses, NEVER used
   wallfuel1	    = scalar, U32,  100, "uS",    0.010, 0.0
   sensor01	    = scalar, S16,  104, "",   0.1000, 0.0
   sensor02     = scalar, S16,  106, "",   0.1000, 0.0
   sensor03	    = scalar, S16,  108, "",   0.1000, 0.0
   sensor04	    = scalar, S16,  110, "",   0.1000, 0.0
   sensor05	    = scalar, S16,  112, "",   0.1000, 0.0
   sensor06	    = scalar, S16,  114, "",   0.1000, 0.0
   sensor07	    = scalar, S16,  116, "",   0.1000, 0.0
   sensor08	    = scalar, S16,  118, "",   0.1000, 0.0

   canpwmin0	    = scalar, U16,  120, "",   1.000, 0.0
   canpwmin1	    = scalar, U16,  122, "",   1.000, 0.0
   canpwmin2	    = scalar, U16,  124, "",   1.000, 0.0
   canpwmin3	    = scalar, U16,  126, "",   1.000, 0.0

   canin1_8	    = scalar, U08,  128, "",   1.000, 0.0
   canout1_8    = scalar, U08,  129, "",   1.000, 0.0
   canout9_16   = scalar, U08,  130, "",   1.000, 0.0

   adc6 	    = scalar, U16,  131, "",   1, 0.0
   adc7 	    = scalar, U16,  133, "",   1, 0.0
   wallfuel2	    = scalar, U32,  135, "uS", 1.000, 0.0
   EAEFuelCorr2	    = scalar, U16,  139 , "%",  1.0, 0.0
   boostduty	    = scalar, U08,  141 , "%",  1.0, 0.0
   syncreason       = scalar, U08,  142,  "", 1.0, 0.0
   sd_status        = scalar, U08,  143,  "", 1.0, 0.0
   user0            = scalar, U16,  144,  "", 1.0, 0.0
#if PW_4X
   pwseq1           = scalar, U16,  146,  "us", 0.004, 0,0
   pwseq2           = scalar, U16,  148,  "us", 0.004, 0,0
   pwseq3           = scalar, U16,  150,  "us", 0.004, 0,0
   pwseq4           = scalar, U16,  152,  "us", 0.004, 0,0
   pwseq5           = scalar, U16,  154,  "us", 0.004, 0,0
   pwseq6           = scalar, U16,  156,  "us", 0.004, 0,0
   pwseq7           = scalar, U16,  158,  "us", 0.004, 0,0
   pwseq8           = scalar, U16,  160,  "us", 0.004, 0,0
   pwseq9           = scalar, U16,  162,  "us", 0.004, 0,0
   pwseq10          = scalar, U16,  164,  "us", 0.004, 0,0
#else
   pwseq1           = scalar, U16,  146,  "us", 0.001, 0,0
   pwseq2           = scalar, U16,  148,  "us", 0.001, 0,0
   pwseq3           = scalar, U16,  150,  "us", 0.001, 0,0
   pwseq4           = scalar, U16,  152,  "us", 0.001, 0,0
   pwseq5           = scalar, U16,  154,  "us", 0.001, 0,0
   pwseq6           = scalar, U16,  156,  "us", 0.001, 0,0
   pwseq7           = scalar, U16,  158,  "us", 0.001, 0,0
   pwseq8           = scalar, U16,  160,  "us", 0.001, 0,0
   pwseq9           = scalar, U16,  162,  "us", 0.001, 0,0
   pwseq10          = scalar, U16,  164,  "us", 0.001, 0,0
#endif
#if MPH
   vss1             = scalar, S16,  166, "MPH", 0.22369, 0.0
   vss2             = scalar, S16,  168, "MPH", 0.22369, 0.0
#else
   vss1             = scalar, S16,  166, "KPH", 0.3600, 0.0
   vss2             = scalar, S16,  168, "KPH", 0.3600, 0.0
#endif
   ss1             = scalar, S16,  170, "RPM", 1.000, 0.0
   ss2             = scalar, S16,  172, "RPM", 1.000, 0.0
#if PW_4X
   n2o_addfuel     = scalar, S16,  174, "ms",  0.004, 0
#else
   n2o_addfuel     = scalar, S16,  174, "ms",  0.001, 0
#endif
   n2o_retard      = scalar, S16,  176, "deg",  0.1, 0
   nitrous1_duty   = scalar, U08,  178, "%", 1, 0
   nitrous2_duty   = scalar, U08,  179, "%", 1, 0
   nitrous_timer   = scalar, U16,  180, "s", 0.001, 0
   sd_filenum      = scalar, U16,  182, "", 1, 0
   sd_error        = scalar, U08,  184, "", 1, 0
   sd_phase        = scalar, U08,  185, "", 1, 0

#if CELSIUS
   egt1            = scalar, S16,  186, "°C",  0.05555, -320
   egt2            = scalar, S16,  188, "°C",  0.05555, -320
   egt3            = scalar, S16,  190, "°C",  0.05555, -320
   egt4            = scalar, S16,  192, "°C",  0.05555, -320
   egt5            = scalar, S16,  194, "°C",  0.05555, -320
   egt6            = scalar, S16,  196, "°C",  0.05555, -320
   egt7            = scalar, S16,  198, "°C",  0.05555, -320
   egt8            = scalar, S16,  200, "°C",  0.05555, -320
   egt9            = scalar, S16,  202, "°C",  0.05555, -320
   egt10           = scalar, S16,  204, "°C",  0.05555, -320
   egt11           = scalar, S16,  206, "°C",  0.05555, -320
   egt12           = scalar, S16,  208, "°C",  0.05555, -320
#else
   egt1            = scalar, S16,  186, "°F", 0.1, 0
   egt2            = scalar, S16,  188, "°F", 0.1, 0
   egt3            = scalar, S16,  190, "°F", 0.1, 0
   egt4            = scalar, S16,  192, "°F", 0.1, 0
   egt5            = scalar, S16,  194, "°F", 0.1, 0
   egt6            = scalar, S16,  196, "°F", 0.1, 0
   egt7            = scalar, S16,  198, "°F", 0.1, 0
   egt8            = scalar, S16,  200, "°F", 0.1, 0
   egt9            = scalar, S16,  202, "°F", 0.1, 0
   egt10           = scalar, S16,  204, "°F", 0.1, 0
   egt11           = scalar, S16,  206, "°F", 0.1, 0
   egt12           = scalar, S16,  208, "°F", 0.1, 0
#endif
   maf             = scalar, U16,  210, "g/sec", 0.010, 0.0

    sensor09	    = scalar, S16,  212, "",   0.1000, 0.0
    sensor10        = scalar, S16,  214, "",   0.1000, 0.0
    sensor11        = scalar, S16,  216, "",   0.1000, 0.0
    sensor12        = scalar, S16,  218, "",   0.1000, 0.0
    sensor13        = scalar, S16,  220, "",   0.1000, 0.0
    sensor14        = scalar, S16,  222, "",   0.1000, 0.0
    sensor15        = scalar, S16,  224, "",   0.1000, 0.0
    sensor16        = scalar, S16,  226, "",   0.1000, 0.0
    eaeload1         = scalar, S16,  228, "%",  0.1000, 0.0
    afrload1         = scalar, S16,  230, "%",  0.1000, 0.0
    gear            = scalar, U08,  232, "", 1, 0
    status6         = scalar, U08,  233, "", 1.0, 0.0
    rpmdot          = scalar, S16,  234, "rpm/sec", 10, 0
    vss1dot         = scalar, S16,  236, "ms-2", 0.1, 0
    vss2dot         = scalar, S16,  238, "ms-2", 0.1, 0
    accelx          = scalar, S16,  240, "ms-2", 0.001, 0
    accely          = scalar, S16,  242, "ms-2", 0.001, 0
    accelz          = scalar, S16,  244, "ms-2", 0.001, 0
    duty_pwm_a      = scalar, U08,  246, "%", 1, 0
    duty_pwm_b      = scalar, U08,  247, "%", 1, 0
    duty_pwm_c      = scalar, U08,  248, "%", 1, 0
    duty_pwm_d      = scalar, U08,  249, "%", 1, 0
    duty_pwm_e      = scalar, U08,  250, "%", 1, 0
    duty_pwm_f      = scalar, U08,  251, "%", 1, 0
    afr1            = scalar, U08,  252, "AFR", 0.1, 0.0
    afr2            = scalar, U08,  253, "AFR", 0.1, 0.0
    afr3            = scalar, U08,  254, "AFR", 0.1, 0.0
    afr4            = scalar, U08,  255, "AFR", 0.1, 0.0
    afr5            = scalar, U08,  256, "AFR", 0.1, 0.0
    afr6            = scalar, U08,  257, "AFR", 0.1, 0.0
    afr7            = scalar, U08,  258, "AFR", 0.1, 0.0
    afr8            = scalar, U08,  259, "AFR", 0.1, 0.0
    egov1           = scalar, U16,  260, "V",  0.00489, 0.0
    egov2           = scalar, U16,  262, "V",  0.00489, 0.0
    egov3           = scalar, U16,  264, "V",  0.00489, 0.0
    egov4           = scalar, U16,  266, "V",  0.00489, 0.0
    egov5           = scalar, U16,  268, "V",  0.00489, 0.0
    egov6           = scalar, U16,  270, "V",  0.00489, 0.0
    egov7           = scalar, U16,  272, "V",  0.00489, 0.0
    egov8           = scalar, U16,  274, "V",  0.00489, 0.0
    egocor1         = scalar, S16,  276, "%",  0.1000, 0.0
    egocor2         = scalar, S16,  278, "%",  0.1000, 0.0
    egocor3         = scalar, S16,  280, "%",  0.1000, 0.0
    egocor4         = scalar, S16,  282, "%",  0.1000, 0.0
    egocor5         = scalar, S16,  284, "%",  0.1000, 0.0
    egocor6         = scalar, S16,  286, "%",  0.1000, 0.0
    egocor7         = scalar, S16,  288, "%",  0.1000, 0.0
    egocor8         = scalar, S16,  290, "%",  0.1000, 0.0
   stream_level     = scalar, U08,  292,  "us", 1,0
   water_duty       = scalar, U08,  293, "%", 1, 0
   dwell_trl        = scalar, U16,  294, "ms", 0.1000, 0.0

   accDecEnrich     = { accelEnrich + (tpsaccden ? tpsfuelcut : 100)      }, "%"
   time             = { timeNow                                        }, "s"
   rpm100           = { rpm / 100.0                                    }

   altDiv1          = { alternate ? 2 : 1                              }
   altDiv2          = { alternate ? 2 : 1                              }

   cycleTime1       = { 60000.0 / rpm * (2.0-twoStroke)                }, "ms"
   nSquirts1        = { nCylinders/divider                             }
   dutyCycle1       = { 100.0*nSquirts1/altDiv1*pulseWidth1/cycleTime1 }, "%"

   cycleTime2       = { 60000.0 / rpm * (2.0-twoStroke)                }, "ms"
   nSquirts2        = { nCylinders/divider                             }
   dutyCycle2       = { 100.0*nSquirts2/altDiv2*pulseWidth2/cycleTime2 }, "%"

#if   NARROW_BAND_EGO
   egoVoltage = { egoV }, "V"      ; For LED bars...
   afr1err = { egov1 - afrtgt1 }
   afr2err = { egov2 - afrtgt2 }
#elif LAMBDA
   lambda1          = { afr1 / stoich }, "Lambda"
   lambda2          = { afr2 / stoich }, "Lambda2"
   lambda3          = { afr3 / stoich }, "Lambda3"
   lambda4          = { afr4 / stoich }, "Lambda4"
   lambda5          = { afr5 / stoich }, "Lambda5"
   lambda6          = { afr6 / stoich }, "Lambda6"
   lambda7          = { afr7 / stoich }, "Lambda7"
   lambda8          = { afr8 / stoich }, "Lambda8"
   egoVoltage = { lambda1          }, "Lambda" ; For LED bars...
   afrtgt1 = { afrtgt1raw / stoich * (egoType == 2) } ; return zero if NB because of mixed units with target in volts
   afrtgt2 = { afrtgt2raw / stoich * (egoType == 2) }
   afr1err = { (afr1 - afrtgt1raw) / stoich * (egoType == 2)}
   afr2err = { (afr2 - afrtgt2raw) / stoich * (egoType == 2)}
#else
   egoVoltage = { afr1             }, "AFR"    ; For LED bars...
   afr1err = { afr1 - afrtgt1 }
   afr2err = { afr2 - afrtgt2 }
#endif
;flex fuel sensor
   fuelComposition  = { (fuelCorrection - 100)*1.587 }, % ; works with default sensor values

;    pwm_opt_load_a    = bits, U08, 838, [5:7], "INVALID", "MAP", "% baro", "TPS", "MAFMAP", "INVALID", "INVALID", "INVALID" ; ITB hidden
; Seems this doesn't work
    pwma_load = { (map * (pwm_opt_load_a == 1)) + (map*100/(barometer+(100*(barometer==0))) * (pwm_opt_load_a == 2)) + (tps * (pwm_opt_load_a == 3)) + (mafmap * (pwm_opt_load_a == 4)) + (coolant * (pwm_opt_load_a == 5)) + (mat * (pwm_opt_load_a == 7))}
    pwmb_load = { (map * (pwm_opt_load_b == 1)) + (map*100/(barometer+(100*(barometer==0))) * (pwm_opt_load_b == 2)) + (tps * (pwm_opt_load_b == 3)) + (mafmap * (pwm_opt_load_b == 4)) + (coolant * (pwm_opt_load_b == 5)) + (mat * (pwm_opt_load_b == 7))}
    pwmc_load = { (map * (pwm_opt_load_c == 1)) + (map*100/(barometer+(100*(barometer==0))) * (pwm_opt_load_c == 2)) + (tps * (pwm_opt_load_c == 3)) + (mafmap * (pwm_opt_load_c == 4)) + (coolant * (pwm_opt_load_c == 5)) + (mat * (pwm_opt_load_c == 7))}
    pwmd_load = { (map * (pwm_opt_load_d == 1)) + (map*100/(barometer+(100*(barometer==0))) * (pwm_opt_load_d == 2)) + (tps * (pwm_opt_load_d == 3)) + (mafmap * (pwm_opt_load_d == 4)) + (coolant * (pwm_opt_load_d == 5)) + (mat * (pwm_opt_load_d == 7))}
    pwme_load = { (map * (pwm_opt_load_e == 1)) + (map*100/(barometer+(100*(barometer==0))) * (pwm_opt_load_e == 2)) + (tps * (pwm_opt_load_e == 3)) + (mafmap * (pwm_opt_load_e == 4)) + (coolant * (pwm_opt_load_e == 5)) + (mat * (pwm_opt_load_e == 7))}
    pwmf_load = { (map * (pwm_opt_load_f == 1)) + (map*100/(barometer+(100*(barometer==0))) * (pwm_opt_load_f == 2)) + (tps * (pwm_opt_load_f == 3)) + (mafmap * (pwm_opt_load_f == 4)) + (coolant * (pwm_opt_load_f == 5)) + (mat * (pwm_opt_load_f == 7))}

    df_temp = { 0 }
    df_press = { 0 }
    boostbar = { (map - barometer) / 101.33}
    boostpsig = { (map - barometer) * 0.1450}
;-------------------------------------------------------------------------------
;--  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.                       --
;--   Type    - Data type of output, converted before writing.                --
;--   Format  - C-style output format of data.                                --

[Datalog]
   ;       Channel          Label          Type    Format
   ;       --------------   ----------     -----   ------
   entry = time,            "Time",        float,  "%.3f"
   entry = seconds,         "SecL",        int,    "%d"
   entry = rpm,             "RPM",         int,    "%d"
   entry = map,             "MAP",         float,  "%.1f"
   entry = throttle,        "TP",          float,  "%.1f"
   entry = maf,             "MAF",         float,  "%.01f", { algorithm == 5 || algorithm2 == 5 }
   entry = mafmap,          "MAFMAP",      float,  "%.1f", { algorithm == 5 || algorithm2 == 5 }
#if   NARROW_BAND_EGO
   entry = egov1     ,      "O2",          float,  "%.3f", {egonum > 0}
   entry = egov2     ,      "O2 #2",       float,  "%.3f", {egonum > 1}
   entry = egov3     ,      "O2 #3",       float,  "%.3f", {egonum > 2}
   entry = egov4     ,      "O2 #4",       float,  "%.3f", {egonum > 3}
   entry = egov5     ,      "O2 #5",       float,  "%.3f", {egonum > 4}
   entry = egov6     ,      "O2 #6",       float,  "%.3f", {egonum > 5}
   entry = egov7     ,      "O2 #7",       float,  "%.3f", {egonum > 6}
   entry = egov8     ,      "O2 #8",       float,  "%.3f", {egonum > 7}
#elif LAMBDA
   entry = lambda1,         "Lambda",      float,  "%.3f", {egonum > 0}
   entry = lambda2,         "Lambda2",     float,  "%.3f", {egonum > 1}
   entry = lambda3,         "Lambda3",     float,  "%.3f", {egonum > 2}
   entry = lambda4,         "Lambda4",     float,  "%.3f", {egonum > 3}
   entry = lambda5,         "Lambda5",     float,  "%.3f", {egonum > 4}
   entry = lambda6,         "Lambda6",     float,  "%.3f", {egonum > 5}
   entry = lambda7,         "Lambda7",     float,  "%.3f", {egonum > 6}
   entry = lambda8,         "Lambda8",     float,  "%.3f", {egonum > 7}
#else
   entry = afr1,            "AFR",         float,  "%.2f", {egonum > 0}
   entry = afr2,            "AFR2",        float,  "%.2f", {egonum > 1}
   entry = afr3,            "AFR3",        float,  "%.2f", {egonum > 2}
   entry = afr4,            "AFR4",        float,  "%.2f", {egonum > 3}
   entry = afr5,            "AFR5",        float,  "%.2f", {egonum > 4}
   entry = afr6,            "AFR6",        float,  "%.2f", {egonum > 5}
   entry = afr7,            "AFR7",        float,  "%.2f", {egonum > 6}
   entry = afr8,            "AFR8",        float,  "%.2f", {egonum > 7}
#endif
   entry = mat,             "MAT",         float,  "%.1f"
   entry = coolant,         "CLT",         float,  "%.1f"
   entry = engine,          "Engine",      int,    "%d"
   entry = batteryVoltage,  "Batt V",      float,  "%.1f"

   entry = egocor1,         "egocor Gego1",        int,    "%.1f"
   entry = egocor2,         "egocor Gego2",        int,    "%.1f", {egonum > 1}
   entry = egocor3,         "egocor Gego3",        int,    "%.1f", {egonum > 2}
   entry = egocor4,         "egocor Gego4",        int,    "%.1f", {egonum > 3}
   entry = egocor5,         "egocor Gego5",        int,    "%.1f", {egonum > 4}
   entry = egocor6,         "egocor Gego6",        int,    "%.1f", {egonum > 5}
   entry = egocor7,         "egocor Gego7",        int,    "%.1f", {egonum > 6}
   entry = egocor8,         "egocor Gego8",        int,    "%.1f", {egonum > 7}
   entry = airCorrection,   "Gair",        int,    "%.1f"
   entry = warmupEnrich,    "Gwarm",       int,    "%d"
   entry = baroCorrection,  "Gbaro",       int,    "%.1f"
   entry = gammaEnrich,     "Gammae",      int,    "%d"
   entry = accDecEnrich,    "TPSacc",      int,    "%d"

   entry = veCurr1,         "Gve",         int,    "%.1f"
   entry = pulseWidth1,     "PW",          float,  "%.3f"
   entry = dutyCycle1,      "DutyCycle1",  float,  "%.1f"

   entry = veCurr2,         "Gve2",        int,    "%.1f"
   entry = pulseWidth2,     "PW2",         float,  "%.3f"
   entry = dutyCycle2,      "DutyCycle2",  float,  "%.1f"

   entry = pwseq1,          "Seq PW1",      float,  "%.3f", { sequential }
   entry = pwseq2,          "Seq PW2",      float,  "%.3f", { sequential }
   entry = pwseq3,          "Seq PW3",      float,  "%.3f", { sequential }
   entry = pwseq4,          "Seq PW4",      float,  "%.3f", { sequential }
   entry = pwseq5,          "Seq PW5",      float,  "%.3f", { sequential }
   entry = pwseq6,          "Seq PW6",      float,  "%.3f", { sequential }
   entry = pwseq7,          "Seq PW7",      float,  "%.3f", { sequential }
   entry = pwseq8,          "Seq PW8",      float,  "%.3f", { sequential }

   entry = advance,         "SparkAdv",    float,  "%.1f"
   entry = knockRetard,     "knockRet",    float,  "%.1f"
   entry = coldAdvDeg,      "ColdAdv",     float,  "%.1f"
   entry = dwell,           "Dwell",       float,  "%.2f"

   entry = iacstep,         "IACstep",     int,    "%d"
   entry = idleDC, "PWM Idle Duty", float, "%.1f"
   entry = boostduty,  "Boost Duty", int, "%d", { boost_ctl_settings_on }

#if NARROW_BAND_EGO
   entry = afrtgt1,    "EgoV 1 Target", float, "%.1f"
   entry = afrtgt2,    "EgoV 2 Target", float, "%.1f"
   entry = afr1err,    "EgoV 1 Error", float, "%.1f"
   entry = afr2err,    "EgoV 2 Error", float, "%.1f"
#elif LAMBDA
   entry = afrtgt1,    "Lambda 1 Target", float, "%.1f"
   entry = afrtgt2,    "Lambda 2 Target", float, "%.1f"
   entry = afr1err,    "Lambda 1 Error", float, "%.1f"
   entry = afr2err,    "Lambda 2 Error", float, "%.1f"
#else
   entry = afrtgt1,    "AFR 1 Target", float, "%.1f"
   entry = afrtgt2,    "AFR 2 Target", float, "%.1f"
   entry = afr1err,    "AFR 1 Error", float, "%.1f"
   entry = afr2err,    "AFR 2 Error", float, "%.1f"
#endif

   entry = tpsDOT,          "tpsDOT",      float,  "%.1f"
   entry = mapDOT,          "mapDOT",      float,  "%.1f"
   entry = rpmdot,        "rpmdot", int, "%d"

;  entry = deltaT,          "deltaT",      float,  "%.0f" - never used
   entry = wallfuel1,        "WallFuel1",    int,    "%d"
   entry = wallfuel2,        "WallFuel2",   int,     "%d"
   entry = EAEFuelCorr1,     "EAE1 %",       int,    "%d"
   entry = EAEFuelCorr2,     "EAE2 %",      int, "%d"
   entry = fuelload,         "Load",        float,  "%.1f"
   entry = fuelload2,        "Secondary Load", float, "%.1f"
   entry = ignload,          "Ign load",   float,    "%.1f"
   entry = ignload2,         "Secondary Ign Load", float, "%.1f"
   entry = eaeload1,          "EAE load", float, "%.1f"
   entry = afrload1,          "AFR load", float, "%.1f"

   entry = egt1,         "EGT 1 temp", int, "%d", {egt_num > 0}
   entry = egt2,         "EGT 2 temp", int, "%d", {egt_num > 1}
   entry = egt3,         "EGT 3 temp", int, "%d", {egt_num > 2}
   entry = egt4,         "EGT 4 temp", int, "%d", {egt_num > 3}
   entry = egt5,         "EGT 5 temp", int, "%d", {egt_num > 4}
   entry = egt6,         "EGT 6 temp", int, "%d", {egt_num > 5}
   entry = egt7,         "EGT 7 temp", int, "%d", {egt_num > 6}
   entry = egt8,         "EGT 8 temp", int, "%d", {egt_num > 7}
   entry = egt9,         "EGT 9 temp", int, "%d", {egt_num > 8}
   entry = egt10,        "EGT 10 temp", int, "%d", {egt_num > 9}
   entry = egt11,        "EGT 11 temp", int, "%d", {egt_num > 10}
   entry = egt12,        "EGT 12 temp", int, "%d", {egt_num > 11}

   entry = sensor01, "sensor01", float, "%.1f", { sensor01_source }
   entry = sensor02, "sensor02", float, "%.1f", { sensor02_source }
   entry = sensor03, "sensor03", float, "%.1f", { sensor03_source }
   entry = sensor04, "sensor04", float, "%.1f", { sensor04_source }
   entry = sensor05, "sensor05", float, "%.1f", { sensor05_source }
   entry = sensor06, "sensor06", float, "%.1f", { sensor06_source }
   entry = sensor07, "sensor07", float, "%.1f", { sensor07_source }
   entry = sensor08, "sensor08", float, "%.1f", { sensor08_source }
   entry = sensor09, "sensor09", float, "%.1f", { sensor09_source }
   entry = sensor10, "sensor10", float, "%.1f", { sensor10_source }
   entry = sensor11, "sensor11", float, "%.1f", { sensor11_source }
   entry = sensor12, "sensor12", float, "%.1f", { sensor12_source }
   entry = sensor13, "sensor13", float, "%.1f", { sensor13_source }
   entry = sensor14, "sensor14", float, "%.1f", { sensor14_source }
   entry = sensor15, "sensor15", float, "%.1f", { sensor15_source }
   entry = sensor16, "sensor16", float, "%.1f", { sensor16_source }

   entry = canpwmin0, "canpwmin0", int, "%d", { enable_pollPWM }
   entry = canpwmin1, "canpwmin1", int, "%d", { enable_pollPWM }
   entry = canpwmin2, "canpwmin2", int, "%d", { enable_pollPWM }
   entry = canpwmin3, "canpwmin3", int, "%d", { enable_pollPWM }

   entry = timing_err, "timing err%", float, "%.1f"
   entry = synccnt, "Lost sync count", int, "%d"
   entry = syncreason, "Lost sync reason", int, "%d"

#if MPH
   entry = vss1,             "mph 1",         int,  "%.1f", {vss_opt1 || vss1_an}
   entry = vss2,             "mph 2",         int,  "%.1f", {vss_opt2 || vss2_an}
#else
   entry = vss1,             "kph 1",         int,  "%.1f", {vss_opt1 || vss1_an}
   entry = vss2,             "kph 2",         int,  "%.1f", {vss_opt2 || vss2_an}
#endif
   entry = ss1,             "Shaft rpm 1",         int,  "%d", { ss_opt1 }
   entry = ss2,             "Shaft rpm 2",         int,  "%d", { ss_opt2 }
   entry = n2o_addfuel,     "Nitrous added fuel",  float, "%.3f", { N2Oopt_2 }
   entry = n2o_retard,      "Nitrous timing retard by", float, "%.1f", { N2Oopt_2 }
   entry = nitrous1_duty,   "Nitrous 1 duty", int, "%d", { N2Oopt_2 }
   entry = nitrous2_duty,   "Nitrous 2 duty", int, "%d", { N2Oopt_2 }
   entry = nitrous_timer,   "Nitrous Timer", float, "%.3f", { N2Oopt_2 }
   entry = sd_filenum,      "SDcard file number", int, "%d", { log_style_on }
   entry = sd_phase,      "SDcard phase", int, "%d", { log_style_on }
   entry = sd_error,      "SDcard error", int, "%d", { log_style_on }
   entry = gear,          "Gear", int, "%d", { gear_method }
   entry = vss1dot,       "vss1dot", float, "%.1f", {vss_opt1 || vss1_an}
   entry = vss2dot,       "vss2dot", float, "%.1f", {vss_opt2 || vss2_an}
   entry = accelx,        "accel X", float, "%.2f", { accXport }
   entry = accely,        "accel Y", float, "%.2f", { accYport }
   entry = accelz,        "accel Z", float, "%.2f", { accZport }
   entry = duty_pwm_a,   "Generic PWM A duty", int, "%d", { pwm_opt_on_a }
   entry = duty_pwm_b,   "Generic PWM B duty", int, "%d", { pwm_opt_on_b }
   entry = duty_pwm_c,   "Generic PWM C duty", int, "%d", { pwm_opt_on_c }
   entry = duty_pwm_d,   "Generic PWM D duty", int, "%d", { pwm_opt_on_d }
   entry = duty_pwm_e,   "Generic PWM E duty", int, "%d", { pwm_opt_on_e }
   entry = duty_pwm_f,   "Generic PWM F duty", int, "%d", { pwm_opt_on_f }
   entry = status1, "status1", int, "%d"
   entry = status2, "status2", int, "%d"
   entry = status3, "status3", int, "%d"
   entry = status4, "status4", int, "%d"
   entry = status5, "status5", int, "%d"

#if INTERNAL_LOG_FIELDS
   ;internalLogField = fieldName, class, type, offset, units, scale, translate, digits
   internalLogField = "Tooth number",       scalar, U08, 1024, "#", 1.0, 0.0, 0
   internalLogField = "Synch",              scalar, U08, 1025, "", 1, 0, 0
   internalLogField = "Cumulative cycles",  scalar, U16, 1026, "#", 1.0, 0.0, 0
   internalLogField = "Cumulative teeth",   scalar, U16, 1027, "#", 1.0, 0.0, 0
   internalLogField = "coilsel",            scalar, U08, 1028, "", 1, 0, 0
   internalLogField = "dwellsel",           scalar, U08, 1029, "", 1, 0, 0
   internalLogField = "PTM",                scalar, U08, 1030, "", 1, 0, 0
   internalLogField = "PTJ",                scalar, U08, 1031, "", 1, 0, 0
   internalLogField = "PTT",                scalar, U08, 1032, "", 1, 0, 0
   internalLogField = "PORTA",              scalar, U08, 1033, "", 1, 0, 0
   internalLogField = "PORTB",              scalar, U08, 1034, "", 1, 0, 0
   internalLogField = "next_dwell.tooth",   scalar, U08, 1035, "", 1, 0, 0
   internalLogField = "next_spark.tooth",   scalar, U08, 1036, "", 1, 0, 0
   internalLogField = "next_inj0.tooth",    scalar, U08, 1037, "", 1, 0, 0
   internalLogField = "next_inj1.tooth",    scalar, U08, 1038, "", 1, 0, 0
   internalLogField = "next_inj2.tooth",    scalar, U08, 1039, "", 1, 0, 0
   internalLogField = "next_inj3.tooth",    scalar, U08, 1040, "", 1, 0, 0
   internalLogField = "next_inj4.tooth",    scalar, U08, 1041, "", 1, 0, 0
   internalLogField = "next_inj5.tooth",    scalar, U08, 1042, "", 1, 0, 0
   internalLogField = "next_inj6.tooth",    scalar, U08, 1043, "", 1, 0, 0
   internalLogField = "next_inj7.tooth",    scalar, U08, 1044, "", 1, 0, 0
   internalLogField = "fuel_ovflo",         scalar, U08, 1046, "", 1, 0, 0
   internalLogField = "wheeldec_ovflo",     scalar, U08, 1047, "", 1, 0, 0
   internalLogField = "next_dwell.time32",  scalar, U32, 1048, "", 1, 0, 0
   internalLogField = "next_spark.time32",  scalar, U32, 1049, "", 1, 0, 0
   internalLogField = "TIE",                scalar, U08, 1050, "", 1, 0, 0
   internalLogField = "TFLG1",              scalar, U08, 1051, "", 1, 0, 0
   internalLogField = "TIMTIE",             scalar, U08, 1052, "", 1, 0, 0
   internalLogField = "TIMTFLG1",           scalar, U08, 1053, "", 1, 0, 0
   internalLogField = "next_inj[0].time",   scalar, U16, 1054, "", 1, 0, 0
   internalLogField = "next_inj[1].time",   scalar, U16, 1055, "", 1, 0, 0
   internalLogField = "next_inj[2].time",   scalar, U16, 1056, "", 1, 0, 0
   internalLogField = "next_inj[3].time",   scalar, U16, 1057, "", 1, 0, 0
   internalLogField = "next_inj[4].time",   scalar, U16, 1058, "", 1, 0, 0
   internalLogField = "next_inj[5].time",   scalar, U16, 1059, "", 1, 0, 0
   internalLogField = "next_inj[6].time",   scalar, U16, 1060, "", 1, 0, 0
   internalLogField = "next_inj[7].time",   scalar, U16, 1061, "", 1, 0, 0
   internalLogField = "XGSEM",              scalar, U08, 1062, "", 1, 0, 0
   internalLogField = "pwcalc1",            scalar, U16, 1063, "", 1, 0, 0
   internalLogField = "pwcalc2",            scalar, U16, 1064, "", 1, 0, 0
   internalLogField = "next_map_start_event.tooth", scalar, U08, 1065, "", 1, 0, 0
   internalLogField = "XGCHID",             scalar, U08, 1066, "", 1, 0, 0
   internalLogField = "XGSWT",              scalar, U08, 1067, "", 1, 0, 0
   internalLogField = "xgate_deadman",      scalar, U08, 1068, "", 1, 0, 0
   internalLogField = "XGMCTL",             scalar, U08, 1069, "", 1, 0, 0
   internalLogField = "xgpc",               scalar, U16, 1070, "", 1, 0, 0
   internalLogField = "xgswe_count",        scalar, U08, 1071, "", 1, 0, 0
   internalLogField = "next_fuel",          scalar, U08, 1072, "", 1, 0, 0
   internalLogField = "inj1_cnt",           scalar, U16, 1073, "", 1, 0, 0
   internalLogField = "inj2_cnt",           scalar, U16, 1074, "", 1, 0, 0
   internalLogField = "inj3_cnt",           scalar, U16, 1075, "", 1, 0, 0
   internalLogField = "inj4_cnt",           scalar, U16, 1076, "", 1, 0, 0
   internalLogField = "inj5_cnt",           scalar, U16, 1077, "", 1, 0, 0
   internalLogField = "inj6_cnt",           scalar, U16, 1078, "", 1, 0, 0
   internalLogField = "inj7_cnt",           scalar, U16, 1079, "", 1, 0, 0
   internalLogField = "inj8_cnt",           scalar, U16, 1080, "", 1, 0, 0
#endif
;-------------------------------------------------------------------------------
