;------------------------------------------------------------------------------- [MegaTune] MTversion = 2.25 ; MegaTune itself; needs to match exec version. versionInfo = "S" ; Put this in the title bar. queryCommand = "Q" ; Verify against signature. signature = "MSII Rev 2.10000 " ; MS-II sends a null at 20th byte. ; 123456789.123456789. ;------------------------------------------------------------------------------- [Constants] ;---------------------------------------------------------------------------- ; Constants Definition ; -------------------- ; ; Scalar Values ; ------------- ; The scaling and translation values are used as follows: ; msValue = userValue / scale - translate ; userValue = (msValue + translate) * scale ; ; I've got no good way to handle a few of these things yet. ; ; Temperatures are fine, check out the Fielding IAC example (fastIdleTemp). ; ; The TPS stuff is a problem, because we have to modify the ini file for ; each TPS installation and again whenever we move the TPS... I figured ; out a moderately palatable solution to presenting the frequency ; divider in the boost control values, turn it into a bit field and then ; enumerate the resulting frequencies. ; ; Array Values ; ------------ ; Arrays are specified just like scalars, except that they have a "shape" ; entry in the fourth parameter. The shape allows you to define lists or ; tables, for example [8] defines a list with eight values and [2x4] defines ; a table with eight values (two rows and four columns). Tables may be ; stored in either "X-" or "Y-order." X-order means that memory is layed ; out like. ; ; [x1,y1] [x2,y1]...[xn,y1] [x1,y2]... ; ; Y-order would be ; ; [x1,y1] [x1,y2]...[x1,yn] [x2,y1]... ; ; To use the TableEditor, you must define two lists and a table, and ; the lengths of the lists must correspond to the shape of the table. ; ; Bit Fields ; ---------- ; Bits are numbered 0-7, the rightmost being bit zero. The basic ; data word that stores bit fields must be unsigned. ; ; You need NOT supply the correct number of labels matching the ; number of bits you've specified (one bit requires 2 values, two ; bits requires 4 values and so on). If you neglect to supply enough ; labels, they will be synthesized using the sequence "1", "2" and so ; on based upon their position in the sequence (the cltType and matType ; will end up with identical lists). ; ;---------------------------------------------------------------------------- pageActivationDelay = 50 ; Milliseconds delay after burn command. blockReadTimeout = 200 ; Milliseconds total timeout for reading page. endianness = big nPages = 1 burnCommand = "b" pageSize = 1688 pageActivate = "" pageReadCommand = "v" pageValueWrite = "w%2o\000\001%v" pageChunkWrite = "w%2o%2c%v" page = 1 ; name = class, type, offset, shape, units, scale, translate, lo, hi, digits nCylinders = bits , U08, 0, [0:3], "INVALID" ; * no_skip_pulses = scalar, U08, 1, "", 1.00000, 0.00000, 3.00, 255.00, 0 ; * ( 1 byte) ICIgnCapture = bits , U08, 2, [0:0], "Falling Edge", "Rising Edge" ; * ICCrankTrigger = bits , U08, 2, [1:2], "Calculated", "Trigger Return", "Trigger Rise", "INVALID" ; * ICIgnOption = bits , U08, 2, [4:5], "Standard Coil Charge", "EDIS", "EDIS Multispark", "INVALID" ; * spkout_hi_lo = bits , U08, 3, [0:0], "Going Low (Normal)", "Going High (Inverted)" ; * max_coil_dur = scalar, U08, 4, "ms", 0.10000, 0.00000, 1.00, 8.00, 1 ; * ( 1 byte) max_spk_dur = scalar, U08, 5, "ms", 0.10000, 0.00000, 0.00, 25.50, 1 ; * ( 1 byte) dwellAcc = scalar, U08, 6, "ms", 0.10000, 0.00000, 0.00, 25.50, 0 ; * ( 1 byte) dwellVolts = array , S08, 7, [ 5], "V", 0.10000, 0.00000,-12.80, 12.70, 1 ; * ( 5 bytes) dwellDuration = array , S08, 12, [ 5], "ms", 0.10000, 0.00000,-12.80, 12.70, 1 ; * ( 5 bytes) RevLimOption = bits , U08, 17, [0:1], "None", "Spark Retard", "Fuel Cut", "INVALID" ; * ( 1 byte) RevLimMaxRtd = scalar, S08, 18, "deg", 0.10000, 0.00000,-12.80, 12.70, 0 ; * ( 1 byte) 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, 0.00, 3000.0, 0 ; ( 2 bytes) advanceTable = array , S16, 22, [12x12], "deg", 0.10000, 0.00000,-10.00, 90.00, 1 ; * (288 bytes) cold_adv_table = array , S16, 310, [ 10], "deg", 0.10000, 0.00000,-10.00, 90.00, 1 ; * ( 20 bytes) triggerOffset = scalar, S16, 330, "deg", 0.10000, 0.00000, -90.0, 180.00, 2 ; * ( 2 bytes) RevLimRpm1 = scalar, S16, 332, "RPM", 1.00000, 0.00000, 0.00,15000.00, 0 ; * ( 2 bytes) RevLimRpm2 = scalar, S16, 334, "RPM", 1.00000, 0.00000, 0.00,15000.00, 0 ; * ( 2 bytes) veTable1 = array , U08, 336, [12x12], "%", 1.00000, 0.00000, 0.00, 255.00, 0 ; * (144 bytes) veTable2 = array , U08, 480, [12x12], "%", 1.00000, 0.00000, 0.00, 255.00, 0 ; * (144 bytes) #if LAMBDA afrTable1 = array , U08, 624, [12x12], "Lambda", 0.006803, 0.00000, 0.00, 2.00, 3 ; * (144 bytes) afrTable2 = array , U08, 768, [12x12], "Lambda", 0.006803, 0.00000, 0.00, 2.00, 3 ; * (144 bytes) #else afrTable1 = array , U08, 624, [12x12], "AFR", 0.10000, 0.00000, 9.00, 20.00, 1 afrTable2 = array , U08, 768, [12x12], "AFR", 0.10000, 0.00000, 9.00, 20.00, 1 #endif wueBins = array , U08, 912, [ 10], "%", 1.00000, 0.00000, 0.00, 255.00, 0 ; * ( 10 bytes) taeBins = array , U08, 922, [ 4], "ms", 0.10000, 0.00000, 0.00, 25.50, 1 ; * ( 4 bytes) maeBins = array , U08, 926, [ 4], "ms", 0.10000, 0.00000, 0.00, 25.50, 1 ; * ( 4 bytes) iacstepTable = array , S16, 930, [ 10], "steps", 1.00000, 0.00000, 0.00, 4000.00, 0 ; * ( 20 bytes) ipwmTable = array , S16, 930, [ 10], "%", 1.00000, 0.00000, 0.00, 100.00, 0 frpm_table = array , U16, 950, [ 12], "RPM", 1.00000, 0.00000, 0.00,15000.00, 0 ; * ( 24 bytes) srpm_table = array , U16, 974, [ 12], "RPM", 1.00000, 0.00000, 0.00,15000.00, 0 ; * ( 24 bytes) fmap_table = array , S16, 998, [ 12], "kPa", 0.10000, 0.00000, 0.00, 400.00, 1 ; * ( 24 bytes) smap_table = array , S16, 1022, [ 12], "kPa", 0.10000, 0.00000, 0.00, 400.00, 1 ; * ( 24 bytes) #if CELSIUS tempTable = array , S16, 1046, [ 10], "°C", 0.05555, -320.000,-40.00, 200.00, 1 ; * ( 20 bytes) Temperature bins for cranking, cold AE and WUE #else tempTable = array , S16, 1046, [ 10], "°F", 0.10000, 0.00000,-40.00, 300.00, 1 #endif taeRates = array , S16, 1066, [ 4], "%/s", 0.10000, 0.00000, 0.00, 1000.00, 1 ; * ( 8 bytes) tpsDot bins used for AE; x for TAE interpolation maeRates = array , S16, 1074, [ 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, 1082, "kPa", 0.10000, 0.00000, -100.0, 3276.7, 1 ; * ( 2 bytes) mapmax = scalar, S16, 1084, "kPa", 0.10000, 0.00000, -100.0, 3276.7, 1 ; * ( 2 bytes) #if CELSIUS clt0 = scalar, S16, 1086, "°C", 0.05555, -320.000, -100.0, 500.0, 1 ; * ( 2 bytes) cltmult = scalar, S16, 1088, "%", 1.00000, 0.00000, -200.0, 200.0, 0 ; * ( 2 bytes) mat0 = scalar, S16, 1090, "°C", 0.05555, -320.000, -100.0, 500.0, 1 ; * ( 2 bytes) #else clt0 = scalar, S16, 1086, "°F", 0.10000, 0.00000, -100.0, 500.0, 1 cltmult = scalar, S16, 1088, "%", 1.00000, 0.00000, -200.0, 200.0, 0 mat0 = scalar, S16, 1090, "°F", 0.10000, 0.00000, -100.0, 500.0, 1 #endif matmult = scalar, S16, 1092, "%", 1.00000, 0.00000, -200.0, 200.0, 0 ; * ( 2 bytes) tpsMin = scalar, S16, 1094, "ADC", 1.00000, 0.00000, 0.0, 1023.0, 0 ; * ( 2 bytes) tpsMax = scalar, S16, 1096, "ADC", 1.00000, 0.00000, 0.0, 1023.0, 0 ; * ( 2 bytes) batt0 = scalar, S16, 1098, "V", 0.10000, 0.00000, 0.0, 3276.7, 1 ; ( 2 bytes) battmax = scalar, S16, 1100, "V", 0.10000, 0.00000,-3276.8, 3276.7, 1 ; ( 2 bytes) ego0 = scalar, S16, 1102, "afr", 0.10000, 0.00000,-3276.8, 3276.7, 1 ; ( 2 bytes) egomult = scalar, S16, 1104, "%", 1.00000, 0.00000, -200.0, 200.0, 0 ; ( 2 bytes) baro0 = scalar, S16, 1106, "kPa", 0.10000, 0.00000,-3276.8, 3276.7, 1 ; * ( 2 bytes) baromax = scalar, S16, 1108, "kPa", 0.10000, 0.00000,-3276.8, 3276.7, 1 ; * ( 2 bytes) bcor0 = scalar, S16, 1110, "%", 1.00000, 0.00000,-3276.8, 3276.7, 1 ; * ( 2 bytes) bcormult = scalar, S16, 1112, "%", 1.00000, 0.00000, -200.0, 200.0, 0 ; * ( 2 bytes) knock0 = scalar, S16, 1114, "V", 0.01000, 0.00000, 0.0, 5.0, 1 ; * ( 2 bytes) knockmax = scalar, S16, 1116, "V", 0.01000, 0.00000, 0.0, 5.0, 1 ; * ( 2 bytes) Dtpred_Gain = scalar, S16, 1118, "%", 1.00000, 0.00000, -200.0, 200.0, 0 ; * ( 2 bytes) crankTolerance = scalar, U08, 1120, "%", 1.00000, 0.00000, 0.00, 255.00, 0 ; * ( 1 byte) asTolerance = scalar, U08, 1121, "%", 1.00000, 0.00000, 0.00, 255.00, 0 ; * ( 1 byte) pulseTolerance = scalar, U08, 1122, "%", 1.00000, 0.00000, 0.00, 255.00, 0 ; * ( 1 byte) IdleCtl = bits , U08, 1123, [0:2], "None", "Solenoid", "IAC Stepper Moving Only", "IAC Stepper Always On", "PWM Warmup", "15-Minute IAC", "INVALID", "INVALID" ; * IACtstep = scalar, U08, 1124, "ms", 0.10000, 0.00000, 0.00, 25.50, 1 ; * ( 1 byte) IACaccstep = scalar, U08, 1125, "ms", 0.10000, 0.00000, 0.00, 25.50, 1 ; * ( 1 byte) IACnaccstep = scalar, U08, 1126, "", 1.00000, 0.00000, 0.00, 255.00, 0 ; * ( 1 byte) ;pad = scalar, U08, 1127, IACStart = scalar, S16, 1128, "", 1.00000, 0.00000, 0.00, 4000.00, 0 ; * ( 1 byte) #if CELSIUS IdleHyst = scalar, S16, 1130, "°C", 0.05555, -320.000, -40.0, 150.0, 1 ; * ( 2 bytes) #else IdleHyst = scalar, S16, 1130, "°F", 0.10000, 0.00000, -40.0, 300.0, 1 #endif IACcrankpos = scalar, S16, 1132, "steps", 1.00000, 0.00000, 0.00, 4000.00, 0 ; ( 2 bytes) IACcrankxt = scalar, S16, 1134, "sec", 1.00000, 0.00000, 0.00,32767.00, 0 ; ( 2 bytes) IACcoldtmp = scalar, S16, 1136, "°F", 0.10000, 0.00000,-40.00, 300.00, 0 ; ( 2 bytes) IACcoldpos = scalar, S16, 1138, "steps", 1.00000, 0.00000, 0.00, 4000.00, 0 ; ( 2 bytes) IACcoldxt = scalar, S16, 1140, "sec", 1.00000, 0.00000, 0.00,32767.00, 0 ; ( 2 bytes) primePulse = scalar, S16, 1142, "ms", 0.10000, 0.00000, 0.00, 65.00, 1 ; ( 2 bytes) primePulseHot = scalar, S16, 1144, "ms", 0.10000, 0.00000, 0.00, 65.00, 1 ; ( 2 bytes) crankCold = scalar, S16, 1146, "ms", 0.10000, 0.00000, 0.00, 65.00, 1 ; * ( 1 byte) crankHot = scalar, S16, 1148, "ms", 0.10000, 0.00000, 0.00, 65.00, 1 ; * ( 1 byte) asePct = scalar, S16, 1150, "%", 1.00000, 0.00000, 0.00, 400.00, 0 ; ( 2 bytes) asePctHot = scalar, S16, 1152, "%", 1.00000, 0.00000, 0.00, 400.00, 0 ; ( 2 bytes) aseCount = scalar, S16, 1154, "cycles", 1.00000, 0.00000, 0.00,32767.00, 0 ; ( 2 bytes) aseCountHot = scalar, S16, 1156, "cycles", 1.00000, 0.00000, 0.00,32767.00, 0 ; ( 2 bytes) taeColdA = scalar, U08, 1158, "ms", 0.10000, 0.00000, 0.00, 25.500, 1 ; * ( 1 byte) taeColdM = scalar, U08, 1159, "%", 1.00000, 0.00000, 0.00, 255.00, 0 ; * ( 1 byte) tpsThresh = scalar, U08, 1160, "%/s", 0.10000, 0.00000, 0.00, 500.00, 1 ; * ( 1 byte) mapThresh = scalar, U08, 1161, "kPa/s", 1.00000, 0.00000, 0.00, 32767.0, 0 ; * ( 1 byte) threshold for MAE taeTime = scalar, U08, 1162, "s", 0.10000, 0.00000, 0.00, 25.50, 1 ; * ( 1 byte) tdePct = scalar, U08, 1163, "", 1.00000, 0.00000, 0.00, 255.00, 0 ; * ( 1 byte) floodClear = scalar, S16, 1164, "%", 0.10000, 0.00000, 0.00, 100.00, 1 ; * ( 2 bytes) TPSOXLimit = scalar, S16, 1166, "%", 0.10000, 0.00000, 0.00, 100.00, 1 ; * ( 2 bytes) tpsProportion = scalar, U08, 1168, "%", 1.00000, 0.00000, 0.00, 100.00, 0 ; * ( 1 byte) baroCorr = bits , U08, 1169, [0:1], "None", "Initial MAP Reading", "Two Independent Sensors", "INVALID" ; * egoType = bits , U08, 1170, [0:1], "Disabled", "Narrow Band", "Single Wide Band", "Dual Wide Band" ; * egoCount = scalar, U08, 1171, "", 1.00000, 0.00000, 0.00, 255.00, 0 ; * ( 1 byte) egoDelta = scalar, U08, 1172, "%", 1.00000, 0.00000, 0.00, 255.00, 0 ; * ( 1 byte) egoLimit = scalar, U08, 1173, "%", 1.00000, 0.00000, 0.00, 255.00, 0 ; * ( 1 byte) #if NARROW_BAND_EGO egoTarget = scalar, U08, 1174, "v", -0.004883, -204.800, 0.00, 2.00, 3 ; * ( 1 byte) #elif LAMBDA AFRTarget = scalar, U08, 1174, "Lambda", 0.006803, 0.00000, 0.00, 2.00, 3 #else AFRTarget = scalar, U08, 1174, "AFR", 0.10000, 0.00000, 0.00, 25.50, 1 #endif tempUnits = bits , U08, 1175, [0:0], "Coolant/MAT Tables in °F", "Coolant/MAT Tables in °C" ; * ( 1 byte) mafOption = bits , U08, 1176, [0:7], "UNUSED" ; ( 1 byte) ;pad = scalar, U08, 1177, #if CELSIUS fastIdleT = scalar, S16, 1178, "°C", 0.05555, -320.000,-40.00, 150.00, 1 ; * ( 2 bytes) egoTemp = scalar, S16, 1180, "°C", 0.05555, -320.000,-40.00, 150.00, 1 ; * ( 2 bytes) #else fastIdleT = scalar, S16, 1178, "°F", 0.10000, 0.00000,-40.00, 300.00, 1 egoTemp = scalar, S16, 1180, "°F", 0.10000, 0.00000,-40.00, 300.00, 1 #endif egoRPM = scalar, S16, 1182, "RPM", 1.00000, 0.00000, 0.00, 15000.0, 0 ; * ( 2 bytes) reqFuel = scalar, U16, 1184, "ms", 0.00100, 0.00000, 0.00, 65.536, 2 ; * ( 2 bytes) divider = scalar, U08, 1186, "", 1.00000, 0.00000, 0.00, 255, 0 ; * ( 1 byte) alternate = bits, U08, 1187, [0:0], "Simultaneous", "Alternating" ; * ( 1 byte) injOpen = scalar, U08, 1188, "ms", 0.10000, 0.00000, 0.00, 25.50, 1 ; * ( 1 byte) injPwmT = scalar, U08, 1189, "ms", 0.10000, 0.00000, 0.00, 25.50, 1 ; * ( 1 byte) injPwmPd = scalar, U08, 1190, "us", 1.00000, 0.00000, 40.00, 100.00, 0 ; * ( 1 byte) injPwmP = scalar, U08, 1191, "%", 1.00000, 0.00000, 0.00, 100.00, 0 ; * ( 1 byte) battFac = scalar, U08, 1192, "ms/v", 0.0166667, 0.0, 0.0, 1.0, 2 ; * ( 1 byte) twoStroke = bits, U08, 1193, [0:0], "Four-stroke", "Two-stroke" ; * injType = bits, U08, 1194, [0:0], "Port Injection", "Throttle Body" ; * nInjectors = bits, U08, 1195, [0:3], "INVALID" ; * engineType = bits, U08, 1196, [0:0], "Even fire", "Odd fire" ; * UNUSED OddFire2 = scalar, U08, 1197, "", 1.00000, 0.00000, 0.00, 255.00, 0 ; U ( 1 byte) UNUSED MapAveno = scalar, U08, 1198, "", 1.00000, 0.00000, 1.00, 8.00, 0 ; * ( 1 byte) RpmAveno = scalar, U08, 1199, "", 1.00000, 0.00000, 1.00, 8.00, 0 ; * ( 1 byte) dualTable = bits, U08, 1200, [0:0], "Single Table", "Dual Table" ; * algorithm = bits, U08, 1201, [0:1], "Speed Density", "Blend SD/Alpha-N", "Pure Alpha-N", "INVALID" ; * IgnAlpha = scalar, U08, 1202, "", 1.00000, 0.00000, 0.00, 255.00, 0 ; U ( 1 byte) UNUSED AfrAlpha = scalar, U08, 1203, "", 1.00000, 0.00000, 0.00, 255.00, 0 ; U ( 1 byte) UNUSED alpha_lorpm = scalar, S16, 1204, "RPM", 1.00000, 0.00000, 0.00,15000.00, 0 ; * ( 2 bytes) alpha_hirpm = scalar, S16, 1206, "RPM", 1.00000, 0.00000, 0.00,15000.00, 0 ; * ( 2 bytes) alphaMAPtable = array , S16, 1208, [ 6x 6], "kPa", 0.10000, 0.00000, 0.00, 200.00, 1 ; * ( 72 bytes) amap_tps = array , S16, 1280, [ 6], "%", 0.10000, 0.00000, 0.0, 100.00, 1 ; * ( 12 bytes) amap_rpm = array , U16, 1292, [ 6], "RPM", 1.00000, 0.00000, 0.00,15000.00, 0 ; * ( 12 bytes) baud = scalar, U32, 1304, "", 1.00000, 0.00000,9600.0,115200.0, 0 ; x ( 4 bytes) MAPOXLimit = scalar, S16, 1308, "kPa", 0.10000, 0.00000, 0.00, 300.00, 2 ; * ( 2 bytes) board_id_type = array , U08, 1310, [ 16] ; ( 16 bytes) board_id_type0 = bits , U08, 1310, [0:7], "No board", "MS-II ECU", "Router Board", "I/O Board" sparePort = array , U08, 1326, [ 2], "on/off", 1.00000, 0.00000, 0.00, 1.00, 0 ; ( 2 bytes) outOffset = array , S08, 1328, [ 2], "", 1.00000, 0.00000,-128.00, 127.00, 0 ; ( 2 bytes) condition = array , S08, 1330, [ 2], "", 1.00000, 0.00000,-128.00, 127.00, 0 ; ( 2 bytes) portValue = array , S08, 1332, [ 2], "", 1.00000, 0.00000,-128.00, 127.00, 0 ; ( 2 bytes) threshold = array , S16, 1334, [ 2], "", 1.00000, 0.00000,-32768.0,32767.0, 0 ; ( 4 bytes) hysteresis = array , S16, 1338, [ 2], "", 1.00000, 0.00000,-32768.0,32767.0, 0 ; ( 4 bytes) aeTaperTime = scalar, U08, 1342, "s", 0.10000, 0.00000, 0.00, 25.50, 1 ; * ( 1 byte) ;pad = scalar, U08, 1343, aeEndPW = scalar, S16, 1344, "ms", 0.10000, 0.00000, 0.00, 1000.00, 1 ; * inpt_spare = array , S16, 1346, [ 171], "", 1.00000, 0.00000,-32768, 32767, 0 ; x ( 16 bytes) ; pageSize = 1688 [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". ; ;---------------------------------------------------------------------------- menu = "&Settings" subMenu = generalSettings, "&General" subMenu = idleControl, "I&dle Control" subMenu = std_separator subMenu = injChars, "I&njector Characteristics" subMenu = std_injection, "Injection &Control" subMenu = alphaNOptions, "&Alpha-N Blending", 0, { algorithm > 0 } subMenu = egoControl, "&EGO Control" subMenu = std_separator subMenu = ignitionOptions, "&Ignition Settings" subMenu = dwellSettings, "D&well Settings" menu = "T&ables" subMenu = tempTable, "&Temperature Table" subMenu = iacBins, "I&dle Steps", 0, { IdleCtl > 1 && IdleCtl < 4 } subMenu = ipwBins, "Idle &PWM Dutycycle", 0, { IdleCtl == 4 } subMenu = alphaMAPTbl, "&Alpha-N MAP Table", 0, { algorithm > 0 } subMenu = std_separator subMenu = veTable1Tbl, "VE Table &1" subMenu = afrTable1Tbl, "A&FR Table 1", 0, { egoType >= 2 } subMenu = veTable2Tbl, "VE Table &2", 0, { dualTable } subMenu = afrTable2Tbl, "AF&R Table 2", 0, { egoType >= 2 && dualTable } subMenu = std_separator subMenu = ignitionTbl, "&Ignition Table" subMenu = coldAdvance, "&Cold Advance" menu = "&Tuning" subMenu = std_realtime, "&Realtime Display" subMenu = alphaMAPMap, "Alpha-&N MAP Table", 0, { algorithm > 0 } subMenu = std_separator subMenu = std_warmup, "&Warmup Wizard" subMenu = std_accel, "&Acceleration Wizard" subMenu = veTable1Map, "VE Table &1" subMenu = veTable2Map, "VE Table &2", 0, { dualTable } subMenu = afrTable1Map, "A&FR Table 1", 0, { egoType >= 2 } subMenu = afrTable2Map, "AF&R Table 2", 0, { egoType >= 2 && dualTable } subMenu = std_separator subMenu = ignitionMap, "&Ignition Map" menu = "Tools" subMenu = std_ms2gentherm, "Calibrate T&hermistor Tables..." subMenu = std_ms2geno2, "Calibrate &AFR Table..." subMenu = sensorCal, "&Sensor Calibration..." subMenu = std_trigwiz, "Tri&gger Wizard..." menu = "Help" subMenu = helpGeneral, "MS-II Info" subMenu = sensorHelp, "Sensor Calibration" ;------------------------------------------------------------------------------- [UserDefined] dialog = generalSettings, "General Settings" topicHelp = "http://www.megasquirt.info/megatune.htm#sg" ; field = "#System" ; field = "Temperature Units", tempUnits ; ! ; field = "#EFI" field = "Dual Table Use", dualTable field = "Barometric Correction", baroCorr field = "MAP Average Bins", MapAveno field = "RPM Average Bins", RpmAveno field = "#Startup" field = "Cranking RPM", crankingRPM field = "#Rev Limiter" field = "Algorithm", RevLimOption field = "Maximum Retard", RevLimMaxRtd, { RevLimOption == 1 } field = "Lower Rev Limit", RevLimRpm1 field = "Upper Rev Limit", RevLimRpm2 dialog = injChars, "Injector Characteristics" topicHelp = "http://www.megasquirt.info/megatune.htm#sn" field = "Injector Open Time", injOpen field = "Battery Voltage Correction", battFac field = "PWM Current Limit", injPwmP field = "PWM Time Threshold", injPwmT field = "!Injector PWM Period", injPwmPd ; ! field = "!Red settings require an MS-II reboot!" dialog = egoControl, "EGO Control" topicHelp = "http://www.megasquirt.info/megatune.htm#se" field = "EGO Sensor Type", egoType #if NARROW_BAND_EGO field = "NB Voltage Target", egoTarget, { egoType == 1 } #elif LAMBDA field = "NB Lambda Target", AFRTarget, { egoType == 1 } #else field = "NB AFR Target", AFRTarget, { egoType == 1 } #endif field = "Ignition Events per Step", egoCount, { egoType == 1 } field = "Controller Step Size", egoDelta, { egoType == 1 } field = "Controller Authority ±", egoLimit, { egoType > 0 } field = "Active Above Coolant Temp", egoTemp, { egoType > 0 } field = "Active Above RPM", egoRPM, { egoType > 0 } field = "Active Below TPS", TPSOXLimit, { egoType > 0 } field = "Active Below MAP", MAPOXLimit, { egoType > 0 } dialog = alphaNOptions, "Alpha-N Settings" topicHelp = "http://www.megasquirt.info/megatune.htm#sh" field = "Pure AN to Blend Threshold", alpha_lorpm field = "Blend to SD Threshold", alpha_hirpm dialog = ignitionOptions, "Ignition Options" topicHelp = "http://www.megasquirt.info/megatune.htm#si" field = "Trigger Offset", triggerOffset field = "Skip Pulses", no_skip_pulses field = "Predictor Algorithm", PredOpt field = "Predictor Gain", Dtpred_Gain field = "#Next-Pulse Tolerance" field = " Cranking", crankTolerance field = " After-start", asTolerance field = " Normal Running", pulseTolerance field = "!Ignition Input Capture", ICIgnCapture, { ICIgnOption != 2 && ICIgnOption != 3 } ; ! field = "!Cranking Trigger", ICCrankTrigger, { ICIgnOption != 2 && ICIgnOption != 3 } ; ! field = "!Coil Charging Scheme", ICIgnOption ; ! field = "!Spark Output", spkout_hi_lo ; ! field = "Maximum Spark Duration", max_spk_dur field = "!Red settings require an MS-II reboot!" dialog = dwellSettings, "Dwell Settings" topicHelp = "http://www.megasquirt.info/megatune.htm#sw" field = "Maximum Dwell Duration", max_coil_dur field = "Acceleration Compensation", dwellAcc field = "#Battery Voltage Compensation" ; Make this an array2D when available. array1D = "", "Voltage %INDEX% ", dwellVolts array1D = "", "Duration at Voltage %INDEX% ", dwellDuration dialog = idleControl, "Idle Control" topicHelp = "http://www.megasquirt.info/megatune.htm#sd" field = "Algorithm", IdleCtl field = "Fast Idle Temperature", fastIdleT, { IdleCtl == 1 } field = "Time Step Size", IACtstep, { IdleCtl > 1 && IdleCtl < 4 } field = "Acceleration Step Size", IACaccstep, { IdleCtl > 1 && IdleCtl < 4 } field = "Number of Acceleration Steps", IACnaccstep, { IdleCtl > 1 && IdleCtl < 4 } field = "!Start Value", IACStart, { IdleCtl > 1 } ; ! field = "Cranking Position", IACcrankpos, { IdleCtl > 1 } field = "Crank-to-Run Taper Time", IACcrankxt, { IdleCtl > 1 } field = "Hysteresis", IdleHyst, { IdleCtl > 1 } field = "#Time-Based After Start" field = " Cold Temperature", IACcoldtmp, { IdleCtl > 1 } field = " Cold Position", IACcoldpos, { IdleCtl > 1 } field = " Cold Taper Time", IACcoldxt, { IdleCtl > 1 } field = "!Red settings require an MS-II reboot!" dialog = tempTable, "Temperature Bins" topicHelp = "http://www.megasquirt.info/megatune.htm#at" field = "#Note" field = "These temperatures apply to IAC/PWM, cold advance" field = "and cranking pulsewidths. Temperature 1 should be the" field = "coldest and temperature %#tempTable% the warmest." array1D = "Temperature Table", "Temperature %INDEX%", tempTable dialog = iacBins, "IAC Step Bins" topicHelp = "http://www.megasquirt.info/megatune.htm#ad" array1D = "IAC Steps", "Steps at %tempTable% ", iacstepTable dialog = ipwBins, "PWM Idle Duty Cycle", 0, { IdleCtl == 4 } topicHelp = "http://www.megasquirt.info/megatune.htm#ap" array1D = "Idle PWM", "Duty Cycle at %tempTable% ", ipwmTable dialog = coldAdvance, "Cold Ignition Advance" topicHelp = "http://www.megasquirt.info/megatune.htm#ac" array1D = "Advance Offset", "Advance at %tempTable% ", cold_adv_table dialog = sensorCal, "Sensor Calibration" topicHelp = sensorHelp ; field = "#Throttle Position" ; field = "Fully closed", tpsMin ; field = "Wide open", tpsMax field = "#MAP Sensor (F1 for common values)" field = "Value at 0.0 volts", map0 field = "Value at 5.0 volts", mapmax field = "#Barometer Sensor (usually identical to MAP)" field = "Value at 0.0 volts", baro0 field = "Value at 5.0 volts", baromax field = "#Barometric Correction" field = "At total vacuum ", bcor0 field = "Rate", bcormult field = "#Knock Sensor Settings" field = "Threshold", knock0 field = "Peak", knockmax ; field = "#Coolant Temperature Sensor Scaling" ; field = "Offset at 0 v", clt0 ; field = "Scale factor", cltmult ; field = "#Air Temperature Sensor Scaling" ; field = "Offset at 0 v", mat0 ; field = "Scale factor", matmult help = sensorHelp, "Sensor Calibration" webHelp = "http://www.megasquirt.info/megatune.htm#os" text = "MAP Sensor Calibration
" text = "
" text = "For the\tMPX4115 use\t10.6 and \t121.7
" text = "\tMPX4250\t\t10.0\t260.0
" text = "\tMPXH6300\t1.1\t315.5
" text = "\tGM 3-BAR\t1.1\t315.5
" text = "\tMPXH6400\t3.5\t416.5
" text = "
" text = "(GM 3-bar data from Dave Hartnell, http://www.not2fast.com/electronics/component_docs/MAP_12223861.pdf)
" text = "
" text = "\tSensor type\tvLo\tpLo\tvHi\tpHi\tvRef
" text = "\tMPX4115 \t0.204 v\t15 kPa\t4.794 v\t115 kPa\t5.100 v
" text = "\tMPX4250 \t0.204 v\t20 kPa\t4.896 v\t250 kPa\t5.100 v
" text = "\tMPXH6300\t0.306 v\t20 kPa\t4.913 v\t304 kPa\t5.100 v
" text = "\tGM 3-BAR\t0.631 v\t40 kPa\t4.914 v\t304 kPa\t5.100 v
" text = "\tMPXH6400\t0.200 v\t20 kPa\t4.800 v\t400 kPa\t5.000 v
" text = "
" text = "In general, use values derived from these equations:
" text = "
" text = "\tm = (pHi-pLo)/(vHi-vLo)
" text = "\tpv1 = pLo - m * vLo
" text = "\tpv2 = pv1 + m * vRef
" text = "
" text = "References:
" text = "\thttp://www.freescale.com/files/sensors/doc/data_sheet/MPX4115A.pdf
" text = "\thttp://www.freescale.com/files/sensors/doc/data_sheet/MPX4250A.pdf
" text = "\thttp://www.freescale.com/files/sensors/doc/data_sheet/MPXH6300A.pdf
" text = "\thttp://www.freescale.com/files/sensors/doc/data_sheet/MPXH6400A.pdf
" text = "
" text = "Barometer Sensor Calibration
" text = "
" text = "If your system has an external barometer sensor, separate from the MAP" text = "sensor, then use these values to calibrate it properly. If you have" text = "a standard MS installation, then copy your MAP sensor values here.
" text = "
" text = "Barometric Correction Calibration
" text = "
" text = "Correction for barometric effects is performed using the linear function below.
" text = "
" text = "\tcorrection = correction_0 + (rate * barometer) / 100
" text = "
" text = "'At total vacuum' contains the total correction at a barometer reading" text = "of 0 kPa (you are on the moon). The 'Rate' contains the percentage per 100" text = "kPa to scale the barometer value. Using the default values of 147 and -47," text = "we see that for a barometer of 100 kPa, we have 100% correction.
" text = "
" text = "\tcorrection = 147 + (-47*100) / 100 = 100%" help = helpGeneral, "MS-II General Help" webHelp = "http://www.megasquirt.info/ms2/" text = "Al Grippo and Bruce Bowling have created MegaSquirt-II, which" text = "is a plug-in daughter card that replaces the 8-bit MC68HC908GP32" text = "with a 16-bit MC9S12C32 processor. MegaSquirt-II is an intermediate" text = "step from the original MegaSquirt towards UltraMegaSquirt.
" text = "
" text = "It is basically a plug-in processor card that has the MC9S12C32" text = "processor plus support hardware as well as a stepper motor chip," text = "and an ignition module controller. The embedded code is written" text = "in C, rather than assembly language, so it should be more accessible" text = "to more programmers (Stephane Carrez has ported GCC to the HC12" text = "processor so, although it doesn't use the full 9S12 instruction" text = "set, we are able to use his version to write code for the MS-II).
" text = "
" text = "For current documentation, click the Web Help button below, or for" text = "support questions visit http://www.msefi.com/." ;------------------------------------------------------------------------------- [TableEditor] ; table_id, map3d_id, "title", page table = veTable1Tbl, veTable1Map, "VE Table 1", 1 ; constant, variable xBins = frpm_table, rpm yBins = fmap_table, calcMAP zBins = veTable1 upDownLabel = "RICHER", "LEANER" gridHeight = 2.0 gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees. table = veTable2Tbl, veTable2Map, "VE Table 2", 1 xBins = frpm_table, rpm yBins = fmap_table, calcMAP zBins = veTable2 upDownLabel = "RICHER", "LEANER" gridHeight = 2.0 gridOrient = 250, 0, 340 #if LAMBDA table = afrTable1Tbl, afrTable1Map, "Lambda Table 1", 1 gridHeight = 3.0 #else table = afrTable1Tbl, afrTable1Map, "AFR Table 1", 1 gridHeight = 1.0 #endif xBins = frpm_table, rpm, readonly yBins = fmap_table, calcMAP, readonly zBins = afrTable1 upDownLabel = "LEANER", "RICHER" gridOrient = 250, 0, 340 #if LAMBDA table = afrTable2Tbl, afrTable2Map, "Lambda Table 2", 1 gridHeight = 3.0 #else table = afrTable2Tbl, afrTable2Map, "AFR Table 2", 1 gridHeight = 1.0 #endif xBins = frpm_table, rpm, readonly yBins = fmap_table, calcMAP, readonly zBins = afrTable2 upDownLabel = "LEANER", "RICHER" gridOrient = 250, 0, 340 table = ignitionTbl, ignitionMap, "Spark Advance Table", 1 xBins = srpm_table, rpm yBins = smap_table, calcMAP zBins = advanceTable upDownLabel = "ADVANCING", "RETARDING" gridHeight = 3.0 gridOrient = 250, 0, 340 table = alphaMAPTbl, alphaMAPMap, "Alpha-N MAP Table", 1 xBins = amap_rpm, rpm yBins = amap_tps, tps zBins = alphaMAPtable upDownLabel = "UP", "DOWN" gridHeight = 2.0 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 advBucketGauge = veTuneValue, "Advance Bucket", "degrees", 0, 55, -1, -1, 999, 999, 1, 1 advdegGauge = advance, "Ignition Advance", "degrees", 0, 50, -1, -1, 999, 999, 1, 1 IACgauge = iacstep, "IAC position", "steps", 0, 255, -1, -1, 999, 999, 0, 0 dwellGauge = dwell, "Dwell", "mSec", 0, 10, 0.5, 1.0, 6.0, 8.0, 1, 1 ; IAC step == idle pwm, when using pwm idle control. PWMIdlegauge = idleDC, "Idle PWM%", "%", 0, 100, -1, -1, 999, 90, 0, 0 accelEnrichGauge = accDecEnrich, "Accel Enrich", "%", 50, 150, -1, -1, 999, 999, 0, 0 afr1Gauge = afr1, "Air:Fuel Ratio", "", 10, 19.4, 12, 13, 15, 16, 2, 2 afr2Gauge = afr2, "Air:Fuel Ratio", "", 10, 19.4, 12, 13, 15, 16, 2, 2 clockGauge = seconds, "Clock", "Seconds", 0, 255, 10, 10, 245, 245, 0, 0 deadGauge = deadValue, "---", "", 0, 1, -1, -1, 2, 2, 0, 0 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 egoCorrGauge = egoCorrection, "EGO Correction", "%", 50, 150, 90, 99, 101, 110, 0, 0 egoGauge = egoVoltage, "Exhaust Gas Oxygen", "volts", 0, 1.0, 0.2, 0.3, 0.6, 0.8, 2, 2 lambda1Gauge = lambda1, "Lambda", "", 0.5, 1.5, 0.5, 0.7, 2, 1.1, 2, 2 lambda2Gauge = lambda2, "Lambda", "", 0.5, 1.5, 0.5, 0.7, 2, 1.1, 2, 2 gammaEnrichGauge = gammaEnrich, "Gamma Enrichment", "%", 50, 150, -1, -1, 151, 151, 0, 0 mapGauge = map, "Engine MAP", "kPa", 0, 255, 0, 20, 200, 245, 1, 0 calcMapGauge = calcMAP, "Estimated MAP", "kPa", 0, 255, 0, 20, 200, 245, 1, 0 pulseWidth1Gauge = pulseWidth1, "Pulse Width 1", "mSec", 0, 25.5, 1.0, 1.2, 20, 25, 3, 1 pulseWidth2Gauge = pulseWidth2, "Pulse Width 2", "mSec", 0, 25.5, 1.0, 1.2, 20, 25, 3, 1 tachometer = rpm, "Engine Speed", "RPM", 0, 8000, 300, 600, 3000, 5000, 0, 0 throttleGauge = throttle, "Throttle Position", "%", 0, 100, -1, 1, 90, 100, 0, 0 veBucketGauge = veTuneValue, "VE Value", "%", 0, 120, -1, -1, 999, 999, 0, 0 veGauge = veCurr1, "VE Current", "%", 0, 120, -1, -1, 999, 999, 0, 0 voltMeter = batteryVoltage,"Battery Voltage", "volts", 7, 21, 8, 9, 15, 16, 2, 2 warmupEnrichGauge = warmupEnrich, "Warmup Enrichment", "%", 100, 150, -1, -1, 101, 105, 0, 0 #if CELSIUS cltGauge = coolant, "Coolant Temp", "°C", -40, 120, -15, 0, 95, 105, 0, 0 matGauge = mat, "Manifold Air Temp", "°C", -40, 110, -15, 0, 95, 100, 0, 0 #else cltGauge = coolant, "Coolant Temp", "°F", -40, 250, 0, 30, 200, 220, 0, 0 matGauge = mat, "Manifold Air Temp", "°F", -40, 215, 0, 30, 200, 210, 0, 0 #endif ;------------------------------------------------------------------------------- [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 #if NARROW_BAND_EGO gauge4 = egoGauge #elif LAMBDA gauge4 = lambda1Gauge #else gauge4 = afr1Gauge #endif gauge5 = mapGauge #if IAC_GAUGE gauge6 = IACgauge #elif PWM_GAUGE gauge6 = PWMIdlegauge #else ; FIDLE_GAUGE gauge6 = matGauge #endif gauge7 = advdegGauge gauge8 = dwellGauge ;---------------------------------------------------------------------------- ; Indicators ; expr off-label on-label, off-bg, off-fg, on-bg, on-fg ; indicator = { tpsaen }, "Not Accelerating", "AE", cyan, white, red, black ; ; Look in the new colors24b.ini for the basic ones, add more or tell me what to add. indicator = { ready }, "Not Ready", "Ready", white, black, green, black indicator = { crank }, "Not Cranking", "Cranking", white, black, red, black indicator = { startw }, "ASE OFF", "ASE", white, black, red, black indicator = { warmup }, "WUE OFF", "WUE", white, black, green, black indicator = { tpsaen }, "TPS Accel", "TPS Accel", white, black, green, black indicator = { tpsden }, "TPS Decel", "TPS Decel", white, black, green, black indicator = { mapaen }, "MAP Accel", "MAP Accel", white, black, green, black indicator = { tps > floodClear && crank }, "", "FLOOD CLEAR", white, black, red, black ;------------------------------------------------------------------------------- [RunTime] barHysteresis = 2.5 ; Seconds #if CELSIUS coolantBar = -40, 100 matBar = -40, 100 #else coolantBar = -40, 215 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, 200 mapDotBar = 0, 300 ;------------------------------------------------------------------------------- [BurstMode] getCommand = "a" [OutputChannels] deadValue = { 0 } ; Convenient unchanging value. ochBlockSize = 88 ochGetCommand = "a" ; Lower case so we don't get confused. seconds = scalar, U16, 0, "s", 1.000, 0.0 secl = { seconds % 256 }, "s" ; For runtime screen. pulseWidth1 = scalar, U16, 2, "s", 0.001, 0.0 pulseWidth2 = scalar, U16, 4, "s", 0.001, 0.0 pulseWidth = { pulseWidth1 }, "s" ; For runtime screen. ; int rpm,adv_deg; // adv in deg x 10 rpm = scalar, S16, 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 ; mapaen: equ 6 ; 0 = not in MAP acceleration mode 1 = MAP deaceeleration 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] tpsaen = bits, U08, 11, [4:4] tpsden = bits, U08, 11, [5:5] mapaen = bits, U08, 11, [6:6] afrtgt1 = scalar, U08, 12, "AFR", 10.00, 0.0 afrtgt2 = scalar, U08, 13, "AFR", 10.00, 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 tpsADC = { tps*10.23 }, "ADC" ; Fake for calibrator and file indexing. 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, S16, 32, "v", 0.100, 0.0 ; egocor1,egocor2,aircor,warmcor, // all in % egoCorrection1 = scalar, S16, 34, "%", 1.000, 0.0 egoCorrection = { egoCorrection1 }, "%" ; Alias for old gauges. egoCorrection2 = scalar, S16, 36, "%", 1.000, 0.0 airCorrection = scalar, S16, 38, "%", 1.000, 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, "%", 1.000, 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, "%", 1.000, 0.0 veCurr2 = scalar, S16, 52, "%", 1.000, 0.0 veCurr = { veCurr1 }, "%" ; For runtime display. iacstep = scalar, S16, 54, "", 1.000, 0.0 idleDC = { iacstep } ; Close enough. 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, S16, 62, "ms", 0.100, 0.0 maf = scalar, S16, 64, "?", 1.000, 0.0 calcMAP = scalar, S16, 66, "kPa", 0.100, 0.0 ; Blend of MAP and TPS, depends on algorithm dtPredErr = scalar, S16, 68, "uS", 1.000, 0.0 ; May be temporary, check code. ;pad = array , S16, 70, [7] deltaT = scalar, S32, 84, "uS", 1.000, 0.0 ; Normalized time between trigger pulses, ; "fills in" missing teeth. accDecEnrich = { accelEnrich + (tpsden ? tpsfuelcut : 100) }, "%" time = { timeNow }, "s" rpm100 = { rpm / 100.0 } altDiv1 = { alternate ? 2 : 1 } altDiv2 = { alternate ? 2 : 1 } cycleTime1 = { 60000.0 / rpm * (2.0-twoStroke) }, "ms" nSquirts1 = { nCylinders/divider } dutyCycle1 = { 100.0*nSquirts1/altDiv1*pulseWidth1/cycleTime1 }, "%" cycleTime2 = { 60000.0 / rpm * (2.0-twoStroke) }, "ms" nSquirts2 = { nCylinders/divider } dutyCycle2 = { 100.0*nSquirts2/altDiv2*pulseWidth2/cycleTime2 }, "%" #if NARROW_BAND_EGO egoVoltage = { 1.0-afr1*0.04883 }, "V" ; For LED bars... #elif LAMBDA egoVoltage = { lambda1 }, "Lambda" ; For LED bars... #else egoVoltage = { afr1 }, "AFR" ; For LED bars... #endif ; pageSize = 88 ;------------------------------------------------------------------------------- [Datalog] ; Full datalog. ; ; Default user-defined log emulates the full datalog. ; ; The entries are saved in the datalog file in the order in ; which they appear in the list below. ; ; Channel - Case sensitive name of output channel to be logged. ; Label - String written to header line of log. Be careful ; about changing these, as programs like MSLVV and ; MSTweak key off specific column names. ; Type - Data type of output, converted before writing. ; Format - C-style output format of data. ; ; Channel Label Type Format ; -------------- ---------- ----- ------ entry = time, "Time", float, "%.3f" entry = seconds, "SecL", int, "%d" entry = rpm, "RPM", int, "%d" entry = map, "MAP", int, "%d" entry = throttle, "TP", int, "%d" #if NARROW_BAND_EGO entry = egoVoltage, "O2", float, "%.3f" #elif LAMBDA entry = lambda1, "Lambda", float, "%.3f" #else entry = afr1, "AFR", float, "%.2f" #endif entry = mat, "MAT", float, "%.1f" entry = coolant, "CLT", float, "%.1f" entry = engine, "Engine", int, "%d" entry = egoCorrection, "Gego", int, "%d" entry = airCorrection, "Gair", int, "%d" entry = warmupEnrich, "Gwarm", int, "%d" entry = baroCorrection, "Gbaro", int, "%d" entry = gammaEnrich, "Gammae", int, "%d" entry = accDecEnrich, "TPSacc", int, "%d" entry = veCurr1, "Gve", int, "%d" entry = pulseWidth1, "PW", float, "%.3f" entry = dutyCycle1, "DutyCycle1", float, "%.1f" entry = veCurr2, "Gve2", int, "%d" entry = pulseWidth2, "PW2", float, "%.3f" entry = dutyCycle2, "DutyCycle2", float, "%.1f" entry = advance, "SparkAdv", float, "%.1f" entry = coldAdvDeg, "ColdAdv", float, "%.1f" entry = dwell, "Dwell", float, "%.2f" entry = tpsDOT, "tpsDOT", float, "%.1f" entry = mapDOT, "mapDOT", float, "%.1f" entry = iacstep, "IACstep", int, "%d" entry = dtPredErr, "dtPredError", float, "%.0f" entry = deltaT, "deltaT", float, "%.0f" ;-------------------------------------------------------------------------------