;-------------------------------------------------------------------------------
; $Id: ms2extra.ini,v 1.186 2016/03/01 18:51:39 jsmcortina Exp $

; configuration defines
;Normally these next lines should be UNset
;Use TunerStudio to fetch and view tooth/trigger logs

; This ini file is copyright 2006,2007,2008,2009,2010,2011,2012,2013 James Murray and Kenneth Culver.
; It is only to be used with a genuine B&G Megasquirt-2, Microsquirt or Microsquirt-module based devices.

;This enables the "full" CAN/serial commands so this INI can be used anywhere on the CAN network except a direct serial connection.
#set CAN_COMMANDS
#unset EGTFULL ; Defaults to 0-1000 degC change to set to use 0-1250 if you made the alternate circuit
#unset INI_VERSION_2 ; this is set by TunerStudio, but needs to be unset for Megatune to work
#unset PORT_STATUS
#unset OUTMSG_EDITING  ; Allow editing of the outmsg data

#if INI_VERSION_2
; ok
#else
#error Megatune cannot be used with this version of MS2/Extra - please upgrade to TunerStudio 2.x or later.
#endif

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

#if CAN_COMMANDS
   versionInfo    = "r\$tsCanId\x0e\x00\x00\x00\x3c"  ; Title bar, this is the code version.
   queryCommand   = "r\$tsCanId\x0f\x00\x00\x00\x14"  ; Verify against signature.
#else
   versionInfo    = "S"  ; Put this in the title bar.
   queryCommand   = "Q"  ; Verify against signature.
#endif
    ; leave last letter alone
   signature      = "MS2Extra comms342a2" ; MS2
                   ; 123456789.123456789.

[TunerStudio]
   iniSpecVersion = 3.24
   helpManualDownloadRoot = "http://www.msextra.com/doc/pdf/"

;----------------------------------------------------------------------------
; 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 II.
;
; 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     = "w\$tsCanId%2i%2o%2c%v" ; might work now :)
    tableBlockingFactor = 256 ;
    
    referenceTable = mafTableBurner, "Calibrate MAF Table..."
        tableIdentifier = 003, "MAF Table"
        adcCount 	= 1024 	; length of the table
        bytesPerAdc 	= 2 	; using words
        scale		= 1 ; scale before sending to controller
        tableGenerator  = fileBrowseGenerator, "Browse for Inc File"
    	solutionsLabel	= "MAF Sensor"
    	solution	= "Default", 	{ table(adcValue, "maffactor.inc") }
    	solution	= "Ford V8", 	{ table(adcValue, "maffactor.inc") }
    	solution	= "Ford Lightning MAF", 	{ table(adcValue, "maffactor_1L3F_Lightning.inc") }
		solution	= "Infiniti Q45 MAF", 		{ table(adcValue, "maffactor_Q45.inc") }
		solution	= "GM LT1/LS1/LS2 MAF", 	{ table(adcValue, "maffactor_lsx.inc") }
        solution    = "Custom inc File",    fileBrowseGenerator

[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"
    settingOption = LAMBDA, "Lambda"
    settingOption = DEFAULT, "WideBand" ; DEFAULT will be over looked and this will fall into the #else block of the statement.

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

[PcVariables]
   ; valid types: boolean, double, int, list
   ;  
   ; no offset as they are local variables. 
   ; entry format the same as Constants, except there is no offset.
   ; arrays are not yet supported. 
   ; name = class,  type,    shape,  units,       scale, translate,    lo,      hi, digits
   ; name = type, min, max;
   ;
   ; type List: value will be index.
   
   ;tsCanId      = bits,   U08,   [0:3] ; The short one, just numbers
    tsCanId       = bits,   U08,   [0:3], "CAN ID 0", "CAN ID 1", "CAN ID 2", "CAN ID 3", "CAN ID 4", "CAN ID 5", "CAN ID 6", "CAN ID 7", "CAN ID 8", "CAN ID 9", "CAN ID 10","CAN ID 11","CAN ID 12","CAN ID 13","CAN ID 14","INVALID"
;    testScale     = scalar, U16,    "%",   0.001,   0,    0,    600,   4
;    testTransform = scalar, U08,    "#",     0.1,   0,    0,   25.5,   1
    rpmhigh = scalar, U16, "rpm", 1, 0, 0, 30000, 0
    rpmwarn = scalar, U16, "rpm", 1, 0, 0, 30000, 0
    rpmdang = scalar, U16, "rpm", 1, 0, 0, 30000, 0
    loadhigh = scalar, U16, "", 1, 0, 100, 1000, 0
    clt_exp = bits, U08, [0:0], "Normal", "Expanded"
    algorithmUnits = bits,    U08,   [0:3], "%", "kPa", "%Baro", "% TPS", "MAFload", "MAFload", "ITB", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" ; *

[LoggerDefinition]
    ; Add Standard Loggers. Supported types: stdMS2Composite, stdMS3Composite, stdMS2SyncComposite, stdMS3SyncComposite, stdMS2Tooth, stdMS3Tooth, stdMS2Trigger, stdMS3Trigger
    stdLogger = stdMS2Composite
    stdLogger = stdMS2SyncComposite
    stdLogger = stdMS2Tooth
    stdLogger = stdMS2Trigger

    ;loggerDef = uniqueName, Display Name, type
    loggerDef = mapLogger, "MAP Logger", csv
       dataReadCommand = "r\\x00\\xf4\\x00\\x00\\x04\\x00" ; standard TS command format
       dataReadTimeout = 10000 ; time in ms
       dataReadyCondition = { ( status3 & 0x02 ) == 0x02 }
       ;dataLength = 1024 ; in bytes, including headers, footers and data //not used..
       ;recordDef = headerLen. footerLen, recordLen
       recordDef =   0,   0,   2; in bytes, the recordLen is for each record, currently limited to 4 bytes
       
       ;recordField = Name,          HeaderName, startBit, bitCount, scale, units, updateCondition
       recordField = nonMap,           "Not MAP",       15, 1, 1.0, "Flag"
       recordField = mapWindow,        "MAPwindow",     14, 1, 1.0, "Flag", { !nonMap } 
       recordField = rpmPrint,         "isRPM",         14, 1, 1.0, "Flag", { nonMap } 
       recordField = mapSensor,        "Sensor",        10, 3, 1.0, "#",    { !nonMap }    
       recordField = mapAdc,           "MAP ADC",       0, 10, 1.0, "ADC",  { !nonMap }    
       recordField = sampleRpm,        "RPM",           0, 14, 1.0, "rpm",  { nonMap && rpmPrint }    
       recordField = toothno,          "Tooth No",      0, 13, 1, "tooth",  { nonMap && !rpmPrint } 
       
       ;calcField  = name,        HeaderName,    units, expression
       calcField   = mapValue,         "MAP",   "kPa",  { map0 + (mapmax - map0) * mapAdc/1023 }

    loggerDef = mafLogger, "MAF Logger", csv
       dataReadCommand = "r\\x00\\xf5\\x00\\x00\\x04\\x00" ; standard TS command format
       dataReadTimeout = 10000 ; time in ms
       dataReadyCondition = { ( status3 & 0x02 ) == 0x02 }
       ;dataLength = 1024 ; in bytes, including headers, footers and data //not used..
       
       ;recordDef = headerLen. footerLen, recordLen
       recordDef =   0,   0,   2; in bytes, the recordLen is for each record, currently limited to 4 bytes
       
       ;recordField = Name,          HeaderName, startBit, bitCount, scale, units, updateCondition
       recordField = nonMaf,           "Not MAF",       15, 1, 1.0, "Flag"
       recordField = mapWindow,        "MAPwindow",     14, 1, 1.0, "Flag", { !nonMaf } 
       recordField = rpmPrint,         "isRPM",         14, 1, 1.0, "Flag", { nonMaf } 
       recordField = mapSensor,        "Sensor",        10, 3, 1.0, "#",    { !nonMaf }    
       recordField = mapAdc,           "MAF ADC",       0, 10, 1.0, "ADC",  { !nonMaf }    
       recordField = sampleRpm,        "RPM",           0, 14, 1.0, "rpm",  { nonMaf && rpmPrint }    
       recordField = crankAngle,       "CrankAngle",    0, 13, 0.1, "deg",  { nonMaf && !rpmPrint }

    loggerDef = mafLogger, "Engine Logger", csv
       dataReadCommand = "r\\x00\\xf6\\x00\\x00\\x04\\x00" ; standard TS command format
       dataReadTimeout = 10000 ; time in ms
       dataReadyCondition = { ( status3 & 0x02 ) == 0x02 }
       ;dataLength = 1024 ; in bytes, including headers, footers and data //not used..
       
       ;recordDef = headerLen. footerLen, recordLen
       recordDef =   0,   0,   2; in bytes, the recordLen is for each record, currently limited to 4 bytes
       
       ;recordField = Name,          HeaderName, startBit, bitCount, scale, units, updateCondition
       recordField = PT7,               "PTT7",          15,  1, 1,   ""
       recordField = PT6,               "PTT6",          14,  1, 1,   ""
       recordField = PT5,               "PTT5",          13,  1, 1,   ""
       recordField = PT4,               "PTT4",          12,  1, 1,   ""
       recordField = PT3,               "PTT3",          11,  1, 1,   ""
       recordField = PT2,               "PTT2",          10,  1, 1,   ""
       recordField = PT1,               "PTT1",          9,  1, 1,   ""
       recordField = PT0,               "PTT0",          8,  1, 1,   ""

       recordField = PTAD7,             "PTAD7",        7,  1, 1,   ""
       recordField = PTAD6,             "PTAD6",        6,  1, 1,   ""
       recordField = PM5,               "PTM5",         5,  1, 1,   ""
       recordField = PM4,               "PTM4",         4,  1, 1,   ""
       recordField = PM3,               "PTM3",         3,  1, 1,   ""
       recordField = PA0,               "PTA0",         0,  1, 1,   ""

    loggerDef = mafLogger, "Engine Logger + MAP", csv
       dataReadCommand = "r\\x00\\xf7\\x00\\x00\\x04\\x00" ; standard TS command format
       dataReadTimeout = 10000 ; time in ms
       dataReadyCondition = { ( status3 & 0x02 ) == 0x02 }
       ;dataLength = 1024 ; in bytes, including headers, footers and data //not used..
       
       ;recordDef = headerLen. footerLen, recordLen
       recordDef =   0,   0,   3; in bytes, the recordLen is for each record, currently limited to 4 bytes
       
       ;recordField = Name,          HeaderName, startBit, bitCount, scale, units, updateCondition

       recordField = mapAdc,           "MAP ADC",       16, 8, 4.0, "ADC" ; scaled to 8 bits    

       recordField = PT7,               "PTT7",          15,  1, 1,   ""
       recordField = PT6,               "PTT6",          14,  1, 1,   ""
       recordField = PT5,               "PTT5",          13,  1, 1,   ""
       recordField = PT4,               "PTT4",          12,  1, 1,   ""
       recordField = PT3,               "PTT3",          11,  1, 1,   ""
       recordField = PT2,               "PTT2",          10,  1, 1,   ""
       recordField = PT1,               "PTT1",          9,  1, 1,   ""
       recordField = PT0,               "PTT0",          8,  1, 1,   ""

       recordField = PTAD7,             "PTAD7",        7,  1, 1,   ""
       recordField = PTAD6,             "PTAD6",        6,  1, 1,   ""
       recordField = PM5,               "PTM5",         5,  1, 1,   ""
       recordField = PM4,               "PTM4",         4,  1, 1,   ""
       recordField = PM3,               "PTM3",         3,  1, 1,   ""
       recordField = PA0,               "PTA0",         0,  1, 1,   ""

       calcField   = mapValue,         "MAP",   "kPa",  { map0 + (mapmax - map0) * mapAdc/1023 }

    loggerDef = mafLogger, "Engine Logger + MAF", csv
       dataReadCommand = "r\\x00\\xf8\\x00\\x00\\x04\\x00" ; standard TS command format
       dataReadTimeout = 10000 ; time in ms
       dataReadyCondition = { ( status3 & 0x02 ) == 0x02 }
       ;dataLength = 1024 ; in bytes, including headers, footers and data //not used..
       
       ;recordDef = headerLen. footerLen, recordLen
       recordDef =   0,   0,   3; in bytes, the recordLen is for each record, currently limited to 4 bytes
       
       ;recordField = Name,          HeaderName, startBit, bitCount, scale, units, updateCondition

       recordField = mafAdc,           "MAF ADC",       16, 8, 4.0, "ADC" ; scaled to 8 bits    

       recordField = PT7,               "PTT7",          15,  1, 1,   ""
       recordField = PT6,               "PTT6",          14,  1, 1,   ""
       recordField = PT5,               "PTT5",          13,  1, 1,   ""
       recordField = PT4,               "PTT4",          12,  1, 1,   ""
       recordField = PT3,               "PTT3",          11,  1, 1,   ""
       recordField = PT2,               "PTT2",          10,  1, 1,   ""
       recordField = PT1,               "PTT1",          9,  1, 1,   ""
       recordField = PT0,               "PTT0",          8,  1, 1,   ""

       recordField = PTAD7,             "PTAD7",        7,  1, 1,   ""
       recordField = PTAD6,             "PTAD6",        6,  1, 1,   ""
       recordField = PM5,               "PTM5",         5,  1, 1,   ""
       recordField = PM4,               "PTM4",         4,  1, 1,   ""
       recordField = PM3,               "PTM3",         3,  1, 1,   ""
       recordField = PA0,               "PTA0",         0,  1, 1,   ""

[Constants]

   ;----------------------------------------------------------------------------
   ; Constants Definition
   ; --------------------
   ;
   ; Scalar Values
   ; -------------
   ; The scaling and translation values are used as follows:
   ;    msValue   = userValue / scale - translate
   ;    userValue = (msValue + translate) * scale
   ;
   ; 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).
   ;
   ;----------------------------------------------------------------------------
   pageActivationDelay = 10 ; Milliseconds delay after burn command.
   blockReadTimeout    = 400 ; Milliseconds total timeout for reading page.
;   writeBlocks = 	on
   tsWriteBlocks = 	on
   interWriteDelay = 	1

; note page 6, 0xf0 = tooth logger
;      page 7, 0xf1 = trigger logger

   endianness          = big
   nPages              = 7
   pageSize            = 1024,                1024,                1024,                1024,                1024,                1024,			1024	
   pageIdentifier      = "\$tsCanId\x04",          "\$tsCanId\x05",          "\$tsCanId\x0a",          "\$tsCanId\x08",	         "\$tsCanId\x09",	      "\$tsCanId\x0b",	      "\$tsCanId\x0c"
   burnCommand         = "b\$tsCanId\x04",         "b\$tsCanId\x05",         "b\$tsCanId\x0a",         "b\$tsCanId\x08",         "b\$tsCanId\x09",         "b\$tsCanId\x0b",         "b\$tsCanId\x0c"
   pageReadCommand     = "r\$tsCanId\x04%2o%2c",   "r\$tsCanId\x05%2o%2c",   "r\$tsCanId\x0a%2o%2c",   "r\$tsCanId\x08%2o%2c",   "r\$tsCanId\x09%2o%2c",   "r\$tsCanId\x0b%2o%2c",   "r\$tsCanId\x0c%2o%2c"
   pageValueWrite      = "w\$tsCanId\x04%2o%2c%v", "w\$tsCanId\x05%2o%2c%v", "w\$tsCanId\x0a%2o%2c%v", "w\$tsCanId\x08%2o%2c%v", "w\$tsCanId\x09%2o%2c%v", "w\$tsCanId\x0b%2o%2c%v", "w\$tsCanId\x0c%2o%2c%v"
   pageChunkWrite      = "w\$tsCanId\x04%2o%2c%v", "w\$tsCanId\x05%2o%2c%v", "w\$tsCanId\x0a%2o%2c%v", "w\$tsCanId\x08%2o%2c%v", "w\$tsCanId\x09%2o%2c%v", "w\$tsCanId\x0b%2o%2c%v", "w\$tsCanId\x0c%2o%2c%v"
   crc32CheckCommand   = "k\$tsCanId\x04\x00\x00\x00\x04",   "k\$tsCanId\x05\x00\x00\x00\x04",   "k\$tsCanId\x0a\x00\x00\x00\x04",   "k\$tsCanId\x08\x00\x00\x00\x04",   "k\$tsCanId\x09\x00\x00\x00\x04", "k\$tsCanId\x0b\x00\x00\x00\x04", "k\$tsCanId\x0c\x00\x00\x00\x04"
 tableCrcCommand = "k\$tsCanId%2i%2o%2c"
 retrieveConfigError    = "r\$tsCanId\x07\x04\x00\x00\xff"
;trigger, tooth, composite loggers by special fetches on pages 0xf0, 0xf1, 0xf2, 0xf3

; new serial
   messageEnvelopeFormat = msEnvelope_1.0
   blockingFactor = 256 ; 256 is max read/write data size for MS2/Extra

;Relationship between TS pages and MS2 pages
; See also ms2_extra_main_decls.h
;TS  MS2 internal
;MS2 internal pages 0-3 are sensor lookup tables
;1     4
;2     5
;MS2 internal pages 6,7 are outpc,txbuf
;3     10
;4     8
;5     9
;6     11
;7     12

   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,  255.00,      0 ; * (  1 byte)
      ICIgnCapture    = bits,    U08,      2,      [0:0], "Falling Edge", "Rising Edge"                          ; *
      engineType      = bits,    U08,      2,      [3:3], "Even fire", "Odd fire"
    ; old setting and settings
      spkout_hi_lo    = bits,    U08,      2,      [4:4], "Going Low (Normal)", "Going High (Inverted)"          ; *
    ; new settings
      spkout_hi_lo2    = bits,    U08,      2,      [4:4], "Going Low", "Going High"          ; *
      injctl          = bits,    U08,      2,      [5:5], "Off","On"
      injctl2_1       = bits,    U08,      3,      [0:0], "Off", "On"
      injctl2_2       = bits,    U08,      3,      [1:1], "Off", "On"
      max_coil_dur    = scalar,  U08,      4,             "ms",       0.0666,   0.00000,  1.00,    8.00,      1 ; * (  1 byte)
      max_spk_dur     = scalar,  U08,      5,             "ms",       0.0666,   0.00000,  0.00,   25.50,      1 ; * (  1 byte)
      dwellAcc        = scalar,  U08,      6,             "ms",       0.0666,   0.00000,  0.00,   25.50,      0 ; * DurAcc
      dwellvolts      = array ,  U08,      7,    [    6], "V",        0.10000,   0.00000,6,   18,      1 ; * (  6 bytes)
      dwellcorr       = array ,  U08,     13,    [    6], "%",       2,   0.00000,20,   512,      0 ; * (  6 bytes)
      PredOpt         = bits  ,  U08,     19,      [0:1], "Last Interval", "1st Derivative", "1st High RPM, 2nd Low", "2nd Derivative" ; *
      crankingRPM     = scalar,  S16,     20,             "RPM",      1.00000,   0.00000,   200,  3000.0,      0 ; * (  2 bytes)
      cold_adv_table  = array ,  S16,     22,    [   10], "deg",      0.10000,   0.00000,-10.00,   10.00,      1 ; * ( 20 bytes)
      triggerOffset   = scalar,  S16,     42,             "deg",      0.10000,   0.00000, -90.0,  180.00,      2 ; * (  2 bytes)
      TpsBypassCLTRevlim = scalar, S16,   44,             "TPS %",    0.10000,   0.00000, 0,      120,         1 ; * (  2 bytes)
       RevLimNormal2_hyst= scalar,U16,    46,             "RPM",      1.00000,   0.00000,  100,  1000,       0
;algorithms. Moved earlier in file so TS resolves them first when loading MSQ
      algorithm       = bits,    U08,    630,      [0:2], "INVALID", "Speed Density", "Percent Baro", "Alpha-N", "INVALID", "MAF", "ITB", "INVALID" ; * 
      algorithm2      = bits,    U08,    630,      [4:6], "Disabled", "Speed Density", "Percent Baro", "Alpha-N", "MAF", "INVALID", "ITB", "INVALID"
      IgnAlgorithm    = bits,    U08,    631,      [0:2], "INVALID", "Speed Density", "Percent Baro", "Alpha-N", "MAF", "INVALID", "ITB", "INVALID"
      IgnAlgorithm2   = bits,    U08,    631,      [4:6], "Disabled", "Speed Density", "Percent Baro", "Alpha-N", "MAF", "INVALID", "ITB", "INVALID"
      afrload = bits, U08, 985, [0:2], "Use primary load (Algorithm)", "MAP", "% baro", "TPS", "MAF", "INVALID", "ITB", "INVALID" 
      eaeload = bits, U08, 985, [4:6], "Use primary load (Algorithm)", "MAP", "% baro", "TPS", "MAF", "INVALID", "ITB", "INVALID" 
;back to normal
#if LAMBDA
      afrTable1       = array ,  U08,     48,    [12x12], "Lambda",  0.006803,   0.00000,  0.00,    2.00,      3 ; * (144 bytes)
      afrTable2       = array ,  U08,    192,    [12x12], "Lambda",  0.006803,   0.00000,  0.00,    2.00,      3 ; * (144 bytes)
#else
      afrTable1       = array ,  U08,     48,    [12x12], "AFR",      0.10000,   0.00000,  1.00,   25.00,      1
      afrTable2       = array ,  U08,    192,    [12x12], "AFR",      0.10000,   0.00000,  1.00,   25.00,      1
#endif
      wueBins         = array ,  U08,    336,    [   10], "%",        1.00000,   0.00000,  0.00,  255.00,      0 ; * ( 10 bytes)
      taeBins         = array ,  U08,    346,    [    4], "ms",       0.10000,   0.00000,  0.00,   25.50,      1 ; * (  4 bytes)
      maeBins         = array ,  U08,    350,    [    4], "ms",       0.10000,   0.00000,  0.00,   25.50,      1 ; * (  4 bytes)

      iacstepTable    = array ,  S16,    354,    [   10], "steps",    1.00000,   0.00000,  0.00,  500.00,      0 ; * ( 20 bytes)

      arpm_table1     = array ,  U16,    374,    [   12], "RPM",      1.00000,   0.00000,  0.00,{rpmhigh},      0 ; * ( 24 bytes)
      arpm_table2     = array ,  U16,    398,    [   12], "RPM",      1.00000,   0.00000,  0.00,{rpmhigh},      0 ; * ( 24 bytes)
      amap_table1     = array ,  S16,    422,    [   12], { bitStringValue( algorithmUnits ,  (afrload ? afrload : algorithm) ) },      0.10000,   0.00000,  0.00,  {loadhigh},      1
      amap_table2     = array ,  S16,    446,    [   12], { bitStringValue( algorithmUnits ,  (afrload ? afrload : algorithm) ) },      0.10000,   0.00000,  0.00,  {loadhigh},      1

#if CELSIUS
      tempTable       = array ,  S16,    470,    [   10], "°C",       0.05555,  -320.000,{cltlowlim},   {clthighlim},      1 ; * ( 20 bytes) Temperature bins for cranking, cold AE and WUE
  #else
      tempTable       = array ,  S16,    470,    [   10], "°F",       0.10000,   0.00000,{cltlowlim},   {clthighlim},      1
  #endif
      taeRates        = array ,  S16,    490,    [    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,    498,    [    4], "kPa/s",    1.00000,   0.00000,  0.00, 32767.0,      0 ; * (  8 bytes) mapDot bins used for AE: x for MAE

      map0            = scalar,  S16,    506,             "%",      0.10000,   0.00000, -100.0, 3276.7,      1 ; * (  2 bytes)
      mapmax          = scalar,  S16,    508,             "%",      0.10000,   0.00000, -100.0, 3276.7,      1 ; * (  2 bytes)
#if CELSIUS
      clt0            = scalar,  S16,    510,             "°C",       0.05555,  -320.000, -100.0,  500.0,      1 ; * (  2 bytes)
      cltmult         = scalar,  S16,    512,             "%",        1.00000,   0.00000, -200.0,  200.0,      0 ; * (  2 bytes)
      mat0            = scalar,  S16,    514,             "°C",       0.05555,  -320.000, -100.0,  500.0,      1 ; * (  2 bytes)
#else
      clt0            = scalar,  S16,    510,             "°F",       0.10000,   0.00000, -100.0,  500.0,      1
      cltmult         = scalar,  S16,    512,             "%",        1.00000,   0.00000, -200.0,  200.0,      0
      mat0            = scalar,  S16,    514,             "°F",       0.10000,   0.00000, -100.0,  500.0,      1
#endif
      matmult         = scalar,  S16,    516,             "%",        1.00000,   0.00000, -200.0,  200.0,      0 ; * (  2 bytes)

      tpsMin          = scalar,  S16,    518,             "ADC",      1.00000,   0.00000,    0.0, 1023.0,      0 ; * (  2 bytes)
      tpsMax          = scalar,  S16,    520,             "ADC",      1.00000,   0.00000,    0.0, 1023.0,      0 ; * (  2 bytes)
      batt0           = scalar,  S16,    522,             "V",        0.10000,   0.00000,    0.0, 3276.7,      1 ;   (  2 bytes)
      battmax         = scalar,  S16,    524,             "V",        0.10000,   0.00000,-3276.8, 3276.7,      1 ;   (  2 bytes)
      ego0            = scalar,  S16,    526,             "afr",      0.10000,   0.00000,-3276.8, 3276.7,      1 ;   (  2 bytes)
      egomult         = scalar,  S16,    528,             "%",        1.00000,   0.00000, -200.0,  200.0,      0 ;   (  2 bytes)

      baro0           = scalar,  S16,    530,             "kPa",      0.10000,   0.00000,-3276.8, 3276.7,      1 ; * (  2 bytes)
      baromax         = scalar,  S16,    532,             "kPa",      0.10000,   0.00000,-3276.8, 3276.7,      1 ; * (  2 bytes)
      bcor0           = scalar,  S16,    534,             "%",        1.00000,   0.00000,-3276.8, 3276.7,      1 ; * (  2 bytes)
      bcormult        = scalar,  S16,    536,             "%",        1.00000,   0.00000, -200.0,  200.0,      0 ; * (  2 bytes)
;      knock0          = scalar,  S16,    538,             "V",        0.01000,   0.00000,    0.0,    5.0,      1 ; * (  2 bytes)
;      knockmax        = scalar,  S16,    540,             "V",        0.01000,   0.00000,    0.0,    5.0,      1 ; * (  2 bytes)
      Dtpred_Gain     = scalar,  S16,    542,             "%",        1.00000,   0.00000, -200.0,  200.0,      0 ; * (  2 bytes)
      crankTolerance  = scalar,  U08,    544,             "%",        1.00000,   0.00000,  0.00,  255.00,      0 ; * (  1 byte)
      asTolerance     = scalar,  U08,    545,             "%",        1.00000,   0.00000,  0.00,  255.00,      0 ; * (  1 byte)
      pulseTolerance  = scalar,  U08,    546,             "%",        1.00000,   0.00000,  0.00,  255.00,      0 ; * (  1 byte)
        IdleCtl         = bits  ,  U08,    547,      [0:1], "None", "On/Off valve", "PWM valve (2 or 3 wire)", "Stepper valve (4 or 6 wire)"
        IdleCtl_alg     = bits  ,  U08,    547,      [3:3], "Open-loop (warmup)", "Closed-loop"
      IdleCtl_home    = bits  ,  U08,    547,      [5:5], "Closed", "Open"

      IdleCtl_out     = bits,    U08,    547,      [6:7], "Normal", "INVALID", "INVALID", "INVALID"
      IACtstep        = scalar,  U08,    548,             "ms",       1,   0.00000,  0.00,   255,      0 ; * (  1 byte) changed to be 0.128 ticks
      IAC_tinitial_step=scalar,  U08,    549,             "ms",       1,   0.00000,  0.00,   255,      0 ; * (  1 byte)
      IACminstep      = scalar,  U08,    550,             "steps",    1,   0.00000,  0.00,  255,      0 ; * (  1 byte)
      dwellduty       = scalar,  U08,    551,             "%",        0.39,      0.0,      0,     100,0
      IACStart        = scalar, S16,     552,             "",         1.00000, 0.00000, 0.00, 4000.00,    0
#if CELSIUS
      IdleHyst        = scalar,  S16,    554,             "°C",       0.05555,   0.00000, 0,  20.0,       1 ; * (  2 bytes)
#else
      IdleHyst        = scalar,  S16,    554,             "°F",       0.10000,   0.00000, 0,  36.0,       1
#endif
      IACcrankxt      = scalar,  S16,    558,             "s",      1.00000,   0.00000,  0.00,32767.00,      0 ; * (  2 bytes)
        IACcurlim     = bits,    U08,    560, [0:1], "Moving only", "Hold current", "Always on", "INVALID"
;        IACcurlim     = bits,    U08,    560, [0:1], "Moving only", "Hold current", "INVALID", "INVALID"
;gaps
      injOpen         = scalar,  U16,    566,             "ms",       0.001,   0.00000,  0.00,   25.50,      3 ; * (  1 byte)
      battFac         = scalar,  U16,    568,             "ms/v",     0.000166667,       0.0,   0.0,     1.0,      3 ; * (  1 byte)
      OverBoostOption = bits,    U08,    570,     [0:1],  "None",    "Fuel Cut", "Spark Cut", "Both"
      OverBoostOption_tol       = bits,    U08,    570,     [2:2],  "Off",    "On"
      OverBoostOption_flexboost = bits,    U08,    570,     [3:3],  "Off",    "On"
      OverBoostKpa    = scalar,  S16,    571,             "kPa",      0.10000,   0.00000,  0.00,  {loadhigh},        1
      OverBoostHyst   = scalar,  S16,    573,             "kPa",      0.10000,   0.00000,  0.00,  100,         1
;spare
      secondtrigopts  = bits,    U08,    577,     [0:0],  "Off", "On"
      secondtrigopts1 = bits,    U08,    577,     [1:1],  "Off", "On"
      secondtrigopts2 = bits,    U08,    577,     [2:2],  "Off", "On"
      secondtrigopts3 = bits,    U08,    577,     [3:3],  "Off", "On"
      tpsThresh       = scalar,  S16,    578,             "%/s",      0.10000,   0.00000,  0.00,  1000.0,      1 ; * (  2 byte)
      mapThresh       = scalar,  S16,    580,             "kPa/s",    1.00000,   0.00000,  0.00,  1000.0,      0 ; * (  2 byte) threshold for MAE
      taeColdA        = scalar,  U08,    582,             "ms",       0.10000,   0.00000,  0.00,  25.500,      1 ; * (  1 byte)
      taeColdM        = scalar,  U08,    583,             "%",        1.00000,   0.00000,  0.00,  255.00,      0 ; * (  1 byte)
      mapsample_angle = scalar,  S16,    584,             "deg",      0.10000,   0.00000,  -360,  360,         1
      taeTime         = scalar,  U08,    586,             "s",        0.10000,   0.00000,  0.00,   25.50,      1 ; * (  1 byte)
      tdePct          = scalar,  U08,    587,             "",         1.00000,   0.00000,  0.00,  255.00,      0 ; * (  1 byte)
      floodClear      = scalar,  S16,    588,             "%",        0.10000,   0.00000,  0.00,  100.00,      1 ; * (  2 bytes)
      TPSOXLimit      = scalar,  S16,    590,             "%",        0.10000,   0.00000,  0.00,  300.00,      1 ; * (  2 bytes)
      tpsProportion   = scalar,  U08,    592,             "%",        1.00000,   0.00000,  0.00,  100.00,      0 ; * (  1 byte)
      baroCorr        = bits  ,  U08,    593,      [0:1], "None", "Initial MAP Reading", "Two Independent Sensors", "INVALID"        ; *
      egoType         = bits  ,  U08,    594,      [0:2], "Disabled", "Narrow Band", "Dual Narrow Band", "Single Wide Band", "Dual Wide Band", "INVALID", "INVALID", "INVALID" ; * EgoOption
      EgoOption_dual  = bits,    U08,    594,      [7:7], "Off", "On"
      egoCount        = scalar,  U08,    595,             "",         1.00000,   0.00000,  0.00,  255.00,      0 ; * (  1 byte)
      egoDelta        = scalar,  U08,    596,             "%",        0.10000,   0.00000,  0.00,  25.5,      1 ; * (  1 byte)
      oldegoLimit        = scalar,  U08,    597,             "%",        1.00000,   0.00000,  0.00,  255.00,      0 ; * (  1 byte)
#if LAMBDA
      AFRTarget       = scalar,  U08,    598,             "Lambda",  0.006803,   0.00000,  0.00,    2.00,      3
#else
      AFRTarget       = scalar,  U08,    598,             "AFR",      0.10000,   0.00000,  0.00,   25.50,      1
#endif
      tempUnits       = bits  ,  U08,    599,      [0:0], "Coolant/MAT Tables in °F", "Coolant/MAT Tables in °C" ; * (  1 byte)
      MAFOption       = bits  ,  U08,    600,      [4:5], "Off", "MS2 AD7/JS4", "MS2 AD6/JS5", "MAP"  ;   (  1 byte)
      mapsample_opt1  = bits,    U08,    601,      [0:1], "1", "2", "4", "INVALID"
      mapsample_opt2  = bits,    U08,    601,      [2:2], "Use timed min", "Use event average"
#if CELSIUS
      fastIdleT       = scalar,  S16,    602,             "°C",       0.05555,  -320.000,{cltlowlim},   {clthighlim},      1 ; * (  2 bytes)
      egoTemp         = scalar,  S16,    604,             "°C",       0.05555,  -320.000,{cltlowlim},   {clthighlim},      1 ; * (  2 bytes)
#else
      fastIdleT       = scalar,  S16,    602,             "°F",       0.10000,   0.00000,{cltlowlim},   {clthighlim},      1
      egoTemp         = scalar,  S16,    604,             "°F",       0.10000,   0.00000,{cltlowlim},   {clthighlim},      1
#endif
      egoRPM          = scalar,  S16,    606,             "RPM",      1.00000,   0.00000,  0.00, {rpmhigh},      0 ; RPMOXLimit
      reqFuel         = scalar,  U16,    608,             "ms",       0.00100,   0.00000,  0.00,  65.536,      2 ; * (  2 bytes)
      divider         = scalar,  U08,    610,             "",         1.00000,   0.00000,  0.00,     255,      0 ; * (  1 byte)
      alternate       = bits,    U08,    611,      [0:0], "Simultaneous", "Alternating"                          ; * (  1 byte)
      altcrank       = bits,    U08,    611,      [1:1], "Every event", "Alternate events"
      injPwmT         = scalar,  U08,    613,             "ms",       0.12800,   0.128,  0.00,   32.64,      1 ; * (  1 byte)
      injPwmPd        = scalar,  U08,    614,             "us",       1.00000,   0.00000, 40.00,  100.00,      0 ; * (  1 byte)
      injPwmP         = scalar,  U08,    615,             "%",        1.00000,   0.00000,  0.00,  100.00,      0 ; * (  1 byte)
      twoStroke       = bits,    U08,    617,      [0:1], "Four-stroke",    "Two-stroke", "INVALID", "Rotary"
;      injType         = bits,    U08,    618,      [0:0], "Port Injection", "Throttle Body"                      ; *
      nInjectors      = bits,    U08,    619,      [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,    620,             "",         0.10000,   0.00000,  0.00,  720.00,      0 ; * (  2 byte)
      rpmLF           = scalar,  U08,    622,             "",         1.00000,   0.00000,  10.00,  100.00,      0 ; * (  1 byte)
      mapLF           = scalar,  U08,    623,             "",         1.00000,   0.00000,  10.00,  100.00,      0 ; * (  1 byte)
      tpsLF           = scalar,  U08,    624,             "",         1.00000,   0.00000,  10.00,  100.00,      0 ; * (  1 byte)
      egoLF           = scalar,  U08,    625,             "",         1.00000,   0.00000,  10.00,  100.00,      0 ; * (  1 byte)
      adcLF           = scalar,  U08,    626,             "",         1.00000,   0.00000,  10.00,  100.00,      0 ; * (  1 byte)
;      knkLF           = scalar,  U08,    627,             "",         1.00000,   0.00000,  0.00,  255.00,      0 ; * (  1 byte)
      mafLF           = scalar,  U08,    628,             "",         1.00000,   0.00000,  10.00,  100.00,      0 ; * (  1 byte)
      dualTable       = bits,    U08,    629,      [0:0], "Single Table", "Dual Table"                           ; dual_tble_optn
;630, 631 used by algorithms. Moved earlier in file so TS resolves them first when loading MSQ
;      algorithm       = bits,    U08,    630,      [0:2], "INVALID", "Speed Density", "Percent Baro", "Alpha-N", "INVALID", "MAF", "ITB", "INVALID" ; * 
;      algorithm2      = bits,    U08,    630,      [4:6], "Disabled", "Speed Density", "Percent Baro", "Alpha-N", "MAF", "INVALID", "ITB", "INVALID"
;      IgnAlgorithm    = bits,    U08,    631,      [0:2], "INVALID", "Speed Density", "Percent Baro", "Alpha-N", "MAF", "INVALID", "ITB", "INVALID"
;      IgnAlgorithm2   = bits,    U08,    631,      [4:6], "Disabled", "Speed Density", "Percent Baro", "Alpha-N", "MAF", "INVALID", "ITB", "INVALID"
      xAfrAlgorithm        = scalar,  U08,    632,             "",         1.00000,   0.00000,  0.00,  255.00,      0 ; U (  1 byte) UNUSED
      dwelltime       = scalar,  U08,    633,             "ms",       0.0666,       0,        0.1,     25.5, 1
      trigret_ang     = scalar,  U16,    634,    "deg", 0.1, 0, 5, 180,1
;      RevLimOption    = bits  ,  U08,    636,      [0:2], "None", "Spark Retard", "Fuel Cut", "Spk retard, fuel cut", "INVALID", "Spark retard/cut","INVALID","Fuel&spark cut"         ; * (  1 byte)
      RevLimOption_retard = bits,U08,    636,      [0:1], "Off", "Progressive retard", "Fixed angle", "INVALID"
      RevLimOption_spkcut = bits,U08,    636,      [2:2], "Off", "On"
      RevLimCLTbased  = bits,    U08,    636,      [3:3], "Normal", "CLT based"
      RevLimOption_fuelprog=bits,U08,    636,      [4:4], "Off", "On"
      RevLimOption_fuelcut =bits,U08,    636,      [5:5], "Off", "On"
      RevLimMaxRtd    = scalar,  U08,    637,             "deg",      0.10000,   0.00000,  0,      25.50,      1 ; * (  1 byte)
      injPwmT2        = scalar,  U08,    638,             "ms",       0.12800,   0.12800,  0.00,   32.64,      1 ; * (  1 byte)
      injPwmPd2       = scalar,  U08,    639,             "us",       1.00000,   0.00000, 40.00,  100.00,      0 ; * (  1 byte)
      injPwmP2        = scalar,  U08,    640,             "%",        1.00000,   0.00000,  0.00,  100.00,      0 ; * (  1 byte)
      injOpen2        = scalar,  U16,    641,             "ms",       0.001,   0.00000,  0.00,   25.50,      3 ; * (  1 byte)
      battFac2        = scalar,  U16,    643,             "ms/v",     0.000166667,       0.0,   0.0,     1.0,      3 ; * (  1 byte)
      mapport         = bits,    U08,    645,      [0:0], "Off", "MAP"
      baro_upper      = scalar,  S16,    646,             "kPa",      0.10000,   0.00000,  50.00,  120.00,      1 ;
      baro_lower      = scalar,  S16,    648,             "kPa",      0.10000,   0.00000,  50.00,  120.00,      1 ;
      baro_default    = scalar,  S16,    650,             "kPa",      0.10000,   0.00000,  50.00,  120.00,      1 ;
;      RevLimTPSbypassRPM = scalar, S16,  652,             "RPM",      1.00000,   0.00000,  0.00,  {rpmhigh},       0 ;
      RevLimRtdAng    = scalar,  S16,    654,             "deg",      0.10000,   0.00000,-10,   25.5,      1
      RevLimNormal2 =   scalar,  S16,    656,             "RPM",      1.00000,   0.00000,  0.00,  {rpmhigh},       0 ;
      TC5_required_width = scalar, U16,  658,             "uSec",     0.66667,   0.00000,  0.00,  5000,        0 ;
      egoLimit =        scalar,  S16,    660,             "%",        0.10000,   0.00000,  0.00,  100,         0 ;
      stoich =          scalar,  S16,    662,             "AFR",      0.10000,   0.00000,  0.00,  25.5,        1 ;
	  enable_pollADC03 =  bits,  U08,    664,      [0:0], "Disable", "Enable"
	  enable_pollADC47 =  bits,  U08,    664,      [1:1], "Disable", "Enable"
	  enable_pollPWM   =  bits,  U08,    664,      [2:2], "Disable", "Enable"
	  enable_pollports = bits,   U08,    664,      [3:3], "Disable", "Enable"
	  poll_tableADC03 = scalar,  U08,    665,             "",         1.00000,   0.00000,     0,     15,       0 ; * (  1 byte)
	  poll_tableADC47 = scalar,  U08,    666,             "",         1.00000,   0.00000,     0,     15,       0 ; * (  1 byte)
	  poll_tablePWM =   scalar,  U08,    667,             "",         1.00000,   0.00000,     0,     15,       0 ; * (  1 byte)
	  poll_tableports = scalar,  U08,    668,             "",         1.00000,   0.00000,     0,     15,       0 ; * (  1 byte)
	  poll_offsetADC03 = scalar, S16,    669,             "bytes",    1.00000,   0.00000,     0,   4095,       0 ;
	  poll_offsetADC47 = scalar, S16,    671,             "bytes",    1.00000,   0.00000,     0,   4095,       0 ;
	  poll_offsetPWM =  scalar,  S16,    673,             "bytes",    1.00000,   0.00000,     0,   4095,       0 ;
	  poll_offsetports = scalar, S16,    675,             "bytes",    1.00000,   0.00000,     0,   4095,       0 ;
	  ports_dir =       bits,    U08,    677,      [0:2], "3 Inputs", "2 Inputs, 1 Output", "INVALID", "1 Input, 2 Outputs", "INVALID", "INVALID", "INVALID", "3 Outputs"
	  port1_type =      bits,    U08,    677,      [4:4], "Digital (8 signals)", "Single value (one signal)"
	  port2_type =      bits,    U08,    677,      [5:5], "Digital (8 signals)", "Single value (one signal)"
	  port3_type =      bits,    U08,    677,      [6:6], "Digital (8 signals)", "Single value (one signal)"
	  port_generic =    bits,    U08,    678,      [0:1], "Disabled", "Remote Port 1", "Remote Port 2", "Remote Port 3"
      enginesize    =   scalar,  U16,    679,    "cc",   1.00000,    0.00000,     0,   65536,    0

      remotePWMfreq     =   scalar,  U08,    681,    "MHz",  1.00000,    0.00000,     1,     50,    0
      remotePWMprescale =   scalar,  U08,    682,       "",  1.00000,    0.00000,     1,    255,    0

      can_bcast1_on    = bits,     U08,    683,           [0:0], "Off", "On"
      can_bcast1_280x4 = bits,     U08,    683,           [1:1], "Off", "On"
      can_bcast1_280x1 = bits,     U08,    683,           [2:2], "Off", "On"
      can_bcast1_289   = bits,     U08,    683,           [3:3], "Off", "On"
      can_bcast1_316   = bits,     U08,    683,           [4:4], "Off", "On"
      can_bcast1_329   = bits,     U08,    683,           [5:5], "Off", "On"
      can_bcast1_561   = bits,     U08,    683,           [6:6], "Off", "On"
      can_bcast1_361   = bits,     U08,    683,           [7:7], "Off", "On"

      can_bcast2_041   = bits,     U08,    684,           [0:0], "Off", "On"
      can_bcast2_xxx   = bits,     U08,    684,           [7:7], "Off", "On"
      
      can_bcast_int    = scalar, U16, 685, "ms", 0.128, 0.00000, 50, 1000,1

      feature7_mafmat = bits,  U08,  687, [0:0], "Off", "On"
      feature7_maftrim = bits, U08,  687, [1:1], "Off", "On"
      feature7_mafcalib= bits, U08,  687, [2:2], "Off", "On"
;     feature7_aeevents= bits, U08,  687, [3:3], "Time", "Events"
      feature7_aetpswot= bits, U08,  687, [4:4], "Off", "On"
      maf_range               = bits,  U08, 688, [0:1], "650g/s", "1300g/s", "1950g/s", "2600g/s"
      map_phase_thresh = scalar,  S16,    689,    "kPa",      0.10000,   0.00000,  0.00,  400,        1
      flex_pct0  = scalar, U16, 691, "%", 0.1, 0.00000, 0, 100,1
      flex_pct1  = scalar, U16, 693, "%", 0.1, 0.00000, 0, 100,1
      flex_baseline  = scalar, U16, 695, "%", 0.1, 0.00000, 0, 100,1
      fuelSpkDel_default  = scalar,  S16,    697,             "deg",      0.10000,   0.00000,-45.00,   45.00,      1
      fuelCorr_default    = scalar,  U08,    699,             "%",        1.00000,   0.00000,  50,     255,      0
;pad 697
      boosttol            = scalar,  S16,    701, "kPa",      0.10000,   0.00000,  0.00,  50,        1
      flexboosttps        = scalar,  S16,    703, "%", 0.10000,   0.00000,  0.00,  100.00,      1;
    oddfireangs1 = scalar, U16,    705,             "",         0.10000,   0.00000,  0.00,  720.00,      0 ; * (  2 byte)
    oddfireangs2 = scalar, U16,    707,             "",         0.10000,   0.00000,  0.00,  720.00,      0 ; * (  2 byte)
    oddfireangs3 = scalar, U16,    709,             "",         0.10000,   0.00000,  0.00,  720.00,      0 ; * (  2 byte)
    oddfireangs4 = scalar, U16,    711,             "",         0.10000,   0.00000,  0.00,  720.00,      0 ; * (  2 byte)
    oddfireangs5 = scalar, U16,    713,             "",         0.10000,   0.00000,  0.00,  720.00,      0 ; * (  2 byte)
    oddfireangs6 = scalar, U16,    715,             "",         0.10000,   0.00000,  0.00,  720.00,      0 ; * (  2 byte)
      can_poll_id0    = scalar,  U08,    717,      "",        1.00000,   0.00000,  0.00,  14,      0 ;
      can_poll_id1    = scalar,  U08,    718,      "",        1.00000,   0.00000,  0.00,  14,      0 ;
      can_poll_id2    = scalar,  U08,    719,      "",        1.00000,   0.00000,  0.00,  14,      0 ;
      can_poll_id3    = scalar,  U08,    720,      "",        1.00000,   0.00000,  0.00,  14,      0 ;
      ; spare 9 bytes
      hw_latency      = scalar,  U16,    730,      "usec", 0.66667, 0.00000, 0.00, 500, 0
      ego_startdelay  = scalar,  U08,    732,             "s",      1, 0, 0, 120, 0
;these are loadopts in firmware
      loadCombine     = bits,    U08,    733,      [0:0], "additive", "multiplicitive"
      loadMult	      = bits,    U08,    733,      [2:2], "don't multiply", "multiply"
      loadStoich      = bits,    U08,    733,      [3:3], "don't include AFRtarget", "include AFRtarget"
      loadopts_oldbaro= bits,    U08,    733,      [6:6], "Off", "On"
      baud            = scalar,  U32,    734,             "",         1.00000,   0.00000,9600.0,115200.0,      0 ; x (  4 bytes)
      MAPOXLimit      = scalar,  S16,    738,             "kPa",      0.10000,   0.00000,  0.00,  300.00,      2 ; * (  2 bytes)
      board_type      = bits ,  U08,    740,            [0:7],       "INVALID", "MS2", "Router", "GPIO"
      mycan_id        = scalar ,  U08,    741,            "",        1.00000,   0.00000,  0.00,  255,      0
; 4 words in here that _DO_NOT_ align correctly with where GPIO wants to clobber
      mapsample_window = scalar, U08,    750,            "deg",       1.00000,   0.00000,  0.00,  180,       0
      can_poll        = bits,     U08,    751,           [0:0], "Disable", "Enable"
;      xcan_poll_id0    = scalar,   U08,    752,                "",      1.00000,   0.00000,  0.00,  14,      0 ;
      MAPOXMin        = scalar,   S16,    753,             "kPa",      0.10000,   0.00000,  0.00,  300.00,      2 ; * (  2 bytes)

      ; Port Settings constants
      psEnabled       = array ,  U08,    756,    [    7], "on/off",   1.00000,   0.00000,      0,       1,     0
      psCondition     = array ,  U08,    763,    [  7x2], "",         1.00000,   0.00000,      0,     255,     0
      psConnector     = array ,  U08,    777,    [    7], "",         1.00000,   0.00000,      0,     255,     0
      psInitValue     = array ,  U08,    784,    [    7], "",         1.00000,   0.00000,      0,     255,     0
      psPortValue     = array ,  U08,    791,    [    7], "",         1.00000,   0.00000,      0,     255,     0
      psOutSize       = array ,  U08,    798,    [  7x2], "",         1.00000,   0.00000,      0,     255,     0
      psOutOffset     = array ,  U16,    812,    [  7x2], "",         1.00000,   0.00000,      0,    1024,     0
      psThreshold     = array ,  S16,    840,    [  7x2], "",         1.00000,   0.00000,-32768.0,32767.0,     0
      psHysteresis    = array ,  S16,    868,    [  7x2], "",         1.00000,   0.00000,-32768.0,32767.0,     0

      aeTaperTime     = scalar,  U08,    896,             "s",        0.10000,   0.00000,  0.00,   25.50,      1 ; * (  1 byte)
      primedelay      = scalar,  U08,    897,             "s",        0.1,       0.0,      0.0,     3,       1 
      aeEndPW         = scalar,  S16,    898,             "ms",       0.10000,   0.00000,  0.00, 1000.00,      1 ; *

      egoAlgorithm    = bits  ,  U08,    900,      [0:1], "Simple", "INVALID", "PID", "INVALID" ; * (  1 byte)
      egoKP           = scalar,  U08,    901,             "%",        1.00000,   0.00000,  0.00,  200.00,      0 ; * (  1 byte)
      egoKI           = scalar,  U08,    902,             "%",        1.00000,   0.00000,  0.00,  200.00,      0 ; * (  1 byte)
      egoKD           = scalar,  U08,    903,             "%",        1.00000,   0.00000,  0.00,  200.00,      0 ; * (  1 byte)
      egoKdelay1      = scalar,  U16,    904,             "ms",       1.00000,   0.00000,  0.00,   65535,      0 ; * (  2 bytes)
      egoKdelay2      = scalar,  U16,    906,             "revs",     1.00000,   0.00000,  0.00,   65535,      0 ; * (  2 bytes)

      flexFuel        = bits  ,  U08,    908,      [0:0], "Disabled", "Enabled"                                  ; * (  1 byte)
      flexport        = bits,    U08,    908,      [1:3], "PE0/JS7", "JS11", "INVALID", "INVALID", "CANPWMIN1", "CANPWMIN2", "CANPWMIN3", "CANPWMIN4"  
      fuelFreq        = array ,  U08,    909,    [    2], "Hz",       1.00000,   0.00000,  0.00,     255,      0 ; * (  2 bytes)
         fuelFreq0    = scalar,  U08,    909,             "Hz",       1.00000,   0.00000,  0.00,     255,      0
         fuelFreq1    = scalar,  U08,    910,             "Hz",       1.00000,   0.00000,  0.00,     255,      0
      fuelCorr        = array ,  U08,    911,    [    2], "%",        1.00000,   0.00000,  0.00,     255,      0 ; * (  2 bytes)
         fuelCorr0    = scalar,  U08,    911,             "%",        1.00000,   0.00000,  0.00,     255,      0
         fuelCorr1    = scalar,  U08,    912,             "%",        1.00000,   0.00000,  0.00,     255,      0

      dwellmode       = bits  ,  U08,    913,  [0:1], "Standard Dwell", "Fixed Duty", "Time after Spark", "Charge at Trigger"
      iacfullopen     = scalar,  U16,    914,  "steps",    1.00000,   0.00000,  0.0,   4000.0,      0

;gap
      knk_option      = bits  ,  U08,    927,      [0:1], "Disabled", "Safe Mode", "Aggressive Mode", "INVALID"  ; * (  1 byte )
      knkDirection    = bits  ,  U08,    927,      [4:4], "Low Input", "High Input"                   ; *
      knkpull         = bits  ,  U08,    927,      [5:6], "Same as knock", "None", "Pull up", "Pull down"                   ; *
      knk_option_an    = bits ,  U08,    927,      [7:7], "On/Off", "Analogue"

      knk_maxrtd      = scalar,  U08,    928,             "deg",      0.1,       0.0,      0.0,    25.5,       1 ; * (  1 byte )
      knk_step1       = scalar,  U08,    929,             "deg",      0.1,       0.0,      0.0,    25.5,       1 ; * (  1 byte )
      knk_step2       = scalar,  U08,    930,             "deg",      0.1,       0.0,      0.0,    25.5,       1 ; * (  1 byte )
      knk_trtd        = scalar,  U08,    931,             "s",      0.1,       0.0,      0.0,    25.5,       1 ; * (  1 byte )
      knk_tadv        = scalar,  U08,    932,             "s",      0.1,       0.0,      0.0,    25.5,       1 ; * (  1 byte )
      knk_dtble_adv   = scalar,  U08,    933,             "deg",      0.1,       0.0,      0.0,    25.5,       1 ; * (  1 byte )
      knk_ndet        = scalar,  U08,    934,             "knocks",   1.0,       0.0,      0.0,     255,       0 ; * (  1 byte )
      EAEOption      = bits  ,  U08,    935,      [0:1], "Off", "On", "INVALID", "On with lag compensation"      ; * (  1 byte )
      knk_maxmap      = scalar,  U16,    936,             "kPa",      0.1,       0.0,      0.0,   300.0,       1 ; * (  2 bytes)
      knk_lorpm       = scalar,  U16,    938,             "rpm",      1.0,       0.0,      0.0,   {rpmhigh},       0 ; * (  2 bytes)
      knk_hirpm       = scalar,  U16,    940,             "rpm",      1.0,       0.0,      0.0,   {rpmhigh},       0 ; * (  2 bytes)
;      knk_rpm         = array ,  U16,    942,    [    6], "rpm",      1.0,       0.0,      0.0,    6000,       0 ; * (  2 bytes)
;      knk_thresh      = array ,  U16,    954,    [    6], "v",        0.01,      0.0,      0.0,    5.00,       2 ; * (  2 bytes)

      triggerTeeth    = scalar,  U16,    966,             "teeth",    1.0,       0.0,      2,     255,       0 ; * (  2 bytes)
      No_Miss_Teeth   = scalar,  U08,    968,             "teeth",    1.0,       0.0,      0.0,     4,       0 ; * (  1 byte )
      Miss_ang        = scalar,  U16,    969,             "deg BTDC",    0.1,       0.0,      0.0,     720,       1 ; * (  2 bytes )

      ICISR_tmask     = scalar,  U08,    971,             "ms",       0.1,       0.0,      0.0,    25.5,       1 ; * (  1 byte )
      ICISR_pmask     = scalar,  U08,    972,             "%",        1.0,       0.0,      0.0,     90,       0 ; * (  1 byte )

      knkport         = bits,    U08,    973,      [0:3], "MS2 AD7/JS4", "MS2 AD6/JS5", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "Remote Port3 Bit 0", "Remote Port3 Bit 1", "Remote Port3 Bit 2", "Remote Port3 Bit 3", "Remote Port3 Bit 4", "Remote Port3 Bit 5", "Remote Port3 Bit 6", "Remote Port3 Bit 7"

      ae_lorpm        = scalar,  U16,    974,             "rpm",      1.0,       0.0,      0.0,   {rpmhigh},       0 ; * (  2 bytes)
      ae_hirpm        = scalar,  U16,    976,             "rpm",      1.0,       0.0,      0.0,   {rpmhigh},       0 ; * (  2 bytes)

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

      IC2ISR_tmask     = scalar,  U08,    982,             "ms",       0.1,       0.0,      0.0,    25.5,       1 ; * (  1 byte )
      IC2ISR_pmask     = scalar,  U08,    983,             "%",        1.0,       0.0,      0.0,     90,       0 ; * (  1 byte )
      NoiseFilterOpts = bits, U08, 984, [0:0], "Off", "On"
      NoiseFilterOpts1 = bits, U08, 984, [1:1], "Off", "On"
      NoiseFilterOpts2 = bits, U08, 984, [2:2], "Off", "On"
      NoiseFilterOpts3 = bits, U08, 984, [3:3], "Off", "On"
;985 is used by afrload and eaeload. Moved earlier in file so TS resolves them first when loading MSQ
;      afrload = bits, U08, 985, [0:2], "Use primary load (Algorithm)", "MAP", "% baro", "TPS", "MAF", "INVALID", "ITB", "INVALID" 
;      eaeload = bits, U08, 985, [4:6], "Use primary load (Algorithm)", "MAP", "% baro", "TPS", "MAF", "INVALID", "ITB", "INVALID" 
;spk_config_spka
; WLED was incorrectly Tachout
      spk_config_spka = bits  ,  U08,    986,      [0:0], "JS10", "D14"                                            ;   (  1 byte )
      spk_conf2_gm    = bits  ,  U08,    987,      [0:0], "Off", "GM Bypass on D16"
      spk_conf2_tfi   = bits  ,  U08,    987,      [1:2], "Off", "TFI Non-signature", "INVALID", "TFI Signature PIP"
      spk_conf2_cam   = bits  ,  U08,    987,      [3:3], "Off", "On"
      spk_conf2_oddodd= bits  ,  U08,    987,      [4:5], "Alternate", "INVALID", "Paired", "Custom" ; note, different bits to MS3
      spk_conf2_kick  = bits  ,  U08,    987,      [6:6], "Off", "On"
      spk_conf2_dli   = bits  ,  U08,    987,      [7:7], "Off", "Toyota DLI"

      spk_config_campol   =bits, U08,    988,      [0:0], "Low", "High"
      spk_config_camcrank = bits, U08,   988,      [1:1], "Crank wheel", "Cam wheel"
      spk_config_trig2 =bits,    U08,    988,      [2:3], "INVALID", "Single wheel with missing tooth", "Dual wheel", "Dual wheel with missing tooth"
      spk_config_trig2l =bits,   U08,    988,      [4:5], "INVALID", "Rising edge", "Falling edge", "Poll level"
      spk_config_resetcam = bits, U08,   988,      [6:7], "Cam", "Crank", "Every cylinder", "INVALID"

 ; invalids in next line are spare and should be used
      spk_mode0       = bits  ,  U08,    989,      [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", "INVALID", "Fuel Only", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID","LS1", "YZF1000", "INVALID", "INVALID","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID","INVALID", "INVALID", "HD 32-2", "Miata 36-2","INVALID", "INVALID", "Ski doo PTEC", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID"
      spk_mode3a      = bits,    U08,    990,      [0:0], "Cam input", "MAP sensor"
      spk_mode3_hirespol= bits,  U08,    990,      [2:2], "Normal", "Inverted"
      spk_mode3       = bits,    U08,    990,      [5:7], "Single coil", "INVALID", "Wasted spark", "Wasted COP", "Coil on plug", "INVALID", "Dual dizzy", "INVALID"
      rtbaroport      = bits,    U08,    991,      [0:3], "MAP", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "MS2 AD6/JS5", "MS2 AD7/JS4", "Remote ADC0", "Remote ADC1", "Remote ADC2", "Remote ADC3", "Remote ADC4", "Remote ADC5", "Remote ADC6", "Remote ADC7" ;  (1 byte )
      ego2port        = bits,    U08,    992,      [0:3], "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "MS2 AD6/JS5", "MS2 AD7/JS4", "Remote ADC0", "Remote ADC1", "Remote ADC2", "Remote ADC3", "Remote ADC4", "Remote ADC5", "Remote ADC6", "Remote ADC7"  ;  (1 byte )
      egoport         = bits,    U08,    993,      [0:3], "Local", "Remote ADC0", "Remote ADC1", "Remote ADC2", "Remote ADC3", "Remote ADC4", "Remote ADC5", "Remote ADC6", "Remote ADC7", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID"  ;  (1 byte )
      kickdelay       = scalar,  U16,    994,     "ms", 0.000666,0.00000,0.1,35.00,3
;996 free
      feature4_0igntrig= bits,   U08,    997,      [1:1], "Off", "Ignition trigger indicator"
      feature4_0VEtblsize=bits,  U08,    997,      [2:2], "16x16","12x12"
      feature4_0ftrig = bits,    U08,    997,      [4:5], "Off", "INVALID", "Simple", "Advanced"
      ipwmTable       = array ,  S16,    998,    [   10], "%",        0.392,   0.00000,  0.00,  100.00,      1
      timing_flags    = bits,    U08,   1018,	 [0:0], "Use Table", "Fixed timing";
      use_prediction  = bits,    U08,   1018,    [1:1], "No Prediction", "1st Deriv Prediction";
      crank_dwell     = scalar,  U08,   1019,     "ms", 0.0666,0.00000,1.00,8.00,1 ; * (  1 byte);
      crank_timing    = scalar,  S16,   1020,     "degrees", 0.10000,0.00000,-10.00,90.00,1;
      fixed_timing    = scalar,  S16,   1022,	  "degrees", 0.10000,0.00000,-10.00,90.00,1;

   page = 2
      pwmidle_target_rpms = array, U16, 0,    [ 8 ], "rpms",      1, 0.00000, 0.00, 2000, 0;
#if CELSIUS
      pwmidle_clt_temps = array,  S16, 16,   [8],  "°C",   0.05555,  -320.000,{cltlowlim},   {clthighlim},      1 ;
#else
      pwmidle_clt_temps = array,  S16, 16,   [8],  "°F",       0.10000,  0.00000,{cltlowlim},   {clthighlim},      1
#endif
      pwmidle_ms = scalar, U16, 32, "ms", 1, 0.00000, 50, 500, 0
      pwmidle_close_delay = scalar, U08, 34, "s", 1, 0.00000, 0, 10, 0
      pwmidle_open_duty = scalar, U08, 35, "%", 0.392, 0.00000, 0, 100, 1
      pwmidle_open_steps = scalar, U08, 35, "steps", 1.00000, 0.00000, 0, 255, 0
      pwmidle_closed_duty = scalar, U08, 36, "%", 0.392, 0.00000, 0, 100, 1
      pwmidle_closed_steps = scalar, U08, 36, "steps", 1.00000, 0.00000, 0, 255, 0
      pwmidle_pid_wait_timer = scalar, U08, 37, "s", 0.1, 0.00000, 2, 10, 1
      pwmidle_min_duty = scalar, U08, 38, "%", 0.392, 0.00000, 0, 255, 1
      pwmidle_min_steps = scalar, U08, 38, "steps", 1.00000, 0.00000, 0, 255, 0
;      pwmidle_engage_rpm_adder = scalar, U16, 39, "rpm", 1, 0.00000, 0, {rpmhigh}, 0
      pwmidle_tps_threshold = scalar, U16, 41, "%", 0.1, 0.00000, 0, 1000, 1
      pwmidle_dp_adder = scalar, U08, 43, "%", 0.392, 0.00000, 0, 20, 1
      pwmidle_dp_adder_steps = scalar, U08, 43, "steps", 1.00000, 0.00000, 0, 20, 0
      pwmidle_rpmdot_threshold = scalar, S16, 44, "rpm/sec", 10.0, 0.00000, 0, 1000, 0
      pwmidle_decelload_threshold = scalar, S16, 46, "%", 0.1, 0.00000, 0, 100, 1
      pwmidle_Kp_new = scalar, U16, 48, "%", 0.10000, 0.00000, 0, 200, 1
      pwmidle_Ki_new = scalar, U16, 50, "%", 0.10000, 0.00000, 0, 200, 1
      pwmidle_Kd_new = scalar, U16, 52, "%", 0.10000, 0.00000, 0, 200, 1
      pwmidle_freq = bits, U08, 54, [0:3], "31Hz", "62Hz", "92Hz", "124Hz", "153Hz", "186Hz", "217Hz", "252Hz", "279Hz", "313Hz", "340Hz", "372Hz", "412Hz", "440Hz", "480Hz", "INVALID"
      pwmidle_freq_cl_opts_display_pid = bits, U08, 54, [7:7], "Basic", "Advanced"
; gap
      pwmidle_max_rpm_new = scalar, U16, 57, "", 1, 0.00000, 0, 4000, 0
      pwmidle_targ_ramptime = scalar, U08, 59, "s", 0.1, 0.00000, 2, 10, 1
      pwmidle_rpmdot_disablepid = scalar, S16, 60, "", 10, 0, 100, 1000, 0
      pwmidle_port = bits, U08, 62, [0:1], "Local", "Remote Port 1", "Remote Port 2", "Remote Port 3" ; for compatability
      pwmidle_port2 = bits, U08, 62, [0:1], "FIDLE", "Remote Port 1", "Remote Port 2", "Remote Port 3"
      pwmidle_dp_decay_factor = scalar, U08, 63, "", 1, 0, 0, 100, 0
      boost_ctl_sensitivity = scalar, S16, 64, "", 0.1, 0, 0, 500, 1
      boost_ctl_settings_freq = bits, U08, 67, [0:2], "INVALID", "78Hz", "39Hz", "26Hz", "19.5Hz", "15.6Hz", "13Hz", "11.1Hz"
      boost_ctl_settings_on = bits, U08, 67, [3:3], "Off","On"
      boost_ctl_settings_cl = bits, U08, 67, [4:4], "Open-loop", "Closed-loop"
;      boost_ctl_settings_invert = bits, U08, 67, [5:5], "Normal", "Inverted"
      boost_ctl_settings_invert_new= bits,   U08, 67, [5:5], "Normal", "Inverted"
      boost_ctl_settings_remote = bits, U08, 67, [6:6], "Local", "Remote"
      boost_ctl_settings_tunemode=   bits,U08, 67, [7:7], "Basic", "Advanced"
      boost_ctl_pins = bits, U08, 68, [0:3], "Off", "IAC1", "IAC2", "INVALID", "JS11", "INVALID", "INVALID", "INVALID", "Fidle", "D14", "D16", "D15", "INVALID", "INVALID", "INVALID","INVALID"
      boost_ctl_remote = bits, U08, 68, [4:5], "INVALID", "Port 1", "Port 2", "Port 3"
      boost_ctl_settings_initialvals=bits,U08,68, [6:6], "Off", "Use Initial Value Table" ; Note that this bit is in a different var
      boost_ctl_Kp = scalar, U08, 69, "%", 1, 0.00000, 0, 200, 0
      boost_ctl_Ki = scalar, U08, 70, "%", 1, 0.00000, 0, 200, 0
      boost_ctl_Kd = scalar, U08, 71, "%", 1, 0.00000, 0, 200, 0
      boost_ctl_closeduty = scalar, U08, 72, "%", 1, 0.00000, 0, 100, 0
      boost_ctl_openduty = scalar, U08, 73, "%", 1, 0.00000, 0, 100, 0
      boost_ctl_ms = scalar, U16, 74, "ms", 1, 0.00000, 10, 500, 0
      boost_ctl_load_targets = array, S16, 76, [8x8], "%", 0.1, 0, 0, 400, 1
      boost_ctl_loadtarg_tps_bins = array, S16, 204, [8], "%", 0.1, 0, 0, 100, 1
      boost_ctl_loadtarg_rpm_bins = array, U16, 220, [8], "rpm", 1, 0, 0, {rpmhigh}, 0
      boost_ctl_pwm_targets = array, U08, 236, [8x8], "%", 1, 0, 0, 100, 0
      boost_ctl_pwmtarg_tps_bins = array, S16, 300, [8], "%", 0.1, 0, 0, 100, 1
      boost_ctl_pwmtarg_rpm_bins = array, U16, 316, [8], "rpm", 1, 0, 0, {rpmhigh}, 0
      pwmidle_crank_dutyorsteps_duty = array, U16, 332, [4], "%", 0.392, 0.00000, 0, 100, 1 
      pwmidle_crank_dutyorsteps_steps = array, U16, 332, [4], "steps", 1, 0, 0, 512, 0
#if CELSIUS
      pwmidle_crank_clt_temps = array, S16, 340, [4], "°C", 0.05555,  -320.000,{cltlowlim},   {clthighlim},      1
#else
      pwmidle_crank_clt_temps = array, S16, 340, [4], "°F",       0.10000,   0.00000,{cltlowlim},   {clthighlim},      1	
#endif
      injadvTable3    = array ,  S16,    348,    [  6x6], "deg",      0.10000,   0.00000, -360.00,  720.00,      1 ; * ( 72 bytes)	
      srpm_injadv3    = array ,  U16,    420,    [    6], "RPM",      1.00000,   0.00000,    0.00,{rpmhigh},      0 ; * ( 12 bytes)	
      smap_injadv3    = array ,  S16,    432,    [    6],   { bitStringValue( algorithmUnits ,  algorithm  ) },      0.10000,   0.00000,    0.00,  {loadhigh},      1 ; * ( 12 bytes)	
 
      primePWTable    = array ,  S16,    444,    [   10], "ms",       0.10000,   0.00000,  0.00,   65.00,      1 ; * ( 20 bytes)
      crankPctTable   = array ,  U16,    464,    [   10], "%",       1,   1,  1,   10000,      0 ; * ( 20 bytes)

      asePctTable     = array ,  S16,    484,    [   10], "%",        1.00000,   0.00000,  0.00,  400.00,      0 ; * (  2 bytes)
      aseCntTable     = array ,  S16,    504,    [   10], "cycles",   1.00000,   0.00000,  0.00, 2500.00,      0 ; * (  2 bytes)
#if CELSIUS
      matTemps        = array ,  S16,    524,    [    6], "°C",       0.05555,  -320.000,-40.00,  150.00,      1 ; * ( 12 bytes)
#else
      matTemps        = array ,  S16,    524,    [    6], "°F",       0.10000,   0.00000,-40.00,  300.00,      1
#endif
      matRetard       = array ,  U08,    536,    [    6], "deg",      0.10000,   0.00000,  0.00,    25.5,      1 ; * (  6 bytes)
      EAEAWCRPMbins   = array,   U16,    542,    [   12], "rpm",      1.00000,   0.00000,0,       {rpmhigh},       0 ; * (24 bytes)
      EAESOCRPMbins   = array,   U16,    566,    [   12], "rpm",      1.00000,   0.00000,0,	  {rpmhigh},       0 ; * (24 bytes)
      EAEAWCKPAbins   = array,   U16,    590,    [   12], { bitStringValue( algorithmUnits ,  (eaeload ? eaeload : algorithm) ) },      0.10000,   0.00000,0,       {loadhigh},         0
      EAESOCKPAbins   = array,   U16,    614,    [   12], { bitStringValue( algorithmUnits ,  (eaeload ? eaeload : algorithm) ) },      0.10000,   0.00000,0,       {loadhigh},         0
      EAEBAWC	      = array,   U08,    638,    [   12], "%",        1.00000,   0.00000,0,       100,         0 ; * (12 bytes)
      EAEBSOC	      = array,   U08,    650,    [   12], "%",        0.10000,   0.00000,0,       25.5,         1 ; * (12 bytes)
      EAEAWN	      = array,   U08,    662,    [   12], "%",        1.00000,   0.00000,0,       200,         0 ; * (12 bytes)
      EAESON	      = array,   U08,    674,    [   12], "%",        1.00000,   0.00000,0,	  200,         0 ; * (12 bytes)
      EAEAWW	      = array,   U08,    686,    [   12], "%",        1.00000,   0.00000,0,	  200,         0
      EAESOW	      = array,   U08,    698,    [   12], "%",        1.00000,   0.00000,0,	  200,         0
      ; Supplemental corrections for MAT. (old version)
#if CELSIUS
      matCorrTemps    = array ,  S16,    710,    [    6], "°C",       0.05555,  -320.000,-40.00,  150.00,      1 ; * ( 12 bytes)
#else
      matCorrTemps    = array ,  S16,    710,    [    6], "°F",       0.10000,   0.00000,-40.00,  300.00,      1
#endif
      matCorrDelta    = array ,  S16,    722,    [    6], "%",        0.10000,   0.00000,-120.0,   120.0,      1 ; * (  6 bytes)
      boost_ctl_lowerlimit = scalar, S16, 734,   "kPa",  0.1, 0, 5, {loadhigh}, 1
; pad 10 bytes
#if CELSIUS
      temp_table_p5   = array,  S16,     746,    [   10], "°C",	      0.05555,   -320.000, {cltlowlim},   {clthighlim},     0
#else
      temp_table_p5   = array,  S16,     746,    [   10], "°F",       0.10000,   0.000,{cltlowlim},   {clthighlim},      1
#endif
      tsf_rpm          = scalar,   U16,    766, "rpm", 1, 0, 0, {rpmhigh}, 0
      tsf_kpa          = scalar,   S16,    768, "kPa", 0.1, 0, 0, {loadhigh}, 1
      tsf_tps          = scalar,   S16,    770, "%", 0.10000,   0.00000,  0.00,  100.00,      1;
      tss_rpm          = scalar,   U16,    772, "rpm", 1, 0, 0, {rpmhigh}, 0
      tss_kpa          = scalar,   S16,    774, "kPa", 0.1, 0, 0, {loadhigh}, 1
      tss_tps          = scalar,   S16,    776, "%", 0.10000,   0.00000,  0.00,  100.00,      1;
#if CELSIUS
      EAEAWWCLTbins   = array,  S16,     778,    [   12], "deg",       0.05555,   -320.000, {cltlowlim},   {clthighlim},     0
      EAESOWCLTbins   = array,  S16,     802,    [   12], "deg",       0.05555,   -320.000, {cltlowlim},   {clthighlim},     0
#else
      EAEAWWCLTbins   = array,  S16,     778,    [   12], "deg",       0.10000,   0.000,{cltlowlim},   {clthighlim},      1
      EAESOWCLTbins   = array,  S16,     802,    [   12], "deg",       0.10000,   0.000,{cltlowlim},   {clthighlim},      1
#endif

;      airden_scaling  = scalar, U08,     826, "%", 1,   0.00000,  50,  150.00,      0
      ts_port_f     = bits  ,  U08,      827,      [0:3], "PE1", "PE0", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "Remote Port3 Bit 0", "Remote Port3 Bit 1", "Remote Port3 Bit 2", "Remote Port3 Bit 3", "Remote Port3 Bit 4", "Remote Port3 Bit 5", "Remote Port3 Bit 6", "Remote Port3 Bit 7"
      ts_port_s     = bits  ,  U08,      827,      [4:7], "PE1", "PE0", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "Remote Port3 Bit 0", "Remote Port3 Bit 1", "Remote Port3 Bit 2", "Remote Port3 Bit 3", "Remote Port3 Bit 4", "Remote Port3 Bit 5", "Remote Port3 Bit 6", "Remote Port3 Bit 7"
;      feature5_0                          828 was 1000
      OvrRunC           = bits  ,  U08,    828,      [0:0], "Off", "On"
;      OvrRunAndSpkC     = bits  ,  U08,    828,      [7:7], "Off", "On"
      f5_0_tsf       = bits  ,  U08,      828,      [1:1], "Off", "On"
      f5_0_tsf_opt   = bits  ,  U08,      828,      [2:3], "Hardware", "rpm", "kPa", "TPS"
      f5_0_tss_opt   = bits  ,  U08,      828,      [5:6], "Hardware", "rpm", "kPa", "TPS"
      f5_0_tss       = bits  ,  U08,      828,      [4:4], "Off", "On"
      pwmidlecranktaper= scalar,  U08,     831,     "s",        0.1,   0,  0,  10,      1
      pwmidleset_inv  = bits,     U08,     832, [1:1], "Normal, 0%=off", "Inverted, 100%=off"
      pwmidleset_koeo = bits,   U08, 832, [7:7], "Off", "On"

      fc_rpm          = scalar,   U16,     833, "rpm", 1, 0, 0, {rpmhigh}, 0
      fc_kpa          = scalar,   S16,     835, "kPa", 0.1, 0, 0, {loadhigh}, 1
      fc_tps          = scalar,   S16,     837, "%", 0.10000,   0.00000,  0.00,  100.00,      1;
#if CELSIUS
      fc_clt          = scalar,   S16,     839,  "°C",       0.05555,  -320.000, {cltlowlim},   {clthighlim},      1 ; * (  2 bytes)
#else
      fc_clt          = scalar,   S16,     839,  "°F",       0.10000,   0.00000, {cltlowlim},   {clthighlim},      1
#endif
      fc_delay        = scalar,   U08,     841,  "s",        0.1, 0, 0, 25.5, 1

      tacho_opt80     = bits,     U08,     842, [7:7], "Off", "On"
      tacho_opt40     = bits,     U08,     842, [6:6], "Normal", "Half speed"
      tacho_opt3f     = bits,     U08,     842, [0:3], "IGN (JS10)", "IAC1", "IAC2", "JS11", "FIDLE", "D14", "D16", "D15", "AD06/JS5", "AD07/JS4", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" 
      EAElagsource    = bits,     U08,     843, [0:0], "TPSdot", "MAPdot"
      EAElagthresh    = scalar,   S16,     844, "unit/sec",  1, 0, 0.00, 1000, 0
      EAElagRPMmax    = scalar,   U16,     846, "rpm", 1, 0, 0.00, {rpmhigh}, 0
      fc_ego_delay    = scalar,   U08,     848, "s", 1, 0, 0.00, 10, 0
      fc_rpm_lower    = scalar,   U16,     849, "rpm", 1, 0, 0, {rpmhigh}, 0
      pwmidle_shift_lower_rpm = scalar, U16, 851, "rpm", 1, 0, 0, {rpmhigh}, 0
      pwmidle_shift_open_time = scalar, U08, 853, "s", 0.1, 0, 0, 10, 1
;morepage5[15]
      ; Port Settings constants
      rmt_psEnabled       = array ,  U08,    864,    [    8], "on/off",   1.00000,   0.00000,      0,       1,     0 ; * (  2 bytes)
      rmt_psCondition     = array ,  U08,    872,    [  8x2], "",         1.00000,   0.00000,      0,     255,     0 ; * (  2 bytes)
      rmt_psConnector     = array ,  U08,    888,    [    8], "",         1.00000,   0.00000,      0,     255,     0 ; * (  2 bytes)
      rmt_psInitValue     = array ,  U08,    896,    [    8], "",         1.00000,   0.00000,      0,     255,     0 ; * (  2 bytes)
      rmt_psPortValue     = array ,  U08,    904,    [    8], "",         1.00000,   0.00000,      0,     255,     0 ; * (  2 bytes)
      rmt_psOutSize       = array ,  U08,    912,    [  8x2], "",         1.00000,   0.00000,      0,     255,     0 ; * (  2 bytes)
      rmt_psOutOffset     = array ,  U16,    928,    [  8x2], "",         1.00000,   0.00000,      0,    1024,     0 ; * (  2 bytes)
      rmt_psThreshold     = array ,  S16,    960,    [  8x2], "",         1.00000,   0.00000,-32768.0,32767.0,     0 ; * (  4 bytes)
      rmt_psHysteresis    = array ,  S16,    992,    [  8x2], "",         1.00000,   0.00000,-32768.0,32767.0,     0 ; * (  4 bytes)

page = 3
      advanceTable1   = array ,  S16,    000,    [12x12], "deg",      0.10000,   0.00000,-10.00,   90.00,      1 ; * (288 bytes)
      advanceTable2   = array ,  S16,    288,    [12x12], "deg",      0.10000,   0.00000,-10.00,   90.00,      1 ; * (288 bytes)
      srpm_table1     = array ,  U16,    576,    [   12], "RPM",      1.00000,   0.00000,  0.00,{rpmhigh},      0 ; * ( 24 bytes)
      srpm_table2     = array ,  U16,    600,    [   12], "RPM",      1.00000,   0.00000,  0.00,{rpmhigh},      0 ; * ( 24 bytes)
      smap_table1     = array ,  S16,    624,    [   12], { bitStringValue( algorithmUnits ,  IgnAlgorithm  ) },        0.10000,   0.00000,  0.00,  {loadhigh},      1
      smap_table2     = array ,  S16,    648,    [   12], { bitStringValue( algorithmUnits ,  IgnAlgorithm2  ) },        0.10000,   0.00000,  0.00,  {loadhigh},      1
      feature3_1      = bits,    U08,    672,      [1:1], "Off", "On"
      feature3_3      = bits,    U08,    672,      [3:3], "Off", "On"
      feature3_matase = bits,    U08,    672,      [6:6], "Off", "On"
      launch_opt_on   = bits,    U08,    673,      [6:7], "Off", "Launch","INVALID","Launch/Flatshift"
      launch_opt_pins = bits,    U08,    673,      [0:3], "PE0/JS7", "PE1", "JS10", "JS11", "JS5", "JS4", "Remote Port3 Bit 0", "Remote Port3 Bit 1", "Remote Port3 Bit 2", "Remote Port3 Bit 3", "Remote Port3 Bit 4", "Remote Port3 Bit 5", "Remote Port3 Bit 6", "Remote Port3 Bit 7", "INVALID" "INVALID"
      launch_sft_zone = scalar,  S16,    674,      "RPM",      1.00000,   0.00000,  100,  2000,      0 ; * (  2 bytes)
      launch_sft_deg  = scalar,  S16,    676,             "deg",      0.10000,   0.00000, -90.0,  180.00,      2 ; * (  2 bytes)
      launch_hrd_lim  = scalar,  U16,    678,             "RPM",      1.00000,   0.00000,  0.00,  {rpmhigh},      0 ; * (  2 bytes)
      launch_tps      = scalar,  S16,    680,  "%",       0.10000,   0.00000,   0.0,  100.00,      0 ;
      launchlimopt    = bits  ,  U08,    682,      [0:1], "None", "Spark Cut", "Fuel Cut", "Spark and fuel"         ; * (  1 byte)
; spare
      flats_arm       = scalar,  U16,    685,      "RPM",      1.00000,   0.00000,  0.00,  {rpmhigh},      0
; spare
      flats_deg       = scalar,  S16,    689,      "deg",      0.10000,   0.00000, -90.0,  180.00,      2 ; * (  2 bytes)
      flats_hrd       = scalar,  U16,    691,      "RPM",      1.00000,   0.00000,  0.00,  {rpmhigh},      0 ; * (  2 bytes)
      staged_pri_size = scalar,  U16,    693,      "cc",       1.00000, 0.00000, 0.0000, 15000,      0 ; * ( 2 bytes)
      staged_sec_size = scalar,  U16,    695,      "cc",       1.00000, 0.00000, 0.0000, 15000,      0 ; * ( 2 bytes)
      staged_first_param = bits, U08,   697,   [0:2], "Off", "RPM", "MAP", "TPS", "Duty", "Table", "INVALID", "INVALID"
      staged_second_param = bits, U08, 697,    [3:5], "Off", "RPM", "MAP", "TPS", "Duty", "INVALID", "INVALID", "INVALID"
      staged_transition_on = bits, U08, 697,   [6:6], "Off", "On"
      staged_second_logic = bits, U08, 697,   [7:7], "OR", "AND"
      staged_transition_events = scalar, U08, 698, "ign events", 1.00000, 0.00000, 0.00, 255.0,  0
      staged_param_1 = scalar, U16, 699, "units", 1.00000, 0.00000, 0.00, 25500.0, 0
      staged_param_2 = scalar, U16, 701, "units", 1.00000, 0.00000, 0.00, 25500.0, 0
      staged_hyst_1 = scalar, U16, 703, "units", 1.00000, 0.00000, 0.00, 25500.0, 0
      staged_hyst_2 = scalar, U16, 705, "units", 1.00000, 0.00000, 0.00, 25500.0, 0

; Nitrous System
      N2Oopt_01   = bits,   U08, 707,[0:1],"INVALID","Bank1", "Bank2", "Both"
      N2Oopt_2    = bits,   U08, 707,[2:2], "Off", "On"
      N2Oopt_3    = bits,   U08, 707,[3:3], "Off", "On"

      N2ORpm        = scalar, U16, 708, "RPM",   1, 0, 1000, {rpmhigh}, 0
      N2ORpmMax     = scalar, U16, 710, "RPM",   1, 0, 1000, {rpmhigh}, 0
      N2OTps        = scalar, S16, 712, "%", 0.10000,   0.00000,  0.00,  100.00,      1;
#if CELSIUS
      N2OClt        = scalar, S16, 714,             "°C",       0.05555,  -320.000, {cltlowlim},   {clthighlim},      1 ; * (  2 bytes)
#else
      N2OClt        = scalar, S16, 714,             "°F",       0.10000,   0.00000, {cltlowlim},   {clthighlim},      1
#endif
      N2OAngle      = scalar, S16, 716,             "deg",      0.10000,   0.00000, 0,  50,      2 ; * (  2 bytes)
      N2OPWLo       = scalar, U16, 718, "ms",  0.001, 0, 0, 25, 3
      N2OPWHi       = scalar, U16, 720, "ms",  0.001, 0, 0, 25, 3

;nitrous/launch
      N2Odel_launch = scalar, U08,   722,       "s",         0.01, 0, 0, 2.55, 2
      N2Odel_flat   = scalar, U08,   723,       "s",         0.01, 0, 0, 2.55, 2
      N2Oholdon     = scalar, U08,   724,       "s",         0.01, 0, 0, 2.55, 2

;nitrous stage 2
; Nitrous System
      N2O2Rpm       = scalar, U16, 725, "RPM",   1, 0, 1000, {rpmhigh}, 0
      N2O2RpmMax    = scalar, U16, 727, "RPM",   1, 0, 1000, {rpmhigh}, 0
      N2O2delay     = scalar, U08, 729, "s", 0.01, 0, 0, 2.55,2
      N2O2Angle     = scalar, S16, 730,             "deg",      0.10000,   0.00000, 0,  50,      2 ; * (  2 bytes)
      N2O2PWLo      = scalar, U16, 732, "ms",  0.000666, 0, 0, 25, 3
      N2O2PWHi      = scalar, U16, 734, "ms",  0.000666, 0, 0, 25, 3

;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, 736, "",   1, 0, 0, 65535, 0
    user_value2      = scalar, U16, 738, "",   1, 0, 0, 65535, 0
    user_conf0       = bits, U08, 740, [0:0], "Off", "On"
    user_conf1       = bits, U08, 740, [1:2], "Mode 0", "Mode 1", "Mode 2", "Mode 3"
;end user defined
    staged_secondary_enrichment = scalar, U16, 741, "ms", 0.001, 0, 0, 10, 3
    staged_percents = array, U08, 743, [6x6], "%", 1, 0, 0, 100, 0
    staged_rpms = array, U16, 779, [6], "rpm", 1, 0, 0, {rpmhigh}, 0
    staged_loads = array, S16, 791, [6], "%", 0.1000, 0, 0, 250, 0
      N2Oopt_pins = bits,   U08, 803,[0:3], "PE0/JS7", "PE1", "JS10", "JS11", "JS5", "JS4", "INVALID" "INVALID", "Remote Port3 Bit 0", "Remote Port3 Bit 1", "Remote Port3 Bit 2", "Remote Port3 Bit 3", "Remote Port3 Bit 4", "Remote Port3 Bit 5", "Remote Port3 Bit 6", "Remote Port3 Bit 7"
      N2Oopt_pins2 = bits,   U08, 803,[4:7], "IAC1+2", "FIDLE+D15", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "Remote Port1 Bits 0+1", "Remote Port1 Bits 1+2", "Remote Port1 Bits 2+3", "Remote Port1 Bits 3+4", "Remote Port1 Bits 4+5", "Remote Port1 Bits 5+6", "Remote Port1 Bits 6+7", "INVALID"
;2 gaps
      dwelltime_trl  = scalar,  U08, 806,             "ms",       0.10000,       0,        0.1,     25.5, 1
      RotarySplitTable = array, S16,  807,    [8x8], "deg",  0.10000, 0.00000, -20, 20, 1
      RotarySplitLoad = array, U16,   935, [ 8 ], { bitStringValue( algorithmUnits ,  IgnAlgorithm  ) }, 0.10000, 0.00000, 0, 65535, 0
      RotarySplitRPM = array, U16,  951, [ 8 ], "RPM", 1, 0.00000, 0, {rpmhigh}, 0
      RotarySplitModeFD = bits, U08, 967, [0:0], "FC mode", "FD mode"
      RotarySplitModeNeg = bits, U08, 967, [1:1], "Not Allowed", "Allowed"

      NoiseFilterRpm = array, U16, 968, [  4], "RPM",      1, 0.00000, 0.00, {rpmhigh},  0
      NoiseFilterLen = array, U16, 976, [  4], "usec",     0.66667, 0.00000, 0.00, 43000, 1
     
      staged_primary_delay = scalar, U08, 985, "ign events", 1, 0, 0, 30, 0
      VariableLagTPSBins = array,  U08,  986, [4], "%/sec", 1, 0.000000, 0.00, 255.00, 0
      VariableLagMapLags = array,  U08,  990, [4], "Lag", 1, 0.000000, 0.00, 255.00, 0
      trig_init      = scalar, U08, 1003, "", 1,0,0,255,0
      inj_time_mask  = scalar, U08, 1004, "", 1,0,0,100,0

page = 4
      pwm_testio   = bits, U08, 0, [0:2], "INVALID", "78Hz", "39Hz", "26Hz", "19.5Hz", "15.6Hz", "13Hz", "11.1Hz"
      duty_testio  = scalar,   U08,    1,   "%", 1, 0, 0, 100, 1
      testop_0    = scalar, U08, 2, "", 1,0,0,255,0
;      testop_coil = bits, U08, 2, [0:1], "Off", "One", "Sequence", "INVALID"
      testop_coil = bits, U08, 2, [0:1], "Off", "One", "INVALID", "INVALID"
      testop_fp   = bits, U08, 2, [4:4], "Off", "On"
;      testop_inj  = bits, U08, 2, [5:6], "Off", "One", "Sequence", "All"
      testop_inj  = bits, U08, 2, [5:6], "Off", "One", "INVALID", "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
      testrpm      = scalar, U16, 4, "RPM", 1.0, {  (120000/testint) - (testint/ 0.128) },0,937500,0
      testpw       = scalar, U16, 6,             "ms",       0.0006660,   0.00000,  0,   43,      3 ; * (  1 byte)
      testinjcnt   = scalar, U16, 8, "", 1,0,0,65535,0, noLocalUpdate
      testsel_inj     = bits,  U08,    10, [0:1], "Inj1", "Inj2", "Inj3/C", "Inj4/D"
      testsel_coil     = bits, U08,     10, [4:6], "CoilA", "CoilB", "CoilC", "CoilD", "CoilE", "CoilF", "INVALID", "INVALID"
      advanceTable3   = array ,  S16,    011,    [12x12], "deg",      0.10000,   0.00000,-10.00,   90.00,      1 ; * (288 bytes)
      srpm_table3     = array ,  U16,    299,    [   12], "RPM",      1.00000,   0.00000,  0.00,{rpmhigh},      0 ; * ( 24 bytes)
      smap_table3     = array ,  S16,    323,    [   12], { bitStringValue( algorithmUnits ,  IgnAlgorithm  ) },      0.10000,   0.00000,  0.00,  {loadhigh},      1 ; * ( 24 bytes)
      testinjPwmT     = scalar,  U08,    347,             "ms",       0.12800,   0.12800,  0.00,   32.64,      1 ; * (  1 byte)
      testinjPwmPd    = scalar,  U08,    348,             "us",       1.00000,   0.00000, 40.00,  100.00,      0 ; * (  1 byte)
      testinjPwmP     = scalar,  U08,    349,             "%",        1.00000,   0.00000,  0.00,  100.00,      0 ; * (  1 byte)
#if CELSIUS
      RevLimLookup    = array ,  S16,    350,    [    8], "°C",       0.05555,  -320.000,{cltlowlim},   {clthighlim},      1 ; * ( 16 bytes)
#else
      RevLimLookup    = array ,  S16,    350,    [    8], "°F",       0.10000,   0.00000,{cltlowlim},   {clthighlim},      1 ; * ( 16 bytes) 
#endif
      RevLimRpm1      = array ,  U16,    366,    [    8], "RPM",      1.00000,   0.00000,  0.00,{rpmhigh},      0 ; * ( 16 bytes)
      iacpostest     = scalar, U16, 382, "steps", 1,0,0,512,0
      iachometest      = scalar, U16, 384, "steps", 1,0,0,65535,0
      flashlock       = bits, U08, 386, [0:0], "Locked", "Unlocked" ; tables 0-3
      idleadvance_on  = bits, U08, 387, [0:2], "Off", "Load", "RPMs", "INVALID", "Adaptive", "INVALID", "INVALID", "INVALID"
      idleadvance_adder  = bits, U08, 387, [3:3], "Set Value", "Adder"
      idleadvance_cl_cond = bits, U08, 387, [4:4], "Manual", "CL PID"
      idleadvance_tps = scalar, S16, 388, "%", 0.1, 0, 0, 100, 1
      idleadvance_rpm = scalar, U16, 390, "rpm", 1, 0, 0, 3000, 0
      idleadvance_load = scalar, S16, 392, "%", 0.1, 0, 0, 100, 0
#if CELSIUS
      idleadvance_clt = scalar, S16, 394, "°C", 0.05555, -320, {cltlowlim},   {clthighlim}, 1
#else
      idleadvance_clt = scalar, S16, 394, "°F", 0.10000, 0.00000, {cltlowlim},   {clthighlim}, 1
#endif
      idleadvance_delay = scalar, U08, 396, "s", 1, 0, 0, 5, 0
;      feature413_dbg = bits, U08, 413, [0:0], "Off", "On"
;      feature413_missdbg = bits, U08, 413, [1:1], "Off", "On"
     
      seq_inj         = bits, U08, 415, [0:1], "Untimed injection", "Sequential/Semi-sequential", "Semi-sequential Siamese", "Sequential Siamese" ;	
      extrainj        = bits, U08, 415, [2:2], "Standard drivers", "Additional drivers" ;	
      injdualvalue    = bits, U08, 415, [3:3], "Single value", "Dual values" ;	
      usevetrim       = bits, U08, 415, [4:4], "Don't use VE Trim Tables", "Use VE Trim Tables" ;	
      injusetable    = bits, U08, 415, [5:5], "Fixed Timing", "Use table" ;	
      injtimingmode   = bits, U08, 415, [6:7], "Start-of-pulse", "Mid-pulse", "End-of-pulse", "INVALID" ;	
      injadv1         = scalar,  S16,    416,             "deg",      0.10000,   0.00000, -360.00,  720.00,      1 ; * (  2 bytes)	
      injadv2         = scalar,  S16,    418,             "deg",      0.10000,   0.00000, -360.00,  720.00,      1 ; * (  2 bytes)	
      injadv3         = scalar,  S16,    420,             "deg",      0.10000,   0.00000, -360.00,  720.00,      1 ; * (  2 bytes)	
      injstagedadv1   = scalar,  S16,    422,             "deg",      0.10000,   0.00000, -360.00,  720.00,      1 ; * (  2 bytes)	
      injstagedadv2   = scalar,  S16,    424,             "deg",      0.10000,   0.00000, -360.00,  720.00,      1 ; * (  2 bytes)	
      injstagedadv3   = scalar,  S16,    426,             "deg",      0.10000,   0.00000, -360.00,  720.00,      1 ; * (  2 bytes)	
      injadvTable1    = array ,  S16,    428,    [  6x6], "deg",      0.10000,   0.00000, -360.00,  720.00,      1 ; * ( 72 bytes)	
      injadvTable2    = array ,  S16,    500,    [  6x6], "deg",      0.10000,   0.00000, -360.00,  720.00,      1 ; * ( 72 bytes)	
      srpm_injadv1    = array ,  U16,    572,    [    6], "RPM",      1.00000,   0.00000,    0.00,{rpmhigh},      0 ; * ( 12 bytes)	
      srpm_injadv2    = array ,  U16,    584,    [    6], "RPM",      1.00000,   0.00000,    0.00,{rpmhigh},      0 ; * ( 12 bytes)	
      smap_injadv1    = array ,  S16,    596,    [    6],   { bitStringValue( algorithmUnits ,  algorithm  ) },      0.10000,   0.00000,    0.00,  {loadhigh},      1 ; * ( 12 bytes)	
      smap_injadv2    = array ,  S16,    608,    [    6],   { bitStringValue( algorithmUnits ,  algorithm  ) },      0.10000,   0.00000,    0.00,  {loadhigh},      1 ; * ( 12 bytes)	
      injcrankadv1    = scalar,  S16,    620,             "deg",      0.10000,   0.00000, -360.00,  720.00,      1 ; * (  2 bytes)	
      injcrankadv2    = scalar,  S16,    622,             "deg",      0.10000,   0.00000, -360.00,  720.00,      1 ; * (  2 bytes)	
      hybrid_rpm      = scalar,  U16,    624,             "RPM",      1.00000,   0.00000,    0.00,{rpmhigh},      0 ; * (  2 bytes)	
      hybrid_hyst     = scalar,  U16,    626,             "RPM",      1.00000,   0.00000,    0.00,{rpmhigh},      0 ; * (  2 bytes)	
      injOpen3        = scalar,  U16,    628,             "ms",       0.001,   0.00000,  0.00,   25.50,      3 ; * (  1 byte)
      battFac3        = scalar,  U16,    630,             "ms/v",     0.000166667,       0.0,   0.0,     1.0,      3 ; * (  1 byte)
      injOpen4        = scalar,  U16,    632,             "ms",       0.001,   0.00000,  0.00,   25.50,      3 ; * (  1 byte)
      battFac4        = scalar,  U16,    634,             "ms/v",     0.000166667,       0.0,   0.0,     1.0,      3 ; * (  1 byte)
      veTrim1         = array ,  S08,    636,      [16x16], "%",   0.0976562500, 1024.0000,   87.60,  112.40,      1 ; * (256 bytes)
      frpm_trim1      = array ,  U16,    892,      [   16], "RPM",      1.00000,   0.00000,    0.00,{rpmhigh},      0 ; * ( 32 bytes)
      fmap_trim1      = array ,  S16,    924,      [   16], { bitStringValue( algorithmUnits ,  algorithm  ) },        0.10000,   0.00000,    0.00,  {loadhigh},      1 ; * ( 32 bytes)

      veTrim1dozen    = array ,  S08,    636,      [12x12], "%",   0.0976562500, 1024.0000,   87.60,  112.40,      1 ; * (144 bytes)
      frpm_trim1doz   = array ,  U16,    892,      [   12], "RPM",      1.00000,   0.00000,    0.00,{rpmhigh},      0 ; * ( 24 bytes)
      fmap_trim1doz   = array ,  S16,    924,      [   12], { bitStringValue( algorithmUnits ,  algorithm  ) },        0.10000,   0.00000,    0.00,  {loadhigh},      1 ; * ( 24 bytes)
;956

;      ; The following is available for use by TunerStudio but isn't presently.
;
;      ; Used to store sensor calibration settings last written to the controller
;      sen_calib_table_id = array,  U08, 968, [   2],   "id",   1.0,  0.0,   0,    255, 0 ; (2 bytes)
;      sen_calib_units       = array,  U08, 970, [   2],   "id",   1.0,  0.0,   0,    255, 0 ; (2 bytes)
;
;      sen_calib_bias     = array,  U32, 972, [   2], "ohms",     1,    0,   0, 100000, 0 ; (8 bytes)
;      sen_calib_temp     = array,  S16, 980, [ 2x3],  "deg",   0.1,    0, -40,    400, 1 ; (12 bytes)
;      sen_calib_res1     = array,  U32, 992, [ 2x3], "ohms",     1,    0,   0, 100000, 0 ; (24 bytes )
;
;      ; The index of the selected EGO sensor as defined in the solutions section of the 
;      ; ReferenceTable section of the ini, this may also be found in the ms2ReferenceTables.ini 
;      ; file found in the inc dir of your TunerStudio installation.
;      ego_calib_selection= scalar, U08, 1016,          "index",  1.0,  0.0, 0.0,  255, 0 ; * (  1 byte)
;      ego_calib_volts    = array,  U08, 1017, [   3],  "Volts",  0.1,  0.0, 0.0,  5.0, 1 ; (3 bytes)
;      ego_calib_afrs     = array,  U08, 1020, [   3],  "AFR",    0.1,  0.0, 0.0, 25.5, 1 ; (3 bytes)

    can_outpc_msg = scalar,  U16,    956,          "",      1,   0.00000, 1,  2047,      0
    can_outpc_gp00_master = bits, U08, 958, [7:7], "Off", "On"
    can_outpc_gp00_int = bits, U08, 958, [1:3], "INVALID", "1Hz", "2Hz", "5Hz", "10Hz", "20Hz", "50Hz", "INVALID"
    can_outpc_gp00 = bits, U08, 958, [0:0], "Off", "On"
    can_outpc_gp01 = bits, U08, 959, [0:0], "Off", "On"
    can_outpc_gp02 = bits, U08, 960, [0:0], "Off", "On"
    can_outpc_gp03 = bits, U08, 961, [0:0], "Off", "On"
    can_outpc_gp04 = bits, U08, 962, [0:0], "Off", "On"
    can_outpc_gp05 = bits, U08, 963, [0:0], "Off", "On"
    can_outpc_gp06 = bits, U08, 964, [0:0], "Off", "On"
    can_outpc_gp07 = bits, U08, 965, [0:0], "Off", "On"
    can_outpc_gp08 = bits, U08, 966, [0:0], "Off", "On"
    can_outpc_gp09 = bits, U08, 967, [0:0], "Off", "On"
    can_outpc_gp10 = bits, U08, 968, [0:0], "Off", "On"
    can_outpc_gp11 = bits, U08, 969, [0:0], "Off", "On"
    can_outpc_gp12 = bits, U08, 970, [0:0], "Off", "On"
    can_outpc_gp13 = bits, U08, 971, [0:0], "Off", "On"
    can_outpc_gp14 = bits, U08, 972, [0:0], "Off", "On"
    can_outpc_gp15 = bits, U08, 973, [0:0], "Off", "On"
    can_outpc_gp17 = bits, U08, 974, [0:0], "Off", "On"
    can_outpc_gp18 = bits, U08, 975, [0:0], "Off", "On"
    can_outpc_gp26 = bits, U08, 976, [0:0], "Off", "On"
    can_outpc_gp27 = bits, U08, 977, [0:0], "Off", "On"
    can_outpc_gp28 = bits, U08, 978, [0:0], "Off", "On"
    can_outpc_gp29 = bits, U08, 979, [0:0], "Off", "On"
    can_outpc_gp43 = bits, U08, 980, [0:0], "Off", "On"
    can_outpc_gp46 = bits, U08, 981, [0:0], "Off", "On"
    can_outpc_gp47 = bits, U08, 982, [0:0], "Off", "On"
    can_outpc_gp51 = bits, U08, 983, [0:0], "Off", "On"
    can_outpc_gp52 = bits, U08, 984, [0:0], "Off", "On"
    can_outpc_gp55 = bits, U08, 985, [0:0], "Off", "On"
    can_outpc_gp57 = bits, U08, 986, [0:0], "Off", "On"
    can_outpc_gp58 = bits, U08, 987, [0:0], "Off", "On"
    can_outpc_gp59 = bits, U08, 988, [0:0], "Off", "On"
;spare1
;990
     
page = 5
      veTable1        = array ,  U08,      0,      [16x16], "%",        1.00000,   0.00000,  0.00,  255.00,      0 ; * (144 bytes)
      veTable2	      = array ,  U08,      256,    [16x16], "%",        1.00000,   0.00000,  0.00,  255.00,      0 ;
      veTable3	      = array ,  U08,      512,    [16x16], "%",        1.00000,   0.00000,  0.00,  255.00,      0 ;

      frpm_table1     = array ,  U16,    768,    [   16], "RPM",      1.00000,   0.00000,  0.00,{rpmhigh},      0
      frpm_table2     = array ,  U16,    800,    [   16], "RPM",      1.00000,   0.00000,  0.00,{rpmhigh},      0
      frpm_table3     = array ,  U16,    832,    [   16], "RPM",      1.00000,   0.00000,  0.00,{rpmhigh},      0
      fmap_table1     = array ,  S16,    864,    [   16], { bitStringValue( algorithmUnits ,  algorithm  ) },        0.10000,   0.00000,  0.00,  {loadhigh},      1
      fmap_table2     = array ,  S16,    896,    [   16], { bitStringValue( algorithmUnits ,  algorithm2  ) },        0.10000,   0.00000,  0.00,  {loadhigh},      1
      fmap_table3     = array ,  S16,    928,    [   16], { bitStringValue( algorithmUnits ,  algorithm  ) },        0.10000,   0.00000,  0.00,  {loadhigh},      1

;same tables again but smaller - start in different places to 16x16
      veTable1dozen   = array ,  U08,      0,      [12x12], "%",        1.00000,   0.00000,  0.00,  255.00,      0 ; * (144 bytes)
      veTable2dozen   = array ,  U08,      144,    [12x12], "%",        1.00000,   0.00000,  0.00,  255.00,      0 ;
      veTable3dozen   = array ,  U08,      288,    [12x12], "%",        1.00000,   0.00000,  0.00,  255.00,      0 ;
      frpm_table1doz  = array ,  U16,    768,    [   12], "RPM",      1.00000,   0.00000,  0.00,{rpmhigh},      0 ; * ( 24 bytes)
      frpm_table2doz  = array ,  U16,    792,    [   12], "RPM",      1.00000,   0.00000,  0.00,{rpmhigh},      0 ; * ( 24 bytes)
      frpm_table3doz  = array ,  U16,    816,    [   12], "RPM",      1.00000,   0.00000,  0.00,{rpmhigh},      0 ; * ( 24 bytes)
      fmap_table1doz  = array ,  S16,    864,    [   12], { bitStringValue( algorithmUnits ,  algorithm  ) },        0.10000,   0.00000,  0.00,  {loadhigh},      1
      fmap_table2doz  = array ,  S16,    888,    [   12], { bitStringValue( algorithmUnits ,  algorithm2  ) },        0.10000,   0.00000,  0.00,  {loadhigh},      1
      fmap_table3doz  = array ,  S16,    912,    [   12], { bitStringValue( algorithmUnits ,  algorithm  ) },        0.10000,   0.00000,  0.00,  {loadhigh},      1

      MAFFlow       = array, U16,    960,  [12], "g/sec", 0.01000,   0.00000,  0.00,   650.0,      1
      MAFCor        = array, U08,    984,  [12], "%", 1.00000,   0.00000,  0.00,   255.0,      0
      matclt_pct    = array, U16,    996,    [6],    "%",    0.010, 0,       0,      100,   1
      matclt_flow   = array, U16,   1008,    [6],    "load*rpm",  100,       0,       0,      6553500, 0

page = 6
      veTrim2         = array ,  S08,      0,      [16x16], "%",   0.0976562500, 1024.0000,   87.60,  112.40,    1 ; * (256 bytes)
      veTrim3         = array ,  S08,      256,    [16x16], "%",   0.0976562500, 1024.0000,   87.60,  112.40,    1 ;
      veTrim4         = array ,  S08,      512,    [16x16], "%",   0.0976562500, 1024.0000,   87.60,  112.40,    1 ;

      frpm_trim2      = array ,  U16,    768,    [   16], "RPM",      1.00000,   0.00000,  0.00,{rpmhigh},      0 ; * ( 32 bytes)
      frpm_trim3      = array ,  U16,    800,    [   16], "RPM",      1.00000,   0.00000,  0.00,{rpmhigh},      0 ; * ( 32 bytes)
      frpm_trim4      = array ,  U16,    832,    [   16], "RPM",      1.00000,   0.00000,  0.00,{rpmhigh},      0 ; * ( 32 bytes)
      fmap_trim2      = array ,  S16,    864,    [   16], { bitStringValue( algorithmUnits ,  algorithm  ) },      0.10000,   0.00000,  0.00,  {loadhigh},      1 ; * ( 32 bytes)
      fmap_trim3      = array ,  S16,    896,    [   16], { bitStringValue( algorithmUnits ,  algorithm  ) },      0.10000,   0.00000,  0.00,  {loadhigh},      1 ; * ( 32 bytes)
      fmap_trim4      = array ,  S16,    928,    [   16], { bitStringValue( algorithmUnits ,  algorithm  ) },      0.10000,   0.00000,  0.00,  {loadhigh},      1 ; * ( 32 bytes)

;same tables again but smaller - start in different places to 16x16
      veTrim2dozen    = array ,  S08,      0,      [12x12], "%",   0.0976562500, 1024.0000,   87.60,  112.40,    1 ; * (144 bytes)
      veTrim3dozen    = array ,  S08,      144,    [12x12], "%",   0.0976562500, 1024.0000,   87.60,  112.40,    1 ;
      veTrim4dozen    = array ,  S08,      288,    [12x12], "%",   0.0976562500, 1024.0000,   87.60,  112.40,    1 ;
      frpm_trim2doz   = array ,  U16,    768,    [   12], "RPM",      1.00000,   0.00000,  0.00,{rpmhigh},      0 ; * ( 24 bytes)
      frpm_trim3doz   = array ,  U16,    792,    [   12], "RPM",      1.00000,   0.00000,  0.00,{rpmhigh},      0 ; * ( 24 bytes)
      frpm_trim4doz   = array ,  U16,    816,    [   12], "RPM",      1.00000,   0.00000,  0.00,{rpmhigh},      0 ; * ( 24 bytes)
      fmap_trim2doz   = array ,  S16,    864,    [   12], { bitStringValue( algorithmUnits ,  algorithm  ) },      0.10000,   0.00000,  0.00,  {loadhigh},      1 ; * ( 24 bytes)
      fmap_trim3doz   = array ,  S16,    888,    [   12], { bitStringValue( algorithmUnits ,  algorithm  ) },      0.10000,   0.00000,  0.00,  {loadhigh},      1 ; * ( 24 bytes)
      fmap_trim4doz   = array ,  S16,    912,    [   12], { bitStringValue( algorithmUnits ,  algorithm  ) },      0.10000,   0.00000,  0.00,  {loadhigh},      1 ; * ( 24 bytes)
      ITB_load_loadvals= array,  S16,     960,    [   10], "%",         0.10000,   0.000, 0,     100.00,      1
      ITB_load_switchpoints = array,S16,  980,    [   10], "%",         0.10000,   0.000, 0,     100.00,      1
      ITB_load_rpms = array,     U16,     1000,   [   10], "rpm",       1.0000,    0.000, 0,     {rpmhigh},       0

page = 7
      idle_up_options_input = bits,   U08, 0,[0:3], "PE0/JS7", "PE1", "JS10", "JS11", "JS5", "JS4", "INVALID" "INVALID", "Remote Port3 Bit 0", "Remote Port3 Bit 1", "Remote Port3 Bit 2", "Remote Port3 Bit 3", "Remote Port3 Bit 4", "Remote Port3 Bit 5", "Remote Port3 Bit 6", "Remote Port3 Bit 7"
    idle_up_options             =   bits,   U08, 0, [6:6], "Off","On" ; old name
    ac_idleup_settings          =   bits,   U08, 0, [6:6], "Off","On"
    idle_up_options_inv         =   bits,   U08, 0, [7:7], "Low","High"
    idle_up_duty                =  scalar,  U08, 1, "%", 0.392, 0.00000, 0, 100, 1  ; old name
    idle_up_steps               =  scalar,  U08, 1, "steps",  1.00000, 0.00000, 0, 255, 0 ; old name
    ac_idleup_adder_duty        = scalar,   U08, 1,     "%",      0.392, 0.00000, 0, 100, 1
    ac_idleup_adder_steps       = scalar,   U08, 1, "steps",  1, 0, 0, 255, 0
    idle_up_targ_rpm            =  scalar,  U16, 2, "rpm", 1, 0, 0, 1000, 0 ; old name
    ac_idleup_cl_targetadder    =  scalar,  U16, 2, "rpm", 1, 0, 0, 1000, 0
    ac_idleup_delay             = scalar,   U16, 4,  "ms",     1.0000, 0.00000, 0.00, 1000, 0
    ClutchPIDEntry              =  bits,    U08, 6, [0:0], "Off","On"
    pidrpm_window               =  scalar,  U08, 7, "", 1, 0, 1, 120, 0
      ac_idleup_io_out     = bits,     U08,     8, [0:4], "IGN (JS10)", "IAC1", "IAC2", "JS11", "FIDLE", "D14", "D16", "D15", "AD06/JS5", "AD07/JS4", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "Remote Port1 Bit 0", "Remote Port1 Bit 1", "Remote Port1 Bit 2", "Remote Port1 Bit 3", "Remote Port1 Bit 4", "Remote Port1 Bit 5", "Remote Port1 Bit 6", "Remote Port1 Bit 7", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "Off"

      pwmidle_cl_opts_initvaluetable = bits, U08, 9, [0:0], "Use last value", "Use initial value table"
      pwmidle_cl_opts_initval_clt = bits, U08, 9, [1:1], "Use MAT", "Use CLT"
 
      idleadvance_curve = array, S16, 10, [ 5 ],  "deg", 0.10000, 0.00000, -20.00, 90.00, 1 
      idleadvance_loads = array, S16, 20, [ 5 ],  "%", 0.10000, 0.00000, 0, 100, 1
      idleadvance_rpms = array, S16, 30, [ 5 ],  "rpms", 1, 0, -16000, 16000, 0
      idleadvance_rpmsdelta = array, S16, 30, [ 5 ],  "rpms", 1, 0, -16000, 16000, 0
   
      idle_voltage_comp_voltage = array, S16, 40, [6], "V", 0.1000, 0, 9, 17, 1
      idle_voltage_comp_voltagedelta = array, S16, 40, [6], "V", 0.1000, 0, -9, 9, 1
      idle_voltage_comp_delta = array, S16, 52, [6], "%", 0.392, 0.00000, -20, 20, 1

      pwmidle_cl_initialvalue_rpms = array, U16, 64, [5], "rpm", 1, 0, 0, {rpmhigh}, 0                       
#if CELSIUS
      pwmidle_cl_initialvalue_matorclt = array, S16, 74, [5], "°C", 0.05555, -320, -40, 230, 1
#else
      pwmidle_cl_initialvalue_matorclt = array, S16, 74, [5], "°F", 0.10000, 0.000, -40, 450, 1
#endif
      pwmidle_cl_initialvalues_duties = array, U08, 84, [5 x 5], "%", 0.392, 0.00000, 0, 100, 1
      pwmidle_cl_initialvalues_steps = array, U08, 84, [5 x 5], "steps", 1, 0, 0, 255, 0

      mafv      = array, U16,    110,  [64], "V", 0.001,   0.00000,  0.00,   5,      3
      mafflow    = array, U16,    238,  [64], "g/sec", {0.01 * (maf_range + 1)},   0.00000,  0.00,   {655 * (maf_range + 1)},      2

      ; Supplemental corrections for barometer and MAT (new curves)
      baroCorrVals    = array ,  S16,    366,    [    9], "kPa",      0.10000,   0.00000,  0.00,  110.00,      1 ; * ( 24 bytes)
#if CELSIUS
      matCorrTemps2    = array ,  S16,    384,    [    9], "°C",       0.05555,  -320.000,-40.00,  150.00,      1 ; * ( 12 bytes)
#else
      matCorrTemps2    = array ,  S16,    384,    [    9], "°F",       0.10000,   0.00000,-40.00,  300.00,      1
#endif
      baroCorrDelta   = array ,  S16,    402,    [    9], "%",        0.10000,   0.00000,-120.0,   120.0,      1 ; * (  6 bytes)
      matCorrDelta2    = array ,  S16,    420,    [    9], "%",        0.10000,   0.00000,-120.0,   150.0,      1 ; * (  6 bytes)
      tpswot_tps      = array ,  S16,    438,    [    6], "%",        0.10000,   0.00000,   0.0,  100.00,      1 ; * ( 12 bytes)
      tpswot_rpm      = array ,  U16,    450,    [    6], "RPM",      1.00000,   0.00000,  0.00,15000.00,      0 ; * ( 12 bytes)
      knock_rpms        = array, U16, 462, [10], "rpm", 1, 0, 0, {rpmhigh}, 0
      knock_thresholds  = array, U16, 482, [10], "%", 0.1, 0, 0, 100, 1
    shift_cut_on    = bits, U08, 502, [0:0], "Off", "On"
      shift_cut_in = bits,   U08, 503,[0:3], "PE0/JS7", "PE1", "JS10", "JS11", "JS5", "JS4", "INVALID" "INVALID", "Remote Port3 Bit 0", "Remote Port3 Bit 1", "Remote Port3 Bit 2", "Remote Port3 Bit 3", "Remote Port3 Bit 4", "Remote Port3 Bit 5", "Remote Port3 Bit 6", "Remote Port3 Bit 7"
      shift_cut_out     = bits,     U08,     504, [0:3], "IGN (JS10)", "IAC1", "IAC2", "JS11", "FIDLE", "D14", "D16", "D15", "AD06/JS5", "AD07/JS4", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "Off" 
;spare
    shift_cut_rpm    = scalar, U16, 506, "RPM", 1, 0, 0, {rpmhigh}, 0
    shift_cut_tps    = scalar, U16, 508, "%", 0.1, 0, 0, 100, 0
    shift_cut_delay  = scalar, U08, 510, "s", 0.01024, 0, 0, 2.55, 2
    shift_cut_time   = scalar, U08, 511, "s", 0.01024, 0, 0, 2.55, 2
    shift_cut_soldelay=scalar, U08, 512, "s", 0.01024, 0, 0, 2.55, 2
    shift_cut_reshift= scalar, U08, 513, "s", 0.01024, 0, 0, 2.55, 2
    ac_idleup_min_rpm   = scalar, U16, 514, "rpm", 1, 0, 0, {rpmhigh}, 0
    ac_delay_since_last_on = scalar, U08, 516, "s", 1.00000, 0.00000, 0, 30, 0
;spare at 517
      boost_ctl_cl_pwm_targs1 = array, U08, 518, [8x8], "%", 1.000, 0.00000, 0.00, 100, 0 
      boost_ctl_cl_pwm_rpms1 = array, U16, 582, [8], "rpm", 1, 0, 0, 25000, 0
      boost_ctl_cl_pwm_targboosts1 = array, S16, 598, [8], "%", 0.10000, 0, 0, 600, 0
      can_bcast_user_id = scalar, U16, 614, "", 1, 0, 1, 2047, 0
      can_bcast_user_d0 = scalar, U08, 616, "", 1, 0, 0, 255, 0
      can_bcast_user_d1 = scalar, U08, 617, "", 1, 0, 0, 255, 0
      can_bcast_user_d2 = scalar, U08, 618, "", 1, 0, 0, 255, 0
      can_bcast_user_d3 = scalar, U08, 619, "", 1, 0, 0, 255, 0
      can_bcast_user_d4 = scalar, U08, 620, "", 1, 0, 0, 255, 0
      can_bcast_user_d5 = scalar, U08, 621, "", 1, 0, 0, 255, 0
      can_bcast_user_d6 = scalar, U08, 622, "", 1, 0, 0, 255, 0
      can_bcast_user_d7 = scalar, U08, 623, "", 1, 0, 0, 255, 0
    dashbcast_id1       = scalar,   U16,    624,         "",      1,   0.00000, 0,  2047,      0
    dashbcast_opta1      = bits, U08,    626, [0:0], "Off", "On"
    dashbcast_opta1adv   = bits, U08,    626, [1:1], "Automatic", "Advanced"
    dashbcast_opta4outrate=bits, U08,    626, [4:5], "10Hz", "20Hz", "50Hz", "100Hz"
;next is 627

; 8 outmsg
    outmsg1_offset01 = scalar, U16,  640, "", 1, 0, 0, 512, 0
    outmsg1_offset02 = scalar, U16,  642, "", 1, 0, 0, 512, 0
    outmsg1_offset03 = scalar, U16,  644, "", 1, 0, 0, 512, 0
    outmsg1_offset04 = scalar, U16,  646, "", 1, 0, 0, 512, 0
    outmsg1_offset05 = scalar, U16,  648, "", 1, 0, 0, 512, 0
    outmsg1_offset06 = scalar, U16,  650, "", 1, 0, 0, 512, 0
    outmsg1_offset07 = scalar, U16,  652, "", 1, 0, 0, 512, 0
    outmsg1_offset08 = scalar, U16,  654, "", 1, 0, 0, 512, 0
    outmsg1_offset09 = scalar, U16,  656, "", 1, 0, 0, 512, 0
    outmsg1_offset10 = scalar, U16,  658, "", 1, 0, 0, 512, 0
    outmsg1_offset11 = scalar, U16,  660, "", 1, 0, 0, 512, 0
    outmsg1_offset12 = scalar, U16,  662, "", 1, 0, 0, 512, 0
    outmsg1_offset13 = scalar, U16,  664, "", 1, 0, 0, 512, 0
    outmsg1_offset14 = scalar, U16,  666, "", 1, 0, 0, 512, 0
    outmsg1_offset15 = scalar, U16,  668, "", 1, 0, 0, 512, 0
    outmsg1_offset16 = scalar, U16,  670, "", 1, 0, 0, 512, 0
    outmsg1_size01   = scalar, U08,  672, "", 1, 0, 0,   8, 0
    outmsg1_size02   = scalar, U08,  673, "", 1, 0, 0,   8, 0
    outmsg1_size03   = scalar, U08,  674, "", 1, 0, 0,   8, 0
    outmsg1_size04   = scalar, U08,  675, "", 1, 0, 0,   8, 0
    outmsg1_size05   = scalar, U08,  676, "", 1, 0, 0,   8, 0
    outmsg1_size06   = scalar, U08,  677, "", 1, 0, 0,   8, 0
    outmsg1_size07   = scalar, U08,  678, "", 1, 0, 0,   8, 0
    outmsg1_size08   = scalar, U08,  679, "", 1, 0, 0,   8, 0
    outmsg1_size09   = scalar, U08,  680, "", 1, 0, 0,   8, 0
    outmsg1_size10   = scalar, U08,  681, "", 1, 0, 0,   8, 0
    outmsg1_size11   = scalar, U08,  682, "", 1, 0, 0,   8, 0
    outmsg1_size12   = scalar, U08,  683, "", 1, 0, 0,   8, 0
    outmsg1_size13   = scalar, U08,  684, "", 1, 0, 0,   8, 0
    outmsg1_size14   = scalar, U08,  685, "", 1, 0, 0,   8, 0
    outmsg1_size15   = scalar, U08,  686, "", 1, 0, 0,   8, 0
    outmsg1_size16   = scalar, U08,  687, "", 1, 0, 0,   8, 0
    outmsg2_offset01 = scalar, U16,  688, "", 1, 0, 0, 512, 0
    outmsg2_offset02 = scalar, U16,  690, "", 1, 0, 0, 512, 0
    outmsg2_offset03 = scalar, U16,  692, "", 1, 0, 0, 512, 0
    outmsg2_offset04 = scalar, U16,  694, "", 1, 0, 0, 512, 0
    outmsg2_offset05 = scalar, U16,  696, "", 1, 0, 0, 512, 0
    outmsg2_offset06 = scalar, U16,  698, "", 1, 0, 0, 512, 0
    outmsg2_offset07 = scalar, U16,  700, "", 1, 0, 0, 512, 0
    outmsg2_offset08 = scalar, U16,  702, "", 1, 0, 0, 512, 0
    outmsg2_offset09 = scalar, U16,  704, "", 1, 0, 0, 512, 0
    outmsg2_offset10 = scalar, U16,  706, "", 1, 0, 0, 512, 0
    outmsg2_offset11 = scalar, U16,  708, "", 1, 0, 0, 512, 0
    outmsg2_offset12 = scalar, U16,  710, "", 1, 0, 0, 512, 0
    outmsg2_offset13 = scalar, U16,  712, "", 1, 0, 0, 512, 0
    outmsg2_offset14 = scalar, U16,  714, "", 1, 0, 0, 512, 0
    outmsg2_offset15 = scalar, U16,  716, "", 1, 0, 0, 512, 0
    outmsg2_offset16 = scalar, U16,  718, "", 1, 0, 0, 512, 0
    outmsg2_size01   = scalar, U08,  720, "", 1, 0, 0,   8, 0
    outmsg2_size02   = scalar, U08,  721, "", 1, 0, 0,   8, 0
    outmsg2_size03   = scalar, U08,  722, "", 1, 0, 0,   8, 0
    outmsg2_size04   = scalar, U08,  723, "", 1, 0, 0,   8, 0
    outmsg2_size05   = scalar, U08,  724, "", 1, 0, 0,   8, 0
    outmsg2_size06   = scalar, U08,  725, "", 1, 0, 0,   8, 0
    outmsg2_size07   = scalar, U08,  726, "", 1, 0, 0,   8, 0
    outmsg2_size08   = scalar, U08,  727, "", 1, 0, 0,   8, 0
    outmsg2_size09   = scalar, U08,  728, "", 1, 0, 0,   8, 0
    outmsg2_size10   = scalar, U08,  729, "", 1, 0, 0,   8, 0
    outmsg2_size11   = scalar, U08,  730, "", 1, 0, 0,   8, 0
    outmsg2_size12   = scalar, U08,  731, "", 1, 0, 0,   8, 0
    outmsg2_size13   = scalar, U08,  732, "", 1, 0, 0,   8, 0
    outmsg2_size14   = scalar, U08,  733, "", 1, 0, 0,   8, 0
    outmsg2_size15   = scalar, U08,  734, "", 1, 0, 0,   8, 0
    outmsg2_size16   = scalar, U08,  735, "", 1, 0, 0,   8, 0
    outmsg3_offset01 = scalar, U16,  736, "", 1, 0, 0, 512, 0
    outmsg3_offset02 = scalar, U16,  738, "", 1, 0, 0, 512, 0
    outmsg3_offset03 = scalar, U16,  740, "", 1, 0, 0, 512, 0
    outmsg3_offset04 = scalar, U16,  742, "", 1, 0, 0, 512, 0
    outmsg3_offset05 = scalar, U16,  744, "", 1, 0, 0, 512, 0
    outmsg3_offset06 = scalar, U16,  746, "", 1, 0, 0, 512, 0
    outmsg3_offset07 = scalar, U16,  748, "", 1, 0, 0, 512, 0
    outmsg3_offset08 = scalar, U16,  750, "", 1, 0, 0, 512, 0
    outmsg3_offset09 = scalar, U16,  752, "", 1, 0, 0, 512, 0
    outmsg3_offset10 = scalar, U16,  754, "", 1, 0, 0, 512, 0
    outmsg3_offset11 = scalar, U16,  756, "", 1, 0, 0, 512, 0
    outmsg3_offset12 = scalar, U16,  758, "", 1, 0, 0, 512, 0
    outmsg3_offset13 = scalar, U16,  760, "", 1, 0, 0, 512, 0
    outmsg3_offset14 = scalar, U16,  762, "", 1, 0, 0, 512, 0
    outmsg3_offset15 = scalar, U16,  764, "", 1, 0, 0, 512, 0
    outmsg3_offset16 = scalar, U16,  766, "", 1, 0, 0, 512, 0
    outmsg3_size01   = scalar, U08,  768, "", 1, 0, 0,   8, 0
    outmsg3_size02   = scalar, U08,  769, "", 1, 0, 0,   8, 0
    outmsg3_size03   = scalar, U08,  770, "", 1, 0, 0,   8, 0
    outmsg3_size04   = scalar, U08,  771, "", 1, 0, 0,   8, 0
    outmsg3_size05   = scalar, U08,  772, "", 1, 0, 0,   8, 0
    outmsg3_size06   = scalar, U08,  773, "", 1, 0, 0,   8, 0
    outmsg3_size07   = scalar, U08,  774, "", 1, 0, 0,   8, 0
    outmsg3_size08   = scalar, U08,  775, "", 1, 0, 0,   8, 0
    outmsg3_size09   = scalar, U08,  776, "", 1, 0, 0,   8, 0
    outmsg3_size10   = scalar, U08,  777, "", 1, 0, 0,   8, 0
    outmsg3_size11   = scalar, U08,  778, "", 1, 0, 0,   8, 0
    outmsg3_size12   = scalar, U08,  779, "", 1, 0, 0,   8, 0
    outmsg3_size13   = scalar, U08,  780, "", 1, 0, 0,   8, 0
    outmsg3_size14   = scalar, U08,  781, "", 1, 0, 0,   8, 0
    outmsg3_size15   = scalar, U08,  782, "", 1, 0, 0,   8, 0
    outmsg3_size16   = scalar, U08,  783, "", 1, 0, 0,   8, 0
    outmsg4_offset01 = scalar, U16,  784, "", 1, 0, 0, 512, 0
    outmsg4_offset02 = scalar, U16,  786, "", 1, 0, 0, 512, 0
    outmsg4_offset03 = scalar, U16,  788, "", 1, 0, 0, 512, 0
    outmsg4_offset04 = scalar, U16,  790, "", 1, 0, 0, 512, 0
    outmsg4_offset05 = scalar, U16,  792, "", 1, 0, 0, 512, 0
    outmsg4_offset06 = scalar, U16,  794, "", 1, 0, 0, 512, 0
    outmsg4_offset07 = scalar, U16,  796, "", 1, 0, 0, 512, 0
    outmsg4_offset08 = scalar, U16,  798, "", 1, 0, 0, 512, 0
    outmsg4_offset09 = scalar, U16,  800, "", 1, 0, 0, 512, 0
    outmsg4_offset10 = scalar, U16,  802, "", 1, 0, 0, 512, 0
    outmsg4_offset11 = scalar, U16,  804, "", 1, 0, 0, 512, 0
    outmsg4_offset12 = scalar, U16,  806, "", 1, 0, 0, 512, 0
    outmsg4_offset13 = scalar, U16,  808, "", 1, 0, 0, 512, 0
    outmsg4_offset14 = scalar, U16,  810, "", 1, 0, 0, 512, 0
    outmsg4_offset15 = scalar, U16,  812, "", 1, 0, 0, 512, 0
    outmsg4_offset16 = scalar, U16,  814, "", 1, 0, 0, 512, 0
    outmsg4_size01   = scalar, U08,  816, "", 1, 0, 0,   8, 0
    outmsg4_size02   = scalar, U08,  817, "", 1, 0, 0,   8, 0
    outmsg4_size03   = scalar, U08,  818, "", 1, 0, 0,   8, 0
    outmsg4_size04   = scalar, U08,  819, "", 1, 0, 0,   8, 0
    outmsg4_size05   = scalar, U08,  820, "", 1, 0, 0,   8, 0
    outmsg4_size06   = scalar, U08,  821, "", 1, 0, 0,   8, 0
    outmsg4_size07   = scalar, U08,  822, "", 1, 0, 0,   8, 0
    outmsg4_size08   = scalar, U08,  823, "", 1, 0, 0,   8, 0
    outmsg4_size09   = scalar, U08,  824, "", 1, 0, 0,   8, 0
    outmsg4_size10   = scalar, U08,  825, "", 1, 0, 0,   8, 0
    outmsg4_size11   = scalar, U08,  826, "", 1, 0, 0,   8, 0
    outmsg4_size12   = scalar, U08,  827, "", 1, 0, 0,   8, 0
    outmsg4_size13   = scalar, U08,  828, "", 1, 0, 0,   8, 0
    outmsg4_size14   = scalar, U08,  829, "", 1, 0, 0,   8, 0
    outmsg4_size15   = scalar, U08,  830, "", 1, 0, 0,   8, 0
    outmsg4_size16   = scalar, U08,  831, "", 1, 0, 0,   8, 0
    outmsg5_offset01 = scalar, U16,  832, "", 1, 0, 0, 512, 0
    outmsg5_offset02 = scalar, U16,  834, "", 1, 0, 0, 512, 0
    outmsg5_offset03 = scalar, U16,  836, "", 1, 0, 0, 512, 0
    outmsg5_offset04 = scalar, U16,  838, "", 1, 0, 0, 512, 0
    outmsg5_offset05 = scalar, U16,  840, "", 1, 0, 0, 512, 0
    outmsg5_offset06 = scalar, U16,  842, "", 1, 0, 0, 512, 0
    outmsg5_offset07 = scalar, U16,  844, "", 1, 0, 0, 512, 0
    outmsg5_offset08 = scalar, U16,  846, "", 1, 0, 0, 512, 0
    outmsg5_offset09 = scalar, U16,  848, "", 1, 0, 0, 512, 0
    outmsg5_offset10 = scalar, U16,  850, "", 1, 0, 0, 512, 0
    outmsg5_offset11 = scalar, U16,  852, "", 1, 0, 0, 512, 0
    outmsg5_offset12 = scalar, U16,  854, "", 1, 0, 0, 512, 0
    outmsg5_offset13 = scalar, U16,  856, "", 1, 0, 0, 512, 0
    outmsg5_offset14 = scalar, U16,  858, "", 1, 0, 0, 512, 0
    outmsg5_offset15 = scalar, U16,  860, "", 1, 0, 0, 512, 0
    outmsg5_offset16 = scalar, U16,  862, "", 1, 0, 0, 512, 0
    outmsg5_size01   = scalar, U08,  864, "", 1, 0, 0,   8, 0
    outmsg5_size02   = scalar, U08,  865, "", 1, 0, 0,   8, 0
    outmsg5_size03   = scalar, U08,  866, "", 1, 0, 0,   8, 0
    outmsg5_size04   = scalar, U08,  867, "", 1, 0, 0,   8, 0
    outmsg5_size05   = scalar, U08,  868, "", 1, 0, 0,   8, 0
    outmsg5_size06   = scalar, U08,  869, "", 1, 0, 0,   8, 0
    outmsg5_size07   = scalar, U08,  870, "", 1, 0, 0,   8, 0
    outmsg5_size08   = scalar, U08,  871, "", 1, 0, 0,   8, 0
    outmsg5_size09   = scalar, U08,  872, "", 1, 0, 0,   8, 0
    outmsg5_size10   = scalar, U08,  873, "", 1, 0, 0,   8, 0
    outmsg5_size11   = scalar, U08,  874, "", 1, 0, 0,   8, 0
    outmsg5_size12   = scalar, U08,  875, "", 1, 0, 0,   8, 0
    outmsg5_size13   = scalar, U08,  876, "", 1, 0, 0,   8, 0
    outmsg5_size14   = scalar, U08,  877, "", 1, 0, 0,   8, 0
    outmsg5_size15   = scalar, U08,  878, "", 1, 0, 0,   8, 0
    outmsg5_size16   = scalar, U08,  879, "", 1, 0, 0,   8, 0
    outmsg6_offset01 = scalar, U16,  880, "", 1, 0, 0, 512, 0
    outmsg6_offset02 = scalar, U16,  882, "", 1, 0, 0, 512, 0
    outmsg6_offset03 = scalar, U16,  884, "", 1, 0, 0, 512, 0
    outmsg6_offset04 = scalar, U16,  886, "", 1, 0, 0, 512, 0
    outmsg6_offset05 = scalar, U16,  888, "", 1, 0, 0, 512, 0
    outmsg6_offset06 = scalar, U16,  890, "", 1, 0, 0, 512, 0
    outmsg6_offset07 = scalar, U16,  892, "", 1, 0, 0, 512, 0
    outmsg6_offset08 = scalar, U16,  894, "", 1, 0, 0, 512, 0
    outmsg6_offset09 = scalar, U16,  896, "", 1, 0, 0, 512, 0
    outmsg6_offset10 = scalar, U16,  898, "", 1, 0, 0, 512, 0
    outmsg6_offset11 = scalar, U16,  900, "", 1, 0, 0, 512, 0
    outmsg6_offset12 = scalar, U16,  902, "", 1, 0, 0, 512, 0
    outmsg6_offset13 = scalar, U16,  904, "", 1, 0, 0, 512, 0
    outmsg6_offset14 = scalar, U16,  906, "", 1, 0, 0, 512, 0
    outmsg6_offset15 = scalar, U16,  908, "", 1, 0, 0, 512, 0
    outmsg6_offset16 = scalar, U16,  910, "", 1, 0, 0, 512, 0
    outmsg6_size01   = scalar, U08,  912, "", 1, 0, 0,   8, 0
    outmsg6_size02   = scalar, U08,  913, "", 1, 0, 0,   8, 0
    outmsg6_size03   = scalar, U08,  914, "", 1, 0, 0,   8, 0
    outmsg6_size04   = scalar, U08,  915, "", 1, 0, 0,   8, 0
    outmsg6_size05   = scalar, U08,  916, "", 1, 0, 0,   8, 0
    outmsg6_size06   = scalar, U08,  917, "", 1, 0, 0,   8, 0
    outmsg6_size07   = scalar, U08,  918, "", 1, 0, 0,   8, 0
    outmsg6_size08   = scalar, U08,  919, "", 1, 0, 0,   8, 0
    outmsg6_size09   = scalar, U08,  920, "", 1, 0, 0,   8, 0
    outmsg6_size10   = scalar, U08,  921, "", 1, 0, 0,   8, 0
    outmsg6_size11   = scalar, U08,  922, "", 1, 0, 0,   8, 0
    outmsg6_size12   = scalar, U08,  923, "", 1, 0, 0,   8, 0
    outmsg6_size13   = scalar, U08,  924, "", 1, 0, 0,   8, 0
    outmsg6_size14   = scalar, U08,  925, "", 1, 0, 0,   8, 0
    outmsg6_size15   = scalar, U08,  926, "", 1, 0, 0,   8, 0
    outmsg6_size16   = scalar, U08,  927, "", 1, 0, 0,   8, 0
    outmsg7_offset01 = scalar, U16,  928, "", 1, 0, 0, 512, 0
    outmsg7_offset02 = scalar, U16,  930, "", 1, 0, 0, 512, 0
    outmsg7_offset03 = scalar, U16,  932, "", 1, 0, 0, 512, 0
    outmsg7_offset04 = scalar, U16,  934, "", 1, 0, 0, 512, 0
    outmsg7_offset05 = scalar, U16,  936, "", 1, 0, 0, 512, 0
    outmsg7_offset06 = scalar, U16,  938, "", 1, 0, 0, 512, 0
    outmsg7_offset07 = scalar, U16,  940, "", 1, 0, 0, 512, 0
    outmsg7_offset08 = scalar, U16,  942, "", 1, 0, 0, 512, 0
    outmsg7_offset09 = scalar, U16,  944, "", 1, 0, 0, 512, 0
    outmsg7_offset10 = scalar, U16,  946, "", 1, 0, 0, 512, 0
    outmsg7_offset11 = scalar, U16,  948, "", 1, 0, 0, 512, 0
    outmsg7_offset12 = scalar, U16,  950, "", 1, 0, 0, 512, 0
    outmsg7_offset13 = scalar, U16,  952, "", 1, 0, 0, 512, 0
    outmsg7_offset14 = scalar, U16,  954, "", 1, 0, 0, 512, 0
    outmsg7_offset15 = scalar, U16,  956, "", 1, 0, 0, 512, 0
    outmsg7_offset16 = scalar, U16,  958, "", 1, 0, 0, 512, 0
    outmsg7_size01   = scalar, U08,  960, "", 1, 0, 0,   8, 0
    outmsg7_size02   = scalar, U08,  961, "", 1, 0, 0,   8, 0
    outmsg7_size03   = scalar, U08,  962, "", 1, 0, 0,   8, 0
    outmsg7_size04   = scalar, U08,  963, "", 1, 0, 0,   8, 0
    outmsg7_size05   = scalar, U08,  964, "", 1, 0, 0,   8, 0
    outmsg7_size06   = scalar, U08,  965, "", 1, 0, 0,   8, 0
    outmsg7_size07   = scalar, U08,  966, "", 1, 0, 0,   8, 0
    outmsg7_size08   = scalar, U08,  967, "", 1, 0, 0,   8, 0
    outmsg7_size09   = scalar, U08,  968, "", 1, 0, 0,   8, 0
    outmsg7_size10   = scalar, U08,  969, "", 1, 0, 0,   8, 0
    outmsg7_size11   = scalar, U08,  970, "", 1, 0, 0,   8, 0
    outmsg7_size12   = scalar, U08,  971, "", 1, 0, 0,   8, 0
    outmsg7_size13   = scalar, U08,  972, "", 1, 0, 0,   8, 0
    outmsg7_size14   = scalar, U08,  973, "", 1, 0, 0,   8, 0
    outmsg7_size15   = scalar, U08,  974, "", 1, 0, 0,   8, 0
    outmsg7_size16   = scalar, U08,  975, "", 1, 0, 0,   8, 0
    outmsg8_offset01 = scalar, U16,  976, "", 1, 0, 0, 512, 0
    outmsg8_offset02 = scalar, U16,  978, "", 1, 0, 0, 512, 0
    outmsg8_offset03 = scalar, U16,  980, "", 1, 0, 0, 512, 0
    outmsg8_offset04 = scalar, U16,  982, "", 1, 0, 0, 512, 0
    outmsg8_offset05 = scalar, U16,  984, "", 1, 0, 0, 512, 0
    outmsg8_offset06 = scalar, U16,  986, "", 1, 0, 0, 512, 0
    outmsg8_offset07 = scalar, U16,  988, "", 1, 0, 0, 512, 0
    outmsg8_offset08 = scalar, U16,  990, "", 1, 0, 0, 512, 0
    outmsg8_offset09 = scalar, U16,  992, "", 1, 0, 0, 512, 0
    outmsg8_offset10 = scalar, U16,  994, "", 1, 0, 0, 512, 0
    outmsg8_offset11 = scalar, U16,  996, "", 1, 0, 0, 512, 0
    outmsg8_offset12 = scalar, U16,  998, "", 1, 0, 0, 512, 0
    outmsg8_offset13 = scalar, U16, 1000, "", 1, 0, 0, 512, 0
    outmsg8_offset14 = scalar, U16, 1002, "", 1, 0, 0, 512, 0
    outmsg8_offset15 = scalar, U16, 1004, "", 1, 0, 0, 512, 0
    outmsg8_offset16 = scalar, U16, 1006, "", 1, 0, 0, 512, 0
    outmsg8_size01   = scalar, U08, 1008, "", 1, 0, 0,   8, 0
    outmsg8_size02   = scalar, U08, 1009, "", 1, 0, 0,   8, 0
    outmsg8_size03   = scalar, U08, 1010, "", 1, 0, 0,   8, 0
    outmsg8_size04   = scalar, U08, 1011, "", 1, 0, 0,   8, 0
    outmsg8_size05   = scalar, U08, 1012, "", 1, 0, 0,   8, 0
    outmsg8_size06   = scalar, U08, 1013, "", 1, 0, 0,   8, 0
    outmsg8_size07   = scalar, U08, 1014, "", 1, 0, 0,   8, 0
    outmsg8_size08   = scalar, U08, 1015, "", 1, 0, 0,   8, 0
    outmsg8_size09   = scalar, U08, 1016, "", 1, 0, 0,   8, 0
    outmsg8_size10   = scalar, U08, 1017, "", 1, 0, 0,   8, 0
    outmsg8_size11   = scalar, U08, 1018, "", 1, 0, 0,   8, 0
    outmsg8_size12   = scalar, U08, 1019, "", 1, 0, 0,   8, 0
    outmsg8_size13   = scalar, U08, 1020, "", 1, 0, 0,   8, 0
    outmsg8_size14   = scalar, U08, 1021, "", 1, 0, 0,   8, 0
    outmsg8_size15   = scalar, U08, 1022, "", 1, 0, 0,   8, 0
    outmsg8_size16   = scalar, U08, 1023, "", 1, 0, 0,   8, 0

[ConstantsExtensions]
    requiresPowerCycle = nCylinders
    requiresPowerCycle = ICIgnCapture
    requiresPowerCycle = engineType
    requiresPowerCycle = divider
    requiresPowerCycle = spkout_hi_lo2
;    requiresPowerCycle = triggerOffset
    requiresPowerCycle = triggerTeeth
    requiresPowerCycle = No_Miss_Teeth
    requiresPowerCycle = IdleCtl
    requiresPowerCycle = IdleCtl_alg
    requiresPowerCycle = IACcurlim
    requiresPowerCycle = IAC_tinitial_step
    requiresPowerCycle = IACStart
    requiresPowerCycle = baroCorr
    requiresPowerCycle = egoType
    requiresPowerCycle = alternate
    requiresPowerCycle = twoStroke
    requiresPowerCycle = nInjectors
    requiresPowerCycle = OddFireang
    requiresPowerCycle = algorithm
    requiresPowerCycle = algorithm2
    requiresPowerCycle = IgnAlgorithm
    requiresPowerCycle = IgnAlgorithm2
    requiresPowerCycle = mycan_id
    requiresPowerCycle = flexFuel
    requiresPowerCycle = flexport
    requiresPowerCycle = dwellmode
    requiresPowerCycle = knk_option
    requiresPowerCycle = knkDirection
    requiresPowerCycle = knkpull
    requiresPowerCycle = knkport
    requiresPowerCycle = spk_conf2_gm
    requiresPowerCycle = spk_conf2_tfi
    requiresPowerCycle = spk_conf2_oddodd
    requiresPowerCycle = spk_conf2_kick
    requiresPowerCycle = spk_conf2_dli
    requiresPowerCycle = spk_config_camcrank
    requiresPowerCycle = spk_config_trig2
    requiresPowerCycle = spk_config_trig2l
    requiresPowerCycle = spk_config_resetcam
    requiresPowerCycle = spk_mode0
    requiresPowerCycle = spk_mode3
    requiresPowerCycle = spk_mode3a
    requiresPowerCycle = spk_mode3_hirespol
    requiresPowerCycle = rtbaroport
    requiresPowerCycle = mapport
    requiresPowerCycle = ego2port
    requiresPowerCycle = feature4_0igntrig
    requiresPowerCycle = tacho_opt3f
    requiresPowerCycle = launch_opt_on
    requiresPowerCycle = launch_opt_pins
    requiresPowerCycle = N2Oopt_pins
    requiresPowerCycle = boost_ctl_pins
    requiresPowerCycle = afrload
    requiresPowerCycle = eaeload
    requiresPowerCycle = seq_inj
    requiresPowerCycle = extrainj
    requiresPowerCycle = MAFOption
    requiresPowerCycle = egoport
    requiresPowerCycle = ego2port
    requiresPowerCycle = hybrid_rpm
    requiresPowerCycle = hybrid_hyst
    requiresPowerCycle = staged_first_param
    requiresPowerCycle = staged_pri_size
    requiresPowerCycle = staged_sec_size
    requiresPowerCycle = dualTable
    requiresPowerCycle = shift_cut_on
    requiresPowerCycle = shift_cut_in
    requiresPowerCycle = shift_cut_out
    requiresPowerCycle = NoiseFilterOpts
    requiresPowerCycle = secondtrigopts
    requiresPowerCycle = boost_ctl_settings_on
    requiresPowerCycle = ac_idleup_io_out
    requiresPowerCycle = ac_idleup_settings
    requiresPowerCycle = idle_up_options_input
    requiresPowerCycle = N2Oopt_2
    requiresPowerCycle = N2Oopt_3
    requiresPowerCycle = N2Oopt_pins2

    defaultValue = tsCanId, "CAN ID 0"
    defaultValue = rpmhigh, 9000
    defaultValue = rpmwarn, 3000
    defaultValue = rpmdang, 5000
    defaultValue = loadhigh, 400
    defaultValue = clt_exp, 0

[SettingContextHelp]
; constantName = "Help Text"
; tool tips tooltips
;Ensure all settings are defined as some MS2/BG words shipped with TS are not applicable.
    nCylinders = "The number of cylinders or rotors in your engine."
    engineType = "Most engines are Even Fire. Typical odd-fire engines are V-twin, some V4, Vmax, some V6, V10." 
    reqFuel = "Global fuel constant. Use the ReqFuel calculator. (Technically related to a pulsewidth at 100%VE)\n\nFirst, fill in all settings below and then click the [Required Fuel] button."
    map0 = "MAP reading at 0V, typically pick a sensor from 'common MAP sensors.'"
    mapmax = "MAP reading at 5V, typically pick a sensor from 'common MAP sensors.'"
    clt0 = ""
    cltmult = ""
    mat0 = ""
    matmult = ""
    tpsMin = "With engine off, set TPS at minimum (foot off pedal) then click 'get current'"
    tpsMax = "With engine off, set TPS at maximum (foot to floor) then click 'get current'"
    batt0 = "Can be used to correct battery voltage readings."
    battmax = "Can be used to correct battery voltage readings."
    ego0 = ""
    egomult = ""
    baro0 = "Baro reading at 0V, typically pick a sensor from 'common Baro sensors.'"
    baromax = "Baro reading at 5V, typically pick a sensor from 'common Baro sensors.'"
    bcor0 = "The barometeric correction to fuel at a total vacuum.\nFor new installs set these two settings to zero and the barometric correction curve to 100% across the board.\n\nImported settings from older code versions use a vacuum of 147, a rate of -47 and have the curve at zero."
    bcormult = "The rate of change of correction.\nFor new installs set these two settings to zero and the barometric correction curve to 100% across the board.\n\nImported settings from older code versions use a vacuum of 147, a rate of -47 and have the curve at zero."
    crankTolerance	= "Percentage tolerance for next input pulse while cranking."
    asTolerance		= "Percentage tolerance for next input pulse during after start period."
    pulseTolerance	= "Percentage tolerance for next input pulse while running."
    feature4_0ftrig = "Selects the type of noise filtering.\nOff = No masking.\nSimple = Fixed 48% time mask\nAdvanced = Configurable mask time and percentage."

    IdleCtl = "Selects method of idle control.\nNone = no idle control valve.\nOn/Off valve = basic open or closed valve (rare)\nPWM valve (2,3 wire) = common from Ford or Bosch.\nStepper (4,6 wire) = common with GM, Subaru "
    IdleCtl_alg = "Open-Loop controls the valve purely based on temperature.\nClosed-Loop adjusts the valve position to achieve a target RPM"
    IACtstep = "Time between each stepper motor step.\nIncrease this if the motor appears to behave intermittently."
    IAC_tinitial_step = "The length of the first motor step. Typically set a little longer to improve reliability."
    IACminstep = "Minimum number of steps to move in one go.\nIncrease from the default of 1 if the valve moves unreliably."
    IACStart = "On startup the stepper motor will move this many steps to ensure it has reached the home position. Set the value to a number larger than the number of steps required for full travel. (This was formerly called 'Start Value')"
    IdleCtl_home = "Whether to home the valve to the fully closed or fully open position."
    IdleCtl_out = "Selects between normal stepper motor output connections or optional connections for Microsquirt add-on board.\nFor Microsquirt, the three options listed are the connections for IACEN, IAC1, IAC2"
    IACcurlim = "Stepper motor current control when not stepping.\nMoving only: turns off power between steps, motor stays cooler but may be unreliable.\nHold current: a holding current is applied between steps.\nAlways on: full current is always applied. Most heat, but reliable."
    iacfullopen = "Number of steps from closed to full open. Homing steps must be set to a larger number."
    IdleHyst    = "Amount the coolant temperature must move before idle position is changed."
    IACcrankxt = "After the engine starts, the idle valve moves from the 'cranking position' to the 'run' position. This setting controls how long that transition takes."
    pwmidlecranktaper = "After the engine starts, the idle valve moves from the 'cranking position' to the 'run' position. This setting controls how long that transition takes."
    pwmidleset_inv = "Most valves work with 0% = closed. A few valves may work in the opposite direction."
    pwmidleset_koeo = "Determines whether the idle valve runs during Key-On-Engine-Off. This can potentially help starting by giving additional air during the first few engine rotations."
    pwmidle_port2 = "Output for PWM idle valve. Typically set to 'FIDLE' which is the connection on your ECU. The 'Remote Port' settings are used with an expansion box only."
    pwmidle_freq = "Frequency to operate at. This varies with valve type. Ford/Bosch valves typically operate 50-100Hz. Miata valves are closer to 300Hz.\nBe aware that above 78Hz the output becomes less precise."
    fastIdleT = "Open the idle valve below this temperature for fast-idle."
    divider = ""
    alternate = "Sets injector staging in non-sequential modes. For Sequential set 2 Squirts/Alternating or 1 Squirt/Simultaneous."
    twoStroke = "Four-Stroke (most engines), Two-stroke or Rotary."
;    injType = "Not used presently."
    nInjectors = "Number of primary injectors i.e. not any secondary staged injectors you may have."
    rpmLF = "Smoothing factors. 100% = no smoothing. 10% = highly smoothed."
    mapLF = "Smoothing factors. 100% = no smoothing. 10% = highly smoothed."
    mafLF = "Smoothing factors. 100% = no smoothing. 10% = highly smoothed."
    tpsLF = "Smoothing factors. 100% = no smoothing. 10% = highly smoothed."
    egoLF = "Smoothing factors. 100% = no smoothing. 10% = highly smoothed."
    adcLF = "Smoothing factors. 100% = no smoothing. 10% = highly smoothed."
    baud = "This should be set to 115200."
; These tips for on/off outputs do not show up in TS 2.1.13, but added for the future
    psEnabled = "Enables this output for programmable control. Do NOT enable an output here that is already is use for another feature e.g. idle, boost etc.\n\nPick an output in the left pane, then set its parameters in the right pane.\nOutputs show green when enabled."
    psCondition = "The variable to the left (like in a datalog) is compared with the target value, the output triggers if:\n> variable is greater than target.\n= variable equals target precisely (useless)\n< variable is less than target\nAnd logical bitwise AND with the target."
    psConnector = "Whether to include a second condition and whether condition 1 AND condition 2 must be true or condition 1 OR condition 2."
    psInitValue = "Typically this is set to 0 which means the output is off."
    psPortValue = "Typically this is set to 1 which means the output is on when triggered."
    psOutSize = ""
    psOutOffset = ""
    psThreshold = "This is the target value that the variable is compared against."
    psHysteresis = "A deadband to prevent the output bouncing on and off."

    enginesize = "Engine size or displacement in cc. Fill this in before using the ReqFuel calculator.\nTo convert from cu.in to cc, multiply by 16.39"
    staged_pri_size = "The size of each of your main/primary injectors in cc/min.\nTypical conversion from lbs/hr is multiply by 10.5"
    baroCorr = "Enables or disables fuel adjustment for barometer (altitude.)\nOff = ignore baro\nInitial MAP reading = take a sample from the MAP sensor at power-on\nTwo independent sensors = use a second dedicated barometer sensor."
      mapport = "The connection to the MAP sensor or 'Off' for installs not using MAP."
      rtbaroport = "The connection to an external or internal barometer sensor."
      baro_upper = "Maximum possible barometer reading that the engine will see. (typ. 102kPa) Limits faulty readings."
      baro_lower = "Lowest possible barometer reading that the engine will see. (typ. 68-80kPa) Limits faulty readings."
      baro_default = "Fixed barometer reading for when barometric correction is disabled."
      tempUnits = "Selects the temperature units displayed on the optional MegaView."

    algorithm = "The calculation method for fuel. The choices are:\nSpeed Density (uses MAP sensor)\nPercent Baro (Speed-Density but with barometric pressure difference included)\nAlpha-N (uses TPS)\nMAF (uses MAF)\nITB (a mode specifically for Independent Throttle Bodies)"
    algorithm2 = "Enables a second modifier fuel table (VE2)\n\nAdvanced use only."
    loadCombine = "Selects the modifier method"
    loadMult = "Normal Speed-Density should enable 'Multiply MAP'. In rare circumstances, this can be disabled. %baro works the same. With Alpha-N, enabling multiply MAP gives 'Hybrid Alpha-N' : disabling multiply MAP gives 'Pure Alpha-N'. MAF never multiplies in MAP."
      loadStoich = "Including the AFR target with the speed-density algorithm allows the VE table to be a 'real' VE table and the desired AFR to be specified in the AFR table.\nWith AFR not included, the AFR table is for reference only and the 'VE' table takes full control.\n\nWith the MAF algorithm, this MUST be enabled to factor the target AFR into the fuel equation."
      loadopts_oldbaro = "Enables old-style compatability barometric calculations. Not recommended for new installs."
      stoich = "The stoichiometric (chemical ideal) AFR for the fuel in use. This is only used when 'incorporate AFR target' is enabled. For gasoline use 14.7. For alternate fuels, alter this number, alter the AFR target table and set your wideband calibration appropriately."
      IgnAlgorithm = "The load Y-axis for ignition table lookups"
      IgnAlgorithm2 = "Enables a second modifier fuel table (Spk2)\n\nAdvanced use only."
      afrload = "The load Y-axis for AFR table lookups"
      eaeload = "The load Y-axis for EAE curve lookups"
    OvrRunC = "Over-run fuel cut is a method to totally cut off fuel during over-run situations such as coasting down a hill in gear. Be sure to set the parameters so that it is only triggered under true over-run conditions and not during regular driving."
    fc_rpm = "Typically a number of hundred RPM above idle."
    fc_kpa = "Typically this will be below your idle kPa."
    fc_tps = "This should be set close to zero such that over-run only enables when you really are off the throttle." 
    fc_clt = "Set this to prevent over-run operation on a cold engine."
    fc_delay = "The delay prevents jerky on/off operation during transients."
    fc_ego_delay = "Over-run will give a full-lean EGO reading and closed-loop EGO should be disabled until a sensible reading is available. Set this long enough so that the EGO sensor is returning a true reading."
    fc_rpm_lower = "Allows a dead-band of RPM for smoother operation. Typically set this a few hundred RPM below your minimum RPM setting."

    RevLimOption_retard = "Options for spark retardation to limit revs.\nOff = no spark retard used\nProgressive Retard = timing is progressively retarded above the set RPM\nFixed angle = above the set RPM the timing is immediately changed to the angle you specify."
    RevLimOption_spkcut = "Enables spark-cut limiting.\nCaution! This can cause catalyst damage and is noisy in operation.\nWill not work with EDIS, TFI or GMDIS"
    RevLimOption_fuelcut = "Whether fuel-cut rev limiting is enabled."

    RevLimMaxRtd = "Maximum timing retard."
    RevLimRtdAng = "Timing value used in Fixed angle."
    RevLimNormal2 = "Specifies the revlimiter max RPM.\nYou MUST also select a rev-limiter type below.\n\nSee the 'Gauge and Settings Limits' page to alter the maximum allowed RPM number."
    RevLimNormal2_hyst = "Sets an RPM deadband, soft limiters start this many RPM below the hard limit. If fuel cut is enabled, then the RPMs must fall by this much before fuel is re-enabled. A number of hundred RPM is suggested."
    RevLimCLTbased = "Enables optional coolant based rev limiter, so that the rev limit can be lowered when the engine is cold. The curve itself sets the hard rev limit at your chosen temperatures."
    TpsBypassCLTRevlim = "Above this TPS% the coolant curve is ignored. This should be set to a high %age number, so that only in an emergency when you really need full throttle on a cold engine can you override the cold limit. Or set to over 100% so that the limit in the curve is always used whatever the throttle position."
    RevLimOption_fuelcut = "Whether fuel-cut rev limiting is enabled."
    RevLimOption_fuelprog = "Enables a progressive non-rotational fuel cut that drops cylinders as revs rise between the lower and hard fuel cut limits.\nMUST NOT be used with staged or throttle-body injection.\nRequires Sequential/Semi-Sequential."

    tacho_opt80 = "Enables the tacho output"
    tacho_opt3f = "Selects the output pin"
    tacho_opt40 = "Normal - an output pulse is generated matching each cylinder event. i.e. 4 cylinder engines have 4 pulses per engine cycle.\nHalf speed - output runs at half speed. This can enable a 4-cyl tacho to be used on an 8-cyl engine."

    MAFOption = "Selects the hardware input pin where the MAF is connected. Or 'Off' to disable MAF readings. "
    feature7_mafmat = "Optionally enables a trim curve based on MAT sensor input."
     feature7_maftrim = "Optionally enables VE table 1 as a trim table. Fill the table with 100% to begin with. "
    maf_range = "Sets the range to match your MAF sensor. Set this before loading a MAF calibration curve. On gasoline, 650g/s ~800hp; 1300g/s ~1600hp; 1950g/s ~2400hp and 2600g/s ~3200hp. Use the lowest range suitable for better low-end precision. "
    feature7_mafcalib = "Select this if you want to use MAF in the 'old way' as per 1.1.x and earlier. See the 1.1.x MAF manual page. "
    injPwmPd = "The period/frequency during the hold phase. Safe to leave at 66us."
    injPwmT = "This the 'peak' time and is typically set to 1-1.5ms"
    injPwmP = "This is the 'hold' percentage current. 30-50% is typical."
    staged_first_param = "This setting enables staged injection and sets the primary staging parameter, which is used to determine when to engage the secondary injectors.\nFor table-based staging, 0% means not staged at all, and 100% means fully staged, between is partially staged."
    staged_sec_size = "Size of secondary injectors in cc/min"
    staged_transition_on = "Allows a gradual transition into staging instead of a hard switch point."
    staged_transition_events = "how many ignition events it will take to go from no staging to fully staged."
    staged_primary_delay = "Delays the reduction of the primary pulse width by a number of ignition events after the secondaries start coming online."
    staged_secondary_enrichment = "This setting is used to inject more fuel on the secondaries than the fully staged calculation determines. This is useful when there is a small lean spot just after staged injection fully engages."
    staged_param_1 = "Used to determine when staged injection engages when using RPM, MAP, TPS, or Duty."
    staged_hyst_1 = "Used as a deadband to determine when staged injection shuts off."
    staged_second_param = "This setting is used to add a second method for determining when to stage."
    staged_param_2 = "Used to determine when staged injection engages when using RPM, MAP, TPS, or Duty."
    staged_hyst_2 = "Used as a deadband to determine when staged injection shuts off."
    staged_second_logic = "Whether both parameters or either parameter will enable staging."
    flexFuel = "This enables or disables the Flex Fuel system."
    flexport = "Selects where the sensor is connected - either locally or via an expansion board.\nExpansion boards will need configuring through 'CAN parameters'."
    fuelFreq0 = "The low frequency generated by the sensor (e.g. 50Hz for the GM sensor)"
    fuelFreq1 = "The high frequency generated by the sensor (e.g. 150Hz for the GM sensor)"
    fuelCorr0 = "The fuel multiplier. 100% means no change. The default of 100% for   0% ethanol gives  0% additional fuel."
    fuelCorr1 = "The fuel multiplier. 100% means no change. The default of 163% for 100% ethanol gives 63% additional fuel."
    fuelSpkDel0 = "The timing addition in degrees at low frequency."
    fuelSpkDel1 = "The timing addition in degrees at high frequency. E85 burns more slowly than pure gasoline and will require more advance."
    flex_pct0 = "The ethanol percentage corresponding to the low frequency."
    flex_pct1 = "The ethanol percentage corresponding to the high frequency."
    flex_baseline = "Ethanol percentage in regular fuel, assumes that the main fuel and spark tables are tuned for regular fuel. Allows flex-fuel system to be enabled without retuning base tables. Set to 0 for backwards compatability."
    fuelCorr_default = "Multiplier to be used if the sensor sends an out of range frequency. (Faulty sensor or an error condition.)"
    fuelSpkDel_default = "Timing to add under fault conditions. (Expected to be 0 or negative.)"
    egoAlgorithm = "None - no fuel changes are made in response to oxygen sensor readings.\nSimple - This method of closed-loop EGO control is well-suited to use with a narrowband O2 sensor. \nPID - This method incorporates a Proportional Integral Derivative control loop which tuned properly, adjusts the amount of fuel being injected to quickly get to the target, and then maintains the target without any oscillation."
    egoCount = "The number of ignition events between each correction."
    egoDelta = "controls how large each correction 'step' is."
    egoLimit = "The maximum amount of adjustment performed by the closed-loop algorithm."
    egoTemp = "Only correct above this temperature."
    egoRPM = "Only correct above this RPM."
    TPSOXLimit = "Only correct below this throttle position."
    MAPOXLimit = "Only correct below this load."
    MAPOXMin = "Only correct above this load."
    ego_startdelay = "Only correct when engine has been running at least this long."
    egoKP = "Proportional term"
    egoKI = "Integral term"
    egoKD = "Differential term"
    egoType = "Disabled - No EGO sensor enabled.\nNarrowband = Enable narrowband sensor/s.\nWideband = Enable wideband sensor/s"
    EgoOption_dual = "Off = Single EGO sensor is used for closed-loop control of all injector channels\n\nOn = The second EGO sensor is used for closed-loop control of PW2 and PW4. Single VE and AFR target tables are used."
    egoport = "Selects where the sensor is connected."
    ego2port = "Selects where the sensor is connected."
    kickdelay = "How long after the trigger-return to wait before starting the coil dwell in kick-start mode."
    spk_mode0 = "Sets the type of tach input pattern decoder to be used."
    triggerOffset = "In 'Basic Trigger' and 'Trigger Return' this specifies the engine angle BTDC that each trigger pulse is received. (0-19 or 50-80 degrees for best results.)\n\nIn 'Toothed Wheel' this should always be set to zero - use tooth#1 angle instead.\n\nIn other modes this setting can make a +/- 20 degree adjustment to the built-in reference angle."
    trigret_ang = "This is only used in CAS 4/1 mode and specifies the angular length of each tooth."
    OddFireang = "For oddfire engines this specifies the angle the engine must rotate from spark A output to spark B output."
    spk_conf2_gm = "With HEI7/8 this setting enables the 'bypass' output on spark B."
    spk_conf2_tfi = "Allows you to enable Signature PIP mode if you have a Signature PIP distributor, where one vane is shorter than the others. Signature PIP mode is used with 'Basic Trigger' and allows the Megasquirt to use these distributors for sequential fuel."
    spk_conf2_cam = "A few wheel modes have an optional cam signal. For most this setting has no effect at all."
    spk_conf2_oddodd = "Alternate = most oddfires such as Ford V4, Chevy V6, Viper V10\n\nPaired = Yamaha Vmax\n\nCustom = set your own oddfire angles."
    spk_conf2_kick = "Primarily for kick-start engines, this enables a delayed spark during cranking. The dwell and spark are both scheduled at the trigger-return point for less chance of kick-back.\n\nCan only be used with \n-'Trigger-Return' or \n-'Basic Trigger' when the Trigger Angle < 20"
    no_skip_pulses = "The number of tach input pulses at start-up that are ignored before ignition calculations and wheel decoding begins. The default value of 3 is suitable for most applications."
    ICIgnCapture = "This must be matched to your tach input. If it is set incorrectly you can experience timing drift with rpms or misdetection of missing teeth on a missing tooth wheel. The tooth logger can be used to confirm polarity is correct."
    spkout_hi_lo2 = "This setting is CRITICAL or you will melt your ignition coils.\nFor Microsquirt this is typically 'Going High'\nFor direct coil control on MS2 this is typically 'Going High'\nFor logic spark output on MS2 this is typically 'Going Low'"
    spk_mode3 = "Specifies the type of ignition coils in use. TFI, HEI, EDIS, GMDIS must set 'single coil'"
    spk_mode3a = "Either 'Cam input' or 'MAP Sensor'. Typically set to 'Cam input'.\nDO NOT select 'MAP Sensor' unless you know why.\n\n'MAP Sensor' must ONLY be selected if you are using the MAP sensor for phase detection on a 1cyl engine or V-twin. Used with 'Dual wheel with missing tooth' only.\nSet the MAP sensor phase threshold on the MAP Sample settings page."
    spk_mode3_hirespol = "Selects whether to flip polarity on cam input.\n\nThe custom wheel decoders require that crank and cam signals are of the same input polarity, in cases where a mix of sensors makes this impossible, this setting can be used to flip the cam input. Does not apply to all decoders."
    spk_config_spka = "D14 = standard 'LED' spark output on MS2.\nJS10 = lesser used alternate spark output.\nIGN1 = main logic spark output on Microsquirt.\nWLED = alternate spark output capable of driving a CDI white wire input or TFI."
    timing_flags = "Fixed Advance = locks timing to the value set below. This is used for confirming timing with a strobe timing light during setup.\n\nUse table = normal operation where the spark advance table is used."

    use_prediction = "1st Deriv Prediction = engine accleration deceleration is allowed for in timing calculation. (Normal setting)\n\nNo Prediction = no allowance."
    fixed_timing  = "The timing to lock to in 'Fixed' mode"
    crank_dwell = "Specifies the base coil dwell time during cranking before battery correction is applied."
    crank_timing = "Specifies the ignition advance to be used while cranking. Typically 5-10 deg BTDC"
    spk_conf2_dli = "Enables specific multiplexed outputs for use with the Toyota ignition module such as used on the 7MGTE."
    dwellmode = "Standard Dwell - this is the setting to use for most installs.\nFixed Duty - locks the spark output to a constant duty cycle instead of controlling dwell. e.g. Ford's 'Push Start' TFI modules, Bosch 'smart' ignition modules, or MSD and other CD boxes.\nTime After Spark - only intended for Saab Tri-Ionic DI cassettes.\nCharge at trigger - rarely used. Could be used with MSD type CDI boxes when running Basic Trigger only."
    max_coil_dur = "The base dwell time before battery voltage correction. Typical values are 3-4 ms."
    max_spk_dur = "The time required for the spark to complete, typically in the order of 1 millisecond."
    dwelltime = "The backwards dwell time for Time-After-Spark"
    dwellduty = "For fixed duty, this specifies the %age duty cycle of the output signal."
    hw_latency = "If you notice a slight retarding of ignition timing with rpm while strobing with fixed timing, you can enter a small number in here to remedy it." 
    feature4_0igntrig = "For Trigger Return mode only, the middle LED on the case can be used to echo the input signal from the distributor to help in setting up the base timing."
    spk_config_trig2 = "Single wheel with missing tooth = typically a crank wheel such as 36-1 or 60-2\n\nDual wheel = two wheels without missing teeth e.g. Nippodenso 24/1 CAS\n\nDual wheel with missing tooth = typically a 36-1, 60-2 crank wheel and an additional cam wheel."
    triggerTeeth = "The number of effective teeth, counting the missing teeth as if they existed. i.e. a 36-1 wheel has 35 physical teeth, but enter 36." 
    No_Miss_Teeth = "The number of missing teeth. Common are 1 for 36-1, or 2 for 60-2 or 36-2"
    Miss_ang = "See the 'Trigger Wheel' section of the manual for more detail on this important setting."
    spk_config_camcrank = "Does the main wheel rotate at crankshaft speed or camshaft (distributor) speed."
    spk_config_trig2l = "Like ignition input capture above, specifies which voltage level is considered 'active'" 
    spk_config_campol = "In 'Poll level' mode specifies which voltage level is used for each engine phase." 
    spk_config_resetcam = "how often are second trigger (e.g. cam) input pulses received."
    oddfireangs1 = "Number of crank degrees engine rotates from Spk A to Spk B"
    oddfireangs2 = "Number of crank degrees engine rotates from Spk B to next cyl"
    oddfireangs3 = "Number of crank degrees engine rotates from Spk C to next cyl"
    oddfireangs4 = "Number of crank degrees engine rotates from Spk D to next cyl"
    mapsample_opt2 = "'Use event average' is useful for most engines.\n\n'Use timed min' is intended for 1cyl, V twins with highly cyclic MAP signals."
    mapsample_opt1 = "How many ignition events to sample over. Typically set to 1 for large engines or 2 for 1,2 cylinder."
    map_phase_thresh = "When using the MAP sensor to detect engine phase, this sets a pressure threshold that can identify the intake vs. exhaust phases. Will be highly engine dependent, 80kPa worked on a small 1-cyl.\n\nThis setting requires:\n- 1 or 2 cyl.\n-Toothed wheel\n-Cam input = MAP sensor\n-Dual wheel with missing tooth"

    pwmidle_closed_duty = "The duty below which changes in duty no longer have an effect on RPM"
    pwmidle_closed_steps = "The number of steps below which changes in duty no longer have an effect on RPM"
    pwmidle_open_duty = "The duty above which changes in duty no longer have an effect on RPM"
    pwmidle_open_steps = "The number of steps above which changes in duty no longer have an effect on RPM"
    pwmidle_dp_adder = "The amount to increase the idle valve duty/steps by when throttle is lifted. Should be set to a value that results in RPM being slightly above the target RPM."
    pwmidle_dp_adder_steps = "The amount to increase the idle valve duty/steps by when throttle is lifted. Should be set to a value that results in RPM being slightly above the target RPM."
    pwmidle_close_delay = "This setting controls the amount of time between pressing the throttle and closing the valve while driving. A value of 0 disables this setting. NOTE: The timer does not start until actual RPM is 200 RPM above the target."
    pwmidle_dp_decay_factor = "This setting determines how quickly the duty added by the dashpot adder decays to 0. The faster RPM falls, the longer the dashpot stays in effect."
    pwmidle_cl_opts_initvaluetable = "This setting controls whether the initial duty value used upon entering closed-loop idle is taken from the last time in closed-loop or taken from the initial value table."
    pwmidle_cl_opts_initval_clt = "This setting is used to set whether the initial values table y-axis lookup is done using CLT or MAT."
    pwmidle_shift_lower_rpm = "The RPM above which the idle valve will remain closed when shifting gears."
    pwmidle_shift_open_time = "The longest amount of time that a shift takes. After this timer expires, the valve will follow normal dashpot behavior."
    pwmidle_Kp_new = "Proportional gain for closed-loop idle PID loop. Reacts immediately to change in RPM."
    pwmidle_Ki_new = "Integral gain for closed-loop idle PID loop. Reacts to sustained difference between target RPM and actual RPM."
    pwmidle_Kd_new = "Derivative gain for closed-loop idle PID loop. Reacts to rate of change of RPM."
    pwmidle_min_duty = "The minimum duty that the PID code will use while engaged."
    pwmidle_min_steps = "The minimum steps that the PID code will use while engaged."
    pwmidle_max_rpm_new = "Use this setting to tune how agressively the idle speed controller tries to reach the target RPM. Adjust the slider up until the idle speed starts oscillating, then back down until it stops. Wait 5-10 seconds between each adjustment to give the controller a chance to settle."
    pwmidle_pid_wait_timer = "Controls how long all conditions for entering closed-loop idle must be met for before entering closed-loop control."
    pwmidle_targ_ramptime = "Approximately how long after entering closed-loop idle it will take for actual RPM to match target RPM."
    pwmidle_ms = "Controls how often the closed-loop idle algorithm runs."
    pwmidle_rpmdot_disablepid = "Use so that engaging clutch without throttle when coasting does not leave PID running. Set so that the jump in RPM cancels closed-loop i.e. when RPMdot exceeds this threshold, closed-loop is cancelled.\nAvoids situations where PID stays running while not actually idling causing stalls once PID is entered again."
    pwmidle_tps_threshold = "Closed-loop idle can activate below this TPS value."
    pwmidle_rpmdot_threshold = "Closed-loop idle can activate below this RPMdot value."
    pwmidle_decelload_threshold = "Closed-loop idle can activate above this load value.\nUse to avoid closed-loop idle activating during over-run. Set it to above the maximum load seen while decelerating."
    ClutchPIDEntry = "Enables the use of a clutch or neutral switch to help determine when closed-loop idle should be active."
    pidrpm_window = "An RPM smoothing feature."
    boost_ctl_settings_on = "Controls whether boost control is enabled."
    boost_ctl_settings_initialvals = "For use with closed-loop boost control. Controls whether the initial values table is used to set the initial duty before closed-loop is engaged."
    boost_ctl_settings_freq = "Frequencies available when using the Slow frequency range."
    boost_ctl_pins = "Output pins available when using the Slow frequency range."
    boost_ctl_settings_invert_new = "Set this so that higher duty yields higher boost."
    boost_ctl_ms = "Controls how often the boost control algorithm runs."
    boost_ctl_settings_remote = "Enables a solenoid connected to an expansion board."
    boost_ctl_remote = "Selects where the solenoid is connected."
    boost_ctl_closeduty = "(Closed-loop) The duty below which changes in duty no longer cause changes in boost pressure."
    boost_ctl_openduty = "(Closed-loop) The duty above which changes in duty no longer cause changes in boost pressure."
    boost_ctl_settings_cl = "Controls whether open-loop or closed-loop control algorithm is used."
    boost_ctl_lowerlimit = "(Closed-loop) Boost pressure must be within this many kPa of the target boost before closed-loop control will activate.\n\nOutside of this range the valve is held wide open (keeping the wastegate shut) for fastest spooling."
    flexboosttps = "Minimum TPS to enable boost control. \n\nZero boost will be targetted below this TPS%"
    OverBoostOption_flexboost = "Uses Flex% as the Y axis on the boost target table instead of TPS.\n\nAllows you to vary boost by E85 percentage."
    boost_ctl_sensitivity = "Use this setting to tune how agressively the boost controller tries to reach the target boost. Adjust the slider up until the boost oscillates around the target, then back down until it stops."
    boost_ctl_settings_tunemode = "Basic: uses fixed PID parameters P=100,I=100,D=100\n\nAdvanced: uses adjustable PID parameters for greater control."
    boost_ctl_Kp = "Proportional gain for closed-loop control. Proportional control causes immediate changes to output duty with changes in boost error."
    boost_ctl_Ki = "Integral gain for closed-loop control. Integral control causes changes in duty with boost error over time. The longer boost is off target, the stronger the reaction due to the integral term."
    boost_ctl_Kd = "Derivative gain for closed-loop control. Derivative control causes larger reactions in boost duty with faster rate of change of boost error. The faster error changes, the more duty will change to counteract."
    OverBoostOption = "Selection can be fuel cut, spark cut, or both. Fuel cut only cuts fuel, spark cut only cuts spark, both cuts both fuel and spark."
    OverBoostOption_tol = "Trips the overboost protection if boost is a certain pressure above boost target. Allows overboost to track the boost target table."
    boosttol = "How far MAP can exceed the boost target before overboost cuts in."
    OverBoostKpa = "Maximum desired boost before overboost protection cuts fuel/spark."
    OverBoostHyst = "After overboost protection is enabled, how far below the maximum boost must boost drop before spark/fuel are re-enabled."
    rpmhigh = "The maximum for RPM on gauges, tables, curves and entry boxes.\nAdjust to suit your engine."
    rpmwarn = "The RPM 'warning' on gauges - yellow"
    rpmdang = "The RPM 'danger' on gauges - red"
    loadhigh = "The maximum 'load' value e.g. kPa on gauges, tables, curves and entry boxes."

    feature3_3 = "Sequenced batch fire can be useful to give more repeatable engine operation. On every startup the batch firing is aligned to the same ignition event (cylinder). Without this feature the alignment is random."
    trig_init = "Specifies the ignition 'trigger'. Typically try 0 or 1."
    inj_time_mask = "The percentage of the time between 'triggers' to fire the injectors. A rudimentary version of injector timing."
    NoiseFilterOpts = "Enables the noise filtering. Uses the curve to set the filter period. The filter measures the width of the tach-in pulse in order to reject short noise spikes and allow through valid wider tach-in pulses. Typically set to 1000us or more at low revs and 100us or more at high revs. Basic distributor setups can use far larger numbers."
    NoiseFilterOpts1 = "Enables ignoring of bogus tach pulses, they will still be recorded in the composite logger."
    NoiseFilterOpts2 = "The tach input is disabled for a short period of time after a valid tach pulse to mask out any bogus tach pulses."
    ICISR_tmask = "The absolute time after a valid tach pulse when new pulses are ignored. The time value here depends greatly on the type of tach input in use.\ne.g. a 60-2 wheel spinning at 10000rpm has a real tach pulse every 0.1ms. A distributor pickup on a 4-cyl at 600rpm has a real tach pulse every 50ms.\nThis value must be set to less than the shortest ever valid time on your install."
    ICISR_pmask = "This works as a percentage of the last valid tooth time. 30-50% are typical values."
    secondtrigopts = "Enables a simple noise filter on the cam tach input."
    TC5_required_width = "Equivalent to the time on the curve used for the crank input."
    secondtrigopts1 = "Enables ignoring of bogus tach pulses, they will still be recorded in the composite logger."
    secondtrigopts2 = "The tach input is disabled for a short period of time after a valid tach pulse to mask out any bogus tach pulses."
    IC2ISR_tmask = "The absolute time after a valid tach pulse when new pulses are ignored. The time value here depends greatly on the type of tach input in use.\ne.g. a 60-2 wheel spinning at 10000rpm has a real tach pulse every 0.1ms. A distributor pickup on a 4-cyl at 600rpm has a real tach pulse every 50ms.\nThis value must be set to less than the shortest ever valid time on your install."
    IC2ISR_pmask = "This works as a percentage of the last valid tooth time. 30-50% are typical values."
    NoiseFilterOpts3 = "A method to reject very short false noise spikes."
    secondtrigopts3 = "A method to reject very short false noise spikes."

    crankingRPM = "Set this a few hundred RPM above your typical fast cranking speed."
    floodClear = "Above this throttle position no fuel will be injected during cranking to help clear a flood situation. It will also disable priming."
    altcrank = "Engines with many cylinders such as V12 may find that the injecting fuel on every tach event gives difficult hot starting due to small pulsewidths.\nThis option allows the fuel to be injected on alternate events (with twice the pulse width)"
    primedelay = "Delays the priming pulses to allow a lazy fuel pump to build pressure."
    feature3_matase = "Can be used to help with perceived heat-soak issues."
    idleadvance_on = "Enables Idle-advance feature.\nLoad = Timing varies based on engine load only.\nRPMs = Timing varies based on engine RPM only.\nAdaptive = Timing changes are used to assist closed-loop idle."
    idleadvance_adder  = "Set Value = timing is set to the value from the curve\nAdder = value from curve adds to existing timing."
    idleadvance_cl_cond = "Use conditions below or link to closed-loop idle."
    idleadvance_tps = "Only activate below this TPS."
    idleadvance_rpm = "Only activate below this RPM."
    idleadvance_load = "Only activate above this load. (Helps code ignore over-run situations.)"
    idleadvance_clt = "Only activate above this coolant temperature. (Typically idle-advance does not work too well during warmup.)"
    idleadvance_delay = "After the conditions are met, wait this long before enabling idle-advance. This helps reduce false activations."

    knk_option = "Disabled: do not use knock feedback for ignition advance control\nSafe Mode: use knock retard, but keep the advance below that which caused knock. This backs the advance 1 small step back and leaves it at that until TPS or MAP changes - or knock comes back. This is 'safe mode' scheme is the safest thing for a DIY set-up.\nAggressive Mode: use knock retard, but keep advance at threshold of knock occurring. That is, the program advances (up to the timing table value) if it doesn't see knock, and retards if does see knock. The difference from safe mode is that the timing can be advance all the way to the table value after knock, not just up to one step below knock. This may result in the knock returning, in which case the timing is retarded again, then advanced slowly, and so on."
    knk_option_an = "On/Off: basic on/off 'knock' or 'no-knock' external input.\nAnalogue: external analogue input proportional to knock signal level"
    knkport = "Selects where the sensor/module is connected. Local connections are advised for faster response.\n\nExpansion boards for on/off inputs will need configuring through 'CAN parameters'.\nAnalogue inputs from expansion board is not supported."
    knkDirection = "The logic input level. i.e. when set to 'low' then a 0V signal means there is knock. This matches the GM module"
    knkpull = "Whether an internal pull-resistor should be applied."
    knk_ndet = "Number of knock events detected before control is started."
    knk_maxmap = "Disable knock retard above this MAP."
    knk_lorpm = "Knock control is implemented above this RPM"
    knk_hirpm = "Knock control is implemented below this RPM"
    knk_maxrtd = "Maximum total retard when knock occurs."
    knk_trtd = "The time between knock retard corrections"
    knk_step1 = "How much to retard by on each correction step when knock is first detected. Make it large to quickly retard the timing and stop knock."
    knk_step2 = "How much to retard by on each correction step if knock restarts after it had stopped."
    knk_tadv = "The time between knock advance corrections (i.e. timing return to normal)"
    knk_dtble_adv = "If ignition table timing changes by this much then return to normal timing as operating in different area."

    EAEOption = "Enables a well-wetting transient system."
    feature7_aetpswot = "Enables a curve to model effective 100% TPS for a given RPM. This allows smaller throttle movements to be more responsive at lower RPMs and ignores changes in throttle above 'wide-open'."
    mapThresh = "Trigger enrichment above this MAPdot value. (The negative of this threshold is also used as the threshold for decel-enleanment.)"
    aeEndPW = "After main enrichment event, taper down to this amount of enrichment.\n0 is suggested."
    taeTime = "Length of main enrichment pulse."
    aeTaperTime = "Length of 'taper' time after main enrichment pulse.\n0 is suggested."
    tpsThresh = "Trigger enrichment above this TPSdot value. (The negative of this threshold is also used as the threshold for decel-enleanment.)"
    tdePct = "Deceleration fuel cut amount in percent. 100% is no cut, 0% is complete cut of fuel.\n100% is suggested."
    taeColdA = "At full cold (-40C/F), add this amount to the enrichment."
    taeColdM = "At full cold (-40C/F), multiply the enrichment by this percentage."
    ae_lorpm = "Below this RPM full enrichment is enabled."
    ae_hirpm = "Above this RPM, there is no enrichment. In between the enrichment is on a sliding scale."
    tpsProportion = "Weight (0-100) to be given to TPSdot over MAPdot for accel enrichment."

    f5_0_tsf = "Enables fuel table switching.\nSwitches from VE1+2 to VE3 alone."
    f5_0_tsf_opt = "Hardware = Physical switch\nRPM,kPa,TPS allow switching above threshold set below."
    ts_port_f = "Selects where the switch is connected. \nExpansion boards will need configuring through 'CAN parameters'."
    tsf_rpm = "RPM threshold."
    tsf_kpa = "MAP threshold."
    tsf_tps = "TPS threshold."
    f5_0_tss = "Enables spark table switching.\nSwitches from Spk1+2 to Spk3 alone."
    f5_0_tss_opt = "Hardware = Physical switch\nRPM,kPa,TPS allow switching above threshold set below."
    ts_port_s = "Selects where the switch is connected. \nExpansion boards will need configuring through 'CAN parameters'."
    tss_rpm = "RPM threshold."
    tss_kpa = "MAP threshold."
    tss_tps = "TPS threshold."

    launch_opt_on = "Off - all of launch is turned off\nLaunch - launch only, no flat shift\nLaunch/flatshift - launch and flat shift.\n(Flat shift is used on manual gearboxes for full throttle shifts with a clutch switch to engage the limiter.)"
    launch_opt_pins = "Input for launch switch."
    launch_sft_zone = "The soft limit is this many rpm below the hard limit. (This is sometimes called the control range.) 200rpm is typical."
    launch_sft_deg = "The absolute timing to retard to. i.e. 5 gives 5 BTDC timing."
    launch_tps = "Launch is only active when the throttle is open a certain percentage. Most users can safely set this to a very low number."
    launch_hrd_lim = "Above this rpm the hard limiter methods are used when the launch conditions are met."
    launchlimopt = "-None - do not use \n-Spark cut - drop sparks, this is the most common limiter used. (Will not work with EDIS ignition.)\n-Fuel cut - cuts fuel.\n-Spark and fuel - both"
    flats_arm = "This rpm set point is used to differentiate between a flat shift and launch condition, typically set to a few hundred RPM above idle."
    flats_deg = "The absolute timing to retard to. i.e. 5 gives 5 BTDC timing."
    flats_hrd = "Above this rpm the hard limiter methods are used when the flat-shift conditions are met."

    N2Oopt_2 = "Enables the feature."
    N2ORpm = "The minimum RPM to enable nitrous."
    N2OClt = "The minimum coolant temperature to enable nitrous."
    N2OTps = "The minimum throttle position to enable nitrous."
    N2ORpmMax = "The maximum RPM to enable nitrous."
    N2Oopt_01 = "Set to 'Both' for most installs. If 'dual table' or Staging are in use it selects which injector bank receives any additional fuel pulsewidth."
    N2Oopt_pins = "Input to use to enable the nitrous system. (Expects a ground signal at the CPU.)\nExpansion boards will need configuring through 'CAN parameters'." 
    N2Oopt_pins2 = "Selects where the outputs are connected.\nExpansion boards will need configuring through 'CAN parameters'."
    N2OPWLo = "Fuel PW to add at the min RPM. (Tapers down between min and max.)"
    N2OPWHi = "Fuel PW to add at the max RPM. (Tapers down between min and max.)"
    N2OAngle = "Sets a fixed ignition retard when nitrous is active."
    N2Odel_launch = "Sets a minimum time after launch control is released before nitrous can activate."
    N2Odel_flat = "Sets a minimum time after flat-shift is released before nitrous can activate."
    N2Oopt_3 = "Enables the second stage."
    N2O2Rpm = "The activation RPM for stage 2."
    N2O2RpmMax = "The maximum RPM for stage 2."
    N2O2delay = "Sets a minimum time delay after stage 1 activates before stage 2 can activate."
    N2O2Angle = "Sets an additional ignition retard when stage2 is active."
    N2O2PWLo = "Fuel PW to add at the min RPM. (Tapers down between min and max.)"
    N2O2PWHi = "Fuel PW to add at the max RPM. (Tapers down between min and max.)"

    mycan_id = "Set to 0 unless specifically wanting to configure this as a secondary data capture ECU."
    enable_pollPWM = "Enables capturing PWM (pulse/frequency) from expansion board."
    can_poll = "Enables fetching data from expansion board via CAN."
    can_poll_id0 = "CANid of expansion board."
    can_poll_id1 = "CANid of expansion board."
    can_poll_id2 = "CANid of expansion board."
    can_poll_id3 = "CANid of expansion board."
    poll_tablePWM = "Table number on expansion board."
    poll_offsetPWM= "Table number on expansion board."
    enable_pollADC03= "Enables capturing analogue inputs from expansion board."
    enable_pollADC47= "Enables capturing analogue inputs from expansion board."
    poll_tableports = "Table number on expansion board."
    poll_tableADC03 = "Table number on expansion board."
    poll_tableADC47 = "Table number on expansion board."
    poll_offsetADC03 = "Data offset on expansion board."
    poll_offsetADC47 = "Data offset on expansion board."
    remotePWMfreq = "Clock frequency on expansion board. See documentation."
    remotePWMprescale = "Prescaler on expansion board. See documentation."
    enable_pollports = "CANid of expansion board for digital inputs/outputs."
    poll_offsetports = "Data offset on expansion board."
    ports_dir = "Selects combination of inputs or outputs.\n\n3 inputs :\n- port 1, port 2, port 3 = input\n\n2 inputs, 1 output :\n- port 1 = output\n- port 2, port 3 = input\n\n1 input, 2 outputs :\n- port 1, port 2 = output\n- port 3 = input"
    port1_type = "Digital = converts into 8 on/off inputs/outputs.\nSingle value = one input or output."
    port2_type = "Digital = converts into 8 on/off inputs/outputs.\nSingle value = one input or output."
    port3_type = "Digital = converts into 8 on/off inputs/outputs.\nSingle value = one input or output."
    port_generic = "Enables use of programmeable on/off outputs on expansion board.\n\nRequires that the port be defined as an output."

    can_bcast1_on = "Enables broadcasting of parameters over CAN."
    can_bcast_int = "How often to broadcast."
    can_bcast1_280x4 = "Enables 0x280 'Motorsteuergerat 640 - engine control unit RPM is 4:1 ratio' message."
    can_bcast1_280x1 = "Enables 0x280 'Motorsteuergerat 640 - engine control unit RPM is 1:1 ratio' message."
    can_bcast1_289 = "Enables 0x289 'Motorsteuergerat 649 - Engine Temp' message."
    can_bcast1_316 = "Enables 0x316 'BMW E46 - engine control unit RPM is 6.42:1 ratio' message."
    can_bcast1_329 = "Enables 0x329 'BMW coolant' message."
    can_bcast1_561 = "Enables 0x561 'Alfa/Fiat/Lancia dash coolant, RPM' message."
    can_bcast1_361 = "Enables 0x361 'Alfa/Fiat/Lancia torque, RPM, TPS' message."
    can_bcast2_041 = "Enables 0x041 'Alfa/Fiat/Lancia dash initialisation' message."
    can_bcast2_xxx = "Enables sending a user-defined CAN packet."
    can_bcast_user_id = "11bit decimal CAN identifier of the user defined test message to send."
    can_bcast_user_d0 = "Decimal message byte 0."
    can_bcast_user_d1 = "Decimal message byte 1."
    can_bcast_user_d2 = "Decimal message byte 2."
    can_bcast_user_d3 = "Decimal message byte 3."
    can_bcast_user_d4 = "Decimal message byte 4."
    can_bcast_user_d5 = "Decimal message byte 5."
    can_bcast_user_d6 = "Decimal message byte 6."
    can_bcast_user_d7 = "Decimal message byte 7."

    testint = "How often to pulse the coil/injector."
    testrpm = "Approximate equivalent RPM."
    testop_coil = "Is coil testing enabled?"
    testsel_coil  = "Which coil output to test.\n\nWith 2 rotor rotary mode: Coil A = leading 1, B = leading 2, C = trailing 1, D = trailing 2."
    testdwell = "Dwell used during testing - no voltage correction is applied."
    testop_inj = "Is injector testing enabled?"
    testsel_inj = "Which injector output to test."
    testpw = "Pulsewidth used during testing - no dead-time is added and no voltage correction is applied."
    testinjcnt = "Number of injection pulses in each test."

    testop_pwm = "Allows testing of different PWM current limiting parameters."
    testinjPwmP = "The PWM duty cycle."
    testinjPwmT = "The full-current time at the beginning of each pulse."
    testinjPwmPd = "The PWM period aka. frequency."

    pwm_testio = "Frequency of pulsed outputs."
    duty_testio = "Duty cycle of pulsed outputs."

    iachometest = "Number of steps to move valve in homing operation (should be set larger than total number of steps from open to closed.)"
    iacpostest = "Desired valve position."

    seq_inj = "Untimed injection = batch fire injection non sequential\nSequential/Semi-sequential = Injection is timed to specific crank angle, either once per rev (semi) or once per cycle (sequential)\nSemi-sequential Siamese = For siamese port engines\nSequential Siamese = for siamese port engines."
    injtimingmode = "What the injection timing angle refers to. End of pulse is typically used and set so that the injection pulse is completed just before the intake valve opens."
    injusetable = "Whether a injection single timing value or a mapped table of timing is used."
    injdualvalue = "For siamese allows different timing for each 'half'."
    injadv1 = "Fixed angle for first injection."
    injadv2 = "Fixed angle for second injection."
    injstagedadv1 = "Allows different angles when staging."
    injstagedadv2 = "Allows different angles when staging."
    injcrankadv1 = "Timing during cranking."
    injcrankadv2 = "Timing during cranking."
    usevetrim = "Allows each injection to be trimmed to allow for differing fuel requirements per cylinder."
    extrainj = "Allows 3rd, 4th injector channels. Note that the MS2 requires modification to enable these." 
    hybrid_rpm = "Sets the RPM to switch to a single pulse per injector."
    hybrid_hyst = "Deadband on that RPM."
    injadv3 = "Injector timing in single-pulse mode."
    injstagedadv3 = "Allows different angles when staging."
    dualTable = "Select between\n- Single Table = a single fuel algorithm (possibly using multiple blended tables)\n-Dual Table = the two injector banks have their own VE (VE1,2) and AFR (AFR1,2) tables running independently."
    feature4_0VEtblsize = "Allows the selection of either 12x12 or 16x16 fuel tables. Before changing size, use the 'Export' feature on your VE tables to save them. Change size then use 'Import' to bring them back."

    mapsample_opt2 = "'Use event average' is useful for most engines.\n\n'Use timed min' is intended for 1cyl, V twins with highly cyclic MAP signals."
    mapsample_window = "How many degrees to sample over."
    mapsample_opt1 = "How many ignition events to sample over. Typically set to 1 for large engines or 2 for 1,2 cylinder."
    mapsample_angle = "The starting angle (BTDC) for MAP sampling."

    injOpen = "Injector dead time.\nTypically 0.7ms for low-z (~2.5ohm) and 0.9ms for high-z (~14ohm) or low-z injectors with resistors."
    battFac = "Battery voltage correction factor, typically 0.2ms/V."
    injctl2_1 = "Enables PWM (peak and hold) current limiting for low-z injectors.\nNote that low-z injectors with resistors do not need PWM current limiting."
    injPwmP = "The PWM duty cycle for the current limiting 'hold' period.\nTypically 30%."
    injPwmT = "The full-current 'peak' time at the beginning of each pulse.\nTypically 1.0ms or more."
    injPwmPd = "The PWM period aka. frequency."
    injctl = "Enables different settings for bank 2 of injectors. Set to Off unless you actually have different injectors installed such as using Staged Injection."
    injOpen2 = "Injector dead time.\nTypically 0.7ms for low-z (~2.5ohm) and 0.9ms for high-z (~14ohm) or low-z injectors with resistors."
    battFac2 = "Battery voltage correction factor, typically 0.2ms/V."
    injctl2_2 = "Enables PWM (peak and hold) current limiting for low-z injectors.\nNote that low-z injectors with resistors do not need PWM current limiting."
    injPwmP2 = "The PWM duty cycle for the current limiting 'hold' period.\nTypically 30%."
    injPwmT2 = "The full-current 'peak' time at the beginning of each pulse.\nTypically 1.0ms or more."
    injPwmPd2 = "The PWM period aka. frequency."
    injOpen3 = "Injector dead time.\nTypically 0.7ms for low-z (~2.5ohm) and 0.9ms for high-z (~14ohm)"
    battFac3 = "Battery voltage correction factor, typically 0.2ms/V."
    injOpen4 = "Injector dead time.\nTypically 0.7ms for low-z (~2.5ohm) and 0.9ms for high-z (~14ohm)"
    battFac4 = "Battery voltage correction factor, typically 0.2ms/V."

    RotarySplitModeFD = "FC mode = combined trailing coil for two trailing plugs.\nFD mode = individual coils for each trailing plug."
    RotarySplitModeNeg = "Split usually fires trailing coils after leading coils, this allows for the split to be negative and the trailing coils to fire before the leading."
    dwelltime_trl = "Dwell time applied to trailing coil(s)."

    ac_idleup_settings = "Enables feature."
    ac_idleup_io_out = "Output to engage compressor."
    idle_up_options_input = "Switch input."
    idle_up_options_inv = "Sets the active state of the input.\nNormally, the idle-up switch input is a ground-switch and the 'Low' settings should be used. In certain installations with appropriate wiring, an active 'High' input can be required."
    ac_idleup_delay = "Delay after switch is pressed before engaging compressor."
    ac_idleup_min_rpm = "Lowest RPM that AC compressor can be turned on."
    ac_delay_since_last_on = "Sets a delay to prevent rapid cycling on/off."
    ac_idleup_adder_duty = "Additional PWM idle duty cycle to add when A/C is active."
    ac_idleup_adder_steps = "Additional idle steps to add when A/C is active."
    idle_up_targ_rpm = "Bump up RPM by this much when A/C is active."

;curves and tables
    tpswot_tps = "Sets the TPS% that is considered wide-open-throttle based on RPM.\ni.e. at low RPMS, partial throttle will flow the same air as full throttle. At maximum RPMs full throttle is required for full air flow.\nWhen the throttle is at or beyond the new 'full throttle' it is considered 100% throttle. This has the effect of making TPS based accel enrichment more sensitive at lower throttle opening at lower RPMs and also prevents TPS accel enrichment if the throttle is already 'fully open.'"
    idle_voltage_comp_delta = "Some 2 wire PWM idle valves will operate differently depending on the system voltage. This allows a compensation to be applied to allow for that difference.\nTypically at lower voltages the valve will need slightly more duty (positive number) and at higher voltages it will need less duty (negative number.)"
    maeBins = "The curve specifies a fuel pulsewidth percent adder based on rate of change of MAP (MAPdot)\nThis is part of the basic time based accel enrichment scheme. Larger changes in MAP require more fuel added. The number is a percentage of ReqFuel."
    taeBins = "The curve specifies a fuel pulsewidth percent adder based on rate of change of TPS (TPSdot)\nThis is part of the basic time based accel enrichment scheme. Larger changes in TPS require more fuel added. The number is a percentage of ReqFuel."
    knock_thresholds = "Sets an allowable knock level before retard is triggered.\nThe numbers here are highly engine dependent."
    primePWTable = "The priming pulse is used to wet the intake manifold walls and provide some initial starting fuel.\nSetting the curve to all zeros will disable fuel pump priming also."
    crankPctTable = "This percentage table controls the fuel injected when the engine is cranking over. Most engines need 200-400% when cold and near 100% when hot.\n(It is a percentage of ReqFuel, so that if you swap injectors, this curve can be left alone.)"
    asePctTable = "Immediately after the engine has started it is normal to need additional fuel. This curve specifies how much as a percentage adder. (5-50%)"
    aseCntTable = "Specifies how long (in engine cycles or seconds) to apply afterstart enrichment."
    wueBins = "Specifies the percentage multiplier for fuel during warmup. At cold temperatures 200-300% may be required. At fully warm (final row in table) 100% MUST be specified.\n(LPG users can override this requirement.)"
    mafflow = "Specifies the flow curve in grammes/sec vs. frequency or voltage.\nStart out with the actual flow curve for your MAF sensor and then 'tweak' to tune it to your install."
    MAFCor = "Specifies the adjustment on top of the MAF sensor calibration you loaded through Tools-Calibrate MAF table\nStart out with the correction curve at 100% (no correction) and then 'tweak' to tune it to your install."
    matclt_pct = "The curve is the %CLT blended into the MAT reading vs. airflow.\nIn theory, at zero air-flow the air temperature in the intake manifold will reach the manifold (coolant) temperature. At infinite airflow, the air will be unaffected by the temperature of the manifold.\nThe curve is setup to give the 'best estimate' of intake air temperature as part of the speed-density fuel calculation.\nIt would be expected that some CLT should be blended in at low airflows, falling away rapidly to close to zero at higher airflows.\nWhen first enabling this curve it will be necessary to adjust the VE values at low RPMs as they will be compensating for the air density change."
    dwellcorr = "Specifies the percentage adjustment to the nominal dwell based on battery voltage.\nInductive coils require greater dwell (charge time) at lower voltages."
    cold_adv_table = "This curve optionally allows ignition timing to be advance during warmup.\n Conversely, some engines may prefer retard during warmup to pre-heat the catalytic convertor."
    iacstepTable = "Specifies the stepper idle 'step' position vs. coolant temperature to be used during warmup.\nLarge positions are more open. Zero is fully closed.\nThe curve will start high at cold temperatures and descend towards zero at high temperatures."
    ipwmTable = "Specifies the PWM idle duty vs. coolant temperature to be used during warmup.\nLarge duties are more open. Typically zero is fully closed. (Some 2 wire Bosch valves have a closed position of about 35%)\nThe curve will start high at cold temperatures and descend towards zero at high temperatures."
    matRetard = "Allows ignition timing to be retarded based on intake temperature. This is primarily for forced induction installs where there is charge heating."
    baroCorrDelta = "There are two ways that barometric correction may be used.\n\n1. The current way. On the MAP/Baro page the 'At total vacuum' and 'rate' numbers must be set to zero. This curve is then normally 100% at all points and adjusted up or down to alter fuelling based on the barometer reading.\n\n2. The old way. The two numbers are set to 147 and -47 and the curve is normally 0% at all points."
    matCorrDelta2 =  "This curve is the whole air density correction exposed in full.\nIt is based on the 'ideal gas law' and typically varies between 125% cold to 75% hot."
    matCorrDelta = "Allows for minor corrections to fuelling based on manifold air temperature (MAT) when using MAF to control fuelling. The default curve is 0% meaning no correction."
    EAEAWN = "This curve modifies the EAE Adhere-to-walls curve. It allows the amount of correction specified by the EAE Adhere-to-walls curve to be increased or decreased based on RPM."
    EAEAWW = "This curve modifies the EAE Adhere-to-walls curve. It allows the amount of correction specified by the EAE Adhere-to-walls curve to be increased or decreased based on coolant temperature."
    EAEBAWC = "This curve determines how much fuel is getting added to the port walls per injection event. It is a percentage (Y-axis) of each injection event based on load (X-axis)."
    EAEBSOC = "This curve determines how much fuel is being sucked from the walls on each intake (valve open) event. It is a percentage (Y-axis) of the total amount of fuel that has adhered to the walls based on load (X-axis), so therefore the percentages are much smaller (about 10x smaller) than the Adhere-to-walls coefficients."
    EAESON = "This curve modifies the EAE Sucked-from-walls curve. It allows the amount of correction specified by the EAE Sucked-from-walls curve to be increased or decreased based on RPM."
    EAESOW = "This curve modifies the EAE Sucked-from-walls curve. It allows the amount of correction specified by the EAE Sucked-from-walls curve to be increased or decreased based on coolant temperature."
    NoiseFilterLen = "The duration of the noise filter depending on RPM. Its aim is to filter out brief spikes of noise on the tach input. The settings here depend on wheel mode and are engine specific. Setting the filter period too high will filter out real teeth.\nExamples\n36-1, 60-2: 500rpm = 200us, 7500rpm = 13\nBasic crank trigger: 500rpm = 1800us, 7500rpm = 120us"
    idleadvance_curve = "Sets the timing vs engine load or RPM or Adaptive when Idle-Advance is active.\nLoad: Typically the curve will ramp from low advance at low load to more advance at higher loads to stablise idle.\nRPM: Typically the curve will ramp from higher advance at lower RPMs to less advance at higher RPMs to stablise idle.\nAdaptive: Typically the curve will ramp from higher advance at negative RPM deltas (below target) to lower advance at positive RPM deltas (above target) to help stablise idle."
    pwmidle_target_rpms = "The closed-loop idle RPM target depending on coolant temperature. It is normal to set a high idle on a cold engine, tapering down as the engine warms up."
    RevLimRpm1 = "When the coolant-based rev-limiter is enabled this allows you to specify different hard rev limits depending on the coolant temperature to prevent a cold engine from being over-revved."
    pwmidle_crank_dutyorsteps_duty = "The idle valve position during cranking. This should be set high enough so that the engine can start without touching the throttle when cold, but not so high that the engine revs up too far immediately after starting."
    pwmidle_crank_dutyorsteps_steps = "The idle valve position during cranking. This should be set high enough so that the engine can start without touching the throttle when cold, but not so high that the engine revs up too far immediately after starting."
    ITB_load_loadvals = "This curve is used to allocate the bins on the VE table to either Speed-Density or Alpha-N tuning. The area of the VE table below the load value from the curve will be used for Speed-Density tuning and the area above the curve will be used for Alpha-N tuning.\nChanging this curve will require the VE table to be retuned.\nSee the full manual for more details on ITB mode."
    ITB_load_switchpoints = "This curve defines the TPS value where the MAP load reaches %Baro switchpoint. This curve will be different for each engine and should be set up using values obtained from log files from your engine. Setting this curve is an important part of ITB mode.\nChanging this curve will require the VE table to be retuned.\nSee the full manual for more details on ITB mode."
; tables
    pwmidle_cl_initialvalues_duties = "The best-guess idle valve duty for RPM/load. This allows you to 'kick-start' the closed-loop idle by setting the valve to the most likely position."
    pwmidle_cl_initialvalues_steps = "The best-guess idle valve position for RPM/load. This allows you to 'kick-start' the closed-loop idle by setting the valve to the most likely position."
    veTable1 = "The main fuel table (1). Larger VE values mean more fuel, smaller mean less fuel."
    veTable2 = "The secondary fuel table (2), can be used as a blend table with table 1. Larger VE values mean more fuel, smaller mean less fuel."
    veTable3 = "The alternate fuel table (3). Can be used as a switched table from no.1. Larger VE values mean more fuel, smaller mean less fuel. When VE3 is active any secondary fuel table is ignored."
    veTable1dozen = "The main fuel table (1). Larger VE values mean more fuel, smaller mean less fuel."
    veTable2dozen = "The secondary fuel table (2), can be used as a blend table with table 1. Larger VE values mean more fuel, smaller mean less fuel."
    veTable3dozen = "The alternate fuel table (3). Can be used as a switched table from no.1. Larger VE values mean more fuel, smaller mean less fuel. When VE3 is active any secondary fuel table is ignored."
    staged_percents = "Percentage values specify the amount of staging.\n0% = not staged, only primaries\n100% = fully staged."
    afrTable1 = "Sets the target AFR vs RPM/load.\nWhen 'incorporate AFR' is off, this is a reference table only.\nWhen 'incorporate AFR' is on, this table is included in the fuel calculation.\n\nSet this table before beginning tuning."
    afrTable2 = "Sets the target AFR vs RPM/load.\nWhen 'incorporate AFR' is off, this is a reference table only.\nWhen 'incorporate AFR' is on, this table is included in the fuel calculation.\n\nSet this table before beginning tuning."
    advanceTable1 = "The main ignition advance table (1). Numbers are actual timing BTDC.\nBe sure to have verified timing before starting tuning."
    advanceTable2 = "The secondary ignition advance table (2), can be used as a blend table with table 1."
    advanceTable3 = "The alternate ignition advance table (3). Can be used as a switched table from no.1. When Spk3 is active any secondary advance table is ignored."
    RotarySplitTable = "Specifies the split (delay) in degrees between leading and trailing coils."
    boost_ctl_pwm_targets = "For open-loop boost, sets the output duty cycle vs. TPS/RPM"
    boost_ctl_load_targets = "For closed-loop boost, sets the target kPa (boost) vs. TPS/RPM"
    veTrim1 = "Specifies a percentage multiplier for adjustment on the basic fuel pulsewidth to allow for difference per cylinder. (100% = no adjustment.)"
    veTrim2 = "Specifies a percentage multiplier for adjustment on the basic fuel pulsewidth to allow for difference per cylinder. (100% = no adjustment.)"
    veTrim3 = "Specifies a percentage multiplier for adjustment on the basic fuel pulsewidth to allow for difference per cylinder. (100% = no adjustment.)"
    veTrim4 = "Specifies a percentage multiplier for adjustment on the basic fuel pulsewidth to allow for difference per cylinder. (100% = no adjustment.)"
    veTrim1dozen = "Specifies a percentage multiplier for adjustment on the basic fuel pulsewidth to allow for difference per cylinder. (100% = no adjustment.)"
    veTrim2dozen = "Specifies a percentage multiplier for adjustment on the basic fuel pulsewidth to allow for difference per cylinder. (100% = no adjustment.)"
    veTrim3dozen = "Specifies a percentage multiplier for adjustment on the basic fuel pulsewidth to allow for difference per cylinder. (100% = no adjustment.)"
    veTrim4dozen = "Specifies a percentage multiplier for adjustment on the basic fuel pulsewidth to allow for difference per cylinder. (100% = no adjustment.)"
    injadvTable1 = "The injector timing in degrees BTDC vs load/RPM. Typical wisdom says that the injection event should finish just as the inlet valve is opening. This corresponds to around 360 BTDC as the timing is measured with respect to the spark event.\nActual best timing can be determined by dyno or road testing."
    injadvTable2 = "The injector timing in degrees BTDC vs load/RPM. Typical wisdom says that the injection event should finish just as the inlet valve is opening. This corresponds to around 360 BTDC as the timing is measured with respect to the spark event.\nActual best timing can be determined by dyno or road testing."
    injadvTable3 = "The injector timing in degrees BTDC vs load/RPM. Typical wisdom says that the injection event should finish just as the inlet valve is opening. This corresponds to around 360 BTDC as the timing is measured with respect to the spark event.\nActual best timing can be determined by dyno or road testing."
    rpmhigh = "The maximum for RPM on gauges, tables, curves and entry boxes.\nAdjust to suit your engine."
    rpmwarn = "The RPM 'warning' on gauges - yellow"
    rpmdang = "The RPM 'danger' on gauges - red"
    loadhigh = "The maximum 'load' value e.g. kPa on gauges, tables, curves and entry boxes."
    clt_exp = "Allows gauges and curves to use an expanded coolant temperature range for air-cooled engines using the CLT sensor to measure oil or head-temperature."

    shift_cut_on = "Enables the sequential / bike shift cut system."
    shift_cut_in = "Input used for the button."
    shift_cut_out = "Output to the shift solenoid."
    shift_cut_rpm = "Minimum RPM to allow shifting."
    shift_cut_tps = "Minimum throttle to allow shifting."
    shift_cut_delay = "The solenoid is activated immediately, then wait this long before cutting spark."
    shift_cut_time = "How long to cut spark for."
    shift_cut_soldelay = "How long to keep the solenoid powered after the spark is returned."
    shift_cut_reshift = "Ignore button for this long after shifting - to prevent a false shift."

    outmsg1_offset01 = "Offset in the OutputChannels of the first variable in the outmsg 1. The outmsg is used to transfer a set of variables to a CAN device. The CAN device must support this and initiate the transfer. The list of variables must match on both devices."
    outmsg1_size01 = "Size in bytes of the first variable in the outmsg 1"
    outmsg2_offset01 = "Offset in the OutputChannels of the first variable in the outmsg 2. The outmsg is used to transfer a set of variables to a CAN device. The CAN device must support this and initiate the transfer. The list of variables must match on both devices."
    outmsg2_size01 = "Size in bytes of the first variable in the outmsg 2"
    outmsg3_offset01 = "Offset in the OutputChannels of the first variable in the outmsg 3. The outmsg is used to transfer a set of variables to a CAN device. The CAN device must support this and initiate the transfer. The list of variables must match on both devices."
    outmsg3_size01 = "Size in bytes of the first variable in the outmsg 3"
    outmsg4_offset01 = "Offset in the OutputChannels of the first variable in the outmsg 4. The outmsg is used to transfer a set of variables to a CAN device. The CAN device must support this and initiate the transfer. The list of variables must match on both devices."
    outmsg4_size01 = "Size in bytes of the first variable in the outmsg 4"
    outmsg5_offset01 = "Offset in the OutputChannels of the first variable in the outmsg 5. The outmsg is used to transfer a set of variables to a CAN device. The CAN device must support this and initiate the transfer. The list of variables must match on both devices."
    outmsg5_size01 = "Size in bytes of the first variable in the outmsg 5"
    outmsg6_offset01 = "Offset in the OutputChannels of the first variable in the outmsg 6. The outmsg is used to transfer a set of variables to a CAN device. The CAN device must support this and initiate the transfer. The list of variables must match on both devices."
    outmsg6_size01 = "Size in bytes of the first variable in the outmsg 6"
    outmsg7_offset01 = "Offset in the OutputChannels of the first variable in the outmsg 7. The outmsg is used to transfer a set of variables to a CAN device. The CAN device must support this and initiate the transfer. The list of variables must match on both devices."
    outmsg7_size01 = "Size in bytes of the first variable in the outmsg 7"
    outmsg8_offset01 = "Offset in the OutputChannels of the first variable in the outmsg 8. The outmsg is used to transfer a set of variables to a CAN device. The CAN device must support this and initiate the transfer. The list of variables must match on both devices."
    outmsg8_size01 = "Size in bytes of the first variable in the outmsg 8"
    flashlock = "Locks or unlocks the sensor calibration tables.\nLocked = Prevents accidental changes to the tables.\nUnlocked = Allows fresh calibrations to be written.\n\nEnsure you lock again after writing the calibration tables."
    pwmidle_freq_cl_opts_display_pid = "Basic mode uses P=100, I=100, D=0\nAdvanced enables the ability to individually set PID gains for cases where the controller cannot be tuned to reach the target adequately in Basic."
    boost_ctl_cl_pwm_targs1 = "The best-estimate boost valve duty for target load vs. RPM. This allows you to 'kick-start' the closed loop boost by setting the valve to the this position before engaging closed-loop PID control.\n\nThe table is determined by reviewing datalogs or taking a known open-loop table."
    can_outpc_msg = "The base message identifier in decimal of the sequential 11-bit CAN addresses used for realtime data (outpc) broadcasting. The ECU assigns the next identifier for each data group whether enabled or not.\ni.e. group 0 is at base identifier, group 17 is at base identifier+17\n\nThis means that by using the default base address you can use a predefined template for your dash etc.\nSee the manual for full message contents and offsets."
    can_outpc_gp00_int = "Sets the broadcasting data rate of all groups."
    can_outpc_gp00 = "Enables broadcasting of this group of data."
    can_outpc_gp17 = "Enables broadcasting of this group of data."
    can_outpc_gp00_master = "Global enable/disable of realtime data CAN broadcasting."
    dashbcast_opta1 = "Enables or disables Dash Broadcasting.\nThis is a simplified set of data for display or logging sent over CAN."
    dashbcast_id1 = "Base CAN identifier used for Dash Broadcasting."
    dashbcast_opta1adv = "Selects between automatic and manual advanced configuration."
    dashbcast_opta4outrate = "Rate to send outputs."
; tool tips end tooltips

[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 = 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 = mafdialog,      "MAF Settings"
        subMenu = MAFtable1,     "MAF Flow Curve", 0, {MAFOption && !feature7_mafcalib}
        subMenu = MAFtable1old,     "MAF Correction Table (Old)", 0, {MAFOption && feature7_mafcalib}
        subMenu = manifoldTempCorr,"MAF/MAT Correction Table", 0, {MAFOption && (feature7_mafmat || ((algorithm != 4) && (algorithm != 5) && (algorithm2 != 4) && (algorithm2 != 5)))}
        subMenu = std_separator 
        subMenu = manifoldTempCorr2,"MAT Air Density Table", 0, {((algorithm != 4) && (algorithm != 5) && (algorithm2 != 4) && (algorithm2 != 5))}
        subMenu = matclt_curve,   "MAT/CLT Correction", 0, {(algorithm != 4) && (algorithm != 5) && (algorithm2 != 4) && (algorithm2 != 5)}
        subMenu = std_separator
        subMenu = std_realtime,    "&Real-Time Display"
        subMenu = iopinlist, "Feature List Showing I/O Pins"
        subMenu = limitsettings, "Gauge and Settings Limits"
        
      menu = "F&uel Settings"
        subMenu = injChars,        "Injector Dead-Time/PWM"
        subMenu = stagedCombined,  "Staged Injection"
        subMenu = flexFuelSettings,"Fuel Sensor Settings (Flex)"
        subMenu = overrun, "Over-Run Fuel Cut"
        subMenu = std_separator 
        subMenu = egoControl,      "&EGO Control"
        subMenu = afrTable1Tbl,    "A&FR Table 1",         0
        subMenu = afrTable2Tbl,    "AF&R Table 2",         0, { dualTable}
        subMenu = std_separator
        subMenu = veTable1Tbl,     "Fuel VE Table &1", 0,{ ((algorithm != 5) || ((algorithm == 5) && (feature7_maftrim))) && (feature4_0VEtblsize==0) }, { (feature4_0VEtblsize==0) }
        subMenu = veTable1Tbldoz,  "Fuel VE Table &1",0, { ((algorithm != 5) || ((algorithm == 5) && (feature7_maftrim))) && feature4_0VEtblsize }, { feature4_0VEtblsize }
        subMenu = veTable2Tbl,     "Fuel VE Table &2", 0,{ (dualTable || algorithm2) && (feature4_0VEtblsize==0) }, { (feature4_0VEtblsize==0) }
        subMenu = veTable2Tbldoz,  "Fuel VE Table &2",0, { (dualTable || algorithm2) && feature4_0VEtblsize }, { feature4_0VEtblsize }
        subMenu = veTable3Tbl,     "Fuel VE Table &3", 0,{ ((f5_0_tsf > 0) || (seq_inj == 3))  && (feature4_0VEtblsize==0) }, { (feature4_0VEtblsize==0) }
        subMenu = veTable3Tbldoz,  "Fuel VE Table &3",0, { ((f5_0_tsf > 0) || (seq_inj == 3))  && feature4_0VEtblsize }, { feature4_0VEtblsize }
         subMenu = std_separator    ;----------------------------------------------
         subMenu = injTiming1Tbl, "Injection Timing Table 1", 0, { (spk_mode0 > 3) && seq_inj && injusetable }
         subMenu = injTiming2Tbl, "Injection Timing Table 2", 0, { (spk_mode0 > 3) && (seq_inj == 3) && injusetable && injdualvalue }
         subMenu = injTiming3Tbl, "Injection Timing Table 3", 0, { (spk_mode0 > 3) && (seq_inj == 3) && injusetable }
        subMenu = veTrim1Tbl,     "Fuel VE Trim Table 1", 0,{ seq_inj && usevetrim && (feature4_0VEtblsize==0) }, { (feature4_0VEtblsize==0) }
        subMenu = veTrim1Tbldoz,  "Fuel VE Trim Table 1",0, { seq_inj && usevetrim && feature4_0VEtblsize }, { feature4_0VEtblsize }
        subMenu = veTrim2Tbl,     "Fuel VE Trim Table 2", 0,{ seq_inj && usevetrim && (feature4_0VEtblsize==0) }, { (feature4_0VEtblsize==0) }
        subMenu = veTrim2Tbldoz,  "Fuel VE Trim Table 2",0, { seq_inj && usevetrim && feature4_0VEtblsize }, { feature4_0VEtblsize }
        subMenu = veTrim3Tbl,     "Fuel VE Trim Table 3", 0,{ seq_inj && usevetrim && extrainj && (feature4_0VEtblsize==0) }, { (feature4_0VEtblsize==0) }
        subMenu = veTrim3Tbldoz,  "Fuel VE Trim Table 3",0, { seq_inj && usevetrim && extrainj && feature4_0VEtblsize }, { feature4_0VEtblsize }
        subMenu = veTrim4Tbl,     "Fuel VE Trim Table 4", 0,{ seq_inj && usevetrim && extrainj && (feature4_0VEtblsize==0) }, { (feature4_0VEtblsize==0) }
        subMenu = veTrim4Tbldoz,  "Fuel VE Trim Table 4",0, { seq_inj && usevetrim && extrainj && feature4_0VEtblsize }, { feature4_0VEtblsize }
        subMenu = std_separator
        subMenu = injseq, "Sequenced Batch Fire", 0, { seq_inj == 0 }
        subMenu = std_separator
        subMenu = fuelcalcs, "Fuel Calculations Summary"
        
      menu = "&Ignition Settings"
        subMenu = combinedignition, "Ignition Options / Wheel Decoder"
         subMenu = std_trigwiz,     "Tri&gger Wizard", 0,{ (spk_mode0 != 31) && (spk_mode0 != 4) }
        subMenu = std_separator                
        subMenu = dwellSettings,   "D&well Battery Correction", 0, { spk_mode0 != 31 }
        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"
  	    subMenu = knockSettings,   "&Knock Sensor Settings" 
        subMenu = std_separator        
        subMenu = ignitionTbl1,     "&Ignition Table 1", 0, {(spk_mode0 != 31) }
        subMenu = ignitionTbl2,     "Ignition Table 2", 0, { (IgnAlgorithm2 !=0) && (spk_mode0 != 31)}
        subMenu = ignitionTbl3,     "Ignition Table 3", 0, {(f5_0_tss>0) && (spk_mode0 != 31)}
        subMenu = std_separator
        subMenu = RotaryTrailingSettings, "Rotary Settings", 0, { (twoStroke == 3) && (spk_mode0 != 31) }
        subMenu = RotarySplitTbl,  "Rotary Split Table", 0, { (twoStroke == 3) && (spk_mode0 != 31) }
        subMenu = std_separator
        subMenu = sparkcalcs, "Spark Calculations Summary"

      menu = "&Startup/Idle"
        subMenu = crsettings,      "Cranking / Startup settings",  0
        subMenu = primingPW,       "Pri&ming Pulse",       0
        subMenu = crankingPW,      "Cra&nking Pulse %",      0
        subMenu = nestedasePct,    "AfterStart Enrichment (ASE)",      0
        subMenu = aseTaper,        "AfterStart Enrichment (ASE) Taper",           0
        subMenu = nestedwarmup_curve, "&Warmup Enrichment (WUE)",       0
        subMenu = std_separator
        subMenu = combinedidle,     "I&dle Control"
        subMenu = pwmidle_crank_dutyorsteps_curve, "Idle Cranking Duty/Steps", 0, {IdleCtl > 1}
        subMenu = idlebins, "Idle Warmup Duty/Steps", 0, {(IdleCtl > 1) && (IdleCtl_alg == 0)}
        subMenu = combinedCLidle, "Closed-Loop Idle Settings", 0, {(IdleCtl > 1) && (IdleCtl_alg == 1)}
        subMenu = pwmidle_target_curve, "Closed-Loop Idle Target RPM Curve", 0, {((IdleCtl > 1) && (IdleCtl_alg == 1)) || (idleadvance_on == 4)}
        subMenu = pwmidle_cl_initialvalues, "Closed-Loop Idle Initial Values", 0, { pwmidle_cl_opts_initvaluetable && (IdleCtl > 1) && (IdleCtl_alg == 1) }
        subMenu = idle_voltage_comp_curve, "PWM Idle Voltage Compensation", 0, {IdleCtl == 2}
        subMenu = ac_idleup, "Air Conditioning Idle-up" 
        subMenu = std_separator
        subMenu = idleAdvance,  "Idle Advance Settings"
        subMenu = idleAdvance_load_curve, "Idle Load Advance Timing",  0, { idleadvance_on==1 }
        subMenu = idleAdvance_rpm_curve, "Idle RPMs Advance Timing",  0, { idleadvance_on==2 }
        subMenu = idleAdvance_adaptive_curve, "Idle Adaptive Advance Timing",  0, { idleadvance_on==4 }

      menu = "Accel Enrich"
        subMenu = accelsettings,   "Accel Enrich Settings"
        subMenu = AEtime_settings, "Time-Based Accel Enrichment"
        subMenu = tpswot_curve,   "TPS WOT curve", 0, {feature7_aetpswot}
        subMenu = std_separator
        subMenu = EAEBAWCcurve,   "EAE Adhere-to-walls Coefficient", 0, {      EAEOption > 0 }
	    subMenu = EAEBSOCcurve,   "EAE Sucked-from-walls Coefficient", 0, {EAEOption > 0}
	    subMenu = EAEAWNcurve,   "EAE Adhere-to-walls RPM Correction", 0, {EAEOption > 0}
	    subMenu = EAESONcurve,   "EAE Sucked-from-walls RPM Correction", 0, {EAEOption > 0}
        subMenu = EAEAWWcurve,   "EAE Adhere-to-walls CLT Correction", 0, {EAEOption > 0}
        subMenu = EAESOWcurve,   "EAE Sucked-from-walls CLT Correction", 0, {EAEOption > 0}
	    subMenu = EAElagcomp,    "EAE Lag Compensation", 0, {EAEOption == 3}

      menu = "Boost/ Advanced"
	    subMenu = boostctlSettings, "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 = boostctlCLPWMtargs1, "Boost Control Initial Duty Table", 0, { (boost_ctl_settings_on == 1) && (boost_ctl_settings_cl == 1) && (boost_ctl_settings_initialvals == 1) }
        subMenu = std_separator
        subMenu = tablesw,         "Table Switching Control"
        subMenu = std_separator 
        subMenu = launch,          "Launch Control"
        subMenu = N2OSystem,    "&Nitrous System"
        subMenu = N2OSystem2,   "&Nitrous Stage 2",              0, { N2Oopt_2 && N2Oopt_3 }
        subMenu = ShiftSettings, "Sequential Shift Cut"
        subMenu = std_separator 
        subMenu = std_port_edit,   "Programmable On/Off Outputs"         

   menuDialog = main
      menu = "3D &Tuning Maps"
;16x16
         subMenu = veTable1Map,     "Fuel VE Table &1", 0, { (feature4_0VEtblsize==0) && ( ((algorithm != 5) || ((algorithm == 5) && (feature7_maftrim))))}, { (feature4_0VEtblsize==0) }
         subMenu = veTable2Map,     "Fuel VE Table &2", 0, { ((dualTable) || (algorithm2 != 0)) && (feature4_0VEtblsize==0) }, { (feature4_0VEtblsize==0) }
         subMenu = veTable3Map,     "Fuel VE Table &3", 0, { (f5_0_tsf || (seq_inj == 3)) && (feature4_0VEtblsize==0) }, { (feature4_0VEtblsize==0) }
         subMenu = veTrim1Map,      "Fuel VE Trim Table 1",0 { seq_inj && (feature4_0VEtblsize==0) && usevetrim }, { (feature4_0VEtblsize==0) }
         subMenu = veTrim2Map,      "Fuel VE Trim Table 2",0 { seq_inj && (feature4_0VEtblsize==0) && usevetrim }, { (feature4_0VEtblsize==0) }
         subMenu = veTrim3Map,      "Fuel VE Trim Table 3",0 { seq_inj && (feature4_0VEtblsize==0) && usevetrim && extrainj }, { (feature4_0VEtblsize==0) }
         subMenu = veTrim4Map,      "Fuel VE Trim Table 4",0 { seq_inj && (feature4_0VEtblsize==0) && usevetrim && extrainj }, { (feature4_0VEtblsize==0) }
;12x12
         subMenu = veTable1Mapdoz,     "Fuel VE Table &1",0, { (feature4_0VEtblsize==1) && ( ((algorithm != 5) || ((algorithm == 5) && (feature7_maftrim))))},  { (feature4_0VEtblsize==1) }
         subMenu = veTable2Mapdoz,     "Fuel VE Table &2",0, { (dualTable || (algorithm2 != 0)) && (feature4_0VEtblsize==1) }, { (feature4_0VEtblsize==1) }
         subMenu = veTable3Mapdoz,     "Fuel VE Table &3",          0, { (f5_0_tsf || (seq_inj == 3)) && (feature4_0VEtblsize==1) }, { (feature4_0VEtblsize==1) }
         subMenu = veTrim1Mapdoz,      "Fuel VE Trim Table 1",0, { seq_inj && (feature4_0VEtblsize==1) && usevetrim }, { (feature4_0VEtblsize==1) }
         subMenu = veTrim2Mapdoz,      "Fuel VE Trim Table 2",0, { seq_inj && (feature4_0VEtblsize==1) && usevetrim }, { (feature4_0VEtblsize==1) }
         subMenu = veTrim3Mapdoz,      "Fuel VE Trim Table 3",0, { seq_inj && (feature4_0VEtblsize==1) && usevetrim && extrainj }, { (feature4_0VEtblsize==1) }
         subMenu = veTrim4Mapdoz,      "Fuel VE Trim Table 4",0, { seq_inj && (feature4_0VEtblsize==1) && usevetrim && extrainj }, { (feature4_0VEtblsize==1) }
         subMenu = afrTable1Map,    "A&FR Table 1"
         subMenu = afrTable2Map,    "AF&R Table 2",         0, { dualTable }
         subMenu = std_separator    ;----------------------------------------------
         subMenu = ignitionMap1,     "&Ignition Table 1", 0, {(spk_mode0 != 31)}
         subMenu = ignitionMap2,     "&Ignition Table 2", 0, {(IgnAlgorithm2 != 0) && (spk_mode0 != 31)}
         subMenu = ignitionMap3,     "&Ignition Table 3", 0, {(f5_0_tss>0) && (spk_mode0 != 31)}
	     subMenu = RotarySplitMap,   "Rotary Split Table", 0, {(twoStroke == 3) && (spk_mode0 != 31)}
	     subMenu = std_separator    ;----------------------------------------------
	     subMenu = boostctlDtyMap,   "Boost Control Duty Table", 0, {boost_ctl_settings_on && boost_ctl_settings_cl == 0}
	     subMenu = boostctlTargMap,  "Boost Control Target Table", 0, {boost_ctl_settings_on && boost_ctl_settings_cl}
	     subMenu = std_separator    ;----------------------------------------------
	     subMenu = injTiming1Map,   "Injection Timing Table 1", 0, { (spk_mode0 > 3) && (seq_inj) && (injusetable) }
	     subMenu = injTiming2Map,   "Injection Timing Table 2", 0, { (spk_mode0 > 3) && (seq_inj == 3) && (injusetable) && (injdualvalue) }
    	 subMenu = injTiming3Map,   "Injection Timing Table 3", 0, { (spk_mode0 > 3) && (seq_inj == 3) && (injusetable) }
      
      menu = "C&AN bus/Testmodes"
         subMenu = canparams, "CAN Parameters"
         subMenu = canbroadcast, "CAN Broadcasting", 0, {can_poll}
         subMenu = canbcast_userdef, "CAN Broadcast Testing", 0, {can_poll && can_bcast1_on && can_bcast2_xxx}
         subMenu = can_outpc_bcast,"CAN Realtime Data Broadcasting", 0, {can_poll}
         subMenu = can_outpc_bcast_2,"CAN Realtime Data Broadcasting 2", 0, {can_poll && can_outpc_gp00_master}
         subMenu = dashbcast, "Dash Broadcasting"
         subMenu = rmt_port_edit,   "Remote On/Off Outputs", 0, { (can_poll) && (enable_pollports) && (ports_dir) && (port_generic) }
         subMenu = std_separator    ;----------------------------------------------
         subMenu = outputtest, "Output Test Mode - Inj/Spk"
         subMenu = outputtest_io, "Output Test Mode - I/O"
         subMenu = iactest, "Output Test Mode - Idle Valve ", 0, {IdleCtl}
#if OUTMSG_EDITING
         subMenu = std_separator 
         subMenu = outmsg1,   "Outmsg 1"
         subMenu = outmsg2,   "Outmsg 2"
         subMenu = outmsg3,   "Outmsg 3"
         subMenu = outmsg4,   "Outmsg 4"
         subMenu = outmsg5,   "Outmsg 5"
         subMenu = outmsg6,   "Outmsg 6"
         subMenu = outmsg7,   "Outmsg 7"
         subMenu = outmsg8,   "Outmsg 8"
#endif
;      subMenu = userdefined, "User defined menu" ; uncomment this line to enable

 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 && feature7_mafcalib}

      menu = "Communications"
         subMenu = setbaud, "Megasquirt Baud Rate"

      menu = "Help"
         subMenu = helpGeneral,     "MS2/Extra Info"

;-------------------------------------------------------------------------------
[VerbiageOverride]
; text over-rides for internal TS dialogs.
; Not all dialogs support this yet, let Phil Tobin know if you need a specific one.
; Requires 0.999.9h upwards
"Engine Stroke" = "Engine Stroke/Rotary"
"Number of Cylinders" = "No. Cylinders/Rotors"

[ControllerCommands]
; commandName    = command1, command2, commandn...
; command in standard ini format, a command name can be assigned to 1 to n commands that will be executed in order.
;         This dos not include any resultant protocol envelope data, only the response data itself.

; WARNING!! These commands bypass TunerStudio's normal memory synchronization. If these commands
; alter mapped settings (Constant) memory in the controller, TunerStudio will have an out of sync condition 
; and may create error messages.
; It is expected that these commands would not typically alter any ram mapped to a Constant.

cmdStopTestmode = "w\$tsCanId\x07\x02\x08\x00\x03\x30\x39\x00"
cmdEnterTestMode = "w\$tsCanId\x07\x02\x08\x00\x03\x30\x39\x01"
cmdtestspkon = "w\$tsCanId\x07\x02\x08\x00\x03\x30\x39\x02"
cmdtestinjon = "w\$tsCanId\x07\x02\x08\x00\x03\x30\x39\x03"

cmdfpon = "w\$tsCanId\x07\x02\x08\x00\x03\x30\x39\x05"
cmdfpoff = "w\$tsCanId\x07\x02\x08\x00\x03\x30\x39\x06"
cmdtestinjspkoff = "w\$tsCanId\x07\x02\x08\x00\x03\x30\x39\x07"

cmdtestiacoff = "w\$tsCanId\x07\x02\x08\x00\x03\x30\x39\x08"
cmdtestiachome = "w\$tsCanId\x07\x02\x08\x00\x03\x30\x39\x09"
cmdtestiacon = "w\$tsCanId\x07\x02\x08\x00\x03\x30\x39\x0a"

cmdtest10off  = "w\$tsCanId\x07\x02\x08\x00\x03\x30\x39\x80"
cmdtest10pulsed = "w\$tsCanId\x07\x02\x08\x00\x03\x30\x39\x82"
cmdtest10on = "w\$tsCanId\x07\x02\x08\x00\x03\x30\x39\x83"

cmdtest11off  = "w\$tsCanId\x07\x02\x08\x00\x03\x30\x39\x84"
cmdtest11pulsed = "w\$tsCanId\x07\x02\x08\x00\x03\x30\x39\x86"
cmdtest11on = "w\$tsCanId\x07\x02\x08\x00\x03\x30\x39\x87"

cmdtest12off  = "w\$tsCanId\x07\x02\x08\x00\x03\x30\x39\x88"
cmdtest12pulsed = "w\$tsCanId\x07\x02\x08\x00\x03\x30\x39\x8a"
cmdtest12on = "w\$tsCanId\x07\x02\x08\x00\x03\x30\x39\x8b"

cmdtest13off  = "w\$tsCanId\x07\x02\x08\x00\x03\x30\x39\x8c"
cmdtest13pulsed = "w\$tsCanId\x07\x02\x08\x00\x03\x30\x39\x8e"
cmdtest13on = "w\$tsCanId\x07\x02\x08\x00\x03\x30\x39\x8f"

cmdtest14off  = "w\$tsCanId\x07\x02\x08\x00\x03\x30\x39\x90"
cmdtest14pulsed = "w\$tsCanId\x07\x02\x08\x00\x03\x30\x39\x92"
cmdtest14on = "w\$tsCanId\x07\x02\x08\x00\x03\x30\x39\x93"

cmdtest15off  = "w\$tsCanId\x07\x02\x08\x00\x03\x30\x39\x94"
cmdtest15pulsed = "w\$tsCanId\x07\x02\x08\x00\x03\x30\x39\x96"
cmdtest15on = "w\$tsCanId\x07\x02\x08\x00\x03\x30\x39\x97"

cmdtest16off  = "w\$tsCanId\x07\x02\x08\x00\x03\x30\x39\x98"
cmdtest16pulsed = "w\$tsCanId\x07\x02\x08\x00\x03\x30\x39\x9a"
cmdtest16on = "w\$tsCanId\x07\x02\x08\x00\x03\x30\x39\x9b"

cmdtest17off  = "w\$tsCanId\x07\x02\x08\x00\x03\x30\x39\x9c"
cmdtest17pulsed = "w\$tsCanId\x07\x02\x08\x00\x03\x30\x39\x9e"
cmdtest17on = "w\$tsCanId\x07\x02\x08\x00\x03\x30\x39\x9f"

[UserDefined]
    dialog = dashbcast, "Dash Broadcasting", yAxis
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#dashbcast"
    field = "Enable", dashbcast_opta1
    field = "Configuration", dashbcast_opta1adv, {dashbcast_opta1}
    field = "Base CAN identifier", dashbcast_id1, {dashbcast_opta1 && dashbcast_opta1adv }
    field = "Outputs transmit rate", dashbcast_opta4outrate, {dashbcast_opta1 && dashbcast_opta1adv }

    dialog = can_outpc_bcast_setting, "", yAxis
        field = "Enable realtime data broadcasting over CAN", can_outpc_gp00_master
        field = "Base message identifier (decimal)", can_outpc_msg
        field = "Broadcasting rate", can_outpc_gp00_int

    dialog = can_outpc_bcast_1, "", yAxis
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#canrtbcast"
        field = "00: Seconds,PW1,PW2,RPM", can_outpc_gp00, { can_outpc_gp00_master }
        field = "01: Advance,Squirt,Engine,AFRtgt1,2,WBen1,2", can_outpc_gp01, { can_outpc_gp00_master }
        field = "02: Baro,MAP,MAT,CLT", can_outpc_gp02, { can_outpc_gp00_master }
        field = "03: TPS,Batt,EGO1,2", can_outpc_gp03, { can_outpc_gp00_master }
        field = "04: Knock,egocor1,2,aircor", can_outpc_gp04, { can_outpc_gp00_master }
        field = "05: warmcor,tpsaccel,tpsfuelcut,barocor", can_outpc_gp05, { can_outpc_gp00_master }
        field = "06: totalcor,ve1,ve2,iacstep", can_outpc_gp06, { can_outpc_gp00_master }
        field = "07: cold_adv,TPSdot,MAPdot,RPMdot", can_outpc_gp07, { can_outpc_gp00_master }
        field = "08: MAFload,fuelload,fuelcor,MAF", can_outpc_gp08, { can_outpc_gp00_master }
        field = "09: egoV1,2,dwell,dwell_trl", can_outpc_gp09, { can_outpc_gp00_master }
        field = "10: status1,2,3,4,5", can_outpc_gp10, { can_outpc_gp00_master }
        field = "11: fuelload2,ignload1,2,airtemp", can_outpc_gp11, { can_outpc_gp00_master }
        field = "12: wallfuel1,2", can_outpc_gp12, { can_outpc_gp00_master }
        field = "13: gpioadc0,1,2,3", can_outpc_gp13, { can_outpc_gp00_master }
        field = "14: gpioadc4,5,6,7", can_outpc_gp14, { can_outpc_gp00_master }
        field = "15: adc6,7", can_outpc_gp15, { can_outpc_gp00_master }

    dialog = can_outpc_bcast_2, "CAN Realtime Data Broadcasting 2", yAxis
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#canrtbcast"
        field = "17: boost_targ1,boostduty1,MAFv", can_outpc_gp17
        field = "18: PWseq1,2,3,4", can_outpc_gp18
        field = "26: nitrous:addfuel,retard", can_outpc_gp26
        field = "27: CANpwinin1,2,3,4", can_outpc_gp27
        field = "28: CLidletarg,tpsadc,EAEload,AFRload", can_outpc_gp28
        field = "29: EAEfcor1,2", can_outpc_gp29
        field = "43: synccnt,reason,timing_err", can_outpc_gp43
        field = "46: injtimingpri,sec", can_outpc_gp46
        field = "47: eth%", can_outpc_gp47
        field = "51: PORTa,b,e,m,t", can_outpc_gp51
        field = "52: CANport1,2,3,knockretard", can_outpc_gp52
        field = "55: looptime", can_outpc_gp55
        field = "57: Advance:Base,Idle,Flex.MATretard", can_outpc_gp57
        field = "58: TableAdv:1,2,3", can_outpc_gp58
        field = "59: Revlimretard,ext_advance,deadtime", can_outpc_gp59
    
    dialog = can_outpc_bcast, "CAN Realtime Data Broadcasting", yAxis
        panel = can_outpc_bcast_setting, North
        panel = can_outpc_bcast_1, South

    dialog = wc_note
        field = "For 99% of engines, warmup must have 100% in the final row. Typical maximum is 255% (cold)."

    dialog = nestedwarmup_curve, "Warmup Enrichment (WUE) - Percent Multiplier"
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#wue"
        panel = warmup_curve
        panel = wc_note

    dialog = ase_note
        field = "The typical range for afterstart is 50% (cold) to 5% (warm)"

    dialog = nestedasePct, "AfterStart Enrichment (ASE) - Percent Adder"
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#ase"
        panel = asePct
        panel = ase_note

    dialog = fuelcalc_gauges1, "", xAxis
        gauge = veGauge1
        gauge = veGauge2
        gauge = reqfuelGauge
        gauge = deadtime1Gauge
        gauge = stoichGauge

    dialog = fuelcalc_gauges2, "", xAxis
        gauge = warmupEnrichGauge     
        gauge = barocorgauge    
        gauge = gammaairGauge
        gauge = flexcorGauge
        gauge = afr1tgtGauge

    dialog = fuelcalc_gauges3, "", xAxis
        gauge = accelEnrichGauge
        gauge = accEnrichMSGauge
        gauge = EAEGauge1
        gauge = EAEGauge2
        gauge = fuelloadGauge
        gauge = n2o_addfuelGauge

    dialog = fuelcalc_gauges3, "", xAxis
        gauge = vetrimGauge1
        gauge = vetrimGauge2
        gauge = vetrimGauge3
        gauge = vetrimGauge4

    dialog = fuelcalc_gauges4, "", xAxis
        gauge = pulseWidth1Gauge
        gauge = pulseWidth2Gauge
        gauge = pulseWidth3Gauge
        gauge = pulseWidth4Gauge

    dialog = fuelcalc_gauges5, "", xAxis
        gauge = dutyCycle1Gauge
        gauge = dutyCycle2Gauge
        gauge = gammaEnrichGauge

    dialog = fuelcalc_gauges6, ""
        field = "For more information on fuel calculations, see http://www.msextra.com/doc/ms3/fuelcalc.html"

    dialog = fuelcalcs, "Fuel Calculations Summary", yAxis
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#fuelsum"
        panel = fuelcalc_gauges1
        panel = fuelcalc_gauges2
        panel = fuelcalc_gauges3
        panel = fuelcalc_gauges4
        panel = fuelcalc_gauges5
        panel = fuelcalc_gauges6

    dialog = sparkcalc_gauges1, "", xAxis
        gauge = adv1Gauge
        gauge = adv2Gauge
        gauge = adv3Gauge
        gauge = base_advanceGauge

    dialog = sparkcalc_gauges2, "", xAxis
        gauge = idle_cor_advanceGauge      
        gauge = coldAdvGauge     
        gauge = mat_retardGauge
        gauge = flex_advanceGauge

    dialog = sparkcalc_gauges3, "", xAxis
        gauge = nitrous_retardGauge
        gauge = revlim_retardGauge
        gauge = ext_advanceGauge
        gauge = knockGauge

    dialog = sparkcalc_gauges4, "", xAxis
        gauge = advdegGauge

    dialog = sparkcalcs, "Spark Calculations Summary", yAxis
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#sparksum"
        panel = sparkcalc_gauges1
        panel = sparkcalc_gauges2
        panel = sparkcalc_gauges3
        panel = sparkcalc_gauges4

   dialog = ShiftSettings, "Sequential Shift Cut"
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#seqshift"
    field = "Shifter Spark Cut System", 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", shift_cut_time, { shift_cut_on }
    field = "Solenoid Delay", shift_cut_soldelay,  { shift_cut_on && shift_cut_out }
    field = "Re-shift Hold-off Time", shift_cut_reshift, { shift_cut_on }

    dialog = pwmidle_crank_dutyorsteps_curve, "", card
        panel = pwmidle_crank_dutyorsteps_dutycurve, Center, {IdleCtl == 2}
        panel = pwmidle_crank_dutyorsteps_stepscurve, Center, {IdleCtl == 3}

    dialog = pwmidle_cl_initialvalues, "", card
        panel = pwmidle_cl_initialvalues_dty, Center, { pwmidle_cl_opts_initvaluetable && (IdleCtl == 2) }
        panel = pwmidle_cl_initialvalues_stps, Center, { pwmidle_cl_opts_initvaluetable && (IdleCtl == 3) }

    dialog = idlebins, "", card
        panel = iacBins, Center, { IdleCtl == 3 }
        panel = ipwBins, Center, { IdleCtl == 2 }

    dialog = flash_unlock, "Un/Lock calibrations"
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#calunlock"
        field = "Sensor Calibrations", flashlock
        field = "Always re-lock after use"

    dialog = airden_words
        field = "For firmware 3.3.x this feature has changed."
        field = "This curve is the whole air density correction exposed in full."
        field = "It is based on the 'ideal gas law'."

    dialog = manifoldTempCorr2, "MAT Air Density Table"
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#matairden"
        panel = airden_words
        panel = airdenCorr
           
    dialog = limitsettings, "Gauge and Settings Limits"
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#gaugeset"
        field = "These are the limits for gauges and tuning settings,"
        field = "so that curves and tables are more appropriately scaled."
        field = "Adjust to suit your engine."
        field = "They do not directly alter engine behaviour."
        field = "RPM - Max Display", rpmhigh
        field = "RPM - Warn Level", rpmwarn
        field = "RPM - Danger Level", rpmdang
        field = "Load/kPa - Max", loadhigh
        field = "Air-cooled Expanded CLT Range", clt_exp

    dialog = iopinlist, "Feature list Showing I/O Pins"
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#iopins"
        displayOnlyField = "Main Fuel Outputs PT1, PT3"
      displayOnlyField = "Extra Fuel Outputs PT2, PT4",  extrainj, {extrainj}

      displayOnlyField = "Spark A Output Pin", spk_config_spka, { (spk_mode0 > 1) && (spk_mode0 != 31) }
        displayOnlyField = "Additional Spark Outputs May Be on LED D14, D16, D15, JS11, ADC6, ADC7", spk_mode3, {spk_mode3}
        displayOnlyField = "Cam Input (If Used) = JS10", spk_mode3a, {!((spk_config_trig2 == 1) && (spk_mode0 == 4))} ; greyed in toothed wheel, single wheel
 displayOnlyField = "Programmable On/Off Output: FIDLE",        psEnabled[0], {psEnabled[0]}
 displayOnlyField = "Programmable On/Off Output: LED D14",      psEnabled[1], {psEnabled[1]}
 displayOnlyField = "Programmable On/Off Output: LED D16",      psEnabled[2], {psEnabled[2]}
 displayOnlyField = "Programmable On/Off Output: LED D15",      psEnabled[3], {psEnabled[3]}
 displayOnlyField = "Programmable On/Off Output: PT7 - IAC1",   psEnabled[4], {psEnabled[4]}
 displayOnlyField = "Programmable On/Off Output: PT6 - IAC2",   psEnabled[5], {psEnabled[5]}
 displayOnlyField = "Programmable On/Off Output: JS11 (PA0)",   psEnabled[6], {psEnabled[6]}

 displayOnlyField = "Programmable On/Off Output: Remote Port Channel 1", rmt_psEnabled[0], {rmt_psEnabled[0]}
 displayOnlyField = "Programmable On/Off Output: Remote Port Channel 2", rmt_psEnabled[1], {rmt_psEnabled[1]}
 displayOnlyField = "Programmable On/Off Output: Remote Port Channel 3", rmt_psEnabled[2], {rmt_psEnabled[2]}
 displayOnlyField = "Programmable On/Off Output: Remote Port Channel 4", rmt_psEnabled[3], {rmt_psEnabled[3]}
 displayOnlyField = "Programmable On/Off Output: Remote Port Channel 5", rmt_psEnabled[4], {rmt_psEnabled[4]}
 displayOnlyField = "Programmable On/Off Output: Remote Port Channel 6", rmt_psEnabled[5], {rmt_psEnabled[5]}
 displayOnlyField = "Programmable On/Off Output: Remote Port Channel 7", rmt_psEnabled[6], {rmt_psEnabled[6]}
 displayOnlyField = "Programmable On/Off Output: Remote Port Channel 8", rmt_psEnabled[7], {rmt_psEnabled[7]}

    displayOnlyField = "EGO 1 port", egoport, {egoType}
    displayOnlyField = "EGO 2 port", ego2port, {(egoType == 2) || (egoType == 4)}
    displayOnlyField = "PWM Idle Output", pwmidle_port2, { (IdleCtl == 1) || (IdleCtl == 2) }
    displayOnlyField = "AC Idle-up Input", idle_up_options_input, { ac_idleup_settings }
    displayOnlyField = "AC Idle-up Output", ac_idleup_io_out, { ac_idleup_settings && (ac_idleup_io_out != 0x0f) }
    displayOnlyField = "Realtime Baro Port",    rtbaroport, {baroCorr == 2}
    displayOnlyField = "MAP Voltage Input",    mapport, {mapport}
    displayOnlyField = "MAF Voltage Input", MAFOption, {MAFOption}
    displayOnlyField = "Flex Sensor Port",              flexport,    { flexFuel > 0 }
    displayOnlyField = "Tacho Output",  tacho_opt3f, { tacho_opt80 }

    displayOnlyField = "Fuel Table Switching Input", ts_port_f, { f5_0_tsf && (f5_0_tsf_opt == 0) }
    displayOnlyField = "Spark Table Switching Input", ts_port_s, { f5_0_tss && (f5_0_tss_opt == 0) }
    displayOnlyField = "Knock Input Pin",      knkport, { knk_option }
    displayOnlyField = "Boost Control Output ",     boost_ctl_pins, {boost_ctl_settings_on && (boost_ctl_settings_remote == 0)}
    displayOnlyField = "Boost Control Output ",     boost_ctl_remote, {boost_ctl_settings_on && boost_ctl_settings_remote}
    displayOnlyField = "Nitrous Output",  N2Oopt_pins2,       { N2Oopt_2 }
    displayOnlyField = "Nitrous Enable Input",  N2Oopt_pins,        { N2Oopt_2 }
    displayOnlyField = "Launch Input",  launch_opt_pins, { launch_opt_on >0 }
        displayOnlyField = "Bike Shifter Input", shift_cut_in, { shift_cut_on }
        displayOnlyField = "Bike Shifter Output", shift_cut_out, { shift_cut_on }

 ; idle up section --------------------------------------------------------------------
   
    dialog = ac_idleup, "Air Conditioning Idle-up"
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#acidle"
        field = "A/C Idle-up",   ac_idleup_settings
        field = "Idle-up Output", ac_idleup_io_out, { ac_idleup_settings }
        field = "Idle-up Input",    idle_up_options_input, {ac_idleup_settings}
        field = "Idle-up Input Polarity",    idle_up_options_inv, {ac_idleup_settings}
        field = "Idle-up Delay", ac_idleup_delay, { ac_idleup_settings }
        field = "Idle-up Min RPM", ac_idleup_min_rpm, { ac_idleup_settings }
        field = "Compressor Delay Since Last On", ac_delay_since_last_on, { ac_idleup_settings }
        field = "Idle-up Duty Adder",   ac_idleup_adder_duty, {ac_idleup_settings && (IdleCtl == 2) }
        field = "Idle-up Steps Adder",  ac_idleup_adder_steps, {ac_idleup_settings && (IdleCtl == 3) } 
        field = "Idle-up Target RPM Adder",    idle_up_targ_rpm ,{ac_idleup_settings && (IdleCtl_alg == 1)}            

   dialog = battcalib, "Calibrate Battery Voltage"
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#calbatt"
        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 = mafdialog, "MAF Settings", yAxis
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#mafset"
        field = "Voltage Input Port", MAFOption
        field = "MAT Correction Curve", feature7_mafmat
        field = "Use VE1 as Trim Table", feature7_maftrim, {algorithm == 5}
        field = "MAF Sensor Range", maf_range
        field = "Set the range before loading a flow curve."
        field = "Use Old-style Calibration Curve (See Tools Menu)", feature7_mafcalib

   dialog = N2OSystem, "Nitrous System"
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#nitrous"
      field =   "Nitrous Control",                   N2Oopt_2
      field =   "Turn N2O On When Above",            N2ORpm,        { N2Oopt_2 }
      field =   "And Coolant Temp Above",            N2OClt,        { N2Oopt_2 }
      field =   "And TPS >",                         N2OTps,        { N2Oopt_2 }
      field = "Enable Input",                    N2Oopt_pins,   { N2Oopt_2 }
      field = "Output Pins For Stage 1+2",           N2Oopt_pins2,  { N2Oopt_2 }
      field =   "Additional Fuel PW @ N2O min rpm",  N2OPWLo,       { N2Oopt_2 }
      field =   "Max RPM",                           N2ORpmMax,     { N2Oopt_2 }
      field =   "Additional Fuel PW @ N2O Max RPM",  N2OPWHi,       { N2Oopt_2 }
      field =   "Enrich Which Bank In DualTable",    N2Oopt_01,     { N2Oopt_2 && dualTable }
      field =   "If ST2 Off Retard Ignition By"      N2OAngle,      { N2Oopt_2}
      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 =   "Nitrous stage 2",                  N2Oopt_3,     { N2Oopt_2 }

   dialog = N2OSystem2, "Nitrous Stage 2"
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#nitrous2"
      field = "Enable stage 2 above",             N2O2Rpm
      field = "Max RPM",                          N2O2RpmMax
      field = "Delay After Stage 1",               N2O2delay
      field = "Retard Ignition By",               N2O2Angle
      field = "Additional Fuel PW @ N2O Min RPM", N2O2PWLo
      field = "Additional Fuel PW @ N2O Max RPM", N2O2PWHi

   dialog = overboost, "Overboost Protection"
   field = "Overboost Protection", OverBoostOption
   field = "Maximum Boost",   OverBoostKpa, { OverBoostOption > 0 }
   field = "Hysteresis",      OverBoostHyst, { OverBoostOption > 0 }
   field = "Boost Tolerance", OverBoostOption_tol, { OverBoostOption && boost_ctl_settings_cl}
   field = "Tolerance", boosttol, {OverBoostOption && OverBoostOption_tol && boost_ctl_settings_cl}
   field = ""
      field = ""
      field = ""

   dialog = flexboost, "Flex/Boost"
   field = "Use Flex On Y Axis Of Target Table", OverBoostOption_flexboost, {boost_ctl_settings_on && boost_ctl_settings_cl && flexFuel}
   field = "Above TPS", flexboosttps, {OverBoostOption_flexboost && boost_ctl_settings_on && boost_ctl_settings_cl && flexFuel}
      field = ""
      field = ""
      field = ""

    dialog = boostctlSettingsr, ""
        panel = overboost, North
        panel = flexboost, South

    dialog = boostctlSettingsl, ""
      field = "Boost Control Enabled",		  boost_ctl_settings_on
      field = "Boost Control Use Initial Value Table", boost_ctl_settings_initialvals, { boost_ctl_settings_on && boost_ctl_settings_cl }
      field = "Solenoid Frequency",		  boost_ctl_settings_freq, { boost_ctl_settings_on && !boost_ctl_settings_remote }
      field = "Control Interval",                 boost_ctl_ms, {boost_ctl_settings_on}
      field = ""
      field = "Boost Control Location",           boost_ctl_settings_remote, { boost_ctl_settings_on && can_poll && enable_pollports && ports_dir }
      field = "Boost Control Pin",                boost_ctl_pins, { boost_ctl_settings_on && !boost_ctl_settings_remote }
      field = "Boost Control Remote Port",        boost_ctl_remote, { boost_ctl_settings_on && boost_ctl_settings_remote }
      field = "Output Polarity",                  boost_ctl_settings_invert_new, {boost_ctl_settings_on}
      field = "Closed Duty",                      boost_ctl_closeduty, {boost_ctl_settings_on && boost_ctl_settings_cl}
      field = "Open Duty",                        boost_ctl_openduty, {boost_ctl_settings_on && boost_ctl_settings_cl}
      field = ""
      field = "Algorithm",			  boost_ctl_settings_cl, {boost_ctl_settings_on}
      field = "Boost Control Lower Limit Delta",  boost_ctl_lowerlimit, {boost_ctl_settings_cl}
      field = "Closed-Loop Boost Tuning Mode",    boost_ctl_settings_tunemode, {boost_ctl_settings_on && boost_ctl_settings_cl}
      slider = "Closed-Loop Sensitivity",         boost_ctl_sensitivity, horizontal, {boost_ctl_settings_on && boost_ctl_settings_cl}
      field = "Proportional Gain",                boost_ctl_Kp, {boost_ctl_settings_on && boost_ctl_settings_cl && boost_ctl_settings_tunemode}
      field = "Integral Gain",                    boost_ctl_Ki, {boost_ctl_settings_on && boost_ctl_settings_cl && boost_ctl_settings_tunemode}
      field = "Differential Gain",                boost_ctl_Kd, {boost_ctl_settings_on && boost_ctl_settings_cl && boost_ctl_settings_tunemode}

    dialog = boostctlSettings, "Boost Control Settings", xAxis
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#boost"
        panel = boostctlSettingsl, West
        panel = boostctlSettingsr, East

      dialog = canwest, ""
       field = "My CAN ID",  mycan_id
       field = "Master Enable", can_poll
       field = "Enable PWM Polling", enable_pollPWM, { can_poll }
       field = "Remote CAN ID", can_poll_id2, {can_poll && (enable_pollPWM)}
       field = "Remote Table Number For PWM data", poll_tablePWM, { can_poll && (enable_pollPWM) }
       field = "Remote Table Offset For PWM data", poll_offsetPWM, { can_poll && (enable_pollPWM) }
       field = "Remote PWM Clock Frequency", remotePWMfreq, { can_poll && (enable_pollPWM) }
       field = "Remote PWM Clock Prescale", remotePWMprescale, { can_poll && (enable_pollPWM) }

      dialog = caneast, ""
       field = "Enable Ports Polling", enable_pollports, { can_poll }
       field = "Remote CAN ID", can_poll_id3, {can_poll && (enable_pollports)}
       field = "Remote Table Number For Ports Data", poll_tableports, { can_poll && (enable_pollports) }
       field = "Remote Table Offset For Ports Data", poll_offsetports, { can_poll && (enable_pollports) }
       field = "Remote Ports Direction", ports_dir, { can_poll && (enable_pollports) }
       field = "Remote Port 1 Type", port1_type, { can_poll && (enable_pollports) }
       field = "Remote Port 2 Type", port2_type, { can_poll && (enable_pollports) }
       field = "Remote Port 3 Type", port3_type, { can_poll && (enable_pollports) }
       field = "Use For Remote On/Off Outputs", port_generic, { can_poll && (enable_pollports) && (ports_dir) }

      dialog = canadc_opt, "", yAxis
       field = "CAN ADC Group On/Off"
       field = "CAN ADC 0-3", enable_pollADC03, { can_poll }
       field = "CAN ADC 4-7", enable_pollADC47, { can_poll }

      dialog = canadc_id, "", yAxis
       field = "CAN Id"
       field = "", can_poll_id0, {can_poll && (enable_pollADC03)}
       field = "", can_poll_id1, {can_poll && (enable_pollADC47)}

      dialog = canadc_tab, "", yAxis
       field = "Table"
       field = "", poll_tableADC03, { can_poll && (enable_pollADC03) }
       field = "", poll_tableADC47, { can_poll && (enable_pollADC47) }

      dialog = canadc_off, "", yAxis
       field = "Offset"
       field = "", poll_offsetADC03, { can_poll && (enable_pollADC03) }
       field = "", poll_offsetADC47, { can_poll && (enable_pollADC47) }

      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
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#canparam"
       panel = can_top, North
       panel = canadcs, South

    dialog = canbcast_userdef, "", yAxis
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#canbcastuser"
        field = "Identifier", can_bcast_user_id
        field = "Data 0", can_bcast_user_d0
        field = "Data 1", can_bcast_user_d1
        field = "Data 2", can_bcast_user_d2
        field = "Data 3", can_bcast_user_d3
        field = "Data 4", can_bcast_user_d4
        field = "Data 5", can_bcast_user_d5
        field = "Data 6", can_bcast_user_d6
        field = "Data 7", can_bcast_user_d7

      dialog = canbroadcast,  "CAN Broadcasting", yAxis
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#canbroadcast"
       field = "Enable Broadcasting", can_bcast1_on
       field = "Broadcast Interval", can_bcast_int, { can_bcast1_on }
       field = "0x280 RPM * 4", can_bcast1_280x4, { can_bcast1_on }
       field = "0x280 RPM * 1", can_bcast1_280x1, { can_bcast1_on }
       field = "0x289 Coolant", can_bcast1_289, { can_bcast1_on }
       field = "0x316 RPM", can_bcast1_316, { can_bcast1_on }
       field = "0x329 Coolant", can_bcast1_329, { can_bcast1_on }
       field = "0x561 Alfa/Fiat/Lancia dash", can_bcast1_561, { can_bcast1_on }
       field = "0x361 Alfa/Fiat/Lancia", can_bcast1_361, { can_bcast1_on }
       field = "0x041 Alfa/Fiat/Lancia", can_bcast2_041, { can_bcast1_on }
       field = "User defined testing", can_bcast2_xxx, { can_bcast1_on }

      dialog = injseq, "Sequenced Batch Fire"
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#seqbatch"
       field = "These settings allow batch firing to be sequenced from a specific"
       field = "trigger number for repeatable phasing on each start."
       field = "Enable Sequenced Batch Fire", feature3_3
       field = "Injector Sequence Start Trigger No.", trig_init, {feature3_3 }
       field = "Injector Time Mask", inj_time_mask, {feature3_3 }

      dialog = seq_injection, "Sequential Injection"
       field = "Sequential Injection", seq_inj, { spk_mode0 > 3 }
       field = "Timing Trigger", injtimingmode, { (spk_mode0 > 3) && seq_inj }
       field = "Fixed Timing Or Table", injusetable, { (spk_mode0 > 3) && seq_inj }
       field = "Number Of Timing Values", injdualvalue, {  (spk_mode0 > 3) && (seq_inj == 3) }
       field = "Fixed Injection Timing 1", injadv1, { (spk_mode0 > 3) && (seq_inj) && (injusetable == 0) }
       field = "Fixed Injection Timing 2", injadv2, { (spk_mode0 > 3) && (seq_inj == 3) && (injusetable == 0) && (injdualvalue) }
       field = "Fixed Injection Timing 1 When Staging On", injstagedadv1, { (spk_mode0 > 3) && (seq_inj) && (injusetable == 0) && (staged_first_param) }
       field = "Fixed Injection Timing 2 When Staging On", injstagedadv2, { (spk_mode0 > 3) && (seq_inj == 3) && (injusetable == 0) && (injdualvalue) && (staged_first_param) }
       field = "Cranking Injection Timing 1", injcrankadv1, { (spk_mode0 > 3) && seq_inj }
       field = "Cranking Injection Timing 2", injcrankadv2, { (spk_mode0 > 3) && (seq_inj == 3) && (injdualvalue) }
       field = "VE Trim Tables", usevetrim, { (spk_mode0 > 3) && seq_inj }
       field = "Injector Drivers", extrainj
	   field = "#Sequential Siamese Hybrid Mode"
	   field = "Single Pulse Activation RPM", hybrid_rpm, { (spk_mode0 > 3) && (seq_inj == 3) }
	   field = "Hysteresis On Single Pulse Activation RPM", hybrid_hyst, { (spk_mode0 > 3) && (seq_inj == 3) }
       field = "Fixed Injection Timing 3", injadv3, { (spk_mode0 > 3) && (seq_inj == 3) && (injusetable == 0) }
       field = "Fixed Injection Timing 3 When Staging On", injstagedadv3, { (spk_mode0 > 3) && (seq_inj == 3) && (injusetable == 0) && (staged_first_param) }

      dialog = tablesw, "Table Switching Control"
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#tablesw"
      field = "Fuel Table Switching",         f5_0_tsf
      field = "Switch Source",        f5_0_tsf_opt,  { f5_0_tsf }
      field = "Switch Location",        ts_port_f,  { f5_0_tsf && !f5_0_tsf_opt }
      field = "RPM Greater Than",     tsf_rpm,  { f5_0_tsf && f5_0_tsf_opt == 1 }
      field = "MAP Greater Than",    tsf_kpa,  { f5_0_tsf && f5_0_tsf_opt == 2 }
      field = "TPS Greater Than",    tsf_tps,  { f5_0_tsf && f5_0_tsf_opt == 3 }
      field = ""
      field = "Spark Table Switching",         f5_0_tss
      field = "Switch Source",        f5_0_tss_opt,  { f5_0_tss }
      field = "Switch Location",        ts_port_s,  { f5_0_tss && !f5_0_tss_opt }
      field = "RPM Greater Than",     tss_rpm,  { f5_0_tss && f5_0_tss_opt == 1 }
      field = "MAP Greater Than",    tss_kpa,  { f5_0_tss && f5_0_tss_opt == 2 }
      field = "TPS Greater Than",    tss_tps,  { f5_0_tss && f5_0_tss_opt == 3 }

    dialog = outputTestbuttons1a, "", xAxis
        ;commandButton = "Label Text", command, { Enabled Condition }, optionalFlags
        ; The rem > 0 expression is just for testing.. It works when the MS is on the Stim with rpm.
        ; a status bit there would be the expected real expression
        commandButton = "Enable Test Mode", cmdEnterTestMode, { (!(status3 & 8)) && (rpm == 0)}

        ; if clickOnCloseIfEnabled is set, then the command assigned to this button will be run on the 
        ; dialog close, but only if the enable condition is true
        ; valid click flags are:
        ; clickOnCloseIfEnabled - the command will be sent on dialog close if active condition is true
        ; clickOnCloseIfDisabled - the command will be sent on dialog close if active condition is false
        ; clickOnClose - the command will be sent on dialog close always
        commandButton = "Disable Test Mode", cmdStopTestmode, { status3 & 8 }, clickOnCloseIfEnabled

    dialog = outputTestbuttons1b, ""
           field = "Ensure engine is stationary or stim RPM is 0 before testing injectors or coils"

    dialog = outputTestbuttons1, "Test Mode Controls", yAxis
        panel = outputTestbuttons1a
        panel = outputTestbuttons1b

    dialog = outputTestbuttons2, "Fuel pump", xAxis
        commandButton = "Fuel Pump On", cmdfpon, { status3 & 8 }
        commandButton = "Fuel Pump Off", cmdfpoff, { status3 & 8 }

          dialog = outputtest_l, "Output Test Modes", yAxis

          dialog = outputtest_spk_l, "", yAxis
           field = "Output Interval", testint
           displayOnlyField = "RPM (Coil-On-Plug)", testrpm
           field = "Coil Testing Mode", testop_coil
           field = "Coil Output To Test", testsel_coil
           field = "Dwell", testdwell

          dialog = outputtest_spk_r, "", yAxis
            commandButton = "Start", cmdtestspkon, { testop_coil && (status3 & 8) && testdwell }
            commandButton = "Stop", cmdtestinjspkoff, { status3 & 8 }

          dialog = outputtest_inj_l, "", yAxis
           field = "Output Interval", testint
           displayOnlyField = "RPM (Full Sequential)", testrpm
           field = "Injector Testing Mode", testop_inj
           field = "Injector Channel To Test", testsel_inj
           field = "Pulsewidth", testpw
           field = "Total Number Of Injections", testinjcnt
           field = "-"
           field = "Note: The following only applies to Inj1 and Inj2"
           field = "batch fire outputs"
           field = "Injector PWM Parameters", testop_pwm
           field = "PWM Current Limit",          testinjPwmP, { testop_pwm }
           field = "PWM Time Threshold",         testinjPwmT, { testop_pwm }
           field = "Injector PWM Period",        testinjPwmPd , { testop_pwm }

          dialog = outputtest_inj_r, "", yAxis
            commandButton = "Start", cmdtestinjon, { testop_inj && (status3 & 8) && testpw && testinjcnt }
            commandButton = "Stop", cmdtestinjspkoff, { status3 & 8 }

        dialog = outputtest_spk, "Coil Testing", xAxis
            panel = outputtest_spk_l
            panel = outputtest_spk_r

        dialog = outputtest_inj, "Injector Testing", xAxis
            panel = outputtest_inj_l
            panel = outputtest_inj_r

        dialog = outputtest_controls, "Output Test Modes", yAxis
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#testinjspk"
            panel = outputTestbuttons1
            panel = outputTestbuttons2
                panel = outputtest_spk
                panel = outputtest_inj

        dialog = outputtest_r, "Reference Gauges", yAxis
            gauge = voltMeter, North
            gauge = injcountGauge, South

        dialog = outputtest, "", xAxis
            panel = outputtest_controls
            panel = outputtest_r

    dialog = outputtest9, "Fuel Pump", yAxis
        commandButton = "Off", cmdfpoff, { status3 & 8 }
        commandButton = "On", cmdfpon, { status3 & 8 }

          dialog = outputtest10, "LED14/SpkA", yAxis
            commandButton = "Off", cmdtest10off, { status3 & 8 }
            commandButton = "Pulsed", cmdtest10pulsed, { status3 & 8 }
            commandButton = "On", cmdtest10on, { status3 & 8 }

          dialog = outputtest11, "LED16/SpkB", yAxis
            commandButton = "Off", cmdtest11off, { status3 & 8 }
            commandButton = "Pulsed", cmdtest11pulsed, { status3 & 8 }
            commandButton = "On", cmdtest11on, { status3 & 8 }

          dialog = outputtest12, "LED15/SpkC", yAxis
            commandButton = "Off", cmdtest12off, { status3 & 8 }
            commandButton = "Pulsed", cmdtest12pulsed, { status3 & 8 }
            commandButton = "On", cmdtest12on, { status3 & 8 }

          dialog = outputtest13, "IAC1", yAxis
            commandButton = "Off", cmdtest13off, { status3 & 8 }
            commandButton = "Pulsed", cmdtest13pulsed, { status3 & 8 }
            commandButton = "On", cmdtest13on, { status3 & 8 }

          dialog = outputtest14, "IAC2", yAxis
            commandButton = "Off", cmdtest14off, { status3 & 8 }
            commandButton = "Pulsed", cmdtest14pulsed, { status3 & 8 }
            commandButton = "On", cmdtest14on, { status3 & 8 }

          dialog = outputtest15, "JS10", yAxis
            commandButton = "Off", cmdtest15off, { status3 & 8 }
            commandButton = "Pulsed", cmdtest15pulsed, { status3 & 8 }
            commandButton = "On", cmdtest15on, { status3 & 8 }

          dialog = outputtest16, "JS11.PA0.SpD", yAxis
            commandButton = "Off", cmdtest16off, { status3 & 8 }
            commandButton = "Pulsed", cmdtest16pulsed, { status3 & 8 }
            commandButton = "On", cmdtest16on, { status3 & 8 }

          dialog = outputtest17, "FIDLE", yAxis
            commandButton = "Off", cmdtest17off, { status3 & 8 }
            commandButton = "Pulsed", cmdtest17pulsed, { status3 & 8 }
            commandButton = "On", cmdtest17on, { status3 & 8 }

          dialog = outputtest10b, "TachOut", yAxis
            commandButton = "Off", cmdtest10off, { status3 & 8 }
            commandButton = "Pulsed", cmdtest10pulsed, { status3 & 8 }
            commandButton = "On", cmdtest10on, { status3 & 8 }

          dialog = outputtest11b, "ALED", yAxis
            commandButton = "Off", cmdtest11off, { status3 & 8 }
            commandButton = "Pulsed", cmdtest11pulsed, { status3 & 8 }
            commandButton = "On", cmdtest11on, { status3 & 8 }

          dialog = outputtest12b, "WLED", yAxis
            commandButton = "Off", cmdtest12off, { status3 & 8 }
            commandButton = "Pulsed", cmdtest12pulsed, { status3 & 8 }
            commandButton = "On", cmdtest12on, { status3 & 8 }

          dialog = outputtest13b, "PT6", yAxis
            commandButton = "Off", cmdtest13off, { status3 & 8 }
            commandButton = "Pulsed", cmdtest13pulsed, { status3 & 8 }
            commandButton = "On", cmdtest13on, { status3 & 8 }

          dialog = outputtest14b, "PT7", yAxis
            commandButton = "Off", cmdtest14off, { status3 & 8 }
            commandButton = "Pulsed", cmdtest14pulsed, { status3 & 8 }
            commandButton = "On", cmdtest14on, { status3 & 8 }

          dialog = outputtest15b, "IGN1", yAxis
            commandButton = "Off", cmdtest15off, { status3 & 8 }
            commandButton = "Pulsed", cmdtest15pulsed, { status3 & 8 }
            commandButton = "On", cmdtest15on, { status3 & 8 }

          dialog = outputtest16b, "PA0", yAxis
            commandButton = "Off", cmdtest16off, { status3 & 8 }
            commandButton = "Pulsed", cmdtest16pulsed, { status3 & 8 }
            commandButton = "On", cmdtest16on, { status3 & 8 }

          dialog = outputtest11c "Output1", yAxis
            commandButton = "Off", cmdtest11off, { status3 & 8 }
            commandButton = "Pulsed", cmdtest11pulsed, { status3 & 8 }
            commandButton = "On", cmdtest11on, { status3 & 8 }

          dialog = outputtest12c, "Output2", yAxis
            commandButton = "Off", cmdtest12off, { status3 & 8 }
            commandButton = "Pulsed", cmdtest12pulsed, { status3 & 8 }
            commandButton = "On", cmdtest12on, { status3 & 8 }

          dialog = outputtest13c, "InjectorC", yAxis
            commandButton = "Off", cmdtest13off, { status3 & 8 }
            commandButton = "Pulsed", cmdtest13pulsed, { status3 & 8 }
            commandButton = "On", cmdtest13on, { status3 & 8 }

          dialog = outputtest14c, "InjectorD", yAxis
            commandButton = "Off", cmdtest14off, { status3 & 8 }
            commandButton = "Pulsed", cmdtest14pulsed, { status3 & 8 }
            commandButton = "On", cmdtest14on, { status3 & 8 }

          dialog = outputtest16c, "Boost", yAxis
            commandButton = "Off", cmdtest16off, { status3 & 8 }
            commandButton = "Pulsed", cmdtest16pulsed, { status3 & 8 }
            commandButton = "On", cmdtest16on, { status3 & 8 }

        dialog = outputtest_io_warning, ""
            field = "Caution! Used incorrectly this can cause hardware damage. USE AT YOUR OWN RISK."
            field = "The pin/port will be forced into an output overriding any other configuration."
            field = "If the output is connected to an ignition coil you will damage it!"
            field = "After testing, turn off/on the ECU to restore normal settings."

        dialog = outputtest_io_pwm, "Pulse Settings", xAxis
            field = "Pulse Frequency", pwm_testio
            field = "Pulse Duty Cycle", duty_testio

        dialog = outputtest_io1, "Outputs", xAxis
            panel = outputtest9
            panel = outputtest10
            panel = outputtest12
            panel = outputtest11
            panel = outputtest13
            panel = outputtest14
            panel = outputtest15
            panel = outputtest16
            panel = outputtest17

        dialog = outputtest_io, "Output Test Mode - I/O", yAxis
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#testio"
            panel = outputTestbuttons1
            panel = outputtest_io_pwm
            panel = outputtest_io1
            panel = outputtest_io_warning

          dialog = iactest_l, "", yAxis
           field = "Idle valve testing can be used with the engine running or stationary"
           field = ""
           field = "Idle Valve Homing Steps", iachometest, { IdleCtl == 3 }
           field = "Idle Valve Step (0-512)", iacpostest, { IdleCtl == 3 }
           field = "PWM Idle Duty% (0-100)", iacpostest, { IdleCtl == 2 }
           field = "Set the steps before enabling testing"

          dialog = iactest_r, "", yAxis
            commandButton = "Enable Test - Home Position", cmdtestiachome, {( IdleCtl == 3 ) }
            commandButton = "Enable Test - Run Position", cmdtestiacon
            commandButton = "Stop Testing", cmdtestiacoff, {1}, clickOnCloseIfEnabled

          dialog = iactest_top, "", xAxis
            panel = iactest_l
            panel = iactest_r

          dialog = iactest_bot, "", xAxis
            gauge = IACgauge
            gauge = PWMIdlegauge

          dialog = iactest, "Output Test Mode - Idle Valve", yAxis
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#testidle"
            panel = iactest_top
            panel = iactest_bot

      dialog = EAElagcomp, "EAE Lag Compensation"
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#eaelag"
       field = "Source",  EAElagsource
       field = "Threshold", EAElagthresh
       field = "Max RPM", EAElagRPMmax


      dialog = RotaryTrailingSettings, "Rotary Settings"
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#rotary"
      field = "See also Rotary Split Table"
      field = "Output Mode", RotarySplitModeFD, { twoStroke == 3 }

      field = "Allow Negative Split?", RotarySplitModeNeg, { twoStroke == 3 }
      field = "Trailing Dwell time", dwelltime_trl, { (twoStroke == 3) && (spk_mode0 >1) && (dwellmode==0) }

      dialog = noisefiltering, ""
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#noise"
      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 = "#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}

      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 = launch, "Launch Control"
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#launch"
      field = "Launch Control Option:",        launch_opt_on
      field = "LAUNCH"
      field = "Input Pin",  launch_opt_pins, { launch_opt_on >0 }
      field = "Launch Hard Limit", launch_hrd_lim, {launch_opt_on}
      field = "Soft Limit Zone", launch_sft_zone, {launch_opt_on}
      field = "Soft Limit Retard To", launch_sft_deg, {launch_opt_on }
      field = "Enable Launch When TPS Above  ", launch_tps, { launch_opt_on >0}
      field = "Limiter Method", launchlimopt, { launch_opt_on >0}
      field = "Flat Shift Arming RPM",          flats_arm,   { launch_opt_on >1 }
      field = "Flat Shift Hard Rev Limit",      flats_hrd,   { launch_opt_on >1 }
      field = "Soft Limit Retard To",                  flats_deg,   { launch_opt_on >1 }

      dialog = tacho, "Tacho Output"
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#tachoout"
      field = "Tacho Output Enabled",         tacho_opt80
      field = ""
      field = "Output Pin",  tacho_opt3f, { tacho_opt80 }
      field = "Speed", tacho_opt40, { tacho_opt80 }

        dialog = overrun_note
            field = "Overrun is on the fuel menu"

      dialog = overrun, "Over-Run Fuel Cut"
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#overrun"
      field = "Over-Run Fuel Cut",         OvrRunC
      field = "Cut Fuel When:"
      field = "RPM Greater Than",         fc_rpm,  { OvrRunC }
      field = "And MAP Lower Than",     fc_kpa,  { OvrRunC }
      field = "And TPS Lower Than",     fc_tps,  { OvrRunC }
      field = "And CLT Higher 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, ""
      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 = ""
      field = "Staging Gradual Transition", staged_transition_on, { staged_first_param && (staged_first_param  & 0x7) != 5 }
      field = "Staging Transition Events", staged_transition_events, { staged_first_param && staged_transition_on && ((staged_first_param & 0x7) != 5) }
      field = "Staging Primary Reduction Delay", staged_primary_delay, { staged_first_param && staged_transition_on && ((staged_first_param & 0x7) != 5) }
      field = "Staging 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 = "Staged Injection Second Parameter", staged_second_param, { staged_first_param && ((staged_first_param & 0x7) != 5) }
      field = "Secondary Staging Threshold", staged_param_2, { staged_second_param && ((staged_first_param & 0x7) != 5) }
      field = "Secondary Staging Hysteresis", staged_hyst_2, { staged_second_param && ((staged_first_param & 0x7) != 5) }
      field = "Secondary Staging Logic", staged_second_logic, { staged_second_param && ((staged_first_param & 0x7) != 5) }

      dialog = secondaryLoad, "Secondary Load Parameters"
      field = "Primary Fuel Load",      algorithm
      field = "Secondary Fuel Load",      algorithm2, { dualTable == 0 }
      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 }
      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 = crsettings, "Cranking / Startup Settings"
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#crankstart"
      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 = "Priming Pulse Delay", primedelay
      field = "Ignore MAT Correction During ASE", feature3_matase

       dialog = generalSettings, "Baro Sensor Settings"
    field = "Barometric Correction", baroCorr
    field = "Realtime Baro Port",    rtbaroport, {baroCorr == 2}
    field = "Upper Limit", baro_upper, {baroCorr}
    field = "Lower Limit", baro_lower, {baroCorr}
    field = "Default Baro", baro_default, {baroCorr < 2}
    field = "Old baro calc", loadopts_oldbaro, {baroCorr}

       dialog = gsmap, "MAP Sensor Settings"
    field = "MAP Sensor Input Port", mapport

       dialog = gsgen, "General Sensor Settings"
    field = "MAP Averaging Lag Factor",    mapLF
    field = "MAF Averaging Lag Factor",    mafLF
    field = "RPM Averaging Lag Factor",    rpmLF
    field = "TPS Averaging Lag Factor",    tpsLF
    field = "Lambda Averaging Lag Factor", egoLF
    field = "CLT/MAT/Battery/Baro Lag Factor",  adcLF
    field = ""
    field = "Dual Table Use",        dualTable
    field = ""
    field = "Fuel Table Size", feature4_0VEtblsize
    field = "Note: Export your fuel tables before changing, then import"
    field = "MegaView Temp. Units", tempUnits

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

       dialog = generalsettings3, "", border
          panel = generalSettings, North
          panel = gsmap, Center
          panel = gsgen, South

       dialog = generalsettings2, "General Settings", border
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#genset"
          panel = generalsettings3, West
          panel = eastgeneral, East

    dialog = map_sample_dialog, "MAP Sample Settings"
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#mapsamp"
    field = "MAP Sample Method", mapsample_opt2
    field = "MAP Sample Window",     mapsample_window, { !mapsample_opt2 }
    field = "MAP Sample Angle", mapsample_angle, { !mapsample_opt2 }
    field = "No. Sample Events", mapsample_opt1, { !mapsample_opt2 }
    field = "Phase Detect Threshold", map_phase_thresh, { (nCylinders < 3) && (spk_mode3a == 1) && (spk_mode0 == 4) && (spk_config_trig2 == 3) }

       dialog = revlimiter, ""
        field = "HARD REV LIMIT"
        field = "Hard Rev Limit",        RevLimNormal2
        field = "Soft Limit Zone / Hysteresis",        RevLimNormal2_hyst
        field = "COOLANT TEMP LIMITER"
        field = "Rev Limiter CLT Based", RevLimCLTbased 
        field = "Rev Limit TPS Bypass",  TpsBypassCLTRevlim, { RevLimCLTbased & 1 }
        field = "SPARK RETARD"
        field = "Spark Retard Mode",  RevLimOption_retard
        field = "Maximum Retard",        RevLimMaxRtd, { RevLimOption_retard == 1 }
        field = "Retard To",        RevLimRtdAng, { RevLimOption_retard == 2}
        field = "SPARK CUT"
        field = "Enable Spark Cut Limiting", RevLimOption_spkcut
        field = "FUEL CUT"
        field = "Enable Fuel Cut Limiting", RevLimOption_fuelcut
        field = "Progressive Fuel Cut", RevLimOption_fuelprog, {RevLimOption_fuelcut}
        field = ""
        field = ""
        field = ""
        field = ""

    dialog = revlimiter2, "Rev Limiter", border
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#revlim"
      panel = revlimiter, West
      panel = revlimiterBins, Center, { RevLimCLTbased & 1 }

       dialog = flexn, ""
        field = "#Spark/fuel"
        field = "Sensor Frequency"
        field = "Ethanol Mix"
        field = "Fuel Multiplier%"
        field = "Timing Addition"

       dialog = flexl, ""
        field = "Low"
        field = "", fuelFreq0,   { flexFuel }
        field = "", flex_pct0,   { flexFuel }
        field = "", fuelCorr0,   { flexFuel }
        field = "", fuelSpkDel0, { flexFuel }
        
       dialog = flexh, ""
        field = "High"
        field = "", fuelFreq1,   { flexFuel }
        field = "", flex_pct1,   { flexFuel }
        field = "", fuelCorr1,   { flexFuel }
        field = "", fuelSpkDel1, { flexFuel }

        dialog = ff_table1, "", xAxis
        panel = flexn
        panel = flexl
        panel = flexh

        dialog = ff_fallback, "", yAxis
          field = "Baseline Ethanol%", flex_baseline,   { flexFuel }
          field = "#Fallback for sensor failure"
          field = "Fallback Fuel Multiplier%", fuelCorr_default,    { flexFuel > 0 }
          field = "Fallback Timing Addition", fuelSpkDel_default, { flexFuel > 0 }

       dialog = flexFuelSettings, "Fuel Sensor Settings (Flex)", yAxis
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#flex"
          field = "Flex Fuel Sensor",         flexFuel
          field = "Sensor Port",              flexport,    { flexFuel > 0 }
        panel = ff_table1
        panel = ff_fallback

 ; first accel page
      dialog = accelsettings, "Accel Enrich Settings"
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#aeset"
;          field = "Use Time-Based or Accel-pump Accel", AE_options
          field = "Wall-Wetting AE (EAE)", EAEOption
          field = "TPSdot Uses %WOT", feature7_aetpswot

;time based AE
       dialog = time_ae_south_west, ""
           field = "Accel MAPdot Threshold", mapThresh
           field = "End Pulsewidth", aeEndPW
;           field = "Time or Ignition Events", feature7_aeevents
;           field = "Accel duration", tpsasync_events, { feature7_aeevents }
;           field = "Accel taper", tpsasync2_events, { feature7_aeevents }
           field = "Accel Time", taeTime ; , { !feature7_aeevents }
           field = "Accel Taper Time", aeTaperTime ; , { !feature7_aeevents }

       dialog = time_ae_south_east, ""
           field = "Accel TPSdot Threshold", tpsThresh
           field = "Decel Fuel Amount", tdePct
           field = "Cold Accel Adder", taeColdA
           field = "Cold Accel Multiplier", taeColdM
          field = "Accel Enrich Down-scaling With RPM"
          field = "Full Accel Below:",      ae_lorpm ;, { !feature7_aeevents }
          field = "Zero Accel Above:",      ae_hirpm ;, { !feature7_aeevents }

       dialog = time_ae_south_south, "", xAxis
        panel = time_ae_south_west
        panel = time_ae_south_east
        
       dialog = time_ae_south, "", yAxis
        liveGraph = timeaeGraph, "AE Graph", South
            graphLine = afr1
            graphLine = TPSdot, "%", -2000, 2000, auto, auto
            graphLine = MAPdot, "%", -2000, 2000, auto, auto
        panel = time_ae_south_south

       dialog = time_ae_mid, ""
        slider = "Accel Enrichment MAPdot<->TPSdot Blend.", tpsProportion, horizontal

       dialog = time_ae_north, "", xAxis
           panel = time_accel_mapdot_curve, West, {tpsProportion < 100}
           panel = time_accel_tpsdot_curve, East, {tpsProportion > 0}

       dialog = AEtime_settings, "Time-Based Accel Enrichment", yAxis
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#aetime"
           panel = time_ae_north
           panel = time_ae_mid
           panel = time_ae_south

   dialog = injChars, "Injector Dead-Time/PWM"
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#injdt"
      field = "Bank 1"
      field = "Injector Dead Time @13.2V",         injOpen
      field = "Battery Voltage Correction", battFac
      field = "PWM Current Limiting", injctl2_1, { !extrainj }
      field = "PWM Current Limit",          injPwmP, { !extrainj && injctl2_1 }
      field = "PWM Time Threshold",         injPwmT, { !extrainj && injctl2_1 }
      field = "Injector PWM Period",       injPwmPd, { !extrainj && injctl2_1 }
      field = "Different Bank Settings",    injctl
      field = "Bank 2"
      field = "Injector2 Dead Time",        injOpen2, { injctl }
      field = "Battery Voltage Corr.",      battFac2, { injctl }
      field = "PWM Current Limiting", injctl2_2, { injctl && !extrainj}
      field = "PWM Current Limit",          injPwmP2, { injctl && !extrainj && injctl2_2}
      field = "PWM Time Threshold",         injPwmT2, { injctl && !extrainj && injctl2_2}
      field = "Injector PWM Period",       injPwmPd2, { injctl && !extrainj && injctl2_2}
       field = "Bank 3"
       field = "Injector3 Dead Time",        injOpen3, { injctl && extrainj }
       field = "Battery Voltage Corr.",      battFac3, { injctl && extrainj }
       field = "Bank 4"
       field = "Injector4 Dead Time",        injOpen4, { injctl && extrainj }
       field = "Battery Voltage Corr.",      battFac4, { injctl && extrainj }

   dialog = egoControl, "EGO Control"
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#egocont"
      field = "EGO Sensor Type",           egoType
      field = "1st EGO Sensor port",       egoport,      { egoType > 0 }
      field = "2nd EGO Sensor port",       ego2port,     { egoType == 2 || egoType == 4}
      field = "Use 2nd EGO Without Dual-Table", EgoOption_dual, {((egoType == 2) || (egoType == 4)) && (dualTable == 0)}
      field = "Ignition Events Per Step",  egoCount,     { egoType > 0 }
      field = "Controller Step Size",      egoDelta,     { egoAlgorithm == 0 }
      field = "Controller Auth +/-",    egoLimit,     { egoType >  0 }
      field = "Active Above CLT", egoTemp,      { egoType >  0 }
      field = "Active Above RPM",          egoRPM,       { egoType >  0 }
      field = "Active Below TPS",          TPSOXLimit,   { egoType >  0 }
      field = "Active Below MAP",          MAPOXLimit,   { egoType >  0 }
      field = "Active Above MAP",          MAPOXMin,     { egoType >  0 }
      field = "Narrowband EGO target",     AFRTarget, { (egoType == 1) || (egoType == 2) }

      field = "#WB Controller Settings"
         field = "Algorithm",              egoAlgorithm, { egoType >  0 }
         field = "EGO Delay After Start",  ego_startdelay, { egoType > 0 }
         field = "PID Proportional Gain",  egoKP,        { egoType >  0 && egoAlgorithm > 1 }
         field = "PID Integral",           egoKI,        { egoType >  0 && egoAlgorithm > 1 }
         field = "PID Derivative",         egoKD,        { egoType >  0 && egoAlgorithm > 1 }

   dialog = ignitionOptions, ""
      field = "Spark Mode (Dizzy,EDIS,wheel)",                   spk_mode0  ; !
      field = "Trigger Angle/Offset",                triggerOffset, { (spk_mode0 != 31) && (spk_mode0 != 4)}
      field = "Angle Between Main And Return", trigret_ang, { spk_mode0 ==12}
      field = "Oddfire First Angle",           OddFireang, { (engineType == 1) && (spk_mode0 != 54)};
      field = "GM HEI/DIS Options",     spk_conf2_gm, {spk_mode0 ==2}
;      field = "Ford TFI options",              spk_conf2_tfi, {spk_mode0 ==3}
      field = "Use Cam Signal If Available",     spk_conf2_cam, {(spk_mode0 == 5) || (spk_mode0 == 6) || (spk_mode0 == 8) || (spk_mode0 == 16) ||(spk_mode0 == 23)}
      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_lo2, {spk_mode0 != 31} ; 
      field = "Number of coils", spk_mode3, { (spk_mode0 > 1) }
      field = "Spark A Output Pin (D14 Preferred)", spk_config_spka, { (spk_mode0 > 1) && (spk_mode0 != 31) }
    field = "Cam Input (see tooltip)", spk_mode3a, {!((spk_config_trig2 == 1) && (spk_mode0 == 4))} ; greyed in toothed wheel, single wheel
      field = "Flip Polarity On Cam", spk_mode3_hirespol, { (spk_mode0 != 4) }

  dialog = moreIgnitionOptions, ""
      field = "Fixed Advance",		       timing_flags
      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 = "Toyota Multiplex",     spk_conf2_dli, {spk_mode0 > 2}
      field = "Dwell Type",                    dwellmode
      field = "Nominal Dwell",        max_coil_dur, {(spk_mode0 >1) && (dwellmode==0) }
      field = "Spark Duration",        max_spk_dur, {(spk_mode0 >1) && (dwellmode==0) }
      field = "Dwell Time",                    dwelltime, {(spk_mode0 >1) && (dwellmode==2) }
      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 = "Kick-start crank delay", spk_conf2_kick,  { ((spk_mode0 == 2) && (triggerOffset < 20)) || (spk_mode0 == 3) }
      field = "Delay", kickdelay,  { spk_conf2_kick && (((spk_mode0 == 2) && (triggerOffset < 20)) || (spk_mode0 == 3)) }

  dialog = triggerWheel, ""
      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 = "Wheel Speed",                   spk_config_camcrank, {(spk_mode0 == 4) || ((spk_mode0 == 14) && (nCylinders == 2))}
      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 = oddfireangles1, ""
            field = "Custom Oddfire Angles In Sequence From #1"

     dialog = oddfireangles3, "", xAxis
            field = "1st", oddfireangs1, {(spk_conf2_oddodd == 3) && (engineType == 1) && (spk_mode0==4)}
            field = "2nd", oddfireangs2, {(spk_conf2_oddodd == 3) && (engineType == 1) && (spk_mode0==4)}

     dialog = oddfireangles5, "", xAxis
            field = "3rd", oddfireangs3, {(spk_conf2_oddodd == 3) && (engineType == 1) && (spk_mode0==4)}
            field = "4th", oddfireangs4, {(spk_conf2_oddodd == 3) && (engineType == 1) && (spk_mode0==4)}


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

     dialog = eastIgnitionOptions, "", yAxis
            panel = moreIgnitionOptions
            panel = oddfireangles1
            panel = oddfireangles3
            panel = oddfireangles5

    dialog = combinedignition, "Ignition Options / Wheel Decoder", border
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#ignopts"
      panel = westIgnitionOptions, West
      panel = eastIgnitionOptions, East

   dialog = pwmidle_closedloop_pwm, "Closed-Loop Idle Valve Settings"
      field = "Idle Valve Closed Duty",          pwmidle_closed_duty
      field = "Idle Valve Open Duty",                  pwmidle_open_duty
      field = "Dashpot Adder",  pwmidle_dp_adder
      field = "Dashpot Decay Factor", pwmidle_dp_decay_factor
      field = "Use Last Value Or Table", pwmidle_cl_opts_initvaluetable
      field = "Use CLT Or MAT In Table Lookup", pwmidle_cl_opts_initval_clt, { pwmidle_cl_opts_initvaluetable }
      field = "Close Delay (0 means do not close)", pwmidle_close_delay
      field = "Shift Settings"
      field = "Leave Valve Closed Above:", pwmidle_shift_lower_rpm, { pwmidle_close_delay }
      field = "For This Number Of Seconds:" pwmidle_shift_open_time, { pwmidle_close_delay } 

   dialog = pwmidle_closedloop_stepper, "Closed-Loop Idle Valve Settings"
      field = "Idle Valve Closed Steps",         pwmidle_closed_steps
      field = "Idle Valve Open Steps",	         pwmidle_open_steps
      field = "Dashpot Adder",  pwmidle_dp_adder_steps
      field = "Dashpot Decay Factor", pwmidle_dp_decay_factor
      field = "Use Last Value Or Table", pwmidle_cl_opts_initvaluetable
      field = "Use CLT Or MAT In Table Lookup", pwmidle_cl_opts_initval_clt, { pwmidle_cl_opts_initvaluetable }
      field = "Close Delay (0 means do not close)", pwmidle_close_delay
      field = "Shift Settings"
      field = "Leave Valve Closed Above:", pwmidle_shift_lower_rpm, { pwmidle_close_delay }
      field = "For This Number Of Seconds:" pwmidle_shift_open_time, { pwmidle_close_delay } 

       dialog = pwmidle_PID_behavior, "Closed-Loop Idle PID Delays And Behavior"
      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 = "PID Disable RPMdot (Max)", pwmidle_rpmdot_disablepid

       dialog = pwmidle_PID_gains, "Closed-Loop Idle PID Gains"
      field = "Tuning Mode", pwmidle_freq_cl_opts_display_pid
	  slider = "Closed-Loop Gain", pwmidle_max_rpm_new, horizontal
      field = "Proportional Gain",    pwmidle_Kp_new, { pwmidle_freq_cl_opts_display_pid }
      field = "Integral Gain",        pwmidle_Ki_new, { pwmidle_freq_cl_opts_display_pid }
      field = "Derivative Gain",      pwmidle_Kd_new, { pwmidle_freq_cl_opts_display_pid } 

       dialog = pwmidle_PID_activation, "Closed-Loop Idle PID Activation Settings"
      field = "Idle Activation TPS Threshold (Max)",   pwmidle_tps_threshold
      field = "RPMdot Threshold (Max)", pwmidle_rpmdot_threshold
      field = "Load Threshold (Min)", pwmidle_decelload_threshold
        field = "Closed-Loop Idle Entry (For Clutch/Neutral Switch)"
        field = "PID Lockout On Switch Active", ClutchPIDEntry
        field = "Sliding Window Smoothing"
        field = "PID RPM Window Size (1=Off)", pidrpm_window

   dialog = pwmidle_closedloop, "", card
        panel = pwmidle_closedloop_pwm, Center, { IdleCtl == 2 }
        panel = pwmidle_closedloop_stepper, Center, { IdleCtl == 3 }

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

     dialog = pwmidle_mid_panel, "", border
        panel = pwmidle_PID_behavior, North
        panel = pwmidle_PID_activation, South

      dialog = combinedCLidle, "Closed-Loop Idle Settings", border
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#clidle"
        panel = pwmidle_mid_panel, Center
        panel = pwmidle_west_panel, West

   dialog = sensorCal, "Calibrate MAP/Baro"
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#calmapbaro"
          settingSelector = "Common MAP Sensors"
             settingOption = "MPX4115",  map0=10.6, mapmax=121.7
             settingOption = "MPX4250",  map0=10,   mapmax=260
             settingOption = "GM 1-BAR", map0=10,   mapmax=105
             settingOption = "GM 2-BAR", map0=8.8,  mapmax=208
             settingOption = "GM 3-BAR / MPXH6300", map0=1.1,  mapmax=315.5
             settingOption = "MPXH6400", map0=3.5,  mapmax=416.5
             settingOption = "AEM 3.5 BAR", map0=-42.3,  mapmax=386.3
             settingOption = "AEM 5.0 BAR", map0=-64.6,  mapmax=581.7

          field =    "Value at 0.0 volts",   map0
          field =    "Value at 5.0 volts",   mapmax

          field = "#Barometer Sensor (usually identical to MAP)"
          settingSelector = "Common Baro Sensors"
             settingOption = "MPX4115",   baro0=10.6, baromax=121.7
             settingOption = "MPX4250",  baro0=10,   baromax=260
             settingOption = "GM 1-BAR", baro0=10,   baromax=105
             settingOption = "GM 2-BAR", baro0=8.8,  baromax=208
             settingOption = "GM 3-BAR / MPXH6300",baro0=1.1,  baromax=315.5
             settingOption = "MPXH6400", baro0=3.5,  baromax=416.5
             settingOption = "AEM 3.5 BAR", map0=-42.3,  mapmax=386.3
             settingOption = "AEM 5.0 BAR", map0=-64.6,  mapmax=581.7

          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 = knockSettings2, ""
      field = "Knock Control",        knk_option
      field = "Input Type",           knk_option_an, { knk_option }
      field = "Knock Input Pin",      knkport, { knk_option }
      field = "#Detection"
      field = "Knock Indicated By:",  knkDirection,   { (knk_option > 0) && (!knk_option_an)}
      field = "Pullup/down On Input",  knkpull,   { (knk_option > 0) && (!knk_option_an)}

      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 = knockSettings, "Knock Sensor Settings", border
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#knock"
            panel = knockSettings2, West
            panel = knockthresh_curve, East, {knk_option_an}

    dialog = idleAdvance, "Idle Advance Settings"
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#idleadv"
      field = "Idle Advance On", idleadvance_on
      field = "Apply As:", idleadvance_adder, { idleadvance_on }
      field = "Go To Idle Advance When:"
      field = "Condition Is:", idleadvance_cl_cond, { idleadvance_on }
      field = "TPS Is Below:", idleadvance_tps, { idleadvance_on && !idleadvance_cl_cond}
      field = "And RPM Is Below:", idleadvance_rpm, { idleadvance_on && !idleadvance_cl_cond}
      field = "And load Is Above:", idleadvance_load, { idleadvance_on && !idleadvance_cl_cond}
      field = "And CLT Is Above:", idleadvance_clt, { idleadvance_on && !idleadvance_cl_cond}
      field = "And After Delay:", idleadvance_delay, { idleadvance_on && !idleadvance_cl_cond}

    dialog = setbaud, "Megasquirt Baud Rate"
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#baud"
      field = "#Advanced users only."
      field = "Changing this setting is not recommended."
      field = "Megasquirt Baud Rate", baud
      field = "Communications -> Settings -> Baud Rate must match."

    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 }

      dialog = base3, "", yAxis
        field = ""
        field = ""
        field = "Engine Size", enginesize
        field = "Injector Size Each", staged_pri_size

      dialog = base2, "", yAxis
        panel = std_injection, North
        panel = base3, South

    dialog = base, "Engine and Sequential Settings", border
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#engseq"
      panel = base2, West
      panel = seq_injection, East

    dialog = stagedCombined, "Staged Injection", border
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#stagedinj"
      panel = staging, West
      panel = stagedTable, Center, { (staged_first_param & 0x7) == 5 }
     
    dialog = ITBcombined, "ITB Load Settings", border
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#itbload"
      panel = ITB_load_switchpoint_curve, West 
      panel = ITB_load_loadvals_curve, Center 
      
       dialog = northwestidle, "", yAxis
          field = "Idle Valve Type",               IdleCtl
          field = "Algorithm",                     IdleCtl_alg, {IdleCtl > 1}

       dialog = northeastidle, "", yAxis
          field = "Fast Idle Temperature",         fastIdleT,    { IdleCtl == 1 }
          field = "Hysteresis",                    IdleHyst,     { IdleCtl == 1 }

    dialog = westidle, "Stepper idle"
      field = "Time Step Size",                IACtstep,     { IdleCtl == 3 }
      field = "Initial Time Step Size",        IAC_tinitial_step,   { IdleCtl == 3 }
      field = "Minimum # Steps To Move",       IACminstep,   { IdleCtl == 3 }
      field = "Homing Steps",                  IACStart,     { IdleCtl == 3 }
      field = "Homing Direction",              IdleCtl_home, { IdleCtl == 3 }
      field = "Wide Open Steps",               iacfullopen,  { IdleCtl_home && (IdleCtl == 3) }
      field = "Crank-to-Run Taper Time",       IACcrankxt,   { (IdleCtl == 3) && (IdleCtl_alg == 0) }
      field = "Hysteresis",                    IdleHyst,     { (IdleCtl == 3) && (IdleCtl_alg == 0) }
      field = "Connection",                    IdleCtl_out,  { IdleCtl == 3 }
      field = "Power Between Steps",           IACcurlim,    { IdleCtl == 3 }
    
    dialog = eastidle, "PWM Idle"
      field = "Crank-to-Run Taper Time", pwmidlecranktaper, { IdleCtl == 2 }
      field = ""
      field = "Valve Mode",      pwmidleset_inv,	 { IdleCtl == 2 }
      field = "Run Valve Before Start", pwmidleset_koeo, { IdleCtl == 2 }
      field = "PWM Idle Port", pwmidle_port2,		 { IdleCtl == 2 }
      field = "Valve Frequency", pwmidle_freq, { (!pwmidle_port2) && (IdleCtl == 2) }
                   
    dialog = northidle, "", border
      panel = northwestidle, West
      panel = northeastidle, East

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

    dialog = combinedidle, "Idle Control", border
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#idle"
      panel = northidle, North
      panel = southidle, South
                      
    dialog = outmsg1_off, "", yAxis
      field = "Variable        Offset"
      field = "01", outmsg1_offset01
      field = "02", outmsg1_offset02
      field = "03", outmsg1_offset03
      field = "04", outmsg1_offset04
      field = "05", outmsg1_offset05
      field = "06", outmsg1_offset06
      field = "07", outmsg1_offset07
      field = "08", outmsg1_offset08
      field = "09", outmsg1_offset09
      field = "10", outmsg1_offset10
      field = "11", outmsg1_offset11
      field = "12", outmsg1_offset12
      field = "13", outmsg1_offset13
      field = "14", outmsg1_offset14
      field = "15", outmsg1_offset15
      field = "16", outmsg1_offset16

    dialog = outmsg1_size, "", yAxis
      field = "                Size"
      field = "", outmsg1_size01
      field = "", outmsg1_size02
      field = "", outmsg1_size03
      field = "", outmsg1_size04
      field = "", outmsg1_size05
      field = "", outmsg1_size06
      field = "", outmsg1_size07
      field = "", outmsg1_size08
      field = "", outmsg1_size09
      field = "", outmsg1_size10
      field = "", outmsg1_size11
      field = "", outmsg1_size12
      field = "", outmsg1_size13
      field = "", outmsg1_size14
      field = "", outmsg1_size15
      field = "", outmsg1_size16

    dialog = outmsg1, "Outmsg 1", xAxis
      panel = outmsg1_off
      panel = outmsg1_size

    dialog = outmsg2_off, "", yAxis
      field = "Variable        Offset"
      field = "01", outmsg2_offset01
      field = "02", outmsg2_offset02
      field = "03", outmsg2_offset03
      field = "04", outmsg2_offset04
      field = "05", outmsg2_offset05
      field = "06", outmsg2_offset06
      field = "07", outmsg2_offset07
      field = "08", outmsg2_offset08
      field = "09", outmsg2_offset09
      field = "10", outmsg2_offset10
      field = "11", outmsg2_offset11
      field = "12", outmsg2_offset12
      field = "13", outmsg2_offset13
      field = "14", outmsg2_offset14
      field = "15", outmsg2_offset15
      field = "16", outmsg2_offset16

    dialog = outmsg2_size, "", yAxis
      field = "                Size"
      field = "", outmsg2_size01
      field = "", outmsg2_size02
      field = "", outmsg2_size03
      field = "", outmsg2_size04
      field = "", outmsg2_size05
      field = "", outmsg2_size06
      field = "", outmsg2_size07
      field = "", outmsg2_size08
      field = "", outmsg2_size09
      field = "", outmsg2_size10
      field = "", outmsg2_size11
      field = "", outmsg2_size12
      field = "", outmsg2_size13
      field = "", outmsg2_size14
      field = "", outmsg2_size15
      field = "", outmsg2_size16

    dialog = outmsg2, "Outmsg 2", xAxis
      panel = outmsg2_off
      panel = outmsg2_size

    dialog = outmsg3_off, "", yAxis
      field = "Variable        Offset"
      field = "01", outmsg3_offset01
      field = "02", outmsg3_offset02
      field = "03", outmsg3_offset03
      field = "04", outmsg3_offset04
      field = "05", outmsg3_offset05
      field = "06", outmsg3_offset06
      field = "07", outmsg3_offset07
      field = "08", outmsg3_offset08
      field = "09", outmsg3_offset09
      field = "10", outmsg3_offset10
      field = "11", outmsg3_offset11
      field = "12", outmsg3_offset12
      field = "13", outmsg3_offset13
      field = "14", outmsg3_offset14
      field = "15", outmsg3_offset15
      field = "16", outmsg3_offset16

    dialog = outmsg3_size, "", yAxis
      field = "                Size"
      field = "", outmsg3_size01
      field = "", outmsg3_size02
      field = "", outmsg3_size03
      field = "", outmsg3_size04
      field = "", outmsg3_size05
      field = "", outmsg3_size06
      field = "", outmsg3_size07
      field = "", outmsg3_size08
      field = "", outmsg3_size09
      field = "", outmsg3_size10
      field = "", outmsg3_size11
      field = "", outmsg3_size12
      field = "", outmsg3_size13
      field = "", outmsg3_size14
      field = "", outmsg3_size15
      field = "", outmsg3_size16

    dialog = outmsg3, "Outmsg 3", xAxis
      panel = outmsg3_off
      panel = outmsg3_size

    dialog = outmsg4_off, "", yAxis
      field = "Variable        Offset"
      field = "01", outmsg4_offset01
      field = "02", outmsg4_offset02
      field = "03", outmsg4_offset03
      field = "04", outmsg4_offset04
      field = "05", outmsg4_offset05
      field = "06", outmsg4_offset06
      field = "07", outmsg4_offset07
      field = "08", outmsg4_offset08
      field = "09", outmsg4_offset09
      field = "10", outmsg4_offset10
      field = "11", outmsg4_offset11
      field = "12", outmsg4_offset12
      field = "13", outmsg4_offset13
      field = "14", outmsg4_offset14
      field = "15", outmsg4_offset15
      field = "16", outmsg4_offset16

    dialog = outmsg4_size, "", yAxis
      field = "                Size"
      field = "", outmsg4_size01
      field = "", outmsg4_size02
      field = "", outmsg4_size03
      field = "", outmsg4_size04
      field = "", outmsg4_size05
      field = "", outmsg4_size06
      field = "", outmsg4_size07
      field = "", outmsg4_size08
      field = "", outmsg4_size09
      field = "", outmsg4_size10
      field = "", outmsg4_size11
      field = "", outmsg4_size12
      field = "", outmsg4_size13
      field = "", outmsg4_size14
      field = "", outmsg4_size15
      field = "", outmsg4_size16

    dialog = outmsg4, "Outmsg 4", xAxis
      panel = outmsg4_off
      panel = outmsg4_size

    dialog = outmsg5_off, "", yAxis
      field = "Variable        Offset"
      field = "01", outmsg5_offset01
      field = "02", outmsg5_offset02
      field = "03", outmsg5_offset03
      field = "04", outmsg5_offset04
      field = "05", outmsg5_offset05
      field = "06", outmsg5_offset06
      field = "07", outmsg5_offset07
      field = "08", outmsg5_offset08
      field = "09", outmsg5_offset09
      field = "10", outmsg5_offset10
      field = "11", outmsg5_offset11
      field = "12", outmsg5_offset12
      field = "13", outmsg5_offset13
      field = "14", outmsg5_offset14
      field = "15", outmsg5_offset15
      field = "16", outmsg5_offset16

    dialog = outmsg5_size, "", yAxis
      field = "                Size"
      field = "", outmsg5_size01
      field = "", outmsg5_size02
      field = "", outmsg5_size03
      field = "", outmsg5_size04
      field = "", outmsg5_size05
      field = "", outmsg5_size06
      field = "", outmsg5_size07
      field = "", outmsg5_size08
      field = "", outmsg5_size09
      field = "", outmsg5_size10
      field = "", outmsg5_size11
      field = "", outmsg5_size12
      field = "", outmsg5_size13
      field = "", outmsg5_size14
      field = "", outmsg5_size15
      field = "", outmsg5_size16

    dialog = outmsg5, "Outmsg 5", xAxis
      panel = outmsg5_off
      panel = outmsg5_size

    dialog = outmsg6_off, "", yAxis
      field = "Variable        Offset"
      field = "01", outmsg6_offset01
      field = "02", outmsg6_offset02
      field = "03", outmsg6_offset03
      field = "04", outmsg6_offset04
      field = "05", outmsg6_offset05
      field = "06", outmsg6_offset06
      field = "07", outmsg6_offset07
      field = "08", outmsg6_offset08
      field = "09", outmsg6_offset09
      field = "10", outmsg6_offset10
      field = "11", outmsg6_offset11
      field = "12", outmsg6_offset12
      field = "13", outmsg6_offset13
      field = "14", outmsg6_offset14
      field = "15", outmsg6_offset15
      field = "16", outmsg6_offset16

    dialog = outmsg6_size, "", yAxis
      field = "                Size"
      field = "", outmsg6_size01
      field = "", outmsg6_size02
      field = "", outmsg6_size03
      field = "", outmsg6_size04
      field = "", outmsg6_size05
      field = "", outmsg6_size06
      field = "", outmsg6_size07
      field = "", outmsg6_size08
      field = "", outmsg6_size09
      field = "", outmsg6_size10
      field = "", outmsg6_size11
      field = "", outmsg6_size12
      field = "", outmsg6_size13
      field = "", outmsg6_size14
      field = "", outmsg6_size15
      field = "", outmsg6_size16

    dialog = outmsg6, "Outmsg 6", xAxis
      panel = outmsg6_off
      panel = outmsg6_size

    dialog = outmsg7_off, "", yAxis
      field = "Variable        Offset"
      field = "01", outmsg7_offset01
      field = "02", outmsg7_offset02
      field = "03", outmsg7_offset03
      field = "04", outmsg7_offset04
      field = "05", outmsg7_offset05
      field = "06", outmsg7_offset06
      field = "07", outmsg7_offset07
      field = "08", outmsg7_offset08
      field = "09", outmsg7_offset09
      field = "10", outmsg7_offset10
      field = "11", outmsg7_offset11
      field = "12", outmsg7_offset12
      field = "13", outmsg7_offset13
      field = "14", outmsg7_offset14
      field = "15", outmsg7_offset15
      field = "16", outmsg7_offset16

    dialog = outmsg7_size, "", yAxis
      field = "                Size"
      field = "", outmsg7_size01
      field = "", outmsg7_size02
      field = "", outmsg7_size03
      field = "", outmsg7_size04
      field = "", outmsg7_size05
      field = "", outmsg7_size06
      field = "", outmsg7_size07
      field = "", outmsg7_size08
      field = "", outmsg7_size09
      field = "", outmsg7_size10
      field = "", outmsg7_size11
      field = "", outmsg7_size12
      field = "", outmsg7_size13
      field = "", outmsg7_size14
      field = "", outmsg7_size15
      field = "", outmsg7_size16

    dialog = outmsg7, "Outmsg 7", xAxis
      panel = outmsg7_off
      panel = outmsg7_size

    dialog = outmsg8_off, "", yAxis
      field = "Variable        Offset"
      field = "01", outmsg8_offset01
      field = "02", outmsg8_offset02
      field = "03", outmsg8_offset03
      field = "04", outmsg8_offset04
      field = "05", outmsg8_offset05
      field = "06", outmsg8_offset06
      field = "07", outmsg8_offset07
      field = "08", outmsg8_offset08
      field = "09", outmsg8_offset09
      field = "10", outmsg8_offset10
      field = "11", outmsg8_offset11
      field = "12", outmsg8_offset12
      field = "13", outmsg8_offset13
      field = "14", outmsg8_offset14
      field = "15", outmsg8_offset15
      field = "16", outmsg8_offset16

    dialog = outmsg8_size, "", yAxis
      field = "                Size"
      field = "", outmsg8_size01
      field = "", outmsg8_size02
      field = "", outmsg8_size03
      field = "", outmsg8_size04
      field = "", outmsg8_size05
      field = "", outmsg8_size06
      field = "", outmsg8_size07
      field = "", outmsg8_size08
      field = "", outmsg8_size09
      field = "", outmsg8_size10
      field = "", outmsg8_size11
      field = "", outmsg8_size12
      field = "", outmsg8_size13
      field = "", outmsg8_size14
      field = "", outmsg8_size15
      field = "", outmsg8_size16

    dialog = outmsg8, "Outmsg 8", xAxis
      panel = outmsg8_off
      panel = outmsg8_size

   help = helpGeneral, "MS2/Extra General Help"
      webHelp = "http://www.msextra.com"
      text = "For current documentation and support questions visit<br>"
      text = "http://www.msextra.com/"
      text = "<br><br>"
      text = "MS2/Extra is licensed for use only on:"
      text = "<br>- offical Megasquirt and Microsquirt products from B&G and resellers."
      text = "<br>- custom ECUs based on the Microsquirt module"
      text = "<br>"
      text = "<br>See the LICENSE.txt that was supplied with this firmware."
        text = "<br><br>"
        text = "To see legal Megasquirts, visit http://www.msextra.com/doc/general/whatmegasquirt.html"

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

[PortEditor]
    ; 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 = rmt_port_edit, "Remote On/Off Outputs"
        ; 1st the array constant, then the labels in the index order. 
        enabledPorts = rmt_psEnabled, "Remote Port Channel 1", "Remote Port Channel 2", "Remote Port Channel 3", "Remote Port Channel 4", "Remote Port Channel 5", "Remote Port Channel 6", "Remote Port Channel 7", "Remote Port Channel 8"
        outputOffset = rmt_psOutOffset 
        outputSize   = rmt_psOutSize 
        operators    = rmt_psCondition, "<", "=", ">", "&" ; the actual ASCII value of the operator will be sent to the controller
        threshold    = rmt_psThreshold
        hysteresis   = rmt_psHysteresis
        powerOnValue = rmt_psInitValue
        triggerValue = rmt_psPortValue
        conditionRelationship = rmt_psConnector, " ", "|", "&"
        activateOption = extendedDataInSize
        activateOption = filter32BitChannels
;-------------------------------------------------------------------------------
    ; 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 = std_port_edit, "Programmable On/Off Outputs"
        ; 1st the array constant, then the labels in the index order. 
;        enabledPorts = psEnabled, "PM2 - FIdle", "PM3 - Injection LED", "PM4 - Accel LED", "PM5 - Warmup LED", "PT6 - IAC1", "PT7 - IAC2", "PA0 - Knock Enable"
        enabledPorts = psEnabled, "FIDLE", "LED D14", "LED D16", "LED D15", "PT7 - IAC1", "PT6 - IAC2", "JS11 (PA0)"

        ; new CAN id, optional if psCanId is set to a valid array equal in size to outputOffset, it will be in the UI. 
        outputCanId  = psCanId
        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, " ", "|", "&"
        activateOption = extendedDataInSize
        activateOption = filter32BitChannels
;-------------------------------------------------------------------------------
[CurveEditor]

       curve = knockthresh_curve, "Knock input threshold"
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#knock"
          columnLabel = "RPM", "%"
          xAxis       = 0, {rpmhigh}, 6
          yAxis       = 0, 100, 6
          xBins       = knock_rpms, rpm
          yBins       = knock_thresholds
          gauge       = knockinGauge

       curve = tpswot_curve, "TPS WOT curve"
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#tpswot"
          columnLabel = "RPM", "TPS"
          xAxis       = 0, {rpmhigh}, 6
          yAxis       = 0, 100, 7
          xBins       = tpswot_rpm, rpm
          yBins       = tpswot_tps

    ;mat/clt
       curve = matclt_curve, "MAT/CLT Correction"
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#matcltcor"
          columnLabel = "Flow", "%CLT"
          xAxis       = 0, {rpmhigh * 400}, 5
          yAxis       = 0, 100, 5
          xBins       = matclt_flow, calcflow
          yBins       = matclt_pct

;time-based
        curve = time_accel_mapdot_curve, "MAP based AE"
;no help needed
            columnLabel = "MAPdot", "Added"
            xAxis = 0, 1200, 6
            yAxis = 0, 48, 4
            xBins = maeRates, MAPdot
            yBins = maeBins

;time-based
        curve = time_accel_tpsdot_curve, "TPS based AE"
;no help needed
            columnLabel = "TPSdot", "Added"
            xAxis = 0, 1200, 6
            yAxis = 0, 48, 4
            xBins = taeRates, TPSdot
            yBins = taeBins

   curve = MAFtable1, "MAF Flow Curve"
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#mafflow"
      columnLabel = "MAF volts", "Flow"
      xAxis       =  0, 5, 11
      yAxis       =  0, {650 * (maf_range + 1)}, 11
      xBins       = mafv, maf_volts
      yBins       = mafflow
      gauge       = maf_voltsGauge

   curve = MAFtable1old, "MAF Correction Table (Old)"
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#mafcor"
      columnLabel = "MAF Flow", "Correction"
      xAxis       =  0, 300, 11
      yAxis       =  0, 255, 11
      xBins       = MAFFlow, maf
      yBins       = MAFCor
      gauge       = mafGauge
 
   curve = dwellSettings, "Dwell Battery Correction"
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#dwellbat"
      columnLabel = "Voltage", "%age"
      xAxis       = 6, 16, 6
      yAxis       = 0, 500, 6
      xBins       = dwellvolts
      yBins       = dwellcorr

   curve = coldAdvance, "Cold Advance"
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#coldadv"
      columnLabel = "Coolant", "Offset"
      xAxis       = -40, {clthighlim}, 9
      yAxis       = -10,  10, 5
      xBins       = tempTable, coolant
      yBins       = cold_adv_table
      gauge       = cltGauge

   curve = iacBins, "Stepper Idle Warmup Position"
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#idlewu"
      columnLabel = "Coolant", "IAC Steps"
      xAxis       = -40, {clthighlim}, 9
      yAxis       =   0, 300, 7
      xBins       = tempTable, coolant
      yBins       = iacstepTable
      gauge       = cltGauge

   curve = ipwBins, "PWM Idle Warmup Duty Cycle"
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#idlewu"
      columnLabel = "Coolant", "Idle PWM Duty"
      xAxis       = -40, {clthighlim}, 9
      yAxis       =   0, 100, 6
      xBins       = tempTable, coolant
      yBins       = ipwmTable
      gauge       = cltGauge

   curve = primingPW, "Priming Pulse"
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#primep"
      columnLabel = "Coolant", "Prime PW"
      xAxis       = -40, {clthighlim}, 9
      yAxis       =   0,  20, 5
      xBins       = temp_table_p5, coolant
      yBins       = primePWTable
      gauge       = cltGauge

   curve = crankingPW, "Cranking Pulse %"
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#crankp"
      columnLabel = "Coolant", "Cranking PW%"
      xAxis       = -40, {clthighlim}, 9
      yAxis       =   0,  500, 6
      xBins       = temp_table_p5, coolant
      yBins       = crankPctTable
      gauge       = cltGauge

   curve = asePct, "Afterstart Enrichment Percentage"
;no help needed
      columnLabel = "Coolant", "Afterstart"
      xAxis       = -40, {clthighlim}, 9
      yAxis       =   0, 100, 6
      xBins       = temp_table_p5, coolant
      yBins       = asePctTable
      gauge       = cltGauge

   curve = aseTaper, "AfterStart Enrichment (ASE) Taper"
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#aset"
      columnLabel = "Coolant", "Taper"
      xAxis       = -40, {clthighlim}, 9
      yAxis       =   0, 500, 6
      xBins       = temp_table_p5, coolant
      yBins       = aseCntTable
      gauge       = cltGauge

   curve = matBasedRetard, "MAT-Based Timing Retard"
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#matretard"
      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, airtemp
      yBins       = matRetard
      gauge       = airtempGauge

   curve = barometerCorr, "Barometric Correction"
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#barocor"
      columnLabel = "Barometer", "Correction"
      xAxis       =  60, 120, 7
      yAxis       = 80,  120, 7
      xBins       = baroCorrVals, barometer
      yBins       = baroCorrDelta
      gauge       = barometerGauge

   curve = airdenCorr, "MAT Air Density"
;no help needed
      columnLabel = "Air temp", "Correction"
      xAxis       =  -40, 200, 9
      yAxis       =  70,  130, 7
      xBins       = matCorrTemps2, airtemp
      yBins       = matCorrDelta2
      gauge       = airtempGauge

   curve = manifoldTempCorr, "MAF/MAT Correction Table"
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#mafmatcor"
      columnLabel = "MAT", "Correction"
      xAxis       =  -40, 200, 9
      yAxis       =  -30,  30, 7
      xBins       = matCorrTemps, mat
      yBins       = matCorrDelta
      gauge       = matGauge

   curve = EAEBAWCcurve, "EAE Adhere-to-Walls Coefficient"
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#eaeawc"
      columnLabel = "%", "Correction"
      xAxis	  = 0, 255, 12
      yAxis       = 0, 100, 12
      xBins	  = EAEAWCKPAbins, eaeload1
      yBins	  = EAEBAWC
      gauge	  = EAEGauge1

   curve = EAEBSOCcurve, "EAE Sucked-from-Walls Coefficient"
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#eaeswc"
      columnLabel = "%", "Correction"
      xAxis	  = 0, 255, 12
      yAxis	  = 0, 25.5, 12
      xBins	  = EAESOCKPAbins, eaeload1
      yBins	  = EAEBSOC
      gauge	  = EAEGauge1

   curve = EAEAWNcurve, "EAE Adhere-to-walls RPM Correction"
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#eaeawrc"
      columnLabel = "RPM", "Correction"
      xAxis	  = 0, {rpmhigh}, 12
      yAxis	  = 0, 200, 12
      xBins 	  = EAEAWCRPMbins, rpm
      yBins	  = EAEAWN
      gauge	  = EAEGauge1

   curve = EAESONcurve, "EAE Sucked-from-walls RPM Correction"
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#eaeswrc"
      columnLabel = "RPM", "Correction"
      xAxis       = 0, {rpmhigh}, 12
      yAxis       = 0, 200, 12
      xBins	  = EAESOCRPMbins, rpm
      yBins       = EAESON
      gauge	  = EAEGauge1

   curve = EAESOWcurve, "EAE Sucked-from-walls CLT Correction"
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#eaeswcc"
      columnLabel = "CLT", "Correction"
      xAxis       = 0, {clthighlim}, 12	
      yAxis       = 0, 200, 12
      xBins	  = EAESOWCLTbins, coolant
      yBins       = EAESOW
      gauge	  = EAEGauge1

   curve = EAEAWWcurve, "EAE Adhere-to-walls CLT Correction"
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#eaeawcc"
      columnLabel = "CLT", "Correction"
      xAxis       = 0, {clthighlim}, 12
      yAxis       = 0, 200, 12
      xBins	  = EAEAWWCLTbins, coolant
      yBins       = EAEAWW
      gauge	  = EAEGauge1

   curve = NoiseFiltercurve, "Noise Filter Curve"
;no help needed
      columnLabel = "RPMS", "usec"
      xAxis	  = 0, {rpmhigh}, 4
      yAxis	  = 0, 2000, 4
      xBins	  = NoiseFilterRpm
      yBins	  = NoiseFilterLen

   curve = warmup_curve, "Warmup Enrichment Curve"
;no help needed
      columnLabel = "Coolant", "WUE %"
      xAxis       = -40, {clthighlim}, 9
      yAxis       =   0,  500, 6
      xBins       = tempTable, coolant
      yBins       = wueBins
      gauge       = cltGauge

   curve = idleAdvance_load_curve, "Idle Load Advance Timing"
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#idleadvload"
      columnLabel = "Load %", "deg"
      xAxis = 0, 100, 6
      yAxis = -20, 90, 6
      xBins = idleadvance_loads, fuelload
      yBins = idleadvance_curve

   curve = idleAdvance_rpm_curve, "Idle RPM Advance Timing"
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#idleadvrpm"
      columnLabel = "RPM", "deg"
      xAxis = 500, 1500, 6
      yAxis = -20, 90, 6
      xBins = idleadvance_rpms, rpm
      yBins = idleadvance_curve

   curve = idleAdvance_adaptive_curve, "Idle Adaptive Advance Timing"
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#idleadvadapt"
      columnLabel = "RPM delta", "deg"
      xAxis = -250, 250, 6
      yAxis = -20, 20, 6
      xBins = idleadvance_rpmsdelta, rpm_target_error_follower
      yBins = idleadvance_curve

   curve = pwmidle_target_curve, "Closed-Loop Idle Target RPMs"
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#clidletarg"
      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"
;no help needed
      columnLabel = "Coolant", "Rev limit" 
      xAxis       = -40, {clthighlim}, 8
      yAxis		  =   0, {rpmhigh}, 8 
      xBins       = RevLimLookup, coolant 
      yBins       = RevLimRpm1 
      gauge       = cltGauge

   curve = pwmidle_crank_dutyorsteps_dutycurve, "Coolant-Based Crank Duty"
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#idlecrank"
      columnLabel = "Coolant", "Duty %"
      xAxis       = -40, {clthighlim}, 4
      yAxis       = 0, 100, 4
      xBins       = pwmidle_crank_clt_temps, coolant
      yBins       = pwmidle_crank_dutyorsteps_duty
      gauge       = cltGauge

   curve = pwmidle_crank_dutyorsteps_stepscurve, "Coolant-Based Crank Steps"
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#idlecrank"
      columnLabel = "Coolant", "Steps"
      xAxis       = -40, {clthighlim}, 4
      yAxis       = 0, 512, 4
      xBins       = pwmidle_crank_clt_temps, coolant
      yBins       = pwmidle_crank_dutyorsteps_steps
      gauge       = cltGauge

   curve = ITB_load_loadvals_curve, "ITB Load At TPS Switchpoint"
; no help needed
      columnLabel = "RPM", "Load"
      xAxis       = 0, {rpmhigh}, 12
      yAxis       = 0, 100, 12
      xBins       = ITB_load_rpms, rpm
      yBins       = ITB_load_loadvals

    curve = ITB_load_switchpoint_curve, "ITB Load TPS Switchpoints"
;no help needed
      columnLabel = "RPM", "TPS %"
      xAxis       = 0, {rpmhigh}, 12
      yAxis       = 0, 100, 12
      xBins       = ITB_load_rpms, rpm
      yBins       = ITB_load_switchpoints
       
    curve = idle_voltage_comp_curve, "PWM Idle Voltage Compensation"
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#idlevolt"
      columnLabel = "Voltage", "Duty"
      xAxis = 9, 17, 6
      yAxis = -15, 15, 6
      xBins = idle_voltage_comp_voltage, batteryVoltage
      yBins = idle_voltage_comp_delta

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

   table = boostctlCLPWMtargs1, boostctlCLPWMtargsMap1, "Boost Control Initial Duty Table", 15
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#bcinitial"
      xBins      = boost_ctl_cl_pwm_rpms1, rpm
      yBins      = boost_ctl_cl_pwm_targboosts1, boost_targ
      zBins      = boost_ctl_cl_pwm_targs1
      upDownLabel = "HIGHER", "LOWER"
      gridOrient = 250, 0, 340

;std 16x16
   table = veTable1Tbl, veTable1Map, "Fuel VE Table 1", 5
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#ve1"
      ;             constant,   variable
      xBins       = frpm_table1, rpm
      yBins       = fmap_table1, fuelload
      zBins       = veTable1
      upDownLabel = "RICHER", "LEANER"
      gridOrient  = 250,   0, 340 ; Space 123 rotation of grid in degrees.

   table = veTable2Tbl, veTable2Map, "Fuel VE Table 2", 5
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#ve2"
      xBins       = frpm_table2, rpm
      yBins       = fmap_table2, fuelload2
      zBins       = veTable2
      upDownLabel = "RICHER", "LEANER"
      gridOrient  = 250,   0, 340

   table = veTable3Tbl, veTable3Map, "Fuel VE Table 3", 5
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#ve3"
      ;             constant,   variable
      xBins       = frpm_table3, rpm
      yBins       = fmap_table3, fuelload
      zBins       = veTable3
      upDownLabel = "RICHER", "LEANER"
      gridOrient  = 250,   0, 340 ; Space 123 rotation of grid in degrees.

    table = stagedTable, stagedMap, "Staged Injection table", 3
;no help needed
      xBins       = staged_rpms, rpm
      yBins       = staged_loads, fuelload
      zBins       = staged_percents
      upDownLabel = "MORE", "LESS"
      gridOrient = 250, 0, 340

;same again but 12x12
   table = veTable1Tbldoz, veTable1Mapdoz, "Fuel VE Table 1", 5
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#ve1"
      ;             constant,   variable
      xBins       = frpm_table1doz, rpm
      yBins       = fmap_table1doz, fuelload
      zBins       = veTable1dozen
      upDownLabel = "RICHER", "LEANER"
      gridOrient  = 250,   0, 340 ; Space 123 rotation of grid in degrees.

   table = veTable2Tbldoz, veTable2Mapdoz, "Fuel VE Table 2", 5
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#ve2"
      xBins       = frpm_table2doz, rpm
      yBins       = fmap_table2doz, fuelload2
      zBins       = veTable2dozen
      upDownLabel = "RICHER", "LEANER"
      gridOrient  = 250,   0, 340

   table = veTable3Tbldoz, veTable3Mapdoz, "Fuel VE Table 3", 5
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#ve3"
      ;             constant,   variable
      xBins       = frpm_table3doz, rpm
      yBins       = fmap_table3doz, fuelload
      zBins       = veTable3dozen
      upDownLabel = "RICHER", "LEANER"
      gridOrient  = 250,   0, 340 ; Space 123 rotation of grid in degrees.

#if LAMBDA
   table = afrTable1Tbl, afrTable1Map, "Lambda Table 1", 1
#else
   table = afrTable1Tbl, afrTable1Map, "AFR Table 1", 1
#endif
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#afr1"
      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
#else
   table = afrTable2Tbl, afrTable2Map, "AFR Table 2", 1
#endif
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#afr2"
      xBins       = arpm_table2, rpm
      yBins       = amap_table2, afrload1
      zBins       = afrTable2
      upDownLabel = "LEANER", "RICHER"
      gridOrient  = 250,   0, 340

   table = ignitionTbl1, ignitionMap1, "Ignition Table 1 (Spark Advance)", 3
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#ign1"
      xBins       = srpm_table1, rpm
      yBins       = smap_table1, ignload
      zBins       = advanceTable1
      upDownLabel = "ADVANCING", "RETARDING"
      gridOrient  = 250,   0, 340

   table = ignitionTbl2, ignitionMap2, "Ignition Table 2 (Spark Advance)", 3
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#ign2"
      xBins       = srpm_table2, rpm
      yBins       = smap_table2, ignload2
      zBins       = advanceTable2
      upDownLabel = "ADVANCING", "RETARDING"
      gridOrient  = 250,   0, 340

   table = ignitionTbl3, ignitionMap3, "Ignition Table 3 (Spark Advance)", 4
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#ign3"
      xBins       = srpm_table3, rpm
      yBins       = smap_table3, ignload
      zBins       = advanceTable3
      upDownLabel = "ADVANCING", "RETARDING"
      gridOrient  = 250,   0, 340

   table = RotarySplitTbl, RotarySplitMap, "Rotary Split Table", 3
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#rotarysplit"
      xBins	  = RotarySplitRPM, rpm
      yBins       = RotarySplitLoad, ignload
      zBins	  = RotarySplitTable
      upDownLabel = "ADVANCING", "RETARDING"
      gridOrient = 250, 0, 340

   table = injTiming1Tbl, injTiming1Map, "Injection Timing Table 1", 4
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#injt1"
      xBins	  = srpm_injadv1, rpm
      yBins   = smap_injadv1, fuelload
      zBins	  = injadvTable1
      upDownLabel = "ADVANCING", "RETARDING"
      gridOrient = 250, 0, 340

   table = injTiming2Tbl, injTiming2Map, "Injection Timing Table 2", 4
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#injt2"
      xBins	  = srpm_injadv2, rpm
      yBins   = smap_injadv2, fuelload
      zBins	  = injadvTable2
      upDownLabel = "ADVANCING", "RETARDING"
      gridOrient = 250, 0, 340

   table = injTiming3Tbl, injTiming3Map, "Injection Timing Table 3", 2
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#injt3"
      xBins	  = srpm_injadv3, rpm
      yBins   = smap_injadv3, fuelload
      zBins	  = injadvTable3
      upDownLabel = "ADVANCING", "RETARDING"
      gridOrient = 250, 0, 340

;std 16x16
   table = veTrim1Tbl, veTrim1Map, "Fuel VE Trim Table 1", 4
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#vetrim1"
      ;             constant,   variable
      xBins       = frpm_trim1, rpm
      yBins       = fmap_trim1, fuelload
      zBins       = veTrim1
      upDownLabel = "RICHER", "LEANER"
      gridOrient  = 250,   0, 340 ; Space 123 rotation of grid in degrees.

   table = veTrim2Tbl, veTrim2Map, "Fuel VE Trim Table 2", 6
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#vetrim2"
      ;             constant,   variable
      xBins       = frpm_trim2, rpm
      yBins       = fmap_trim2, fuelload
      zBins       = veTrim2
      upDownLabel = "RICHER", "LEANER"
      gridOrient  = 250,   0, 340 ; Space 123 rotation of grid in degrees.

   table = veTrim3Tbl, veTrim3Map, "Fuel VE Trim Table 3", 6
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#vetrim3"
      ;             constant,   variable
      xBins       = frpm_trim3, rpm
      yBins       = fmap_trim3, fuelload
      zBins       = veTrim3
      upDownLabel = "RICHER", "LEANER"
      gridOrient  = 250,   0, 340 ; Space 123 rotation of grid in degrees.

   table = veTrim4Tbl, veTrim4Map, "Fuel VE Trim Table 4", 6
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#vetrim4"
      ;             constant,   variable
      xBins       = frpm_trim4, rpm
      yBins       = fmap_trim4, fuelload
      zBins       = veTrim4
      upDownLabel = "RICHER", "LEANER"
      gridOrient  = 250,   0, 340 ; Space 123 rotation of grid in degrees.

;same again but 12x12
   table = veTrim1Tbldoz, veTrim1Mapdoz, "Fuel VE Trim Table 1", 4
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#vetrim1"
      ;             constant,   variable
      xBins       = frpm_trim1doz, rpm
      yBins       = fmap_trim1doz, fuelload
      zBins       = veTrim1dozen
      upDownLabel = "RICHER", "LEANER"
      gridOrient  = 250,   0, 340 ; Space 123 rotation of grid in degrees.

   table = veTrim2Tbldoz, veTrim2Mapdoz, "Fuel VE Trim Table 2", 6
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#vetrim2"
      ;             constant,   variable
      xBins       = frpm_trim2doz, rpm
      yBins       = fmap_trim2doz, fuelload
      zBins       = veTrim2dozen
      upDownLabel = "RICHER", "LEANER"
      gridOrient  = 250,   0, 340 ; Space 123 rotation of grid in degrees.

   table = veTrim3Tbldoz, veTrim3Mapdoz, "Fuel VE Trim Table 3", 6
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#vetrim3"
      ;             constant,   variable
      xBins       = frpm_trim3doz, rpm
      yBins       = fmap_trim3doz, fuelload
      zBins       = veTrim3dozen
      upDownLabel = "RICHER", "LEANER"
      gridOrient  = 250,   0, 340 ; Space 123 rotation of grid in degrees.

   table = veTrim4Tbldoz, veTrim4Mapdoz, "Fuel VE Trim Table 4", 6
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#vetrim4"
      ;             constant,   variable
      xBins       = frpm_trim4doz, rpm
      yBins       = fmap_trim4doz, fuelload
      zBins       = veTrim4dozen
      upDownLabel = "RICHER", "LEANER"
      gridOrient  = 250,   0, 340 ; Space 123 rotation of grid in degrees.

   table = boostctlDutys, boostctlDtyMap, "Boost Control Duty Table", 2
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#boostduty"
      xBins       = boost_ctl_pwmtarg_rpm_bins, rpm
      yBins	  = boost_ctl_pwmtarg_tps_bins, throttle
      zBins       = boost_ctl_pwm_targets
      upDownLabel = "HIGHER", "LOWER"
      gridOrient = 250, 0, 340

   table = boostctlTargs, boostctlTargMap, "Boost Control Target Table", 2
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#boosttarg"
      xBins       = boost_ctl_loadtarg_rpm_bins, rpm
      yBins       = boost_ctl_loadtarg_tps_bins, throttle
      zBins       = boost_ctl_load_targets
      upDownLabel = "HIGHER", "LOWER"
      gridOrient  = 250, 0, 340

   table = pwmidle_cl_initialvalues_dty, pwmidle_cl_initialvalues_dtymap, "Closed-Loop Idle Initial Values", 19
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#clidleinit"
      xBins = pwmidle_cl_initialvalue_rpms, cl_idle_targ_rpm
      yBins = pwmidle_cl_initialvalue_matorclt, pwmidle_cl_initialvalue_matorclt_follower
      zBins = pwmidle_cl_initialvalues_duties
      upDownLabel = "INCREASE","DECREASE"
      gridOrient = 250, 0, 340

    table = pwmidle_cl_initialvalues_stps, pwmidle_cl_initialvalues_stpmap, "Closed-Loop Idle Initial Values", 19
         topicHelp = "file://$getProjectsDirPath()/docs/Megasquirt2_TunerStudio_MS_Lite_Reference-3.4.pdf#clidleinit"
      xBins = pwmidle_cl_initialvalue_rpms, cl_idle_targ_rpm
      yBins = pwmidle_cl_initialvalue_matorclt, pwmidle_cl_initialvalue_matorclt_follower
      zBins = pwmidle_cl_initialvalues_steps
      upDownLabel = "INCREASE","DECREASE"
      gridOrient = 250, 0, 340

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

[GaugeConfigurations]

   ;-------------------------------------------------------------------------------
   ;  Notes on some of the gauges.
   ;
   ;  The accelEnrichGauge is now a composite of both acceleration enrichment
   ;  and deceleration enleanment numbers.  See the definition of the variable
   ;  accDecEnrich in the OutputChannels section.
   ;
   ;  David Hooke contributed the lambda gauge and associated transfer
   ;  function files.
   ;
   ;  The lambda gauge is the best way (my opinion) to report data from a
   ;  wide band EGO gauge, it standardizes the output irrespective of fuel
   ;  or mix of fuels, so you needn't do any brainwork to know if your 75%
   ;  gasoline and 25% methanol is rich at 10:1 or not.
   ;
   ;  Use the file WBlambda100AVR.inc, if using a standard ADC (e.g., AVR cpu).
   ;  Use the file WBlambda100MOT.inc, if using a biased ADC (e.g., MOT cpu).
   ;-------------------------------------------------------------------------------
   ; Define a gauge's characteristics here, then go to a specific layout
   ; block (Tuning or FrontPage) and use the name you've defined here to
   ; display that gauge in a particular position.
   ;
   ; Name  = Case-sensitive, user-defined name for this gauge configuration.
   ; Var   = Case-sensitive name of variable to be displayed, see the
   ;         OutputChannels block in this file for possible values.
   ; Title = Title displayed at the top of the gauge.
   ; Units = Units displayed below value on gauge.
   ; Lo    = Lower scale limit of gauge.
   ; Hi    = Upper scale limit of gauge.
   ; LoD   = Lower limit at which danger color is used for gauge background.
   ; LoW   = Lower limit at which warning color is used.
   ; HiW   = Upper limit at which warning color is used.
   ; HiD   = Upper limit at which danger color is used.
   ; vd    = Decimal places in displayed value
   ; ld    = Label decimal places for display of Lo and Hi, above.

   ;Name               Var            Title                 Units     Lo     Hi     LoD    LoW   HiW   HiD vd ld
gaugeCategory = "Outputs"
   IACgauge          = iacstep,       "Idle Stepper position",       "steps",   0,   255,    -1,     -1,  999,  999, 0, 0
   dwellGauge        = dwell,         "Dwell",              "ms",    0,    10,   0.5,    1.0,  6.0,  8.0, 1, 1
   dwelltrlGauge     = dwell_trl,     "Dwell (Trailing)",   "ms",    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",      "ms",    0,  25.5,    1.0,   1.2,   20,   25, 3, 1
   pulseWidth2Gauge  = pulseWidth2,   "Pulse Width 2",      "ms",    0,  25.5,    1.0,   1.2,   20,   25, 3, 1
   pulseWidth3Gauge  = pulseWidth3,   "Pulse Width 3",      "ms",    0,  25.5,    1.0,   1.2,   20,   25, 3, 1
   pulseWidth4Gauge  = pulseWidth4,   "Pulse Width 4",      "ms",    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
   injadv1Gauge = inj_adv1,       "Injection Timing 1",   "degrees", -360,   360,    -999,     -999,  999,  999, 1, 1
   injadv2Gauge = inj_adv2,       "Injection Timing 2",   "degrees", -360,   360,    -999,     -999,  999,  999, 1, 1

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
   accEnrichMSGauge  = accEnrichMS, "Accel Enrich PW",       "ms",      50,   150,     -1,    -1,  999,  999, 3, 3
   clockGauge        = seconds,       "Clock",              "Seconds", 0,  65535,     10,    10,  65535,  65535, 0, 0
   gammaEnrichGauge  = gammaEnrich,   "Total Cor",   "%",      50,   150,     -1,    -1,  151,  151, 0, 0
   gammaairGauge     = airCorrection, "Air Density Correction",        "%",      50,   150,     -1,    -1,  151,  151, 1, 1
   barocorgauge = baroCorrection,  "Barometric Correction",        "%",      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
   vetrimGauge1   = vetrim1curr,       "VE Trim 1",         "%",        87,  113,     -999,    -999,  999,  999, 1, 1
   vetrimGauge2   = vetrim2curr,       "VE Trim 2",         "%",        87,  113,     -999,    -999,  999,  999, 1, 1
   vetrimGauge3   = vetrim3curr,       "VE Trim 3",         "%",        87,  113,     -999,    -999,  999,  999, 1, 1
   vetrimGauge4   = vetrim4curr,       "VE Trim 4",         "%",        87,  113,     -999,    -999,  999,  999, 1, 1
   flexcorGauge = fuelCorrection, "E85 Fuel Correction", "%",       0,   200,     40,    70,  130,  160, 0, 0
   reqfuelGauge  = reqfuel,   "Req Fuel (calc)",    "ms",    0,  25.5,    1.0,   1.2,   20,   25, 3, 1
   n2o_addfuelGauge  = n2o_addfuel,   "Nitrous Added Fuel",    "ms",    0,  25.5,    1.0,   1.2,   20,   25, 3, 1
   deadtime1Gauge  = deadtime1,   "DeadTime 1",      "ms",    0,  25.5,    1.0,   1.2,   20,   25, 3, 1
   warmupEnrichGauge = warmupEnrich,  "Warmup Enrichment",  "%",     100,   150,     -1,    -1,  101,  105, 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", "%", -12.7, 12.7, 255,255,255,0,1
   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, 0
   veGauge1          = veCurr1,       "VE Current1",         "%",       0,   120,     -1,    -1,  999,  999, 1, 1
   veGauge2          = veCurr2,       "VE2 Current",         "%",       0,   120,     -1,    -1,  999,  999, 1, 1
   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
    boost_target = boost_targ, "Boost Target", "%", 0, 500, -1, -1, 999, 999, 1, 1
    cl_idle_targ_rpm = cl_idle_targ_rpm, "CL Idle Target", "RPM",     0,  {rpmhigh},    300,   600, {rpmwarn}, {rpmdang}, 0, 0
   coldAdvGauge      = coldAdvDeg,    "Cold Advance",       "deg",     0,  25.0,     -50,    -50,  50.0, 50.0, 1, 1
   ext_advanceGauge   = ext_advance,    "External Advance",    "deg",     0,  25.0,     -50,    -50,  50.0, 50.0, 1, 1
   base_advanceGauge = base_advance,  "Base Spark Advance", "deg",     0,  25.0,     -50,    -50,  50.0, 50.0, 1, 1
   idle_cor_advanceGauge = idle_cor_advance, "Idle Correction Advance", "deg",     0,  25.0,     -50,    -50,  50.0, 50.0, 1, 1
   mat_retardGauge   = mat_retard,    "MAT Retard",         "deg",     0,  25.0,     -50,    -50,  50.0, 50.0, 1, 1
   flex_advanceGauge = flex_advance,  "Flex Advance",       "deg",     0,  25.0,     -50,    -50,  50.0, 50.0, 1, 1
   adv1Gauge         = adv1,          "Spark Table 1",      "deg",     0,  25.0,     -50,    -50,  50.0, 50.0, 1, 1
   adv2Gauge         = adv2,          "Spark Table 2",      "deg",     0,  25.0,     -50,    -50,  50.0, 50.0, 1, 1
   adv3Gauge         = adv3,          "Spark Table 3",      "deg",     0,  25.0,     -50,    -50,  50.0, 50.0, 1, 1
   revlim_retardGauge= revlim_retard, "Revlim Retard",      "deg",     0,  25.0,     -50,    -50,  50.0, 50.0, 1, 1
   nitrous_retardGauge= nitrous_retard,"Nitrous Retard",      "deg",     0,  25.0,     -50,    -50,  50.0, 50.0, 1, 1

 ;Name               Var            Title                 Units     Lo     Hi     LoD    LoW   HiW   HiD vd ld

gaugeCategory = "Sensor inputs 1"
#if CELSIUS
   cltGauge          = coolant,       "Coolant Temp",  "°C", -40, {clthighlim}, {cltlowdang}, {cltlowwarn}, {clthighwarn},  {clthighdang}, 0, 0
   matGauge          = mat,           "Manifold Air Temp",    "°C",    -40,   110,    -15,     0,   95,  100, 0, 0
   airtempGauge      = airtemp,       "Est. Intake Air Temp", "°C",    -40,   110,    -15,     0,   95,  100, 0, 0
#else
	  cltGauge       = coolant,       "Coolant Temp",  "°F", -40, {clthighlim}, {cltlowdang}, {cltlowwarn}, {clthighwarn},  {clthighdang}, 0, 0
   matGauge          = mat,           "Manifold Air Temp",    "°F",    -40,   215,      0,    30,  200,  210, 0, 0
   airtempGauge      = airtemp,       "Est. Intake 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,  {rpmhigh},    300,   600, {rpmwarn}, {rpmdang}, 0, 0
   throttleGauge     = throttle,      "Throttle Position",  "%",       0,   100,     -1,     1,   90,  100, 1, 1
   mapGauge          = map,           "Engine MAP",         "kPa",     0,   {loadhigh},      0,    20,  200,  {loadhigh}, 1, 0
   barometerGauge    = barometer,     "Barometer",          "kPa",    60,   120,      0,    20,  120,  120, 1, 0
   fuelloadGauge      = fuelload,     "Fuel Load",          { bitStringValue( algorithmUnits , algorithm ) },     0,   {loadhigh},      0,    20,  200,  {loadhigh}, 1, 0
   fuelload2Gauge    = fuelload2,     "Secondary Fuel Load", { bitStringValue( algorithmUnits , algorithm2 ) },    0,   {loadhigh},      0,    20,  200,  {loadhigh}, 1, 0
   ignloadGauge      = ignload,       "Ign Load",           { bitStringValue( algorithmUnits , IgnAlgorithm ) },     0,   {loadhigh},      0,    20,  200,  {loadhigh}, 1, 0
   ignload2Gauge     = ignload2,      "Secondary Ign Load", { bitStringValue( algorithmUnits , IgnAlgorithm2 ) },     0,   {loadhigh},      0,    20,  200,  {loadhigh}, 1, 0
   eaeloadGauge      = eaeload1,      "EAE Load",           { bitStringValue( algorithmUnits ,  (eaeload ? eaeload : algorithm) ) },     0,   {loadhigh},      0,    20,  200,  {loadhigh}, 1, 0
   afrloadGauge      = afrload1,      "AFR Load",           { bitStringValue( algorithmUnits ,  (afrload ? afeload : algorithm) ) },     0,   {loadhigh},      0,    20,  200,  {loadhigh}, 1, 0
   mafGauge = maf,  "Mass Air Flow", "g/sec",   0,   {650 * (maf_range + 1)},      0,   {200 * (maf_range + 1)},  {480 * (maf_range + 1)},  {550 * (maf_range + 1)}, 2, 0
   maf_voltsGauge = maf_volts,  "MAF Volts", "V",   0,   5.00,      0,   5.00,  5.00,  5.00, 3, 1
   mafloadGauge = mafload, "MAFload", "kPa",       0,   400,      -1,  -1,   999,  999, 1, 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
   boostvacGauge     = boostvac,      "Vac/Boost",       "inHg/psig", -30, 30, -30, -30, 30, 30, 1, 1

gaugeCategory = "Sensor inputs 2"
   gpioadc0Gauge  = gpioadc0,   "GPIO ADC 0",      "",    0,  1023,    1023, 1023,  1023,   1023,0, 0
   gpioadc1Gauge  = gpioadc1,   "GPIO ADC 1",      "",    0,  1023,    1023, 1023,  1023,   1023,0, 0
   gpioadc2Gauge  = gpioadc2,   "GPIO ADC 2",      "",    0,  1023,    1023, 1023,  1023,   1023,0, 0
   gpioadc3Gauge  = gpioadc3,   "GPIO ADC 3",      "",    0,  1023,    1023, 1023,  1023,   1023,0, 0
   gpioadc4Gauge  = gpioadc4,   "GPIO ADC 4",      "",    0,  1023,    1023, 1023,  1023,   1023,0, 0
   gpioadc5Gauge  = gpioadc5,   "GPIO ADC 5",      "",    0,  1023,    1023, 1023,  1023,   1023,0, 0
   gpioadc6Gauge  = gpioadc6,   "GPIO ADC 6",      "",    0,  1023,    1023, 1023,  1023,   1023,0, 0
   gpioadc7Gauge  = gpioadc7,   "GPIO ADC 7",      "",    0,  1023,    1023, 1023,  1023,   1023,0, 0
   knockinGauge   = knock,      "Knock Input",     "%",   0,  100.0,     -1,   -1,  100.0, 100.0, 1, 1

   adc6Gauge  = adc6,   "ADC 6",      "",    0,  1023,    1023, 1023,  1023,   1023,0, 0
   adc7Gauge  = adc7,   "ADC 7",      "",    0,  1023,    1023, 1023,  1023,   1023,0, 0
#if CELSIUS
    #if EGTFULL
   egtGauge6          = egt6temp,           "EGT",                   "C",    0,  1250, 0, 0,     1250,   1250, 1, 1
   egtGauge7          = egt7temp,           "EGT" ,                   "C",    0,  1250, 0, 0,     1250,   1250, 1, 1
    #else
   egtGauge6          = egt6temp,           "EGT",                   "C",    0,  1000, 0, 0,     1000,   1000, 1, 1
   egtGauge7          = egt7temp,           "EGT" ,                   "C",    0,  1000, 0, 0,     1000,   1000, 1, 1
    #endif
#else
    #if EGTFULL
   egtGauge6          = egt6temp,           "EGT",                   "F",    0,  2280, 0, 0,     2280,   2280, 1, 1
   egtGauge7          = egt7temp,           "EGT",                   "F",    0,  2280, 0, 0,     2280,   2280, 1, 1
    #else
   egtGauge6          = egt6temp,           "EGT",                   "F",    0,  1830, 0, 0,     1830,   1830, 1, 1
   egtGauge7          = egt7temp,           "EGT",                   "F",    0,  1830, 0, 0,     1830,   1830, 1, 1
    #endif
#endif
   fuelcompsn= fuel_pct, "Ethanol Percentage","%",      0,   100,     -1,    -1,   85,  101, 1, 1

gaugeCategory = "AFR/EGO inputs+calcs"
   afr1Gauge         = afr1,          "Air:Fuel Ratio1",     "",       10,  19.4,     12,    13,   15,   16, 2, 2
   afr2Gauge         = afr2,          "Air:Fuel Ratio2",     "",       10,  19.4,     12,    13,   15,   16, 2, 2

   afr1tgtGauge         = afrtgt1,          "AFR1 Target",     "",       10,  19.4,     12,    13,   15,   16, 2, 2
   afr2tgtGauge         = afrtgt2,          "AFR2 Target",     "",       10,  19.4,     12,    13,   15,   16, 2, 2

   egoCorrGauge      = egoCorrection, "EGO Correction",     "%",      50,   150,     90,    99,  101,  110, 1, 1
   egoCorrGauge1     = egoCorrection1,"EGO Correction 1",   "%",      50,   150,     90,    99,  101,  110, 1, 1
   egoCorrGauge2     = egoCorrection2,"EGO Correction 2",   "%",      50,   150,     90,    99,  101,  110, 1, 1
   egoGauge          = egoVoltage,    "Exhaust Gas Oxygen", "volts",   0,   1.0,    0.2,   0.3,  0.7,  0.8, 2, 2
   egoVGauge          = egoV,    "Exhaust Gas Oxygen1", "volts",   0,   5,    5,   5,  5,  5, 5, 2
   egoV2Gauge         = egoV2,    "Exhaust Gas Oxygen2", "volts",   0,   5,    5,   5,  5,  5, 5, 2

   lambda1Gauge      = lambda1,       "Lambda1",             "",      0.5,   1.5,    0.5,   0.7,    2,  1.1, 2, 2
   lambda2Gauge      = lambda2,       "Lambda2",             "",      0.5,   1.5,    0.5,   0.7,    2,  1.1, 2, 2
   stoichGauge       = Stoich,        "Stoich",     "",       10,  19.4,     12,    13,   15,   16, 2, 2

gaugeCategory = "X-Code dev"
; for diagnotics
   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
   injcountGauge  = status5,   "Injection Count",      "pulses",    0,  1000,    65535, 65535,  65535,   65535,0, 0
   looptimeGauge = looptime,   "Mainloop Time",      "us",    0,  65535,    255, 255,  255,   255, 0, 0
   deadGauge         = deadValue,     "---",                "",        0,     1,     -1,    -1,    2,    2, 0, 0
    can_errorGauge = can_error, "CAN error bits", "",    0,  255,    255, 255,  255,   255,0, 0
    can_error_countGauge = can_error_cnt, "CAN error count", "",    0,  255,    255, 255,  255,   255,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 = throttleGauge
   gauge3 = pulseWidth1Gauge
;   gauge4 = pulseWidth2Gauge
   gauge4 = cltGauge
   gauge5 = advdegGauge
   gauge6 = fuelloadGauge
#if   NARROW_BAND_EGO
   gauge7 = egoVGauge
#elif LAMBDA
   gauge7 = lambda1Gauge
#else
    gauge7 = afr1Gauge
#endif
;   gauge7 = dwellGauge
;   gauge8 = matGauge
;   gauge8 = injadv2Gauge
    gauge8 = lostsyncGauge
   ;----------------------------------------------------------------------------
   ; Indicators
   ;               expr         off-label          on-label, off-bg, off-fg, on-bg, on-fg
   ;   indicator = { tpsaen }, "Not Accelerating", "AE",     cyan,   white,  red,   black
   ;
   indicator = { ready              }, "Not Ready",    "Ready",       white, black, green, black
   indicator = { crank              }, "Not Cranking", "Cranking",    white, black, green,   black
   indicator = { startw             }, "ASE OFF",      "ASE",         white, black, green,   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 & 4}, "Config Error",   "Config Error",   white, black, red,   black
   indicator = { status1 & 1}, "Need Burn",   "Need Burn",   white, black, red,   black
   indicator = { status1 & 2}, "Lost Data",   "Lost Data",   white, black, red,   black
   indicator = { status1 & 8}, "Not RPM synced", "RPM Synced", red, black, green, black
   indicator = { status1 & 128}, "Half-RPM sync", "Full-RPM sync",       white, black, green, black

;optional ones
   indicator = { status1 & 32}, "Fuel Tbl sw", "Fuel Tbl sw", white, black, green, black
   indicator = { status1 & 64}, "Spk Tbl sw", "Spk Tbl sw", white, black, green, black
   indicator = { status2 & 1}, "N2O 1", "N2O 1", white, black, green, black
   indicator = { status2 & 2}, "N2O 2", "N2O 2", white, black, green, black
   indicator = { status2 & 4}, "Hard limit", "Hard limit", white, black, red, black
   indicator = { status2 & 8}, "Launch", "Launch", white, black, green, black
   indicator = { status2 & 16}, "Flat shift", "Flat shift", white, black, green, black
   indicator = { status2 & 32}, "Spark cut", "Spark cut", white, black, red, black
   indicator = { status2 & 64}, "Over boost", "Over boost", white, black, red, black
   indicator = { status2 & 128}, "CL idle", "CL idle", white, black, green, black
   indicator = { knock },               "Knock", "Knock", white, black, red, black
   indicator = { status3 & 1}, "No Fuel cut", "Fuel cut",      white, black, red, black
   indicator = { status3 & 2}, "T-log", "T-log", white, black, green, black
   indicator = { status3 & 4}, "MAPsample error!", "MAPsample error!", white, black, red, black
   indicator = { status3 & 8}, "Test mode", "Test mode",       white, black, yellow, black
   indicator = { status3 & 32}, "No soft limit", "Soft limiter",white, black, red, black
   indicator = { status3 & 64}, "No seq. shift", "Seq. Shift",  white, black, red, black
   indicator = { status3 & 128}, "AC", "AC",                    white, black, green, black

#if PORT_STATUS
   indicator = { portbde & 1 }, "PORTE0", "PORTE0", white, black, green, black
   indicator = { portbde & 2 }, "PORTE1", "PORTE1", white, black, green, black
   indicator = { portbde & 16 }, "PORTE4", "PORTE4", white, black, green, black
   indicator = { portbde & 32 }, "PORTB4", "PORTB4", white, black, green, black
   indicator = { portbde & 64 }, "PORTAD6", "PORTAD6", white, black, green, black
   indicator = { portbde & 128 }, "PORTAD7", "PORTAD7", white, black, green, black

   indicator = { portam & 1 }, "PORTA0", "PORTA0", white, black, green, black
   indicator = { portam & 4 }, "PORTM2", "PORTM2", white, black, green, black
   indicator = { portam & 8 }, "PORTM3", "PORTM3", white, black, green, black
   indicator = { portam & 16 }, "PORTM4", "PORTM4", white, black, green, black
   indicator = { portam & 32 }, "PORTM5", "PORTM5", white, black, green, black

   indicator = { portt & 1 }, "PORTT0", "PORTT0", white, black, green, black
   indicator = { portt & 2 }, "PORTT1", "PORTT1", white, black, green, black
   indicator = { portt & 4 }, "PORTT2", "PORTT2", white, black, green, black
   indicator = { portt & 8 }, "PORTT3", "PORTT3", white, black, green, black
   indicator = { portt & 16 }, "PORTT4", "PORTT4", white, black, green, black
   indicator = { portt & 32 }, "PORTT5", "PORTT5", white, black, green, black
   indicator = { portt & 64 }, "PORTT6", "PORTT6", white, black, green, black
   indicator = { portt & 128 }, "PORTT7", "PORTT7", white, black, green, black
#endif
;-------------------------------------------------------------------------------

[RunTime]
   barHysteresis = 2.5 ; Seconds
#if CELSIUS

	  coolantBar    = -40,  {clthighlim}
   matBar        = -40,  100
#else
	  coolantBar    = -40,  {clthighlim}
   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       = egoGauge,         egoGauge,          egoGauge,         egoGauge
#elif LAMBDA
   gauge3       = lambda1Gauge,     lambda1Gauge,      lambda1Gauge,     lambda1Gauge
#else
   gauge3       = afr1Gauge,        afr1Gauge,         afr1Gauge,        afr1Gauge
#endif
   gauge4       = egoCorrGauge,     warmupEnrichGauge, pulseWidth1Gauge, pulseWidth2Gauge
   gauge5       = veBucketGauge,    veBucketGauge,     veBucketGauge,    veBucketGauge
   gauge6       = accelEnrichGauge, accelEnrichGauge,  dutyCycle1Gauge,  dutyCycle2Gauge

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

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

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

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

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

   ochBlockSize     = 212 ; change this if adding extra data to outpc
#if CAN_COMMANDS
;full version that works anywhere
   ochGetCommand    = "r\$tsCanId\x07%2o%2c"
#else
; fast get via serial
   ochGetCommand       = "A"
#endif

   seconds          = scalar, U16,    0, "s",   1.000, 0.0
   secl = { seconds % 256 }, "s" ; For runtime screen.
   pulseWidth1      = scalar, U16,    2, "ms",   0.000666, 0.0
   pulseWidth2      = scalar, U16,    4, "ms",   0.000666, 0.0
   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]

   afrtgt1          = scalar, U08,   12, "AFR", 0.1, 0.0
   afrtgt2          = scalar, U08,   13, "AFR", 0.1, 0.0

   ; 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

   throttle         = { tps }, "%"
   batteryVoltage   = scalar, S16,   26, "v",   0.100, 0.0
   afr1             = scalar, S16,   28, "AFR", 0.100, 0.0
   afr2             = scalar, S16,   30, "AFR", 0.100, 0.0
   lambda1          = { afr1 / 14.7 }, "Lambda"
   lambda2          = { afr2 / 14.7 }, "Lambda"
   knock            = scalar, U16,   32, "%",   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.100, 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.100, 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.392, 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.0666, 0.0
   mafload          = scalar, S16,   64, "kPa",     0.100, 0.0
   fuelload         = scalar, S16,   66, { bitStringValue( algorithmUnits , algorithm  ) },   0.100, 0.0
   fuelCorrection   = scalar, S16,   68, "%",     1.000, 0.0 ; Percent fuel correction due to 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", 0.6667, 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, S16,   88, { bitStringValue( algorithmUnits , algorithm2  ) },    0.100, 0.0
   ignload	    = scalar, S16,   90, { bitStringValue( algorithmUnits , IgnAlgorithm ) },    0.100, 0.0
   ignload2	    = scalar, S16,   92, { bitStringValue( algorithmUnits , IgnAlgorithm2 ) },    0.100, 0.0
;spare[5] were in here - removed
   synccnt         = scalar,  U08,     94, "", 1, 0
   timing_err       = scalar, S08,   95, "%", 0.1, 0 ; accuracy of timing prediction
   deltaT           = scalar, S32,  96, "uS",    1.000, 0.0 ; Normalized time between trigger pulses,
                                                             ; "fills in" missing teeth (only used with EDIS)
   wallfuel1	    = scalar, U32,  100, "uS",    1.000, 0.0

   gpioadc0	    = scalar, U16,  104, "",   1.000, 0.0
   gpioadc1     = scalar, U16,  106, "",   1.000, 0.0
   gpioadc2	    = scalar, U16,  108, "",   1.000, 0.0
   gpioadc3	    = scalar, U16,  110, "",   1.000, 0.0
   gpioadc4	    = scalar, U16,  112, "",   1.000, 0.0
   gpioadc5	    = scalar, U16,  114, "",   1.000, 0.0
   gpioadc6	    = scalar, U16,  116, "",   1.000, 0.0
   gpioadc7	    = scalar, U16,  118, "",   1.000, 0.0

   gpiopwmin0	    = scalar, U16,  120, "",   1.000, 0.0
   gpiopwmin1	    = scalar, U16,  122, "",   1.000, 0.0
   gpiopwmin2	    = scalar, U16,  124, "",   1.000, 0.0
   gpiopwmin3	    = scalar, U16,  126, "",   1.000, 0.0
;the following re-arrange for RC2 to ensure safe alignment for CAN-passthrough
   adc6 	    = scalar, U16,  128, "",   1, 0.0
   adc7 	    = scalar, U16,  130, "",   1, 0.0
   wallfuel2	    = scalar, U32,  132, "uS", 1.000, 0.0
   EAEFuelCorr2	    = scalar, U16,  136 , "%",  1.0, 0.0
   boostduty	    = scalar, U08,  138 , "%",  1.0, 0.0
   syncreason       = scalar, U08,  139,  "", 1.0, 0.0
   user0            = scalar, U16,  140,  "", 1.0, 0.0

   inj_adv1     = scalar, S16,  142, "deg", 0.100, 0.0
   inj_adv2     = scalar, S16,  144, "deg", 0.100, 0.0
   pulseWidth3  = scalar, U16,  146, "ms",   0.000666, 0.0
   pulseWidth4  = scalar, U16,  148, "ms",   0.000666, 0.0
   vetrim1curr  = scalar, S16,   150, "%",   0.00976562500, 10240.0
   vetrim2curr  = scalar, S16,   152, "%",   0.00976562500, 10240.0
   vetrim3curr  = scalar, S16,   154, "%",   0.00976562500, 10240.0
   vetrim4curr  = scalar, S16,   156, "%",   0.00976562500, 10240.0
   maf          = scalar, U16,   158, "g/sec", { 0.010 * (maf_range + 1) }, 0.0
   eaeload1     = scalar, S16,   160, { bitStringValue( algorithmUnits ,  (eaeload ? eaeload : algorithm) ) }, 0.1, 0.0
   afrload1     = scalar, S16,   162, { bitStringValue( algorithmUnits ,  (afrload ? afrload : algorithm) ) }, 0.1, 0.0
   RPMdot       = scalar, S16,   164, "rpm/sec", 10, 0.0

   gpioport0	    = scalar, U08,  166, "",   1.000, 0.0 ;was 142
   gpioport1	    = scalar, U08,  167, "",   1.000, 0.0 ;was 143
   gpioport2	    = scalar, U08,  168, "",   1.000, 0.0 ;was 144
; *spare *
   cl_idle_targ_rpm = scalar, S16,   170, "rpm", 1, 0 ; cl_idle_targ_rpm
   maf_volts   = scalar, U16,   172, "V",   0.001, 0.0
#if CELSIUS
   airtemp          = scalar, S16,   174, "°C",  0.05555, -320.0
#else
   airtemp          = scalar, S16,   174, "°F",  0.100, 0.0
#endif
    dwell_trl       = scalar, U16,  176, "ms",    0.0666, 0.0
   fuel_pct        = scalar, U16,  178,  "%",  0.1000, 0.0
   boost_targ      = scalar, S16,   180, "%", 0.1, 0

   ext_advance       = scalar, S16,    182, "deg", 0.100, 0.0
   base_advance     = scalar, S16,    184, "deg", 0.100, 0.0
   idle_cor_advance = scalar, S16,    186, "deg", 0.100, 0.0
   mat_retard       = scalar, S16,    188, "deg", 0.100, 0.0
   flex_advance     = scalar, S16,    190, "deg", 0.100, 0.0
   adv1             = scalar, S16,    192, "deg", 0.100, 0.0
   adv2             = scalar, S16,    194, "deg", 0.100, 0.0
   adv3             = scalar, S16,    196, "deg", 0.100, 0.0
   revlim_retard    = scalar, S16,    198, "deg", 0.100, 0.0
   nitrous_retard   = scalar, S16,    200, "deg", 0.100, 0.0
   deadtime1        = scalar, U16,   202, "s",   0.001, 0.0
   n2o_addfuel  = scalar, U16,   204, "ms",   0.000666, 0.0
   portbde          = scalar, U08,   206, "", 1.0, 0.0
   portam           = scalar, U08,   207, "", 1.0, 0.0
   portt            = scalar, U08,   208, "", 1.0, 0.0
    can_error_cnt   = scalar, U08, 209, "", 1,0
    can_error       = scalar, U16, 210, "", 1,0
;    can_error_rxovr       = bits, U08, 210, [0:0]
;    can_error_rxwrn       = bits, U08, 210, [1:1]
;    can_error_rxerr       = bits, U08, 210, [2:2]
;    can_error_txwrn       = bits, U08, 210, [3:3]
;    can_error_txerr       = bits, U08, 210, [4:4]
;    can_error_pass       = bits, U08, 210, [5:5]]
;    can_error_oor       = bits, U08, 210, [6:6]
;    can_error_pass2       = bits, U08, 210, [7:7]

    accDecEnrich     = { (pulseWidth1 > 0) ? (((accEnrichMS + decEnrichMS)/pulseWidth1*100) + 100) : 100 }, "%"
    accDecEnrichPcnt = { (pulseWidth1 > 0) ? (accelEnrich/pulseWidth1 + (tpsaccden ? tpsfuelcut : accelEnrich/pulseWidth1*100)) : 100 }, "%"
    accEnrichPcnt    = { (pulseWidth1 > 0) ? (100 + (accelEnrich/pulseWidth1*100)) : 100 }, "%"
    accEnrichMS      = { accelEnrich                  }, "ms"
    decEnrichPcnt    = { (tpsaccden ? tpsfuelcut : 100)  }, "%"
    decEnrichMS      = { (pulseWidth1 > 0) ? ((tpsfuelcut/100*pulseWidth1)-pulseWidth1) : 100 }, "ms" ; approximation because doesn't include deadtime

   time             = { timeNow                                        }, "s"
   rpm100           = { rpm / 100.0                                    }

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

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

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

    reqfuel = { reqFuel }
    Stoich = { stoich }

  ; Vacuum and Boost Gauges

    boostbar = { (map - barometer) / 101.33}
    boostpsig = { (map - barometer) * 0.1450}
   vacuum = { (barometer-map)*0.2953007 } ; Calculate vacuum in in-Hg.
   boostvac = { map < barometer ? -vacuum : boostpsig }

   pwmidle_cl_initialvalue_matorclt_follower = { pwmidle_cl_opts_initval_clt ? coolant : mat }, "deg"
   rpm_target_error_follower = { rpm - cl_idle_targ_rpm }, "rpm"

#if CELSIUS
    cltlowlim   = { clt_exp ? -40 : -40 }
    clthighlim  = { clt_exp ? 230 : 120 }
    cltlowdang  = { clt_exp ? 65 : 10 }
    cltlowwarn  = { clt_exp ? 93 : 65 }
    clthighwarn = { clt_exp ? 162 : 93 }
    clthighdang = { clt_exp ? 176 : 104 }
    mathigh = { 110 }
#else ; fahrenheit
    cltlowlim   = { clt_exp ? -40 : -40 }
    clthighlim  = { clt_exp ? 450 : 250 }
    cltlowdang  = { clt_exp ? 150 : 50 }
    cltlowwarn  = { clt_exp ? 200 : 150 }
    clthighwarn = { clt_exp ? 325 : 200 }
    clthighdang = { clt_exp ? 350 : 220 }
    mathigh = { 215 }
#endif

#if   NARROW_BAND_EGO
   egoVoltage = { egoV }, "V"      ; For LED bars...
#elif LAMBDA
   egoVoltage = { lambda1          }, "Lambda" ; For LED bars...
#else
   egoVoltage = { afr1             }, "AFR"    ; For LED bars...
#endif

; note these conversions are based on the AD595CQ datasheet for ANSI thermocouples.
; European thermocouples may require a different calculation
; The K type thermocouple output is not precisely linear, so these
; calculations are an approximation.
; 0degC is close enough to 0V
; With the 15K/10K circuit. 1250degC would apply 5.01V to the adc and result in '1025ADC counts' if that was possible
; So temp = adc/1025 * 1250 or adc * 1.222 
#if EGTFULL
#if CELSIUS
   egt6temp          = { adc6 * 1.222 }                              ; Setup for converting 0-5.01V = 0 - 1250C
   egt7temp          = { adc7 * 1.222 }                              ; Setup for converting 0-5.01V = 0 - 1250C
#else
   egt6temp          = { (adc6 * 2.200)+32 }                             ; Setup for converting 0-5.01V = 32 - 2282F
   egt7temp          = { (adc7 * 2.200)+32 }                             ; Setup for converting 0-5.01V = 32 - 2282F
#endif
#else ; normal 0-1000 range
; With the 10K/10K circuit. 1000degC would apply 5.10V to the adc and result in '1044ADC counts' if that was possible
#if CELSIUS
   egt6temp          = { adc6 * 0.956 }                              ; Setup for converting 0-5.10V = 0 - 1000C
   egt7temp          = { adc7 * 0.956 }                              ; Setup for converting 0-5.10V = 0 - 1000C
#else
   egt6temp          = { (adc6 * 1.721) + 32 }                             ; Setup for converting 0-5.10V = 32 - 1832F
   egt7temp          = { (adc7 * 1.721) + 32 }                             ; Setup for converting 0-5.10V = 32 - 1832F
#endif
#endif

;synthetic air flow
    calcflow = { fuelload * rpm * veCurr1/100 }

;old names
   tpsDOT = { TPSdot }
   mapDOT = { MAPdot }

;-------------------------------------------------------------------------------
;--  The entries are saved in the datalog file in the order in which they     --
;--  appear in the list below.                                                --
;--                                                                           --
;--   Channel - Case sensitive name of output channel to be logged.           --
;--   Label   - String written to header line of log.  Be careful             --
;--             about changing these, as programs like MSLVV and              --
;--             MSTweak key off specific column names.                        --
;--   Type    - Data type of output, converted before writing.                --
;--   Format  - C-style output format of data.                                --

[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 = boostpsig,       "Boost psi",   float,  "%.1f"
   entry = throttle,        "TPS",         float,  "%.1f"
   entry = maf,             "MAF",         float,  "%.01f", { MAFOption }
   entry = mafload,         "MAFload",     float,  "%.1f",  { MAFOption }
#if   NARROW_BAND_EGO
   entry = egoV,      "O2",          float,  "%.3f"
   entry = egoV2,      "O2-2",          float,  "%.3f"
#elif LAMBDA
   entry = lambda1,         "Lambda",      float,  "%.3f"
   entry = lambda2,         "Lambda2",      float,  "%.3f"
#else
   entry = afr1,            "AFR",         float,  "%.2f"
   entry = afr2,            "AFR2",         float,  "%.2f"
#endif
   entry = mat,             "MAT",         float,  "%.1f"
   entry = coolant,         "CLT",         float,  "%.1f"
   entry = engine,          "Engine",      int,    "%d"
   entry = batteryVoltage,  "Batt V",      float,  "%.1f"

   entry = egoCorrection1,   "EGO cor1",    float,    "%.1f"
   entry = egoCorrection2,   "EGO cor2",    float,    "%.1f"
   entry = airCorrection,   "Fuel: Air cor",        int,    "%.1f"
   entry = warmupEnrich,    "Fuel: Warmup cor",       int,    "%d"
   entry = baroCorrection,  "Fuel: Baro cor",       int,    "%.1f"
   entry = gammaEnrich,     "Fuel: Total cor",      int,    "%d"
   entry = accDecEnrich,    "Fuel: Accel enrich",      int,    "%d"

   entry = accEnrichMS,     "Accel PW",    float,  "%.3f"

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

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

   entry = advance,         "SPK: Spark Advance",    float,  "%.1f"
   entry = knockRetard,     "SPK: Knock retard",    float,  "%.1f"
   entry = coldAdvDeg,      "SPK: Cold advance",     float,  "%.1f"
   entry = ext_advance,    "SPK: External advance",   float,  "%.1f"
   entry = base_advance,   "SPK: Base Spark Advance",float,  "%.1f"
   entry = idle_cor_advance, "SPK: Idle Correction Advance", float,  "%.1f"
   entry = mat_retard,    "SPK: MAT Retard",         float,  "%.1f"
   entry = flex_advance,  "SPK: Flex Advance",       float,  "%.1f"
   entry = adv1,          "SPK: Spark Table 1",      float,  "%.1f"
   entry = adv2,          "SPK: Spark Table 2",      float,  "%.1f"
   entry = adv3,          "SPK: Spark Table 3",      float,  "%.1f"
   entry = revlim_retard, "SPK: Revlim Retard",      float,  "%.1f"
   entry = nitrous_retard,"SPK: Nitrous Retard",      float,  "%.1f"

   entry = dwell,           "Dwell",       float,  "%.2f"
   entry = barometer,       "Barometer",   float,  "%.1f"
   entry = TPSdot,          "TPSdot",      float,  "%.1f"
   entry = MAPdot,          "MAPdot",      float,  "%.1f"
   entry = RPMdot,          "RPMdot",      int,      "%d"

   entry = iacstep,         "Stepper Idle Position",     int,    "%d", {IdleCtl == 3}
   entry = idleDC, "PWM Idle Duty", float, "%.1f", {IdleCtl == 2}
   entry = boostduty,  "Boost Duty", int, "%d", { boost_ctl_settings_on }
   entry = boost_targ, "Boost Target", int, "%d", { boost_ctl_settings_on && boost_ctl_settings_cl }

   entry = fuel_pct, "Ethanol Percentage", float, "%.1f", { flexFuel > 0 }
   entry = fuelCorrection, "E85 Fuel Correction", int, "%d", { flexFuel > 0 }

   entry = wallfuel1,        "WallFuel1",    int,    "%d", {EAEOption}
   entry = wallfuel2,        "WallFuel2",   int,     "%d", {EAEOption}
   entry = EAEFuelCorr1,     "EAE1 %",       int,    "%d", {EAEOption}
   entry = EAEFuelCorr2,     "EAE2 %",      int, "%d", {EAEOption}
   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", {EAEOption}
   entry = afrload1,         "AFR Load", float, "%.1f"
   entry = egt6temp,         "EGT 6 temp", int, "%d"
   entry = egt7temp,         "EGT 7 temp", int, "%d"
   entry = adc6, "ADC6", int, "%d"
   entry = adc7, "ADC7", int, "%d"

   entry = gpioadc0, "gpioadc0", int, "%d"
   entry = gpioadc1, "gpioadc1", int, "%d"
   entry = gpioadc2, "gpioadc2", int, "%d"
   entry = gpioadc3, "gpioadc3", int, "%d"
   entry = gpioadc4, "gpioadc4", int, "%d"
   entry = gpioadc5, "gpioadc5", int, "%d"
   entry = gpioadc6, "gpioadc6", int, "%d"
   entry = gpioadc7, "gpioadc7", int, "%d"

   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"
   entry = cl_idle_targ_rpm, "Closed-Loop Idle Target RPM", int, "%d", {((IdleCtl > 1) && (IdleCtl_alg == 1)) || (idleadvance_on == 4)}
   entry = rpm_target_error_follower, "Closed-Loop Idle RPM Error", int, "%d", {((IdleCtl > 1) && (IdleCtl_alg == 1)) || (idleadvance_on == 4)}
   entry = timing_err, "Timing Err%", float, "%.1f"
   entry = afrtgt1,    "AFR Target 1", float, "%.1f"

   entry = synccnt, "Lost Sync Count", int, "%d"
   entry = syncreason, "Lost Sync Reason", int, "%d"

   entry = inj_adv1,       "InjTiming1",    float,  "%.1f"
   entry = inj_adv2,       "InjTiming2",    float,  "%.1f"
   entry = pulseWidth3,     "PW3",         float,  "%.3f"
   entry = pulseWidth4,     "PW4",         float,  "%.3f"
   entry = vetrim1curr,         "VE Trim 1",         float,    "%.1f"
   entry = vetrim2curr,         "VE Trim 2",         float,    "%.1f"
   entry = vetrim3curr,         "VE Trim 3",         float,    "%.1f"
   entry = vetrim4curr,         "VE Trim 4",         float,    "%.1f"
   entry = knock,           "Knock In",    float,  "%.1f"
    entry = portStatus, "On/Off Outputs Status Bits", int, "%d"
    entry = portbde, "PORTs BDE", int, "%d"
    entry = portam, "PORTs AM", int, "%d"
    entry = portt, "PORT T", int, "%d"
    entry = can_error, "CAN error bits", int, "%d"
    entry = can_error_cnt, "CAN error count", int, "%d"

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