Merge branch 'master' into pr/46

Conflicts:
	reference/Speeduino base tune.msq
This commit is contained in:
Josh Stewart 2016-10-01 01:45:18 +10:00
commit 4d0fe1836a
15 changed files with 632 additions and 4265 deletions

View File

@ -67,7 +67,7 @@ void command()
break;
case 'Q': // send code version
Serial.print("speeduino 201609-dev");
Serial.print("speeduino 201609");
break;
case 'V': // send VE table and constants in binary

View File

@ -0,0 +1,579 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<msq xmlns="http://www.msefi.com/:msq">
<bibliography author="TunerStudio MS(Beta) 3.0.10.04 - EFI Analytics, Inc." tuneComment="" writeDate="Fri Sep 30 22:35:03 AEST 2016"/>
<versionInfo fileFormat="5.0" firmwareInfo="Speeduino+2016.09" nPages="8" signature="speeduino 201609"/>
<page>
<pcVariable name="tsCanId">"0"</pcVariable>
</page>
<page number="0" size="288">
<constant cols="16" digits="0" name="veTable" rows="16" units="%">
39.0 39.0 39.0 39.0 39.0 38.0 37.0 36.0 35.0 34.0 33.0 33.0 33.0 33.0 33.0 33.0
40.0 40.0 41.0 42.0 42.0 41.0 40.0 39.0 39.0 39.0 39.0 39.0 40.0 40.0 40.0 40.0
40.0 42.0 43.0 46.0 46.0 45.0 44.0 43.0 42.0 42.0 43.0 43.0 43.0 44.0 44.0 44.0
42.0 45.0 47.0 51.0 51.0 49.0 48.0 47.0 46.0 46.0 46.0 47.0 47.0 47.0 48.0 48.0
44.0 49.0 52.0 56.0 55.0 54.0 52.0 51.0 50.0 50.0 50.0 50.0 51.0 51.0 51.0 52.0
48.0 54.0 58.0 61.0 59.0 58.0 56.0 55.0 54.0 53.0 54.0 54.0 54.0 55.0 55.0 55.0
54.0 61.0 64.0 66.0 64.0 62.0 61.0 59.0 58.0 57.0 57.0 58.0 58.0 59.0 59.0 59.0
60.0 67.0 70.0 70.0 68.0 67.0 65.0 63.0 62.0 61.0 61.0 61.0 62.0 63.0 63.0 63.0
67.0 74.0 76.0 75.0 73.0 71.0 69.0 68.0 66.0 64.0 65.0 65.0 66.0 66.0 67.0 67.0
74.0 80.0 81.0 79.0 77.0 75.0 73.0 72.0 70.0 68.0 68.0 69.0 69.0 70.0 70.0 71.0
81.0 85.0 86.0 84.0 82.0 80.0 78.0 76.0 74.0 72.0 72.0 72.0 73.0 74.0 74.0 74.0
87.0 91.0 91.0 88.0 86.0 84.0 82.0 80.0 78.0 76.0 76.0 76.0 77.0 78.0 78.0 78.0
93.0 93.0 93.0 93.0 93.0 90.0 88.0 86.0 84.0 83.0 83.0 83.0 84.0 85.0 85.0 86.0
93.0 93.0 93.0 93.0 93.0 92.0 90.0 88.0 86.0 86.0 86.0 87.0 88.0 89.0 89.0 90.0
93.0 93.0 93.0 93.0 93.0 93.0 93.0 90.0 90.0 90.0 90.0 91.0 92.0 93.0 93.0 93.0
93.0 93.0 93.0 93.0 93.0 93.0 93.0 93.0 93.0 93.0 93.0 93.0 93.0 93.0 93.0 93.0
</constant>
<constant cols="1" digits="0" name="rpmBins" rows="16" units="RPM">
500.0
700.0
900.0
1400.0
2000.0
2800.0
3600.0
4500.0
5200.0
5500.0
5800.0
6200.0
6500.0
6800.0
6900.0
7000.0
</constant>
<constant cols="1" digits="0" name="mapBins" rows="16" units="kPa">
15.0
25.0
30.0
35.0
40.0
45.0
50.0
55.0
60.0
65.0
70.0
75.0
85.0
90.0
95.0
100.0
</constant>
</page>
<page number="1" size="64">
<constant digits="1" name="unused2-1" units="ms">5.0</constant>
<constant digits="1" name="unused2-2" units="ms">2.3</constant>
<constant digits="0" name="asePct" units="%">25.0</constant>
<constant digits="0" name="aseCount" units="s">8.0</constant>
<constant cols="1" digits="0" name="wueRates" rows="10" units="%">
180.0
175.0
168.0
154.0
134.0
121.0
112.0
104.0
102.0
100.0
</constant>
<constant digits="0" name="crankingPct" units="%">20.0</constant>
<constant name="pinLayout">"Speeduino v0.4"</constant>
<constant name="tachoPin">"Board Default"</constant>
<constant name="unused2-16f">"One"</constant>
<constant digits="1" name="tdePct" units="ms">3.2</constant>
<constant digits="1" name="taeColdA" units="ms">0.0</constant>
<constant digits="0" name="tpsThresh" units="%/s">100.0</constant>
<constant digits="0" name="taeTime" units="ms">200.0</constant>
<constant name="display">"Unused"</constant>
<constant name="display1">"VE"</constant>
<constant name="display2">"CPU"</constant>
<constant name="display3">"TPS"</constant>
<constant name="display4">"Mem"</constant>
<constant name="display5">"RPM"</constant>
<constant name="displayB1">"RPM"</constant>
<constant name="displayB2">"RPM"</constant>
<constant digits="1" name="reqFuel" units="ms">12.8</constant>
<constant digits="0" name="divider">2.0</constant>
<constant name="alternate">"Alternating"</constant>
<constant name="multiplyMAP">"No"</constant>
<constant name="includeAFR">"No"</constant>
<constant digits="1" name="injOpen" units="ms">1.0</constant>
<constant digits="0" name="inj1Ang" units="deg">355.0</constant>
<constant digits="0" name="inj2Ang" units="deg">355.0</constant>
<constant digits="0" name="inj3Ang" units="deg">355.0</constant>
<constant digits="0" name="inj4Ang" units="deg">355.0</constant>
<constant name="mapSample">"Cycle Average"</constant>
<constant name="twoStroke">"Four-stroke"</constant>
<constant name="injType">"Port"</constant>
<constant name="nCylinders">"4"</constant>
<constant name="cltType">"GM"</constant>
<constant name="matType">"GM"</constant>
<constant name="nInjectors">"4"</constant>
<constant name="engineType">"Even fire"</constant>
<constant name="flexEnabled">"Off"</constant>
<constant name="algorithm">"Speed Density"</constant>
<constant name="baroCorr">"Off"</constant>
<constant name="injLayout">"Bank"</constant>
<constant digits="1" name="primePulse" units="ms">4.0</constant>
<constant digits="0" name="dutyLim" units="%">85.0</constant>
<constant digits="0" name="unused41" units="RPM">4200.0</constant>
<constant digits="3" name="egoSwitch" units="v">0.0</constant>
<constant digits="0" name="taeColdM" units="%">0.0</constant>
<constant digits="0" name="tpsMin" units="ADC">26.0</constant>
<constant digits="0" name="tpsMax" units="ADC">230.0</constant>
<constant digits="0" name="mapMin" units="kpa">10.0</constant>
<constant digits="0" name="mapMax" units="kpa">260.0</constant>
<constant digits="0" name="fpPrime" units="s">3.0</constant>
<constant digits="1" name="stoich" units=":1">14.7</constant>
<constant digits="0" name="oddfire2">0.0</constant>
<constant digits="0" name="oddfire3">0.0</constant>
<constant digits="0" name="oddfire4">0.0</constant>
<constant digits="0" name="unused2-57" units="RPM">0.0</constant>
<constant digits="0" name="unused2-58" units="RPM">0.0</constant>
<constant digits="0" name="unused2-59" units="RPM">0.0</constant>
<constant digits="0" name="unused2-60" units="RPM">0.0</constant>
<constant digits="0" name="unused2-61" units="RPM">0.0</constant>
<constant digits="0" name="unused2-62" units="RPM">0.0</constant>
<constant digits="0" name="unused2-63" units="RPM">0.0</constant>
</page>
<page number="2" size="288">
<constant cols="16" digits="0" name="advTable1" rows="16" units="deg">
17.0 18.0 19.0 20.0 21.0 24.0 25.0 27.0 28.0 29.0 30.0 31.0 32.0 32.0 33.0 34.0
17.0 18.0 19.0 20.0 21.0 24.0 25.0 27.0 28.0 29.0 30.0 31.0 32.0 32.0 33.0 34.0
17.0 18.0 19.0 20.0 21.0 24.0 25.0 27.0 28.0 29.0 30.0 31.0 32.0 32.0 33.0 34.0
17.0 20.0 21.0 20.0 21.0 24.0 25.0 27.0 28.0 28.0 30.0 31.0 31.0 31.0 32.0 33.0
17.0 22.0 22.0 20.0 21.0 24.0 25.0 26.0 28.0 28.0 30.0 31.0 31.0 31.0 32.0 33.0
17.0 20.0 20.0 20.0 21.0 24.0 25.0 26.0 27.0 28.0 29.0 30.0 30.0 30.0 31.0 32.0
17.0 20.0 20.0 20.0 21.0 23.0 23.0 24.0 25.0 26.0 27.0 28.0 29.0 29.0 30.0 31.0
17.0 20.0 20.0 20.0 21.0 22.0 22.0 23.0 24.0 25.0 26.0 27.0 28.0 28.0 29.0 30.0
18.0 18.0 18.0 18.0 21.0 21.0 21.0 21.0 21.0 21.0 21.0 20.0 19.0 20.0 20.0 20.0
18.0 18.0 18.0 18.0 20.0 20.0 20.0 20.0 19.0 16.0 19.0 18.0 18.0 18.0 18.0 18.0
18.0 18.0 18.0 18.0 18.0 18.0 18.0 18.0 17.0 17.0 17.0 16.0 16.0 16.0 16.0 16.0
18.0 18.0 18.0 18.0 17.0 17.0 17.0 17.0 16.0 16.0 16.0 15.0 15.0 15.0 15.0 15.0
18.0 18.0 18.0 18.0 16.0 16.0 16.0 16.0 15.0 15.0 15.0 14.0 14.0 14.0 14.0 14.0
18.0 18.0 18.0 16.0 13.0 13.0 13.0 13.0 12.0 12.0 12.0 11.0 11.0 11.0 11.0 11.0
16.0 16.0 16.0 14.0 11.0 11.0 11.0 11.0 11.0 11.0 11.0 9.0 9.0 9.0 9.0 9.0
15.0 15.0 15.0 13.0 10.0 10.0 10.0 10.0 10.0 10.0 10.0 8.0 8.0 8.0 8.0 8.0
</constant>
<constant cols="1" digits="0" name="rpmBins2" rows="16" units="RPM">
500.0
700.0
1200.0
1700.0
2200.0
2700.0
3200.0
3700.0
4200.0
4700.0
5200.0
5700.0
6200.0
6700.0
7200.0
7700.0
</constant>
<constant cols="1" digits="0" name="mapBins2" rows="16" units="kPa">
20.0
30.0
40.0
50.0
60.0
70.0
80.0
90.0
100.0
115.0
130.0
145.0
160.0
175.0
190.0
205.0
</constant>
</page>
<page number="3" size="64">
<constant digits="0" name="TrigAng" units="Deg">0.0</constant>
<constant digits="0" name="FixAng" units="Deg">0.0</constant>
<constant digits="0" name="CrankAng" units="Deg">5.0</constant>
<constant digits="0" name="TrigAngMul">4.0</constant>
<constant name="TrigEdge">"Leading"</constant>
<constant name="TrigSpeed">"Crank Speed"</constant>
<constant name="IgInv">"Going Low"</constant>
<constant name="oddfire">"Yes"</constant>
<constant name="TrigPattern">"Missing Tooth"</constant>
<constant digits="0" name="IdleAdvRPM" units="RPM">3200.0</constant>
<constant digits="1" name="IdleAdvCLT" units="C">-21.0</constant>
<constant digits="0" name="IdleDelayTime" units="sec">38.0</constant>
<constant digits="0" name="StgCycles" units="cycles">2.0</constant>
<constant name="dwellcont">"Dwell control"</constant>
<constant name="useDwellLim">"On"</constant>
<constant name="sparkMode">"Wasted Spark"</constant>
<constant name="dfcoEnabled">"Off"</constant>
<constant name="TrigFilter">"Off"</constant>
<constant name="ignCranklock">"Off"</constant>
<constant digits="1" name="dwellcrank" units="ms">4.5</constant>
<constant digits="1" name="dwellrun" units="ms">3.0</constant>
<constant digits="0" name="numteeth" units="teeth">36.0</constant>
<constant digits="0" name="onetwo" units="teeth">1.0</constant>
<constant digits="0" name="crankRPM" units="rpm">400.0</constant>
<constant digits="0" name="tpsflood" units="%">80.0</constant>
<constant digits="0" name="SoftRevLim" units="rpm">6500.0</constant>
<constant digits="0" name="SoftLimRetard" units="deg">20.0</constant>
<constant digits="1" name="SoftLimMax" units="s">2.0</constant>
<constant digits="0" name="HardRevLim" units="rpm">7000.0</constant>
<constant cols="1" digits="0" name="taeBins" rows="4" units="%/s">
80.0
270.0
490.0
880.0
</constant>
<constant cols="1" digits="0" name="taeRates" rows="4" units="%">
5.0
11.0
17.0
32.0
</constant>
<constant cols="1" digits="0" name="wueBins" rows="10" units="C">
-40.0
-26.0
-8.0
9.0
26.0
38.0
49.0
60.0
69.0
80.0
</constant>
<constant digits="0" name="dwellLim" units="ms">8.0</constant>
<constant cols="1" digits="0" name="dwellRates" rows="6" units="%">
110.0
105.0
100.0
100.0
91.0
85.0
</constant>
<constant cols="1" digits="0" name="iatRetBins" rows="6" units="C">
58.0
82.0
93.0
104.0
116.0
140.0
</constant>
<constant cols="1" digits="0" name="iatRetRates" rows="6" units="deg">
0.0
0.0
2.0
4.0
6.0
10.0
</constant>
<constant digits="0" name="dfcoRPM" units="RPM">1500.0</constant>
<constant digits="0" name="dfcoHyster" units="RPM">200.0</constant>
<constant digits="0" name="dfcoTPSThresh" units="%">1.0</constant>
<constant name="ignBypassEnable">"Off"</constant>
<constant name="ignBypassPin">"1"</constant>
<constant name="ignBypassHiLo">"LOW"</constant>
</page>
<page number="4" size="288">
<constant cols="16" digits="1" name="afrTable" rows="16" units="AFR">
14.7 14.7 14.7 14.7 15.0 15.1 15.1 14.8 14.7 14.7 14.7 14.7 14.7 14.7 14.7 14.7
14.7 14.7 14.7 14.7 15.0 15.1 15.1 14.8 14.7 14.7 14.7 14.7 14.7 14.7 14.7 14.7
14.7 14.7 14.7 14.7 15.0 15.1 15.1 14.8 14.7 14.7 14.7 14.7 14.7 14.7 14.7 14.7
14.7 14.7 14.7 14.7 14.9 15.0 15.0 14.8 14.7 14.7 14.7 14.6 14.5 14.5 14.4 14.4
14.7 14.7 14.7 14.7 14.8 14.9 14.9 14.7 14.6 14.5 14.4 14.3 14.2 14.0 14.0 14.0
14.7 14.7 14.7 14.7 14.7 14.9 14.9 14.7 14.5 14.3 14.1 13.9 13.8 13.6 13.6 13.5
14.3 14.3 14.3 14.7 14.7 14.7 14.7 14.5 14.1 13.8 13.8 13.8 13.7 13.5 13.5 13.4
14.2 14.2 14.2 14.7 14.7 14.7 14.7 14.3 13.9 13.6 13.6 13.6 13.4 13.2 13.2 13.1
14.1 14.1 14.2 14.5 14.5 14.4 14.2 13.9 13.5 13.2 13.1 13.0 13.0 12.9 12.9 12.9
14.1 14.1 14.2 14.3 14.1 14.0 13.9 13.6 13.3 13.1 13.0 13.0 12.9 12.9 12.9 12.9
14.1 14.1 14.2 14.1 13.7 13.6 13.6 13.3 13.1 13.0 13.0 12.9 12.9 12.8 12.8 12.8
14.0 14.0 14.0 13.7 13.4 13.4 13.3 13.1 13.0 12.9 12.9 12.9 12.8 12.8 12.8 12.8
13.7 13.7 13.7 12.9 12.8 12.9 12.9 12.8 12.8 12.8 12.8 12.8 12.8 12.8 12.8 12.8
13.4 13.4 13.4 12.9 12.8 12.8 12.8 12.7 12.7 12.7 12.7 12.7 12.7 12.7 12.7 12.7
13.1 13.1 13.1 12.8 12.8 12.8 12.7 12.6 12.6 12.6 12.6 12.6 12.6 12.6 12.6 12.6
12.8 12.8 12.8 12.8 12.8 12.7 12.6 12.5 12.5 12.5 12.5 12.5 12.5 12.5 12.5 12.5
</constant>
<constant cols="1" digits="0" name="rpmBinsAFR" rows="16" units="RPM">
500.0
700.0
900.0
1400.0
2000.0
2800.0
3600.0
4500.0
5200.0
5500.0
5800.0
6200.0
6500.0
6800.0
6900.0
7000.0
</constant>
<constant cols="1" digits="0" name="mapBinsAFR" rows="16" units="kPa">
15.0
25.0
30.0
35.0
40.0
45.0
50.0
55.0
60.0
65.0
70.0
75.0
85.0
90.0
95.0
100.0
</constant>
</page>
<page number="5" size="64">
<constant name="egoAlgorithm">"No correction"</constant>
<constant name="egoType">"Wide Band"</constant>
<constant name="boostEnabled">"Off"</constant>
<constant name="vvtEnabled">"Off"</constant>
<constant name="boostCutType">"Off"</constant>
<constant digits="0" name="egoKP" units="%">100.0</constant>
<constant digits="0" name="egoKI" units="%">20.0</constant>
<constant digits="0" name="egoKD" units="%">0.0</constant>
<constant digits="0" name="egoTemp" units="C">70.0</constant>
<constant digits="0" name="egoCount">16.0</constant>
<constant digits="0" name="egoDelta" units="%">1.0</constant>
<constant digits="0" name="egoLimit">15.0</constant>
<constant digits="1" name="ego_min" units="AFR">9.0</constant>
<constant digits="1" name="ego_max" units="AFR">19.0</constant>
<constant digits="0" name="ego_sdelay" units="sec">15.0</constant>
<constant digits="0" name="egoRPM" units="rpm">1200.0</constant>
<constant digits="0" name="egoTPSMax" units="%">70.0</constant>
<constant digits="0" name="egoLoadMax" units="%">90.0</constant>
<constant digits="0" name="egoLoadMin" units="%">20.0</constant>
<constant cols="1" digits="1" name="brvBins" rows="6" units="V">
6.6
9.4
12.1
14.8
16.9
20.3
</constant>
<constant cols="1" digits="0" name="injBatRates" rows="6" units="%">
110.0
106.0
100.0
100.0
100.0
98.0
</constant>
<constant cols="1" digits="0" name="airDenBins" rows="9" units="C">
-40.0
-20.0
0.0
20.0
35.0
50.0
60.0
90.0
120.0
</constant>
<constant cols="1" digits="0" name="airDenRates" rows="9" units="%">
126.0
116.0
107.0
100.0
95.0
91.0
88.0
81.0
74.0
</constant>
<constant digits="0" name="boostFreq" units="Hz">30.0</constant>
<constant digits="0" name="vvtFreq" units="Hz">300.0</constant>
<constant digits="0" name="idleFreq" units="Hz">120.0</constant>
<constant name="launchPin">"1"</constant>
<constant name="launchEnable">"No"</constant>
<constant name="launchHiLo">"LOW"</constant>
<constant digits="0" name="lnchSoftLim" units="rpm">3500.0</constant>
<constant digits="0" name="lnchRetard" units="deg">15.0</constant>
<constant digits="0" name="lnchHardLim" units="rpm">4000.0</constant>
<constant digits="0" name="lnchFuelAdd" units="%">255.0</constant>
<constant digits="0" name="idleKP" units="%">10.0</constant>
<constant digits="0" name="idleKI" units="%">0.0</constant>
<constant digits="0" name="idleKD" units="%">5.0</constant>
<constant digits="0" name="boostLimit" units="kPa">120.0</constant>
<constant digits="0" name="boostKP" units="%">100.0</constant>
<constant digits="0" name="boostKI" units="%">0.0</constant>
<constant digits="0" name="boostKD" units="%">0.0</constant>
<constant name="lnchPullRes">"Float"</constant>
<constant name="unused6-60">"ONE"</constant>
<constant digits="0" name="unused6-61" units="RPM">4500.0</constant>
<constant digits="0" name="unused6-62" units="RPM">3000.0</constant>
<constant digits="0" name="unused6-63" units="RPM">6000.0</constant>
</page>
<page number="6" size="64">
<constant cols="1" digits="0" name="iacCLValues" rows="10" units="RPM">
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
</constant>
<constant cols="1" digits="0" name="iacOLStepVal" rows="10" units="Steps">
369.0
327.0
291.0
246.0
213.0
168.0
123.0
87.0
45.0
0.0
</constant>
<constant cols="1" digits="0" name="iacOLPWMVal" rows="10" units="Duty %">
43.0
39.0
33.0
29.0
24.0
20.0
17.0
17.0
16.0
9.0
</constant>
<constant cols="1" digits="0" name="iacBins" rows="10" units="C">
-38.0
-19.0
1.0
17.0
34.0
50.0
63.0
79.0
98.0
143.0
</constant>
<constant cols="1" digits="0" name="iacCrankSteps" rows="4" units="Steps">
123.0
579.0
390.0
300.0
</constant>
<constant cols="1" digits="0" name="iacCrankDuty" rows="4" units="Duty %">
27.0
31.0
44.0
60.0
</constant>
<constant cols="1" digits="0" name="iacCrankBins" rows="4" units="C">
-28.0
6.0
44.0
76.0
</constant>
<constant name="iacAlgorithm">"None"</constant>
<constant name="iacStepTime">"3"</constant>
<constant name="iacChannels">"1"</constant>
<constant name="iacPWMdir">"Normal"</constant>
<constant digits="0" name="iacFastTemp" units="C">20.0</constant>
<constant digits="0" name="iacStepHome" units="Steps">240.0</constant>
<constant digits="0" name="iacStepHyster" units="Steps">4.0</constant>
<constant name="fanInv">"No"</constant>
<constant name="fanEnable">"Off"</constant>
<constant name="unused7-55b">"No"</constant>
<constant name="unused7-55c">"No"</constant>
<constant name="unused7-55d">"No"</constant>
<constant name="unused7-55e">"No"</constant>
<constant name="unused7-55f">"No"</constant>
<constant digits="0" name="fanSP" units="C">75.0</constant>
<constant digits="0" name="fanHyster" units="C">2.0</constant>
<constant digits="0" name="fanFreq" units="Hz">6.0</constant>
<constant cols="1" digits="0" name="fanPWMBins" rows="4" units="C">
60.0
-20.0
-40.0
158.0
</constant>
</page>
<page number="7" size="160">
<constant cols="8" digits="0" name="boostTable" rows="8" units="kPa">
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
10.0 10.0 10.0 10.0 10.0 10.0 10.0 10.0
10.0 10.0 10.0 10.0 10.0 10.0 10.0 10.0
26.0 26.0 26.0 26.0 26.0 26.0 26.0 26.0
26.0 26.0 26.0 26.0 26.0 26.0 26.0 26.0
40.0 40.0 40.0 40.0 40.0 40.0 40.0 40.0
40.0 40.0 40.0 40.0 40.0 40.0 40.0 40.0
40.0 40.0 40.0 40.0 40.0 40.0 40.0 40.0
</constant>
<constant cols="1" digits="0" name="rpmBinsBoost" rows="8" units="RPM">
1000.0
2000.0
3000.0
3800.0
4500.0
5300.0
6000.0
6800.0
</constant>
<constant cols="1" digits="0" name="tpsBinsBoost" rows="8" units="TPS">
0.0
10.0
20.0
40.0
50.0
60.0
80.0
100.0
</constant>
<constant cols="8" digits="0" name="vvtTable" rows="8" units="%">
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
11.0 10.0 6.0 6.0 6.0 6.0 7.0 7.0
24.0 22.0 20.0 18.0 18.0 18.0 19.0 20.0
32.0 30.0 29.0 28.0 27.0 27.0 27.0 29.0
39.0 39.0 38.0 38.0 37.0 37.0 36.0 36.0
46.0 47.0 47.0 46.0 46.0 45.0 45.0 43.0
56.0 56.0 56.0 55.0 55.0 55.0 55.0 56.0
68.0 68.0 69.0 69.0 69.0 69.0 69.0 69.0
</constant>
<constant cols="1" digits="0" name="rpmBinsVVT" rows="8" units="RPM">
1000.0
2000.0
3000.0
3800.0
4500.0
5300.0
6000.0
6800.0
</constant>
<constant cols="1" digits="0" name="tpsBinsVVT" rows="8" units="TPS">
0.0
10.0
20.0
40.0
50.0
60.0
80.0
100.0
</constant>
</page>
<settings Comment="These setting are only used if this msq is opened without a project.">
<setting name="SPEED_DENSITY" value="SPEED_DENSITY"/>
<setting name="CAN_COMMANDS_OFF" value="CAN_COMMANDS_OFF"/>
<setting name="CELSIUS" value="CELSIUS"/>
</settings>
<userComments Comment="These are user comments that can be related to a particular setting or dialog."/>
</msq>

View File

@ -1,126 +0,0 @@
#include <avr/interrupt.h>
#include <avr/io.h>
//#define clockspeed 16000000
/*
unsigned long schedule1Duration; //How long (uS) after calling the start callback to we call the end callback
unsigned long schedule2Duration;
void (*schedule1StartCallback)(); //Start Callback function for schedule1
void (*schedule2StartCallback)();
void (*schedule1EndCallback)(); //End Callback function for schedule1
void (*schedule2EndCallback)();
*/
void initialiseSchedulers();
void setFuelSchedule1(void (*startCallback)(), unsigned long timeout, unsigned long duration, void(*endCallback)());
void setSchedule2(void (*startCallback)(), unsigned long timeout, unsigned long duration, void(*endCallback)());
enum ScheduleStatus {OFF, PENDING, RUNNING};
struct Schedule {
unsigned long duration;
ScheduleStatus Status;
void (*StartCallback)(); //Start Callback function for schedule1
void (*EndCallback)(); //Start Callback function for schedule1
};
Schedule fuelSchedule1;
Schedule fuelSchedule2;
Schedule ignitionSchedule1;
Schedule ignitionSchedule2;
void setup()
{
Serial.begin(9600);
initialiseSchedulers();
}
void loop()
{
unsigned long curTime = micros();
unsigned long uSInFuture = 50000; //50mS in the future
unsigned long expectedTime = curTime + uSInFuture;
setFuelSchedule1(callback, uSInFuture, uSInFuture, callback);
Serial.print("Expected time: ");
Serial.println(expectedTime);
delay(1000);
}
void callback()
{
unsigned long arrivedTime = micros();
Serial.print("Arrived time: ");
Serial.println(arrivedTime);
}
void initialiseSchedulers()
{
// Much help in this from http://arduinomega.blogspot.com.au/2011/05/timer2-and-overflow-interrupt-lets-get.html
//Fuel Schedules, which uses timer 3
TCCR3B = 0x00; //Disbale Timer3 while we set it up
TCNT3 = 0; //Reset Timer Count
TIFR3 = 0x00; //Timer3 INT Flag Reg: Clear Timer Overflow Flag
TCCR3A = 0x00; //Timer3 Control Reg A: Wave Gen Mode normal
TCCR3B = (1 << CS12); //Timer3 Control Reg B: Timer Prescaler set to 256. Refer to http://www.instructables.com/files/orig/F3T/TIKL/H3WSA4V7/F3TTIKLH3WSA4V7.jpg
fuelSchedule1.Status = OFF;
fuelSchedule2.Status = OFF;
//Ignition Schedules, which uses timer 3
TCCR4B = 0x00; //Disbale Timer3 while we set it up
TCNT4 = 0; //Reset Timer Count
TIFR4 = 0x00; //Timer3 INT Flag Reg: Clear Timer Overflow Flag
TCCR4A = 0x00; //Timer3 Control Reg A: Wave Gen Mode normal
TCCR4B = (1 << CS12); //Timer3 Control Reg B: Timer Prescaler set to 256. Refer to http://www.instructables.com/files/orig/F3T/TIKL/H3WSA4V7/F3TTIKLH3WSA4V7.jpg
ignitionSchedule1.Status = OFF;
ignitionSchedule2.Status = OFF;
}
/*
These 4 function turn a schedule on, provides the time to start and the duration and gives it callback functions.
All 4 functions operate the same, just on different schedules
Args:
startCallback: The function to be called once the timeout is reached
timeout: The number of uS in the future that the callback should be triggered
duration: The number of uS after startCallback is called before endCallback is called
endCallback: This function is called once the duration time has been reached
*/
void setFuelSchedule1(void (*startCallback)(), unsigned long timeout, unsigned long duration, void(*endCallback)())
{
if(fuelSchedule1.Status == RUNNING) { return; } //Check that we're not already part way through a schedule
//We need to calculate the value to reset the timer to (preload) in order to achieve the desired overflow time
//As the timer is ticking every 16uS (Time per Tick = (Prescale)*(1/Frequency))
unsigned int absoluteTimeout = TCNT3 + (timeout / 16); //Each tick occurs every 16uS with the 256 prescaler, so divide the timeout by 16 to get ther required number of ticks. Add this to the current tick count to get the target time. This will automatically overflow as required
OCR3A = absoluteTimeout;
fuelSchedule1.duration = duration;
fuelSchedule1.StartCallback = startCallback; //Name the start callback function
fuelSchedule1.EndCallback = endCallback; //Name the start callback function
fuelSchedule1.Status = PENDING; //Turn this schedule on
TIMSK3 |= (1 << OCIE3A); //Turn on the compare unit (ie turn on the interrupt)
}
//Timer3A (schedule 1) Overflow Compare Vector
//This needs to call the callback function if one has been provided and rest the timer
ISR(TIMER3_COMPA_vect)
{
if (fuelSchedule1.Status == PENDING) //Check to see if this schedule is turn on
{
fuelSchedule1.StartCallback();
fuelSchedule1.Status = RUNNING; //Set the status to be in progress (ie The start callback has been called, but not the end callback)
unsigned int absoluteTimeout = TCNT3 + (fuelSchedule1.duration / 16);
OCR3A = absoluteTimeout;
}
else if (fuelSchedule1.Status == RUNNING)
{
fuelSchedule1.EndCallback();
fuelSchedule1.Status = OFF; //Turn off the schedule
TIMSK3 &= ~(1 << OCIE3A); //Turn off this output compare unit (This simply writes 0 to the OCIE3A bit of TIMSK3)
}
TIFR3 = 0x00; //Timer3 INT Flag Reg: Clear Timer Overflow Flag. I'm not 100% sure this is necessary, but better to be safe
}

View File

@ -1,157 +0,0 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<msq xmlns="http://www.msefi.com/:msq">
<bibliography author="TunerStudio MS 2.0.6 - EFI Analytics, Inc." tuneComment=" &lt;p style=&quot;margin-top: 0&quot;&gt;&lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;/p&gt;&lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; " writeDate="Wed Sep 18 16:45:09 EST 2013"/>
<versionInfo fileFormat="4.0" firmwareInfo="Bowling &amp; Grippo MS1 Base Code 20" nPages="2" signature="20"/>
<page number="0" size="125">
<constant digits="0" name="taeColdM" units="%">0.0</constant>
<constant digits="0" name="egoRPM" units="RPM">0.0</constant>
<constant cols="1" digits="0" name="wueBins" rows="10" units="%">
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
</constant>
<constant digits="1" name="injOpen" units="ms">0.0</constant>
<constant digits="1" name="taeColdA" units="ms">0.0</constant>
<constant name="egoType">"Narrow band"</constant>
<constant name="mapType">"115 kPa"</constant>
<constant name="alternate">"Alternating"</constant>
<constant digits="0" name="egoDelta" units="%">0.0</constant>
<constant digits="1" name="crankCold" units="ms">0.2</constant>
<constant digits="1" name="primePulse" units="ms">0.0</constant>
<constant digits="0" name="divider">2.0</constant>
<constant name="twoStroke">"Four-stroke"</constant>
<constant digits="0" name="egoTemp" units="°C">-39.96</constant>
<constant cols="8" digits="0" name="veTable" rows="8" units="%">
15.0 20.0 25.0 25.0 27.0 30.0 34.0 39.0
20.0 21.0 28.0 33.0 55.0 37.0 25.0 44.0
22.0 23.0 35.0 49.0 55.0 44.0 40.0 47.0
28.0 33.0 47.0 60.0 61.0 60.0 85.0 55.0
35.0 45.0 57.0 60.0 68.0 75.0 85.0 68.0
45.0 55.0 68.0 63.0 75.0 88.0 92.0 79.0
53.0 68.0 77.0 88.0 90.0 94.0 96.0 90.0
65.0 75.0 85.0 96.0 98.0 100.0 101.0 99.0
</constant>
<constant digits="0" name="aseCount">13.0</constant>
<constant digits="3" name="tpsThresh" units="v/s">0.0</constant>
<constant digits="1" name="reqFuel" units="ms">13.4</constant>
<constant digits="1" name="taeBins1" units="ms">0.2</constant>
<constant digits="1" name="taeBins2" units="ms">0.2</constant>
<constant digits="1" name="taeBins3" units="ms">0.2</constant>
<constant name="nCylinders">"4"</constant>
<constant digits="0" name="tdePct" units="%">0.0</constant>
<constant name="algorithm">"Speed Density"</constant>
<constant digits="1" name="taeBins4" units="ms">0.0</constant>
<constant digits="1" name="taeTime" units="ms">0.0</constant>
<constant cols="1" digits="1" name="taeBins" rows="4" units="ms">
0.2
0.2
0.2
0.0
</constant>
<constant digits="0" name="injOCfuel" units="ms">0.0</constant>
<constant name="cltType">"GM"</constant>
<constant digits="3" name="egoSwitch" units="v">0.0</constant>
<constant cols="1" digits="0" name="mapBins" rows="8" units="kPa">
20.0
30.0
40.0
50.0
60.0
70.0
88.0
100.0
</constant>
<constant digits="0" name="asePct" units="%">12.0</constant>
<constant name="baroCorr">"Off"</constant>
<constant cols="1" digits="0" name="rpmBins" rows="8" units="RPM">
700.0
1200.0
2000.0
3000.0
4000.0
4900.0
5500.0
6500.0
</constant>
<constant digits="0" name="injPwmP" units="%">0.0</constant>
<constant digits="0" name="egoCount">0.0</constant>
<constant digits="1" name="crankHot" units="ms">3.5</constant>
<constant digits="1" name="fastIdleT" units="°C">59.94</constant>
<constant digits="2" name="battFac" units="ms/v">0.0</constant>
<constant name="engineType">"Even fire"</constant>
<constant name="nInjectors">"4"</constant>
<constant digits="0" name="egoLimit" units="%">0.0</constant>
<constant digits="0" name="rpmk">3000.0</constant>
<constant name="injType">"Port"</constant>
<constant digits="1" name="injPwmT" units="ms">0.0</constant>
<constant name="matType">"GM"</constant>
</page>
<page number="1" size="125">
<constant cols="8" digits="0" name="advTable1" rows="8" units="deg">
10.0 20.0 25.0 27.0 32.0 35.0 36.0 40.0
10.0 21.0 23.0 27.0 32.0 35.0 38.0 40.0
12.0 23.0 23.0 28.0 32.0 35.0 38.0 40.0
12.0 15.0 23.0 28.0 34.0 35.0 38.0 40.0
10.0 15.0 23.0 28.0 35.0 36.0 38.0 40.0
10.0 15.0 23.0 28.0 35.0 36.0 38.0 40.0
10.0 15.0 23.0 28.0 35.0 36.0 38.0 40.0
10.0 15.0 23.0 28.0 35.0 36.0 38.0 40.0
</constant>
<constant cols="1" digits="0" name="rpmBins2" rows="8" units="RPM">
500.0
1200.0
2000.0
3000.0
3500.0
4200.0
5000.0
6000.0
</constant>
<constant digits="1" name="IdleAdvCLT" units="C">-20.535</constant>
<constant name="TrigCrank">"Time Based"</constant>
<constant digits="1" name="dwellrun" units="ms">4.5</constant>
<constant digits="0" name="IdleAdvRPM" units="RPM">3200.0</constant>
<constant digits="0" name="onetwo" units="teeth">1.0</constant>
<constant name="oddfire">"Yes"</constant>
<constant digits="0" name="IdleAdvTPS" units="ADC">27.0</constant>
<constant digits="0" name="IgHold">10.0</constant>
<constant cols="1" digits="0" name="mapBins2" rows="8" units="kPa">
15.0
20.0
30.0
45.0
65.0
75.0
86.0
100.0
</constant>
<constant digits="1" name="dwellcrank" units="ms">4.0</constant>
<constant digits="0" name="Trim" units="Deg">13.024</constant>
<constant digits="0" name="CrankAng" units="Deg">4.0832</constant>
<constant name="dwellcont">"Dwell control"</constant>
<constant digits="0" name="numteeth" units="teeth">12.0</constant>
<constant digits="0" name="TrigAng" units="Deg">176.0</constant>
<constant digits="0" name="StgCycles" units="cycles">40.0</constant>
<constant digits="0" name="IdleAdv" units="Deg">-1.9008</constant>
<constant digits="0" name="IdleDelayTime" units="sec">38.0</constant>
<constant name="IgInv">"No"</constant>
<constant digits="0" name="FixAng" units="Deg">-9.9968</constant>
<constant name="Trig_plus">"+22.5"</constant>
</page>
<settings Comment="These setting are only used if this msq is opened without a project.">
<setting name="NARROW_BAND_EGO" value="NARROW_BAND_EGO"/>
<setting name="CELSIUS" value="CELSIUS"/>
<setting name="SPEED_DENSITY" value="SPEED_DENSITY"/>
<setting name="MPX4250" value="MPX4250"/>
</settings>
<userComments Comment="These are user comments that can be related to a particular setting or dialog.">
<userComment name="IgHold" value=""/>
</userComments>
</msq>

View File

@ -1,229 +0,0 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<msq xmlns="http://www.msefi.com/:msq">
<bibliography author="TunerStudio MS 2.6.14 - EFI Analytics, Inc." tuneComment=" &#10;&#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; " writeDate="Wed Jan 28 17:03:18 EST 2015"/>
<versionInfo fileFormat="4.0" firmwareInfo="" nPages="2" signature="20"/>
<page>
<pcVariable name="tsCanId">"0"</pcVariable>
<pcVariable cols="1" digits="1" name="wueAfrTargetOffset" rows="10" units=":1">
-1.5
-1.1
-0.8
-0.6
-0.5
-0.4
-0.3
-0.2
-0.1
0.0
</pcVariable>
<pcVariable cols="1" digits="0" name="wueAnalRecommend" rows="10" units="%">
199.0
158.0
145.0
131.0
127.0
119.0
119.0
119.0
109.0
101.0
</pcVariable>
<pcVariable cols="1" digits="0" name="tempTable" rows="10" units="%">
-40.0
-29.0
-18.0
-7.0
4.0
16.0
27.0
38.0
54.0
71.0
</pcVariable>
</page>
<page number="0" size="128">
<constant cols="8" digits="0" name="veTable" rows="8" units="%">
15.0 20.0 25.0 25.0 27.0 30.0 34.0 39.0
20.0 21.0 28.0 33.0 50.0 37.0 25.0 44.0
22.0 23.0 35.0 49.0 55.0 40.0 40.0 47.0
28.0 33.0 47.0 60.0 60.0 60.0 85.0 55.0
35.0 45.0 57.0 60.0 68.0 75.0 85.0 68.0
45.0 55.0 68.0 63.0 75.0 88.0 92.0 79.0
53.0 68.0 77.0 88.0 90.0 94.0 96.0 90.0
65.0 75.0 85.0 96.0 98.0 100.0 101.0 99.0
</constant>
<constant cols="1" digits="0" name="rpmBins" rows="8" units="RPM">
700.0
1200.0
2000.0
3000.0
4000.0
4900.0
5500.0
6500.0
</constant>
<constant cols="1" digits="0" name="tpsBins" rows="8" units="TPS">
20.0
30.0
40.0
50.0
60.0
70.0
88.0
100.0
</constant>
<constant digits="1" name="crankCold" units="ms">0.2</constant>
<constant digits="1" name="crankHot" units="ms">3.5</constant>
<constant digits="0" name="asePct" units="%">15.0</constant>
<constant digits="0" name="aseCount" units="s">13.0</constant>
<constant cols="1" digits="0" name="wueBins" rows="10" units="%">
199.0
158.0
145.0
135.0
126.0
120.0
119.0
118.0
114.0
101.0
</constant>
<constant digits="1" name="unused1" units="ms">0.2</constant>
<constant digits="1" name="unused2" units="ms">0.2</constant>
<constant digits="1" name="unused3" units="ms">0.2</constant>
<constant digits="1" name="unused4" units="ms">0.0</constant>
<constant digits="1" name="taeColdA" units="ms">0.0</constant>
<constant digits="0" name="tpsThresh" units="%/s">80.0</constant>
<constant digits="1" name="taeTime" units="ms">2.0</constant>
<constant digits="0" name="tdePct" units="%">80.0</constant>
<constant digits="0" name="egoTemp" units="°C">-39.96</constant>
<constant digits="0" name="egoCount">0.0</constant>
<constant digits="0" name="egoDelta" units="%">0.0</constant>
<constant digits="0" name="egoLimit" units="%">0.0</constant>
<constant digits="1" name="reqFuel" units="ms">14.9</constant>
<constant digits="0" name="divider">1.0</constant>
<constant name="alternate">"Simultaneous"</constant>
<constant digits="1" name="injOpen" units="ms">1.0</constant>
<constant digits="0" name="injOCfuel" units="ms">0.0</constant>
<constant digits="0" name="injPwmP" units="%">0.0</constant>
<constant digits="1" name="injPwmT" units="ms">0.0</constant>
<constant digits="2" name="battFac" units="ms/v">0.0</constant>
<constant digits="0" name="rpmk">12000.0</constant>
<constant name="mapType">"115 kPa"</constant>
<constant name="twoStroke">"Four-stroke"</constant>
<constant name="injType">"Port"</constant>
<constant name="nCylinders">"1"</constant>
<constant name="cltType">"GM"</constant>
<constant name="matType">"GM"</constant>
<constant name="nInjectors">"1"</constant>
<constant name="engineType">"Even fire"</constant>
<constant name="egoType">"Narrow band"</constant>
<constant name="algorithm">"Alpha-N"</constant>
<constant name="baroCorr">"Off"</constant>
<constant digits="1" name="primePulse" units="ms">1.5</constant>
<constant digits="0" name="egoRPM" units="RPM">0.0</constant>
<constant digits="1" name="fastIdleT" units="°C">59.94</constant>
<constant digits="3" name="egoSwitch" units="v">0.0</constant>
<constant digits="0" name="taeColdM" units="%">0.0</constant>
<constant digits="0" name="tpsMin" units="ADC">9.0</constant>
<constant digits="0" name="tpsMax" units="ADC">72.0</constant>
</page>
<page number="1" size="128">
<constant cols="8" digits="0" name="advTable1" rows="8" units="deg">
10.0 20.0 25.0 27.0 32.0 38.0 38.0 40.0
10.0 21.0 23.0 27.0 32.0 35.0 38.0 40.0
12.0 23.0 23.0 28.0 32.0 35.0 38.0 40.0
12.0 15.0 23.0 28.0 34.0 35.0 38.0 40.0
10.0 15.0 23.0 28.0 35.0 36.0 38.0 40.0
10.0 15.0 23.0 28.0 35.0 36.0 38.0 40.0
10.0 15.0 23.0 28.0 35.0 36.0 38.0 40.0
10.0 15.0 23.0 28.0 35.0 36.0 38.0 40.0
</constant>
<constant cols="1" digits="0" name="rpmBins2" rows="8" units="RPM">
500.0
1200.0
2000.0
3000.0
3500.0
4200.0
5000.0
6000.0
</constant>
<constant cols="1" digits="0" name="tpsBins2" rows="8" units="TPS">
10.0
20.0
35.0
50.0
65.0
75.0
86.0
100.0
</constant>
<constant digits="0" name="TrigAng" units="Deg">176.0</constant>
<constant digits="0" name="FixAng" units="Deg">0.0</constant>
<constant digits="0" name="Trim" units="Deg">13.024</constant>
<constant digits="0" name="CrankAng" units="Deg">11.6</constant>
<constant digits="0" name="IgHold">10.0</constant>
<constant name="Trig_plus">"+45"</constant>
<constant name="TrigCrank">"Time Based"</constant>
<constant name="IgInv">"No"</constant>
<constant name="oddfire">"Yes"</constant>
<constant digits="0" name="IdleAdv" units="Deg">-1.9008</constant>
<constant digits="0" name="IdleAdvTPS" units="ADC">65.0</constant>
<constant digits="0" name="IdleAdvRPM" units="RPM">3200.0</constant>
<constant digits="1" name="IdleAdvCLT" units="C">-20.535</constant>
<constant digits="0" name="IdleDelayTime" units="sec">38.0</constant>
<constant digits="0" name="StgCycles" units="cycles">1.0</constant>
<constant name="dwellcont">"Dwell control"</constant>
<constant digits="1" name="dwellcrank" units="ms">4.5</constant>
<constant digits="1" name="dwellrun" units="ms">4.0</constant>
<constant digits="0" name="numteeth" units="teeth">36.0</constant>
<constant digits="0" name="onetwo" units="teeth">1.0</constant>
<constant digits="0" name="crankRPM" units="rpm">300.0</constant>
<constant digits="0" name="tpsflood" units="%">70.0</constant>
<constant digits="0" name="SoftRevLim" units="rpm">6000.0</constant>
<constant digits="0" name="SoftLimRetard" units="deg">14.9952</constant>
<constant digits="1" name="SoftLimMax" units="s">2.0</constant>
<constant digits="0" name="HardRevLim" units="rpm">6500.0</constant>
<constant cols="1" digits="0" name="taeBins" rows="4" units="%/s">
80.0
200.0
520.0
890.0
</constant>
<constant cols="1" digits="0" name="taeRates" rows="4" units="%">
18.0
24.0
33.0
42.0
</constant>
<constant cols="1" digits="0" name="wueRates" rows="10" units="C">
0.0
11.0
22.0
33.0
44.0
56.0
67.0
78.0
94.0
111.0
</constant>
<constant digits="0" name="unused121" units="none">0.0</constant>
<constant digits="0" name="unused122" units="none">0.0</constant>
<constant digits="0" name="unused123" units="none">0.0</constant>
<constant digits="0" name="unused124" units="none">0.0</constant>
<constant digits="0" name="unused125" units="none">0.0</constant>
<constant digits="0" name="unused126" units="none">0.0</constant>
<constant digits="0" name="unused127" units="none">0.0</constant>
</page>
<settings Comment="These setting are only used if this msq is opened without a project.">
<setting name="NARROW_BAND_EGO" value="NARROW_BAND_EGO"/>
<setting name="CELSIUS" value="CELSIUS"/>
<setting name="ALPHA_N" value="ALPHA_N"/>
<setting name="MPX4250" value="MPX4250"/>
</settings>
<userComments Comment="These are user comments that can be related to a particular setting or dialog.">
<userComment name="SoftRevLim" value=""/>
</userComments>
</msq>

View File

@ -1,278 +0,0 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<msq xmlns="http://www.msefi.com/:msq">
<bibliography author="TunerStudio MS 2.6.14 - EFI Analytics, Inc." tuneComment=" &#10;&#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; &#10; " writeDate="Tue Feb 17 16:32:50 EST 2015"/>
<versionInfo fileFormat="4.0" firmwareInfo="Bowling &amp; Grippo MS1 Base Code 20" nPages="3" signature="20"/>
<page>
<pcVariable name="tsCanId">"0"</pcVariable>
<pcVariable cols="1" digits="1" name="wueAfrTargetOffset" rows="10" units=":1">
-1.5
-1.1
-0.8
-0.6
-0.5
-0.4
-0.3
-0.2
-0.1
0.0
</pcVariable>
<pcVariable cols="1" digits="0" name="wueAnalRecommend" rows="10" units="%">
199.0
158.0
145.0
135.0
126.0
120.0
119.0
118.0
114.0
101.0
</pcVariable>
<pcVariable cols="1" digits="0" name="tempTable" rows="10" units="%">
-40.0
-29.0
-18.0
-7.0
4.0
16.0
27.0
38.0
54.0
71.0
</pcVariable>
</page>
<page number="0" size="128">
<constant cols="8" digits="0" name="veTable" rows="8" units="%">
27.0 27.0 27.0 27.0 27.0 27.0 27.0 27.0
29.0 32.0 35.0 36.0 36.0 36.0 36.0 36.0
35.0 42.0 45.0 46.0 46.0 46.0 46.0 46.0
46.0 53.0 55.0 56.0 56.0 56.0 55.0 55.0
59.0 64.0 65.0 65.0 65.0 65.0 65.0 65.0
71.0 74.0 75.0 75.0 75.0 75.0 75.0 74.0
90.0 91.0 92.0 92.0 92.0 92.0 92.0 91.0
102.0 103.0 103.0 104.0 103.0 103.0 103.0 103.0
</constant>
<constant cols="1" digits="0" name="rpmBins" rows="8" units="RPM">
700.0
1200.0
2000.0
3000.0
4000.0
4900.0
5500.0
6500.0
</constant>
<constant cols="1" digits="0" name="tpsBins" rows="8" units="TPS">
20.0
30.0
40.0
50.0
60.0
70.0
88.0
100.0
</constant>
<constant digits="1" name="crankCold" units="ms">6.5</constant>
<constant digits="1" name="crankHot" units="ms">3.5</constant>
<constant digits="0" name="asePct" units="%">15.0</constant>
<constant digits="0" name="aseCount" units="s">13.0</constant>
<constant cols="1" digits="0" name="wueBins" rows="10" units="%">
162.0
152.0
143.0
135.0
126.0
120.0
119.0
118.0
114.0
101.0
</constant>
<constant digits="0" name="crankingPct" units="%">25.0</constant>
<constant digits="1" name="unused96" units="ms">0.0</constant>
<constant digits="1" name="unused97" units="ms">0.0</constant>
<constant digits="1" name="taeColdA" units="ms">0.0</constant>
<constant digits="0" name="tpsThresh" units="%/s">90.0</constant>
<constant digits="0" name="taeTime" units="ms">200.0</constant>
<constant digits="0" name="tdePct" units="%">80.0</constant>
<constant digits="1" name="unused102" units="ms">0.0</constant>
<constant digits="1" name="unused103" units="ms">0.0</constant>
<constant digits="1" name="unused104" units="ms">0.0</constant>
<constant digits="1" name="unused105" units="ms">0.0</constant>
<constant digits="1" name="reqFuel" units="ms">6.2</constant>
<constant digits="0" name="divider">1.0</constant>
<constant name="alternate">"Alternating"</constant>
<constant digits="1" name="injOpen" units="ms">1.0</constant>
<constant digits="0" name="injOCfuel" units="ms">0.0</constant>
<constant digits="0" name="injPwmP" units="%">0.0</constant>
<constant digits="1" name="injPwmT" units="ms">0.0</constant>
<constant digits="2" name="battFac" units="ms/v">0.0</constant>
<constant digits="0" name="rpmk">3000.0</constant>
<constant name="mapType">"250 kPa"</constant>
<constant name="twoStroke">"Four-stroke"</constant>
<constant name="injType">"Port"</constant>
<constant name="nCylinders">"4"</constant>
<constant name="cltType">"GM"</constant>
<constant name="matType">"GM"</constant>
<constant name="nInjectors">"4"</constant>
<constant name="engineType">"Even fire"</constant>
<constant name="egoType1">"Narrow band"</constant>
<constant name="algorithm">"Speed Density"</constant>
<constant name="baroCorr">"Off"</constant>
<constant digits="1" name="primePulse" units="ms">1.5</constant>
<constant digits="0" name="unused120" units="RPM">0.0</constant>
<constant digits="1" name="fastIdleT" units="°C">59.94</constant>
<constant digits="3" name="egoSwitch" units="v">0.0</constant>
<constant digits="0" name="taeColdM" units="%">0.0</constant>
<constant digits="0" name="tpsMin" units="ADC">0.0</constant>
<constant digits="0" name="tpsMax" units="ADC">252.0</constant>
</page>
<page number="1" size="128">
<constant cols="8" digits="0" name="advTable1" rows="8" units="deg">
10.0 20.0 25.0 27.0 32.0 38.0 38.0 40.0
10.0 21.0 23.0 27.0 32.0 35.0 38.0 40.0
12.0 23.0 23.0 28.0 32.0 35.0 38.0 40.0
12.0 15.0 23.0 28.0 27.0 28.0 31.0 33.0
10.0 15.0 19.0 24.0 24.0 25.0 27.0 29.0
10.0 15.0 13.0 18.0 18.0 19.0 21.0 23.0
10.0 15.0 12.0 17.0 17.0 18.0 20.0 22.0
10.0 15.0 15.0 17.0 17.0 18.0 20.0 23.0
</constant>
<constant cols="1" digits="0" name="rpmBins2" rows="8" units="RPM">
500.0
1200.0
2000.0
3000.0
3500.0
4200.0
5000.0
6000.0
</constant>
<constant cols="1" digits="0" name="tpsBins2" rows="8" units="TPS">
10.0
20.0
35.0
50.0
65.0
75.0
86.0
100.0
</constant>
<constant digits="0" name="TrigAng" units="Deg">244.0</constant>
<constant digits="0" name="FixAng" units="Deg">0.0</constant>
<constant digits="0" name="Trim" units="Deg">13.024</constant>
<constant digits="0" name="CrankAng" units="Deg">11.6</constant>
<constant digits="0" name="IgHold">10.0</constant>
<constant name="Trig_plus">"+45"</constant>
<constant name="TrigCrank">"Time Based"</constant>
<constant name="IgInv">"No"</constant>
<constant name="oddfire">"Yes"</constant>
<constant digits="0" name="IdleAdv" units="Deg">-1.9008</constant>
<constant digits="0" name="IdleAdvTPS" units="ADC">65.0</constant>
<constant digits="0" name="IdleAdvRPM" units="RPM">3200.0</constant>
<constant digits="1" name="IdleAdvCLT" units="C">-20.535</constant>
<constant digits="0" name="IdleDelayTime" units="sec">38.0</constant>
<constant digits="0" name="StgCycles" units="cycles">1.0</constant>
<constant name="dwellcont">"Dwell control"</constant>
<constant digits="1" name="dwellcrank" units="ms">4.5</constant>
<constant digits="1" name="dwellrun" units="ms">3.0</constant>
<constant digits="0" name="numteeth" units="teeth">36.0</constant>
<constant digits="0" name="onetwo" units="teeth">1.0</constant>
<constant digits="0" name="crankRPM" units="rpm">300.0</constant>
<constant digits="0" name="tpsflood" units="%">92.0</constant>
<constant digits="0" name="SoftRevLim" units="rpm">7000.0</constant>
<constant digits="0" name="SoftLimRetard" units="deg">15.0</constant>
<constant digits="1" name="SoftLimMax" units="s">2.0</constant>
<constant digits="0" name="HardRevLim" units="rpm">7500.0</constant>
<constant cols="1" digits="0" name="taeBins" rows="4" units="%/s">
80.0
200.0
520.0
890.0
</constant>
<constant cols="1" digits="0" name="taeRates" rows="4" units="%">
18.0
24.0
33.0
42.0
</constant>
<constant cols="1" digits="0" name="wueRates" rows="10" units="C">
0.0
11.0
22.0
33.0
44.0
56.0
67.0
78.0
94.0
111.0
</constant>
<constant digits="0" name="dwellLim" units="ms">8.0</constant>
<constant digits="0" name="unused122" units="none">0.0</constant>
<constant digits="0" name="unused123" units="none">0.0</constant>
<constant digits="0" name="unused124" units="none">0.0</constant>
<constant digits="0" name="unused125" units="none">0.0</constant>
<constant digits="0" name="unused126" units="none">0.0</constant>
<constant digits="0" name="unused127" units="none">0.0</constant>
</page>
<page number="2" size="128">
<constant digits="0" name="unused95" units="none">0.0</constant>
<constant cols="8" digits="1" name="afrTable" rows="8" units="AFR">
14.7 14.7 15.0 15.1 14.9 14.7 14.7 14.7
14.7 14.7 15.0 15.1 14.9 14.7 14.7 14.7
14.7 14.7 14.8 15.0 14.8 14.6 14.4 14.0
14.3 14.3 14.7 14.7 14.6 14.1 13.8 13.4
14.1 14.2 14.5 14.3 14.0 13.5 13.1 12.9
14.1 14.2 13.7 13.6 13.4 13.1 13.0 12.8
13.5 13.5 12.8 12.9 12.8 12.7 12.7 12.7
12.8 12.8 12.8 12.7 12.5 12.5 12.5 12.5
</constant>
<constant cols="1" digits="0" name="rpmBinsAFR" rows="8" units="RPM">
500.0
1200.0
2000.0
3000.0
3500.0
4200.0
5000.0
6000.0
</constant>
<constant cols="1" digits="0" name="tpsBinsAFR" rows="8" units="TPS">
10.0
20.0
35.0
50.0
65.0
75.0
86.0
100.0
</constant>
<constant name="egoAlgorithm">"Simple"</constant>
<constant name="egoType">"Disabled"</constant>
<constant digits="0" name="egoKP" units="%">100.0</constant>
<constant digits="0" name="egoKI" units="%">20.0</constant>
<constant digits="0" name="egoKD" units="%">0.0</constant>
<constant digits="0" name="egoTemp" units="°C">69.93</constant>
<constant digits="0" name="egoCount">16.0</constant>
<constant digits="0" name="egoDelta" units="%">1.0</constant>
<constant digits="0" name="egoLimit">15.0</constant>
<constant digits="1" name="ego_min" units="AFR">9.0</constant>
<constant digits="1" name="ego_max" units="AFR">19.0</constant>
<constant digits="0" name="ego_sdelay" units="sec">15.0</constant>
<constant digits="0" name="egoRPM" units="rpm">1200.0</constant>
<constant digits="0" name="egoTPSMax" units="%">70.0</constant>
<constant digits="0" name="egoLoadMax" units="%">90.0</constant>
<constant digits="0" name="egoLoadMin" units="%">20.0</constant>
</page>
<settings Comment="These setting are only used if this msq is opened without a project.">
<setting name="CELSIUS" value="CELSIUS"/>
<setting name="ALPHA_N" value="ALPHA_N"/>
<setting name="MPX4250" value="MPX4250"/>
<setting name="INNOVATE_LC1_DEFAULT" value="INNOVATE_LC1_DEFAULT"/>
</settings>
<userComments Comment="These are user comments that can be related to a particular setting or dialog.">
<userComment name="SoftRevLim" value=""/>
<userComment name="aseCount" value=""/>
</userComments>
</msq>

View File

@ -1,739 +0,0 @@
;-------------------------------------------------------------------------------
[MegaTune]
MTversion = 2.25 ; MegaTune itself; needs to match exec version.
queryCommand = "Q" ; B&G embedded code version 2.0/2.98x/3.00
signature = 20 ; Versions above return a single byte, 20T.
;-------------------------------------------------------------------------------
[Constants]
;----------------------------------------------------------------------------
; Constants Definition
; --------------------
;
; Scalar Values
; -------------
; The scaling and translation values are used as follows:
; msValue = userValue / scale - translate
; userValue = (msValue + translate) * scale
;
; I've got no good way to handle a few of these things yet.
;
; Temperatures are fine, check out the Fielding IAC example (fastIdleT).
;
; The TPS stuff is a problem, because we have to modify the ini file for
; each TPS installation and again whenever we move the TPS... I figured
; out a moderately palatable solution to presenting the frequency
; divider in the boost control values, turn it into a bit field and then
; enumerate the resulting frequencies.
;
; Array Values
; ------------
; Arrays are specified just like scalars, except that they have a "shape"
; entry in the fourth parameter. The shape allows you to define lists or
; tables, for example [8] defines a list with eight values and [2x4] defines
; a table with eight values (two rows and four columns). Tables may be
; stored in either "X-" or "Y-order." X-order means that memory is layed
; out like.
;
; [x1,y1] [x2,y1]...[xn,y1] [x1,y2]...
;
; Y-order would be
;
; [x1,y1] [x1,y2]...[x1,yn] [x2,y1]...
;
; To use the TableEditor, you must define two lists and a table, and
; the lengths of the lists must correspond to the shape of the table.
;
; Bit Fields
; ----------
; Bits are numbered 0-7, the rightmost being bit zero. The basic
; data word that stores bit fields must be unsigned.
;
; You need NOT supply the correct number of labels matching the
; number of bits you've specified (one bit requires 2 values, two
; bits requires 4 values and so on). If you neglect to supply enough
; labels, they will be synthesized using the sequence "1", "2" and so
; on based upon their position in the sequence (the cltType and matType
; will end up with identical lists).
;
; If you specify a label as "INVALID" (all upper case), then it will
; not be displayed in the combo box, so you can leave out values that
; make no sense.
;
;----------------------------------------------------------------------------
endianness = big
nPages = 2
burnCommand = "B"
; pageSize = 125
pageSize = 125, 125
pageActivationDelay = 10
; pageActivate = ""
pageActivate = "P\001", "P\002"
pageReadCommand = "V", "V"
pageValueWrite = "W%o%v", "W%o%v"
; pageChunkWrite = "" ; No chunk write for standard MS.
page = 1
; name = bits, type, offset, bits
; name = array, type, offset, shape, units, scale, translate, lo, hi, digits
; name = scalar, type, offset, units, scale, translate, lo, hi, digits
veTable = array, U08, 0, [8x8], "%", 1.0, 0.0, 0.0, 255.0, 0
rpmBins = array, U08, 64, [ 8], "RPM", 100.0, 0.0, 100.0, 25500.0, 0
#if SPEED_DENSITY
mapBins = array, U08, 72, [ 8], "kPa", 1.0, 0.0, 0.0, 255.0, 0
#elif ALPHA_N
tpsBins = array, U08, 72, [ 8], "TPS", 1.0, 0.0, 0.0, 255.0, 0
#elif AIR_FLOW_METER
#error "MSnS does not support MAF"
#exit
#endif
crankCold = scalar, U08, 80, "ms", 0.1, 0.0, 0.0, 25.5, 1
crankHot = scalar, U08, 81, "ms", 0.1, 0.0, 0.0, 25.5, 1
asePct = scalar, U08, 82, "%", 1.0, 0.0, 0.0, 95.0, 0
aseCount = scalar, U08, 83, "", 1.0, 0.0, 0.0, 254.0, 0
wueBins = array, U08, 84, [ 10], "%", 1.0, 0.0, 100.0, 255.0, 0
taeBins = array, U08, 94, [ 4], "ms", 0.1, 0.0, 0.0, 25.5, 1
taeBins1 = scalar, U08, 94, "ms", 0.1, 0.0, 0.0, 25.5, 1
taeBins2 = scalar, U08, 95, "ms", 0.1, 0.0, 0.0, 25.5, 1
taeBins3 = scalar, U08, 96, "ms", 0.1, 0.0, 0.0, 25.5, 1
taeBins4 = scalar, U08, 97, "ms", 0.1, 0.0, 0.0, 25.5, 1
taeColdA = scalar, U08, 98, "ms", 0.1, 0.0, 0.0, 25.5, 1
tpsThresh = scalar, U08, 99, "v/s",0.1953125, 0.0, 0.2, 49.8, 3
taeTime = scalar, U08, 100, "ms", 0.1, 0.0, 0.0, 25.5, 1
tdePct = scalar, U08, 101, "%", 1.0, 0.0, 0.0, 255.0, 0
#if CELSIUS
egoTemp = scalar, U08, 102, "°C", 0.555, -72, -40, 102.0, 0
#else
egoTemp = scalar, U08, 102, "°F", 1.0, -40, -40, 215.0, 0
#endif
egoCount = scalar, U08, 103, "", 1.0, 0.0, 0.0, 255.0, 0
egoDelta = scalar, U08, 104, "%", 1.0, 0.0, 0.0, 255.0, 0
egoLimit = scalar, U08, 105, "%", 1.0, 0.0, 0.0, 255.0, 0
reqFuel = scalar, U08, 106, "ms", 0.1, 0.0, 0.0, 25.5, 1
divider = scalar, U08, 107, "", 1.0, 0.0
alternate = bits, U08, 108, [0:0], "Simultaneous", "Alternating"
injOpen = scalar, U08, 109, "ms", 0.1, 0.0, 0.1, 25.5, 1
injOCfuel = scalar, U08, 110, "ms", 0.1, 0.0, 0.0, 0.0, 0
injPwmP = scalar, U08, 111, "%", 1.0, 0.0, 0.0, 100.0, 0
injPwmT = scalar, U08, 112, "ms", 0.1, 0.0, 0.0, 25.5, 1
battFac = scalar, U08, 113, "ms/v",0.0166667, 0.0, 0.0, 1.0, 2
rpmk = scalar, U16, 114, "", 1.0, 0.0
; Config1
mapType = bits, U08, 116, [0:1], "115 kPa", "250 kPa", "INVALID", "INVALID"
twoStroke = bits, U08, 116, [2:2], "Four-stroke", "Two-stroke"
injType = bits, U08, 116, [3:3], "Port", "Throttle Body"
nCylinders = bits, U08, 116, [4:7+1]
; Config3
cltType = bits, U08, 117, [0:1], "GM", "Unknown1", "Unknown2", "Unknown3"
matType = bits, U08, 117, [2:3], "GM", "Unknown1", "Unknown2", "Unknown3"
nInjectors = bits, U08, 117, [4:7+1]
; Config3
engineType = bits, U08, 118, [0:0], "Even fire", "Odd fire"
egoType = bits, U08, 118, [1:1], "Narrow band", "Wide band"
algorithm = bits, U08, 118, [2:2], "Speed Density", "Alpha-N"
baroCorr = bits, U08, 118, [3:3], "Off", "On"
primePulse = scalar, U08, 119, "ms", 0.1, 0.0, 0.0, 25.5, 1
egoRPM = scalar, U08, 120, "RPM", 100.0, 0.0, 100, 25500, 0
#if CELSIUS
fastIdleT = scalar, U08, 121, "°C", 0.555, -72.0, -40, 102, 1
#else
fastIdleT = scalar, U08, 121, "°F", 1.0, -40.0, -40, 215, 0
#endif
egoSwitch = scalar, U08, 122, "v", 0.0196, 0.0, 0.0, 5.0, 3
taeColdM = scalar, U08, 123, "%", 1.0, 0.0, 0.0, 250.0, 0
;--------------------------------------------------
;Start Ignition table (Table 2)
;--------------------------------------------------
page = 2
advTable1 = array, U08, 0,[8x8], "deg", 1.0, 0.0, 0.0, 255.0, 0
rpmBins2 = array, U08, 64,[ 8], "RPM", 100.0, 0.0, 100, 25500, 0
#if SPEED_DENSITY
mapBins2 = array, U08, 72, [ 8], "kPa", 1.0, 0.0, 0.0, 255.0, 0
#elif ALPHA_N
tpsBins2 = array, U08, 72, [ 8], "TPS", 1.0, 0.0, 0.0, 255.0, 0
#elif AIR_FLOW_METER
#error "MSnS does not support MAF"
#exit
#endif
TrigAng = scalar, U08, 80, "Deg", 0.352, 0, 0, 90, 0
FixAng = scalar, U08, 81, "Deg", 0.352, -28.4, -10, 80, 0
Trim = scalar, S08, 82, "Deg", 0.352, 0, -45, 45, 0
CrankAng = scalar, U08, 83, "Deg", 0.352, -28.4, -10, 80, 0
IgHold = scalar, U08, 84, "", 1, 0, 0, 100, 0
Trig_plus = bits, U08, 85[0:1], "0", "+22.5", "INVALID", "+45"
TrigCrank = bits, U08, 85[2:2], "Trigger Return", "Time Based"
IgInv = bits, U08, 85[3:3], "No", "Yes"
oddfire = bits, U08, 85[4:4], "No", "Yes"
IdleAdv = scalar, U08, 86, "Deg", 0.352,-28.4, -10, 80, 0
IdleAdvTPS = scalar, U08, 87, "ADC", 1, 0, 0, 255, 0
IdleAdvRPM = scalar, U08, 88, "RPM", 100, 0, 0, 1200, 0
#if CELSIUS
IdleAdvCLT = scalar, U08, 89, "C", 0.555, -72, -40, 102, 1
#else
IdleAdvCLT = scalar, U08, 89, "F", 1, -40, -40, 215, 0
#endif
IdleDelayTime = scalar, U08, 90, "sec", 1, 0, 0, 5, 0
StgCycles = scalar, U08, 91, "cycles", 1, 0, 0, 255, 0
;Dwell control
;running dwell variable railed to 8 - who needs more than 8ms?
dwellcont = bits, U08, 92, [1:1], "Fixed duty*^", "Dwell control"
dwellcrank = scalar, U08, 93, "ms", 0.1, 0, 0, 25, 1
dwellrun = scalar, U08, 94, "ms", 0.1, 0, 0, 8, 1
triggerTeeth = scalar, U08, 95, "teeth", 1.0, 0.0, 0.0, 255, 0 ; * ( 1 byte)
No_Miss_Teeth = scalar, U08, 96, "teeth", 1.0, 0.0, 0.0, 255, 0 ; * ( 1 byte )
;-------------------------------------------------------------------------------
[Menu]
;----------------------------------------------------------------------------
; There are five pre-defined values that may be used to define your menus.
; The first four allow access to the "standard" dialog boxes, the last one
; merely draws a separator (horizontal line) in the menu.
;
; std_constants
; std_enrichments
; std_realtime
; std_warmup
;
; std_separator
;
; If you use any of the std_constants, std_enrichments or std_warmup
; editors, they may be optionally suffixed with a page number (only
; useful for multi-page code variants), which causes them to edit the
; specified page. If you leave off the page specifier, they edit logical
; page one as specified in the Constants section.
;
; There are four special menu names, which when used append to the standard
; menus of the same name instead of creating a new one. The menu names
; are "File", "Communications", "Tools" and "Help".
;
;----------------------------------------------------------------------------
menu = "&Settings"
subMenu = std_constants, "&Constants"
subMenu = std_enrichments, "&Enrichments"
subMenu = veTableTbl, "&VE Table", 0
subMenu = sparkTbl, "&Spark Table", 1
menu = "&Tuning"
subMenu = std_realtime, "&Realtime Display"
subMenu = std_warmup, "&Warmup Wizard"
subMenu = veTableMap, "&VE Table"
;-------------------------------------------------------------------------------
[UserDefined]
; define a MegaTune compatible version here
; no need to for std_enrichments, it is built in.
[UserDefinedTS]
; Enhanced TunerStudio dialogs can be defined here
; MegaTune will over look this section
; These dialogs will over-ride those in the UserDefined Section
; User defined ar loaded first, then if one by the same name is defiend here,
; it will replace the MegaTune definition
; dialog = name, Title, Layout
;
; valid options for layout are xAxis, yAxis, border
; for an xAxis, each field added will be added from right to left
; A yAxis layout will add fields from top to bottom
; A border layout will expect an additional constraint to determine placement
; valid border constraints are north, South, East, West, Center
; all 5 do not need to be filled.
; The field name can be either a constant reference, or a reference to another
; dialog which will be added.
; dialogs can be nested and can be mixed with fields
dialog = accelEnrichments, "Acceleration Enrichment"
field = "TPSdot Threshold", tpsThresh
field = "Accel Time", taeTime
field = "Cold Accel Enrichment", taeColdA
field = "Cold Accel Mult", taeColdM
field = "Decel Fuel Amount", tdePct
field = "Acceleration Enrichment Bins (ms)"
field = "2 v/s", taeBins1
field = "4 v/s", taeBins2
field = "8 v/s", taeBins3
field = "15 v/s", taeBins4
dialog = crankPW, "Cranking Pulsewidths (ms)"
#if CELSIUS
field = "Priming Pulsewidth", primePulse
field = "Pulsewidth at -40°C", crankCold
field = "Pulsewidth at 77°C", crankHot
#else
field = "Priming Pulsewidth", primePulse
field = "Pulsewidth at -40°F", crankCold
field = "Pulsewidth at 170°F", crankHot
#endif
dialog = aseSettings, "Afterstart Enrichment"
field = "Enrichment %", asePct
field = "Number of Ignition Cycles", aseCount
dialog = egoSettings, "Exhaust Gas Oxygen"
field = "EGO Sensor Type", egoType
field = "EGO Switch Point (v)", egoSwitch
field = "Coolant Temp Activation", egoTemp
field = "Ignition Events Per Step", egoCount
field = "EGO Step", egoDelta
field = "EGO ± Limit", egoLimit
field = "EGO Active Above", egoRPM
dialog = westEnrichments, "", yAxis
panel = crankPW
panel = aseSettings
panel = egoSettings
dialog = std_enrichments, "Enrichments", border ; xAxis would work here too, but wanted to give a border example
topicHelp = "helpEnrichments"
panel = westEnrichments, West
panel = accelEnrichments, East
; -------------------------------------------------------------
; Help down here
help = helpEnrichments, "Enrichments Help"
text = "<strong>Priming Pulse</strong><br><br>"
text = "The duration in milliseconds of a priming pulse that is applied when the MS controller is powered up. If you dont want a priming pulse, set this field to zero. (Only available for version 2.0 and later of MegaSquirt controller code.)<br>"
text = "<br><strong>Cranking Pulsewidth</strong><br><br>"
text = "Cranking pulse width determines how long the injector will be open in milliseconds for each pulse while the engine is cranking (i.e., the RPM is below 300). The actual pulse width is determined by performing linear interpolation on the line described by the end points you enter for the "-40 degrees F" and "170 degrees F" values. For instance, if you enter 10.0 ms as the pulse width at -40 F and 2.0 ms at 170 F, the pulse width will be 6.0 ms when you start your engine at 65 F.<br>"
text = "Note: Cranking pulse occur at every ignition event, while running pulses only occur at the interval specified on the constants page; if you have a 4 cylinder engine and are taking the tachometer signal from the coil, then you will get four (4) cranking pulses per cycle and depending on settings one injection per cycle while running.<br>"
text = "The MS variables "CWU" and "CWH" hold the low temperature and high temperature pulse widths, respectively.<br>"
text = "<br><strong>Afterstart Enrichment</strong><br>"
text = "The afterstart enrichment is one that decays from its max value (specified in the "Enrichment (percent)" field) to zero in a linear fashion over a period defined in "Number of Ignition Cycles." If you specify 20% enrichment over 250 ignition cycles, then the first pulse is enriched by 20%, the 125th pulse is enriched by 10% and the 250th (and later) by zero percent (this assumes 1 event per cycle, or a 1 cylinder engine; divide by the number of ignition events per cycle to get the specific behavior for your motor).<br>"
text = "MS stores these values in the flash constants called "AWC" (Afterstart Warmup Count) and "AWEV" (Afterstart Warmup Enrichment Value).<br>"
text = "<br><strong>Exhaust Gas Oxygen Sensor Parameters</strong><br>"
text = "These parameters define the closed loop behavior of MS. You must have a narrow band O2 sensor hooked up for this mode to work in v.1.0 controller code; either a narrow band or wide band will work with v.2.0 of controller code. To disable closed loop operation altogether, set the EGO Step value to zero.<br>"
text = "<br><strong>EGO Sensor Type</strong><br>"
text = "Specify either a narrow band sensor or wide band sensor. Functionally this merely sets the direction sense of the sensor voltage. For narrow band sensors, the voltage rises as the mixture is richening and drops as the mixture becomes lean. The wide band setting corresponds to the opposite sense, i.e., voltage drops to indicate enrichment (this is how the DIY-WB operates, not necessarily all WB sensors!). (Available in v 2.0 controller code.)<br>"
text = "<br><strong>EGO Switch Point (v)</strong><br>"
text = "This is the switching point voltage that indicates stoichiometric combustion (approximately 14.7:1 with gasoline). For narrow band sensors this is 0.5 v*; for the DIY-WB wideband sensor it is 2.5 v (for other wideband sensors this voltage may be quite different). (This value is only active in v 2.0 controller code.)<br>"
text = "*This is true for zirconia NB sensors, which are used almost exclusively in modern vehicles. The titania NB sensor has a different voltage range (1-5 v), but is rarely used.<br>"
text = "<br><strong>Coolant Temp Activation (°F)</strong><br>"
text = "This is the temperature below which closed loop operation is disabled. If this value is too low, then closed loop will try to lean out the warmup enrichments and you may experience rough running. Typical value is 160 F and should somewhat above the point at which warmup enrichment stops (see the Warmup Enrichment Bins settings and find the lowest on which contains 100).<br>"
text = "The MS value "EGOTEMP" stores this quantity.<br>"
text = "<br><strong>Ignition Events Per Step</strong><br>"
text = "This value determines the rate at which the closed loop algorithm applies correction. The default value of 32, when used on a four cylinder engine with four ignition events per cycle, tells MS to wait for 8 cycles before changing the current correction factor.<br>"
text = "<br><strong>EGO Step (percent)</strong><br>"
text = "Once the closed loop algorithm has decided to change the correction factor, it adds or subtracts this percentage from the current value. This should move slowly to avoid unstable response, so make sure it is small, 1% being the default.<br>"
text = "<br><strong>EGO Limit (%)</strong><br>"
text = "Closed loop operation should not be substituted for proper tuning! This value limits the correction that can be made by the closed loop algorithm, the default of 10% indicates the correction factor cannot go outside the range 90-110%.<br>"
text = "<br><strong>EGO Active Above RPM</strong><br>"
text = "This value specifies the lower limit above which closed loop operation occurs. Typically, your engine will idle best when it is richer than stoich, so turning off closed loop for low RPMs allows this to happen. The default value for the RPM limit is 1200. (Available only in v 2.0 MS, older versions have a fixed 1200 RPM value in the controller code.)<br>"
text = "<br><strong>Warmup Enrichment Bins</strong><br>"
text = "Warmup enrichment is based on coolant temperature. Since warmup enrichment requirements are usually non-linear, several bins are provided to specify different rates in different temperature domains.<br>"
text = "Place values in the "-40" through "160 degrees F" fields, typically running from about 120 at -40 F to 100 at 100 F; make sure the values are all 100 or greater.<br>"
text = "The MS array "WWU" contains these enrichment values.<br>"
text = "<br><strong>Acceleration Enrichment</strong><br>"
text = "Acceleration enrichment (AE) occurs when you open the throttle "rapidly" to avoid bogging the engine. In v.1.01 MS, this is done solely based upon the rate of change in the throttle position sensor (also called TPSDOT).<br>"
text = "<br><strong>TPSDOT Thresh</strong><br>"
text = "This is the threshold in v/sec below which no acceleration enrichment will occur (you can move the throttle from idle to full open without acceleration enrichment, if you open it slowly enough). Depends grossly upon the range of your TPS, a typical value might be 1.2 v/sec.<br>"
text = "<strong>Tuning Note:</strong> While you are tuning the VE table you should set this threshold artificially high (maybe 40.0) to disable acceleration enrichment completely. After the VE table is fairly well-defined, set this back to 1.2 and begin tuning AE.<br>"
text = "MS stores this value in the "TPSTHRESH" variable.<br>"
text = "<br><strong>Accel Time (sec)</strong><br>"
text = "This value indicates how long the acceleration enrichment "squirt" will last. Typical values are around 1.0 second. MS stores this value in the variable "TPSACLK."<br>"
text = "<br><strong>Cold Accel Enrichment (ms)</strong><br>"
text = "The acceleration enrichment pulse also varies depending upon coolant temperature. The value specified here is the pulse width added to the value from the bin calculations at -40 F. The Cold Acceleration Enrichment amount is linearly interpolated from full amount at -40 F down to zero at 165 F. A typical value might be 2.0 ms.<br>"
text = "This value is stored in the "TPSACOLD" variable in MS.<br>"
text = "<br><strong>Cold Accel Multiplier (%)</strong><br>"
text = "Another means for increasing the amount of fuel delivered by the acceleration enrichment pulse is supplied by this value; it is likewise interpolated from the full specified amount at 40F down to zero at 165 F. Before the Cold Acceleration Enrichment value is added to the base acceleration enrichment pulsewidth, it is multiplied by this value.<br>"
text = "Total AE = Base AE * CAM + CAE<br>"
text = "The difference between the two types of AE cold modify can be easily seen with a few examples:<br>"
text = "1) Assume we have a calculated AE pulse of 5.0 ms. Say our coolant temperature is 40 F, giving a CAE pulse of 2.0 ms and CAM is turned off (100%). The result is 5.0+2.0 = 7.0 ms.<br>"
text = "2) Assume same base AE and temperature, but now we turn off CAE (0.0 ms) and set CAM to give 140%. The result is the same, we get 5.0*1.4 = 7.0 ms.<br>"
text = "3) Take the first case, but hit the accelerator faster, giving 8.0 ms base AE pulse. We now have a result of 8.0+2.0 = 10.0 ms.<br>"
text = "4) Take case 2, but with the higher base AE pulse, giving 8.0*1.4 = 11.2 ms.<br>"
text = "The bottom line is that the CAE modifier is constant and independent of the base pulse, where on the other hand, the CAM modifier has a proportional effect on the AE, bigger base pulse means bigger result.<br>"
text = "This value is stored in the 'ACMULT' variable in MS.<br>"
text = "<br><strong>Decel Fuel Amount (%)</strong><br>"
text = "When you let off the throttle rapidly (that is the closing rate exceeds TPSDOT Thresh) and the engine is turning faster than 1500 RPM, then deceleration fuel cutoff is performed by MS. Deceleration fuel amount is multiplied by the "normal" pulse width, that is, if the calculated pulse is 12.0 ms and you have 20% decel amount, then the resulting pulse width is 2.4 ms. A value of 100% causes the fuel to remain at its calculated value, and can cure bucking on deceleration in vehicles with manual transmissions; those with automatic transmissions may benefit in fuel economy by using values below 100%.<br>"
text = "The MS variable "TPSDQ" holds this value as a percentage. <br>"
text = "<br><strong>Acceleration Enrichment Bins (ms)</strong><br>"
text = "These bins specify the actual enrichment in terms of pulse width. They are linearly interpolated to determine a value that is ultimately added to the computed pulse width.<br>"
text = "The array of values is called "TPSAQ" as stored in MS."
[TableEditor]
; table_id, map3d_id, "title", page
table = veTableTbl, veTableMap, "VE Table", 1
; constant, variable
xBins = rpmBins, rpm
#if SPEED_DENSITY
yBins = mapBins, map
#else
yBins = tpsBins, tpsADC
#endif
zBins = veTable
gridHeight = 2.0
gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees.
upDownLabel = "(RICHER)", "(LEANER)"
table = sparkTbl, sparkMap, "Ignition Advance Table", 2
xBins = rpmBins2, rpm
#if SPEED_DENSITY
yBins = mapBins2, map
#else ALPHA_N
yBins = tpsBins2, tpsADC
#endif
zBins = advTable1
gridHeight = 3.0
upDownLabel = "ADVANCED", "RETARDED"
;-------------------------------------------------------------------------------
[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
baroADCGauge = baroADC, "Barometer ADC", "", 0, 255, -1, -1, 256, 256, 0, 0
mapADCGauge = mapADC, "MAP ADC", "", 0, 255, -1, -1, 256, 256, 0, 0
matADCGauge = matADC, "MAT ADC", "", 0, 255, -1, -1, 256, 256, 0, 0
cltADCGauge = cltADC, "CLT ADC", "", 0, 255, -1, -1, 256, 256, 0, 0
tpsADCGauge = tpsADC, "TPS ADC", "", 0, 255, -1, -1, 256, 256, 0, 0
batADCGauge = batADC, "BAT ADC", "", 0, 255, -1, -1, 256, 256, 0, 0
#if NARROW_BAND_EGO
egoGauge = egoVoltage, "Exhaust Gas Oxygen", "volts", 0, 1.0, 0.2, 0.3, 0.6, 0.8, 2, 2
#else
egoGauge = egoVoltage, "Exhaust Gas Oxygen", "volts", 0.5, 4.5, 0.0, 0.0, 5.0, 5.0, 2, 2
#endif
lambdaGauge = lambda, "Lambda", "", 0.5, 1.5, 0.5, 0.7, 2, 1.1, 2, 2
accelEnrichGauge = accDecEnrich, "Accel Enrich", "%", 50, 150, -1, -1, 999, 999, 0, 0
afrGauge = afr, "Air:Fuel Ratio", "", 10, 19.4, 12, 13, 15, 16, 2, 2
clockGauge = secl, "Clock", "Seconds", 0, 255, 10, 10, 245, 245, 0, 0
deadGauge = deadValue, "---", "", 0, 1, -1, -1, 2, 2, 0, 0
dutyCycleGauge = dutyCycle, "Duty Cycle", "%", 0, 100, -1, -1, 85, 90, 1, 1
egoCorrGauge = egoCorrection, "EGO Correction", "%", 50, 150, 90, 99, 101, 110, 0, 0
gammaEnrichGauge = gammaEnrich, "Gamma Enrichment", "%", 50, 150, -1, -1, 151, 151, 0, 0
mapGauge = map, "Engine MAP", "kPa", 0, 255, 0, 20, 200, 245, 0, 0
pulseWidthGauge = pulseWidth, "Pulse Width", "mSec", 0, 25.5, 1.0, 1.2, 20, 25, 1, 1
tachometer = rpm, "Engine Speed", "RPM", 0, 8000, 300, 600, 3000, 5000, 0, 0
throttleGauge = throttle, "Throttle Position", "%TPS", 0, 100, -1, 1, 90, 100, 0, 0
veBucketGauge = veTuneValue, "VE Value", "%", 0, 120, -1, -1, 999, 999, 0, 0
veGauge = veCurr, "VE Current", "%", 0, 120, -1, -1, 999, 999, 0, 0
voltMeter = batteryVoltage,"Battery Voltage", "volts", 7, 21, 8, 9, 15, 16, 2, 2
warmupEnrichGauge = warmupEnrich, "Warmup Enrichment", "%", 100, 150, -1, -1, 101, 105, 0, 0
#if CELSIUS
cltGauge = coolant, "Coolant Temp", "%TEMP", -40, 120, -15, 0, 95, 105, 0, 0
matGauge = mat, "Manifold Air Temp", "%TEMP", -40, 110, -15, 0, 95, 100, 0, 0
#else
cltGauge = coolant, "Coolant Temp", "%TEMP", -40, 250, 0, 30, 200, 220, 0, 0
matGauge = mat, "Manifold Air Temp", "%TEMP", -40, 215, 0, 30, 200, 210, 0, 0
#endif
;-------------------------------------------------------------------------------
[FrontPage]
#if NARROW_BAND_EGO
egoLEDs = 0.0, 1.0, 0.5 ; NB settings.
#else
; If you reverse these range values as you see below, then the LED
; bar will work as you expect, high on the right, low on the left.
egoLEDs = 4.0, 1.0, 2.5 ; WB settings.
#endif
; Gauges are numbered left to right, top to bottom.
;
; 1 2 3 4
; 5 6 7 8
gauge1 = tachometer
#if SPEED_DENSITY
gauge2 = throttleGauge
#else
gauge2 = tpsADCGauge
#endif
gauge3 = pulseWidthGauge
gauge4 = dutyCycleGauge
gauge5 = mapGauge
gauge6 = matGauge
gauge7 = cltGauge
gauge8 = gammaEnrichGauge
;----------------------------------------------------------------------------
; Indicators
; expr off-label on-label, off-bg, off-fg, on-bg, on-fg
indicator = { ready }, "Not Ready", "Ready", white, black, green, black
indicator = { crank }, "Not Cranking", "Cranking", white, black, green, black
indicator = { startw }, "ASE OFF", "ASE", white, black, green, black
indicator = { warmup }, "WUE OFF", "WUE", white, black, green, black
indicator = { tpsaccaen }, "TPS Accel", "TPS Accel", white, black, green, black
indicator = { mapaccaen }, "MAP Accel", "MAP Accel", white, black, green, black
indicator = { tpsaccden }, "TPS Decel", "TPS Decel", white, black, green, black
indicator = { mapaccden }, "MAP Decel", "MAP Decel", white, black, green, 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, 1.0
#else
egoBar = 0, 5.0
#endif
gammaEBar = 0, 200
mapBar = 0, 255
pulseWidthBar = 0, 25.5
rpmBar = 0, 8000
throttleBar = 0, 100
egoCorrBar = 0, 200
baroCorrBar = 0, 200
warmupCorrBar = 0, 200
airdenCorrBar = 0, 200
veCorrBar = 0, 200
accCorrBar = 0, 100
;-------------------------------------------------------------------------------
[Tuning]
#if NARROW_BAND_EGO
egoLEDs = 0.0, 1.0, 0.5 ; NB settings.
#else
; If you reverse these range values as you see below, then the LED
; bar will work as you expect, high on the right, low on the left.
egoLEDs = 4.0, 1.0, 2.5 ; WB settings.
#endif
font = "Courier", 14
spotDepth = 2 ; 0 = no indicators, 1 = Z only, 2 = XYZ indicators.
cursorDepth = 2 ; Same as spot depth.
; The four radio buttons on the tuning screen select a "page" of six
; gauges. The gauge numbering is the same as the front page, across
; then down.
; 1 2
; 3 4
; 5 6
;
; gaugeColumns allows you to hide or show gauges in column 2 (i.e.,
; gauges 2, 4 and 6).
gaugeColumns = 2 ; Only 1 or 2 are valid.
;----------------------------------------------------------------------------
; Notes on tuning screen gauges:
; pageButtons = Labels for radio buttons at bottom of tuning dialog.
;
; Gauge 2 previously switched automatically to be tpsGauge when alpha-n
; was enabled, but you need to do it manually now.
;----------------------------------------------------------------------------
; Page 1 Page 2 Page 3 Page 4
pageButtons = "&EGO", "&WUE", "PW&1", "PW&2"
gauge1 = tachometer, tachometer, tachometer, tachometer
gauge2 = mapGauge, mapGauge, mapGauge, mapGauge
gauge3 = egoGauge, egoGauge, egoGauge, egoGauge
gauge4 = egoCorrGauge, warmupEnrichGauge, pulseWidthGauge, pulseWidthGauge
gauge5 = veBucketGauge, veBucketGauge, veBucketGauge, veBucketGauge
gauge6 = accelEnrichGauge, accelEnrichGauge, dutyCycleGauge, dutyCycleGauge
;-------------------------------------------------------------------------------
[OutputChannels]
; The number of bytes MegaTune should expect as a result
; of sending the "A" command to MegaSquirt is determined
; by the value of ochBlockSize, so be very careful when
; you change it.
deadValue = { 0 } ; Convenient unchanging value.
ochGetCommand = "A"
ochBlockSize = 22
secl = scalar, U08, 0, "sec", 1.000, 0.000
squirt = scalar, U08, 1, "bits", 1.000, 0.000
engine = scalar, U08, 2, "bits", 1.000, 0.000
ready = bits, U08, 2, [0:0]
crank = bits, U08, 2, [1:1]
startw = bits, U08, 2, [2:2]
warmup = bits, U08, 2, [3:3]
tpsaccaen = bits, U08, 2, [4:4]
tpsaccden = bits, U08, 2, [5:5]
mapaccaen = bits, U08, 2, [6:6]
mapaccden = bits, U08, 2, [7:7]
baroADC = scalar, U08, 3, "ADC", 1.000, 0.000
mapADC = scalar, U08, 4, "ADC", 1.000, 0.000
matADC = scalar, U08, 5, "ADC", 1.000, 0.000
cltADC = scalar, U08, 6, "ADC", 1.000, 0.000
tpsADC = scalar, U08, 7, "ADC", 1.000, 0.000
batADC = scalar, U08, 8, "ADC", 1.000, 0.000
egoADC = scalar, U08, 9, "ADC", 1.000, 0.000
egoCorrection = scalar, U08, 10, "%", 1.000, 0.000
airCorrection = scalar, U08, 11, "%", 1.000, 0.000
warmupEnrich = scalar, U08, 12, "%", 1.000, 0.000
rpm100 = scalar, U08, 13, "r100", 1.000, 0.000
pulseWidth = scalar, U08, 14, "ms", 0.100, 0.000
accelEnrich = scalar, U08, 15, "%", 1.000, 0.000
baroCorrection = scalar, U08, 16, "%", 1.000, 0.000
gammaEnrich = scalar, U08, 17, "%", 1.000, 0.000
veCurr = scalar, U08, 18, "%", 1.000, 0.000
blank1 = scalar, U08, 19 ; Raw inputs, as they come from MS.
blank2 = scalar, U08, 20
blank3 = scalar, U08, 21
; Computed output channels. See "megatuneExamples.ini" for all the
; pre-defined variables, search for "???" and you'll see them.
accDecEnrich = { accelEnrich + ((engine & 0b00100000) ? tdePct : 100) }
batteryVoltage = { batADC / 255.0 * 30.0 } ; Current MS power supply voltage.
coolant = { tempCvt(table(cltADC, "thermfactor.inc")-40) } ; Coolant sensor temperature in user units.
egoVoltage = { egoADC / 255.0 * 5.0 } ; EGO sensor voltage.
mat = { tempCvt(table(matADC, "matfactor.inc")-40) } ; Manifold temperature in user units.
rpm = { rpm100*100 } ; True RPM.
time = { timeNow } ; "timeNow" is a parameterless built-in function.
afrtarget = { 0 }
#include "lambdaSensors.ini"
#if MPX4250
barometer = { table(baroADC, "kpafactor4250.inc") }
map = { table(mapADC, "kpafactor4250.inc") } ; Manifold pressure in kPa.
#else
barometer = { table(baroADC, "kpafactor4115.inc") }
map = { table(mapADC, "kpafactor4115.inc") }
#endif
throttle = { table(tpsADC, "throttlefactor.inc") }
idleDC = { (coolant < fastIdleT) * 100 }
altDiv = { alternate ? 2 : 1 }
cycleTime = { 60000.0 / rpm * (2.0-twoStroke) }
nSquirts = { nCylinders/divider }
dutyCycle = { 100.0*nSquirts/altDiv*pulseWidth/cycleTime }
;-------------------------------------------------------------------------------
[Datalog]
; Full datalog.
;
; Default user-defined log emulates the full datalog.
;
; The entries are saved in the datalog file in the order in
; which they appear in the list below.
;
; Channel - Case sensitive name of output channel to be logged.
; Label - String written to header line of log. Be careful
; about changing these, as programs like MSLVV and
; MSTweak key off specific column names.
; Type - Data type of output, converted before writing.
; Format - C-style output format of data.
;
; Channel Label Type Format
; -------------- ---------- ----- ------
entry = time, "Time", float, "%.3f"
entry = secl, "SecL", int, "%d"
entry = rpm100, "RPM", int, "%d"
entry = map, "MAP", int, "%d"
entry = throttle, "TP", int, "%d"
entry = egoVoltage, "O2", float, "%.3f"
entry = mat, "MAT", float, "%.1f"
entry = coolant, "CLT", float, "%.1f"
entry = engine, "Engine", int, "%d"
entry = egoCorrection, "Gego", int, "%d"
entry = airCorrection, "Gair", int, "%d"
entry = warmupEnrich, "Gwarm", int, "%d"
entry = baroCorrection, "Gbaro", int, "%d"
entry = gammaEnrich, "Gammae", int, "%d"
entry = accDecEnrich, "TPSacc", int, "%d"
entry = veCurr, "Gve", int, "%d"
entry = pulseWidth, "PW", float, "%.1f"
entry = blank2, "Gve2", int, "%d"
entry = pulseWidth, "PW2", float, "%.1f"
entry = dutyCycle, "DutyCycle1", float, "%.1f"
entry = dutyCycle, "DutyCycle2", float, "%.1f"
entry = blank1, "UserData1", int, "%d"
entry = blank2, "UserData2", int, "%d"
entry = blank3, "UserData3", int, "%d"

View File

@ -1,786 +0,0 @@
;-------------------------------------------------------------------------------
[MegaTune]
MTversion = 2.25 ; MegaTune itself; needs to match exec version.
queryCommand = "Q" ; B&G embedded code version 2.0/2.98x/3.00
signature = 20 ; Versions above return a single byte, 20T.
;-------------------------------------------------------------------------------
[Constants]
;----------------------------------------------------------------------------
; Constants Definition
; --------------------
;
; Scalar Values
; -------------
; The scaling and translation values are used as follows:
; msValue = userValue / scale - translate
; userValue = (msValue + translate) * scale
;
; I've got no good way to handle a few of these things yet.
;
; Temperatures are fine, check out the Fielding IAC example (fastIdleT).
;
; The TPS stuff is a problem, because we have to modify the ini file for
; each TPS installation and again whenever we move the TPS... I figured
; out a moderately palatable solution to presenting the frequency
; divider in the boost control values, turn it into a bit field and then
; enumerate the resulting frequencies.
;
; Array Values
; ------------
; Arrays are specified just like scalars, except that they have a "shape"
; entry in the fourth parameter. The shape allows you to define lists or
; tables, for example [8] defines a list with eight values and [2x4] defines
; a table with eight values (two rows and four columns). Tables may be
; stored in either "X-" or "Y-order." X-order means that memory is layed
; out like.
;
; [x1,y1] [x2,y1]...[xn,y1] [x1,y2]...
;
; Y-order would be
;
; [x1,y1] [x1,y2]...[x1,yn] [x2,y1]...
;
; To use the TableEditor, you must define two lists and a table, and
; the lengths of the lists must correspond to the shape of the table.
;
; Bit Fields
; ----------
; Bits are numbered 0-7, the rightmost being bit zero. The basic
; data word that stores bit fields must be unsigned.
;
; You need NOT supply the correct number of labels matching the
; number of bits you've specified (one bit requires 2 values, two
; bits requires 4 values and so on). If you neglect to supply enough
; labels, they will be synthesized using the sequence "1", "2" and so
; on based upon their position in the sequence (the cltType and matType
; will end up with identical lists).
;
; If you specify a label as "INVALID" (all upper case), then it will
; not be displayed in the combo box, so you can leave out values that
; make no sense.
;
;----------------------------------------------------------------------------
endianness = big
nPages = 2
burnCommand = "B"
; pageSize = 125
pageSize = 125, 125
pageActivationDelay = 10
; pageActivate = ""
pageActivate = "P\001", "P\002"
pageReadCommand = "V", "V"
pageValueWrite = "W%o%v", "W%o%v"
; pageChunkWrite = "" ; No chunk write for standard MS.
page = 1
; name = bits, type, offset, bits
; name = array, type, offset, shape, units, scale, translate, lo, hi, digits
; name = scalar, type, offset, units, scale, translate, lo, hi, digits
veTable = array, U08, 0, [8x8], "%", 1.0, 0.0, 0.0, 255.0, 0
rpmBins = array, U08, 64, [ 8], "RPM", 100.0, 0.0, 100.0, 25500.0, 0
#if SPEED_DENSITY
mapBins = array, U08, 72, [ 8], "kPa", 1.0, 0.0, 0.0, 255.0, 0
#elif ALPHA_N
tpsBins = array, U08, 72, [ 8], "TPS", 1.0, 0.0, 0.0, 255.0, 0
#elif AIR_FLOW_METER
#error "MSnS does not support MAF"
;#exit
#endif
crankCold = scalar, U08, 80, "ms", 0.1, 0.0, 0.0, 25.5, 1
crankHot = scalar, U08, 81, "ms", 0.1, 0.0, 0.0, 25.5, 1
asePct = scalar, U08, 82, "%", 1.0, 0.0, 0.0, 95.0, 0
aseCount = scalar, U08, 83, "", 1.0, 0.0, 0.0, 254.0, 0
wueBins = array, U08, 84, [ 10], "%", 1.0, 0.0, 100.0, 255.0, 0
taeBins = array, U08, 94, [ 4], "ms", 0.1, 0.0, 0.0, 25.5, 1
taeBins1 = scalar, U08, 94, "ms", 0.1, 0.0, 0.0, 25.5, 1
taeBins2 = scalar, U08, 95, "ms", 0.1, 0.0, 0.0, 25.5, 1
taeBins3 = scalar, U08, 96, "ms", 0.1, 0.0, 0.0, 25.5, 1
taeBins4 = scalar, U08, 97, "ms", 0.1, 0.0, 0.0, 25.5, 1
taeColdA = scalar, U08, 98, "ms", 0.1, 0.0, 0.0, 25.5, 1
tpsThresh = scalar, U08, 99, "v/s",0.1953125, 0.0, 0.2, 49.8, 3
taeTime = scalar, U08, 100, "ms", 0.1, 0.0, 0.0, 25.5, 1
tdePct = scalar, U08, 101, "%", 1.0, 0.0, 0.0, 255.0, 0
#if CELSIUS
egoTemp = scalar, U08, 102, "°C", 0.555, -72, -40, 102.0, 0
#else
egoTemp = scalar, U08, 102, "°F", 1.0, -40, -40, 215.0, 0
#endif
egoCount = scalar, U08, 103, "", 1.0, 0.0, 0.0, 255.0, 0
egoDelta = scalar, U08, 104, "%", 1.0, 0.0, 0.0, 255.0, 0
egoLimit = scalar, U08, 105, "%", 1.0, 0.0, 0.0, 255.0, 0
reqFuel = scalar, U08, 106, "ms", 0.1, 0.0, 0.0, 25.5, 1
divider = scalar, U08, 107, "", 1.0, 0.0
alternate = bits, U08, 108, [0:0], "Simultaneous", "Alternating"
injOpen = scalar, U08, 109, "ms", 0.1, 0.0, 0.1, 25.5, 1
injOCfuel = scalar, U08, 110, "ms", 0.1, 0.0, 0.0, 0.0, 0
injPwmP = scalar, U08, 111, "%", 1.0, 0.0, 0.0, 100.0, 0
injPwmT = scalar, U08, 112, "ms", 0.1, 0.0, 0.0, 25.5, 1
battFac = scalar, U08, 113, "ms/v",0.0166667, 0.0, 0.0, 1.0, 2
rpmk = scalar, U16, 114, "", 1.0, 0.0
; Config1
mapType = bits, U08, 116, [0:1], "115 kPa", "250 kPa", "INVALID", "INVALID"
twoStroke = bits, U08, 116, [2:2], "Four-stroke", "Two-stroke"
injType = bits, U08, 116, [3:3], "Port", "Throttle Body"
nCylinders = bits, U08, 116, [4:7+1]
; Config2
cltType = bits, U08, 117, [0:1], "GM", "Unknown1", "Unknown2", "Unknown3"
matType = bits, U08, 117, [2:3], "GM", "Unknown1", "Unknown2", "Unknown3"
nInjectors = bits, U08, 117, [4:7+1]
; Config3
engineType = bits, U08, 118, [0:0], "Even fire", "Odd fire"
egoType = bits, U08, 118, [1:1], "Narrow band", "Wide band"
algorithm = bits, U08, 118, [2:2], "Speed Density", "Alpha-N"
baroCorr = bits, U08, 118, [3:3], "Off", "On"
primePulse = scalar, U08, 119, "ms", 0.1, 0.0, 0.0, 25.5, 1
egoRPM = scalar, U08, 120, "RPM", 100.0, 0.0, 100, 25500, 0
#if CELSIUS
fastIdleT = scalar, U08, 121, "°C", 0.555, -72.0, -40, 102, 1
#else
fastIdleT = scalar, U08, 121, "°F", 1.0, -40.0, -40, 215, 0
#endif
egoSwitch = scalar, U08, 122, "v", 0.0196, 0.0, 0.0, 5.0, 3
taeColdM = scalar, U08, 123, "%", 1.0, 0.0, 0.0, 250.0, 0
;--------------------------------------------------
;Start Ignition table (Table 2)
;--------------------------------------------------
page = 2
advTable1 = array, U08, 0,[8x8], "deg", 1.0, 0.0, 0.0, 255.0, 0
rpmBins2 = array, U08, 64,[ 8], "RPM", 100.0, 0.0, 100, 25500, 0
#if SPEED_DENSITY
mapBins2 = array, U08, 72, [ 8], "kPa", 1.0, 0.0, 0.0, 255.0, 0
#elif ALPHA_N
tpsBins2 = array, U08, 72, [ 8], "TPS", 1.0, 0.0, 0.0, 255.0, 0
#elif AIR_FLOW_METER
#error "MSnS does not support MAF"
#exit
#endif
TrigAng = scalar, U08, 80, "Deg", 4, 0, 0, 360, 0
FixAng = scalar, U08, 81, "Deg", 0.352, -28.4, -10, 80, 0
Trim = scalar, S08, 82, "Deg", 0.352, 0, -45, 45, 0
CrankAng = scalar, U08, 83, "Deg", 0.352, -28.4, -10, 80, 0
IgHold = scalar, U08, 84, "", 1, 0, 0, 100, 0
Trig_plus = bits, U08, 85[0:1], "0", "+22.5", "INVALID", "+45"
TrigCrank = bits, U08, 85[2:2], "Trigger Return", "Time Based"
IgInv = bits, U08, 85[3:3], "No", "Yes"
oddfire = bits, U08, 85[4:4], "No", "Yes"
IdleAdv = scalar, U08, 86, "Deg", 0.352,-28.4, -10, 80, 0
IdleAdvTPS = scalar, U08, 87, "ADC", 1, 0, 0, 255, 0
IdleAdvRPM = scalar, U08, 88, "RPM", 100, 0, 0, 1200, 0
#if CELSIUS
IdleAdvCLT = scalar, U08, 89, "C", 0.555, -72, -40, 102, 1
#else
IdleAdvCLT = scalar, U08, 89, "F", 1, -40, -40, 215, 0
#endif
IdleDelayTime = scalar, U08, 90, "sec", 1, 0, 0, 5, 0
StgCycles = scalar, U08, 91, "cycles", 1, 0, 0, 255, 0
;Dwell control
;running dwell variable railed to 8 - who needs more than 8ms?
dwellcont = bits, U08, 92, [1:1], "Fixed duty*^", "Dwell control"
dwellcrank = scalar, U08, 93, "ms", 0.1, 0, 0, 25, 1
dwellrun = scalar, U08, 94, "ms", 0.1, 0, 0, 8, 1
numteeth = scalar, U08, 95, "teeth", 1.0, 0.0, 0.0, 255, 0
onetwo = scalar, U08, 96, "teeth", 1.0, 0.0, 0.0, 255, 0
crankRPM = scalar, U08, 97, "rpm", 100.0, 0.0, 100, 1000, 0
tpsflood = scalar, U08, 98, "raw", 1.0, 0.0, 0.0, 255.0, 0
;-------------------------------------------------------------------------------
[Menu]
;----------------------------------------------------------------------------
; There are five pre-defined values that may be used to define your menus.
; The first four allow access to the "standard" dialog boxes, the last one
; merely draws a separator (horizontal line) in the menu.
;
; std_constants
; std_enrichments
; std_realtime
; std_warmup
;
; std_separator
;
; If you use any of the std_constants, std_enrichments or std_warmup
; editors, they may be optionally suffixed with a page number (only
; useful for multi-page code variants), which causes them to edit the
; specified page. If you leave off the page specifier, they edit logical
; page one as specified in the Constants section.
;
; There are four special menu names, which when used append to the standard
; menus of the same name instead of creating a new one. The menu names
; are "File", "Communications", "Tools" and "Help".
;
;----------------------------------------------------------------------------
menu = "&Settings"
subMenu = std_constants, "&Constants"
subMenu = std_enrichments, "&Enrichments"
subMenu = veTableTbl, "&VE Table", 0
subMenu = sparkTbl, "&Spark Table", 1
menu = "&Tuning"
subMenu = std_realtime, "&Realtime Display"
subMenu = std_warmup, "&Warmup Wizard"
subMenu = veTableMap, "&VE Table"
menu = "Spar&k"
subMenu = sparkSettings, "&Spark Settings"
subMenu = sparkTbl, "Spark Table"
;subMenu = IdleAdvance, "Idle Advance settings",
;subMenu = Knock, "Kn&ock System"
;subMenu = IatCltIg, "&IAT/Clt Related Ignition"
subMenu = dwellSettings, "Dwell settings"
;subMenu = wheelsim, "Stim for wheel"
;subMenu = oddwheel, "Oddfire Wheel settings", 7, { wheelon && oddfire }
;-------------------------------------------------------------------------------
[UserDefined]
; define a MegaTune compatible version here
; no need to for std_enrichments, it is built in.
[UserDefinedTS]
; Enhanced TunerStudio dialogs can be defined here
; MegaTune will over look this section
; These dialogs will over-ride those in the UserDefined Section
; User defined ar loaded first, then if one by the same name is defiend here,
; it will replace the MegaTune definition
; dialog = name, Title, Layout
;
; valid options for layout are xAxis, yAxis, border
; for an xAxis, each field added will be added from right to left
; A yAxis layout will add fields from top to bottom
; A border layout will expect an additional constraint to determine placement
; valid border constraints are north, South, East, West, Center
; all 5 do not need to be filled.
; The field name can be either a constant reference, or a reference to another
; dialog which will be added.
; dialogs can be nested and can be mixed with fields
dialog = accelEnrichments, "Acceleration Enrichment"
field = "TPSdot Threshold", tpsThresh
field = "Accel Time", taeTime
field = "Cold Accel Enrichment", taeColdA
field = "Cold Accel Mult", taeColdM
field = "Decel Fuel Amount", tdePct
field = "Acceleration Enrichment Bins (ms)"
field = "2 v/s", taeBins1
field = "4 v/s", taeBins2
field = "8 v/s", taeBins3
field = "15 v/s", taeBins4
dialog = crankPW, "Cranking Pulsewidths (ms)"
#if CELSIUS
field = "Priming Pulsewidth", primePulse
field = "Pulsewidth at -40°C", crankCold
field = "Pulsewidth at 77°C", crankHot
#else
field = "Priming Pulsewidth", primePulse
field = "Pulsewidth at -40°F", crankCold
field = "Pulsewidth at 170°F", crankHot
#endif
dialog = aseSettings, "Afterstart Enrichment"
field = "Enrichment %", asePct
field = "Number of Ignition Cycles", aseCount
dialog = egoSettings, "Exhaust Gas Oxygen"
field = "EGO Sensor Type", egoType
field = "EGO Switch Point (v)", egoSwitch
field = "Coolant Temp Activation", egoTemp
field = "Ignition Events Per Step", egoCount
field = "EGO Step", egoDelta
field = "EGO ± Limit", egoLimit
field = "EGO Active Above", egoRPM
dialog = westEnrichments, "", yAxis
panel = crankPW
panel = aseSettings
panel = egoSettings
dialog = std_enrichments, "Enrichments", border ; xAxis would work here too, but wanted to give a border example
topicHelp = "helpEnrichments"
panel = westEnrichments, West
panel = accelEnrichments, East
dialog = sparkSettings,"Spark Settings",3
topicHelp = Shelp3
field = "Wheel decoder base teeth", numteeth
field = "Missing teeth", onetwo
field = "Trigger Angle"
field = "Trigger Angle ", TrigAng
field = "Note: This number will be rounded to the nearest 4 degrees"
field = "This number represents the angle ATDC when the 1st"
field = "tooth after the gap passes the sensor."
field = ""
;field = "Cranking Timing", TrigCrank
;field = "Cranking advance Angle (see F1)", CrankAng, { TrigCrank + edis + dwellcont }
field = "Hold Ignition", IgHold
field = "Spark Output Inverted (see F1)", IgInv
field = ""
field = "Fixed Angle (-10 = use map)", FixAng
field = "Trim Angle", Trim
dialog = dwellSettings,"Dwell Settings",4
topicHelp = DwellHelp
field = "Dwell control", dwellcont
field = "Or:"
field = " Cranking dwell", dwellcrank, { dwellcont }
field = " Running dwell", dwellrun, { dwellcont }
;field = "Minimum discharge period", mindischg, { dwellcont }
field = ""
field = "#Note"
field = "these times are for 12V. Battery voltage correction"
field = "is applied. At higher voltages the time is reduced"
field = "and when low it is increased"
; -------------------------------------------------------------
; Help down here
help = helpEnrichments, "Enrichments Help"
text = "<strong>Priming Pulse</strong><br><br>"
text = "The duration in milliseconds of a priming pulse that is applied when the MS controller is powered up. If you dont want a priming pulse, set this field to zero. (Only available for version 2.0 and later of MegaSquirt controller code.)<br>"
text = "<br><strong>Cranking Pulsewidth</strong><br><br>"
text = "Cranking pulse width determines how long the injector will be open in milliseconds for each pulse while the engine is cranking (i.e., the RPM is below 300). The actual pulse width is determined by performing linear interpolation on the line described by the end points you enter for the "-40 degrees F" and "170 degrees F" values. For instance, if you enter 10.0 ms as the pulse width at -40 F and 2.0 ms at 170 F, the pulse width will be 6.0 ms when you start your engine at 65 F.<br>"
text = "Note: Cranking pulse occur at every ignition event, while running pulses only occur at the interval specified on the constants page; if you have a 4 cylinder engine and are taking the tachometer signal from the coil, then you will get four (4) cranking pulses per cycle and depending on settings one injection per cycle while running.<br>"
text = "The MS variables "CWU" and "CWH" hold the low temperature and high temperature pulse widths, respectively.<br>"
text = "<br><strong>Afterstart Enrichment</strong><br>"
text = "The afterstart enrichment is one that decays from its max value (specified in the "Enrichment (percent)" field) to zero in a linear fashion over a period defined in "Number of Ignition Cycles." If you specify 20% enrichment over 250 ignition cycles, then the first pulse is enriched by 20%, the 125th pulse is enriched by 10% and the 250th (and later) by zero percent (this assumes 1 event per cycle, or a 1 cylinder engine; divide by the number of ignition events per cycle to get the specific behavior for your motor).<br>"
text = "MS stores these values in the flash constants called "AWC" (Afterstart Warmup Count) and "AWEV" (Afterstart Warmup Enrichment Value).<br>"
text = "<br><strong>Exhaust Gas Oxygen Sensor Parameters</strong><br>"
text = "These parameters define the closed loop behavior of MS. You must have a narrow band O2 sensor hooked up for this mode to work in v.1.0 controller code; either a narrow band or wide band will work with v.2.0 of controller code. To disable closed loop operation altogether, set the EGO Step value to zero.<br>"
text = "<br><strong>EGO Sensor Type</strong><br>"
text = "Specify either a narrow band sensor or wide band sensor. Functionally this merely sets the direction sense of the sensor voltage. For narrow band sensors, the voltage rises as the mixture is richening and drops as the mixture becomes lean. The wide band setting corresponds to the opposite sense, i.e., voltage drops to indicate enrichment (this is how the DIY-WB operates, not necessarily all WB sensors!). (Available in v 2.0 controller code.)<br>"
text = "<br><strong>EGO Switch Point (v)</strong><br>"
text = "This is the switching point voltage that indicates stoichiometric combustion (approximately 14.7:1 with gasoline). For narrow band sensors this is 0.5 v*; for the DIY-WB wideband sensor it is 2.5 v (for other wideband sensors this voltage may be quite different). (This value is only active in v 2.0 controller code.)<br>"
text = "*This is true for zirconia NB sensors, which are used almost exclusively in modern vehicles. The titania NB sensor has a different voltage range (1-5 v), but is rarely used.<br>"
text = "<br><strong>Coolant Temp Activation (°F)</strong><br>"
text = "This is the temperature below which closed loop operation is disabled. If this value is too low, then closed loop will try to lean out the warmup enrichments and you may experience rough running. Typical value is 160 F and should somewhat above the point at which warmup enrichment stops (see the Warmup Enrichment Bins settings and find the lowest on which contains 100).<br>"
text = "The MS value "EGOTEMP" stores this quantity.<br>"
text = "<br><strong>Ignition Events Per Step</strong><br>"
text = "This value determines the rate at which the closed loop algorithm applies correction. The default value of 32, when used on a four cylinder engine with four ignition events per cycle, tells MS to wait for 8 cycles before changing the current correction factor.<br>"
text = "<br><strong>EGO Step (percent)</strong><br>"
text = "Once the closed loop algorithm has decided to change the correction factor, it adds or subtracts this percentage from the current value. This should move slowly to avoid unstable response, so make sure it is small, 1% being the default.<br>"
text = "<br><strong>EGO Limit (%)</strong><br>"
text = "Closed loop operation should not be substituted for proper tuning! This value limits the correction that can be made by the closed loop algorithm, the default of 10% indicates the correction factor cannot go outside the range 90-110%.<br>"
text = "<br><strong>EGO Active Above RPM</strong><br>"
text = "This value specifies the lower limit above which closed loop operation occurs. Typically, your engine will idle best when it is richer than stoich, so turning off closed loop for low RPMs allows this to happen. The default value for the RPM limit is 1200. (Available only in v 2.0 MS, older versions have a fixed 1200 RPM value in the controller code.)<br>"
text = "<br><strong>Warmup Enrichment Bins</strong><br>"
text = "Warmup enrichment is based on coolant temperature. Since warmup enrichment requirements are usually non-linear, several bins are provided to specify different rates in different temperature domains.<br>"
text = "Place values in the "-40" through "160 degrees F" fields, typically running from about 120 at -40 F to 100 at 100 F; make sure the values are all 100 or greater.<br>"
text = "The MS array "WWU" contains these enrichment values.<br>"
text = "<br><strong>Acceleration Enrichment</strong><br>"
text = "Acceleration enrichment (AE) occurs when you open the throttle "rapidly" to avoid bogging the engine. In v.1.01 MS, this is done solely based upon the rate of change in the throttle position sensor (also called TPSDOT).<br>"
text = "<br><strong>TPSDOT Thresh</strong><br>"
text = "This is the threshold in v/sec below which no acceleration enrichment will occur (you can move the throttle from idle to full open without acceleration enrichment, if you open it slowly enough). Depends grossly upon the range of your TPS, a typical value might be 1.2 v/sec.<br>"
text = "<strong>Tuning Note:</strong> While you are tuning the VE table you should set this threshold artificially high (maybe 40.0) to disable acceleration enrichment completely. After the VE table is fairly well-defined, set this back to 1.2 and begin tuning AE.<br>"
text = "MS stores this value in the "TPSTHRESH" variable.<br>"
text = "<br><strong>Accel Time (sec)</strong><br>"
text = "This value indicates how long the acceleration enrichment "squirt" will last. Typical values are around 1.0 second. MS stores this value in the variable "TPSACLK."<br>"
text = "<br><strong>Cold Accel Enrichment (ms)</strong><br>"
text = "The acceleration enrichment pulse also varies depending upon coolant temperature. The value specified here is the pulse width added to the value from the bin calculations at -40 F. The Cold Acceleration Enrichment amount is linearly interpolated from full amount at -40 F down to zero at 165 F. A typical value might be 2.0 ms.<br>"
text = "This value is stored in the "TPSACOLD" variable in MS.<br>"
text = "<br><strong>Cold Accel Multiplier (%)</strong><br>"
text = "Another means for increasing the amount of fuel delivered by the acceleration enrichment pulse is supplied by this value; it is likewise interpolated from the full specified amount at 40F down to zero at 165 F. Before the Cold Acceleration Enrichment value is added to the base acceleration enrichment pulsewidth, it is multiplied by this value.<br>"
text = "Total AE = Base AE * CAM + CAE<br>"
text = "The difference between the two types of AE cold modify can be easily seen with a few examples:<br>"
text = "1) Assume we have a calculated AE pulse of 5.0 ms. Say our coolant temperature is 40 F, giving a CAE pulse of 2.0 ms and CAM is turned off (100%). The result is 5.0+2.0 = 7.0 ms.<br>"
text = "2) Assume same base AE and temperature, but now we turn off CAE (0.0 ms) and set CAM to give 140%. The result is the same, we get 5.0*1.4 = 7.0 ms.<br>"
text = "3) Take the first case, but hit the accelerator faster, giving 8.0 ms base AE pulse. We now have a result of 8.0+2.0 = 10.0 ms.<br>"
text = "4) Take case 2, but with the higher base AE pulse, giving 8.0*1.4 = 11.2 ms.<br>"
text = "The bottom line is that the CAE modifier is constant and independent of the base pulse, where on the other hand, the CAM modifier has a proportional effect on the AE, bigger base pulse means bigger result.<br>"
text = "This value is stored in the 'ACMULT' variable in MS.<br>"
text = "<br><strong>Decel Fuel Amount (%)</strong><br>"
text = "When you let off the throttle rapidly (that is the closing rate exceeds TPSDOT Thresh) and the engine is turning faster than 1500 RPM, then deceleration fuel cutoff is performed by MS. Deceleration fuel amount is multiplied by the "normal" pulse width, that is, if the calculated pulse is 12.0 ms and you have 20% decel amount, then the resulting pulse width is 2.4 ms. A value of 100% causes the fuel to remain at its calculated value, and can cure bucking on deceleration in vehicles with manual transmissions; those with automatic transmissions may benefit in fuel economy by using values below 100%.<br>"
text = "The MS variable "TPSDQ" holds this value as a percentage. <br>"
text = "<br><strong>Acceleration Enrichment Bins (ms)</strong><br>"
text = "These bins specify the actual enrichment in terms of pulse width. They are linearly interpolated to determine a value that is ultimately added to the computed pulse width.<br>"
text = "The array of values is called "TPSAQ" as stored in MS."
[TableEditor]
; table_id, map3d_id, "title", page
table = veTableTbl, veTableMap, "VE Table", 1
; constant, variable
xBins = rpmBins, rpm
#if SPEED_DENSITY
yBins = mapBins, map
#else
yBins = tpsBins, tps
#endif
zBins = veTable
gridHeight = 2.0
gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees.
upDownLabel = "(RICHER)", "(LEANER)"
table = sparkTbl, sparkMap, "Ignition Advance Table", 2
xBins = rpmBins2, rpm
#if SPEED_DENSITY
yBins = mapBins2, map
#else ALPHA_N
yBins = tpsBins2, tps
#endif
zBins = advTable1
gridHeight = 3.0
upDownLabel = "ADVANCED", "RETARDED"
;-------------------------------------------------------------------------------
[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
baroADCGauge = baroADC, "Barometer ADC", "", 0, 255, -1, -1, 256, 256, 0, 0
mapADCGauge = mapADC, "MAP ADC", "", 0, 255, -1, -1, 256, 256, 0, 0
matADCGauge = matADC, "MAT ADC", "", 0, 255, -1, -1, 256, 256, 0, 0
cltADCGauge = cltADC, "CLT ADC", "", 0, 255, -1, -1, 256, 256, 0, 0
tpsADCGauge = tpsADC, "TPS ADC", "", 0, 255, -1, -1, 256, 256, 0, 0
batADCGauge = batADC, "BAT ADC", "", 0, 255, -1, -1, 256, 256, 0, 0
#if NARROW_BAND_EGO
egoGauge = egoVoltage, "Exhaust Gas Oxygen", "volts", 0, 1.0, 0.2, 0.3, 0.6, 0.8, 2, 2
#else
egoGauge = egoVoltage, "Exhaust Gas Oxygen", "volts", 0.5, 4.5, 0.0, 0.0, 5.0, 5.0, 2, 2
#endif
lambdaGauge = lambda, "Lambda", "", 0.5, 1.5, 0.5, 0.7, 2, 1.1, 2, 2
accelEnrichGauge = accDecEnrich, "Accel Enrich", "%", 50, 150, -1, -1, 999, 999, 0, 0
afrGauge = afr, "Air:Fuel Ratio", "", 10, 19.4, 12, 13, 15, 16, 2, 2
clockGauge = secl, "Clock", "Seconds", 0, 255, 10, 10, 245, 245, 0, 0
deadGauge = deadValue, "---", "", 0, 1, -1, -1, 2, 2, 0, 0
dutyCycleGauge = dutyCycle, "Duty Cycle", "%", 0, 100, -1, -1, 85, 90, 1, 1
egoCorrGauge = egoCorrection, "EGO Correction", "%", 50, 150, 90, 99, 101, 110, 0, 0
gammaEnrichGauge = gammaEnrich, "Gamma Enrichment", "%", 50, 150, -1, -1, 151, 151, 0, 0
mapGauge = map, "Engine MAP", "kPa", 0, 255, 0, 20, 200, 245, 0, 0
pulseWidthGauge = pulseWidth, "Pulse Width", "mSec", 0, 25.5, 1.0, 1.2, 20, 25, 1, 1
tachometer = rpm, "Engine Speed", "RPM", 0, 8000, 300, 600, 3000, 5000, 0, 0
throttleGauge = throttle, "Throttle Position", "%TPS", 0, 100, -1, 1, 90, 100, 0, 0
veBucketGauge = veTuneValue, "VE Value", "%", 0, 120, -1, -1, 999, 999, 0, 0
veGauge = veCurr, "VE Current", "%", 0, 120, -1, -1, 999, 999, 0, 0
voltMeter = batteryVoltage,"Battery Voltage", "volts", 7, 21, 8, 9, 15, 16, 2, 2
warmupEnrichGauge = warmupEnrich, "Warmup Enrichment", "%", 100, 150, -1, -1, 101, 105, 0, 0
#if CELSIUS
cltGauge = coolant, "Coolant Temp", "%TEMP", -40, 120, -15, 0, 95, 105, 0, 0
matGauge = mat, "Manifold Air Temp", "%TEMP", -40, 110, -15, 0, 95, 100, 0, 0
#else
cltGauge = coolant, "Coolant Temp", "%TEMP", -40, 250, 0, 30, 200, 220, 0, 0
matGauge = mat, "Manifold Air Temp", "%TEMP", -40, 215, 0, 30, 200, 210, 0, 0
#endif
advanceGauge = advance, "Spark Advance", "deg BTDC", 50, -10, 0, 0, 35, 45, 0,
;-------------------------------------------------------------------------------
[FrontPage]
#if NARROW_BAND_EGO
egoLEDs = 0.0, 1.0, 0.5 ; NB settings.
#else
; If you reverse these range values as you see below, then the LED
; bar will work as you expect, high on the right, low on the left.
egoLEDs = 4.0, 1.0, 2.5 ; WB settings.
#endif
; Gauges are numbered left to right, top to bottom.
;
; 1 2 3 4
; 5 6 7 8
gauge1 = tachometer
#if SPEED_DENSITY
gauge2 = throttleGauge
#else
gauge2 = tpsGauge
#endif
gauge3 = pulseWidthGauge
gauge4 = dutyCycleGauge
gauge5 = mapGauge
gauge6 = matGauge
gauge7 = cltGauge
gauge8 = gammaEnrichGauge
;----------------------------------------------------------------------------
; Indicators
; expr off-label on-label, off-bg, off-fg, on-bg, on-fg
indicator = { ready }, "Not Ready", "Ready", white, black, green, black
indicator = { crank }, "Not Cranking", "Cranking", white, black, green, black
indicator = { startw }, "ASE OFF", "ASE", white, black, green, black
indicator = { warmup }, "WUE OFF", "WUE", white, black, green, black
indicator = { tpsaccaen }, "TPS Accel", "TPS Accel", white, black, green, black
indicator = { mapaccaen }, "MAP Accel", "MAP Accel", 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 }, "", "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, 1.0
#else
egoBar = 0, 5.0
#endif
gammaEBar = 0, 200
mapBar = 0, 255
pulseWidthBar = 0, 25.5
rpmBar = 0, 8000
throttleBar = 0, 100
egoCorrBar = 0, 200
baroCorrBar = 0, 200
warmupCorrBar = 0, 200
airdenCorrBar = 0, 200
veCorrBar = 0, 200
accCorrBar = 0, 100
;-------------------------------------------------------------------------------
[Tuning]
#if NARROW_BAND_EGO
egoLEDs = 0.0, 1.0, 0.5 ; NB settings.
#else
; If you reverse these range values as you see below, then the LED
; bar will work as you expect, high on the right, low on the left.
egoLEDs = 4.0, 1.0, 2.5 ; WB settings.
#endif
font = "Courier", 14
spotDepth = 2 ; 0 = no indicators, 1 = Z only, 2 = XYZ indicators.
cursorDepth = 2 ; Same as spot depth.
; The four radio buttons on the tuning screen select a "page" of six
; gauges. The gauge numbering is the same as the front page, across
; then down.
; 1 2
; 3 4
; 5 6
;
; gaugeColumns allows you to hide or show gauges in column 2 (i.e.,
; gauges 2, 4 and 6).
gaugeColumns = 2 ; Only 1 or 2 are valid.
;----------------------------------------------------------------------------
; Notes on tuning screen gauges:
; pageButtons = Labels for radio buttons at bottom of tuning dialog.
;
; Gauge 2 previously switched automatically to be tpsGauge when alpha-n
; was enabled, but you need to do it manually now.
;----------------------------------------------------------------------------
; Page 1 Page 2 Page 3 Page 4
pageButtons = "&EGO", "&WUE", "PW&1", "PW&2"
gauge1 = tachometer, tachometer, tachometer, tachometer
gauge2 = mapGauge, mapGauge, mapGauge, mapGauge
gauge3 = egoGauge, egoGauge, egoGauge, egoGauge
gauge4 = egoCorrGauge, warmupEnrichGauge, pulseWidthGauge, pulseWidthGauge
gauge5 = veBucketGauge, veBucketGauge, veBucketGauge, veBucketGauge
gauge6 = accelEnrichGauge, accelEnrichGauge, dutyCycleGauge, dutyCycleGauge
;-------------------------------------------------------------------------------
[OutputChannels]
; The number of bytes MegaTune should expect as a result
; of sending the "A" command to MegaSquirt is determined
; by the value of ochBlockSize, so be very careful when
; you change it.
deadValue = { 0 } ; Convenient unchanging value.
ochGetCommand = "A"
ochBlockSize = 23
secl = scalar, U08, 0, "sec", 1.000, 0.000
squirt = scalar, U08, 1, "bits", 1.000, 0.000
engine = scalar, U08, 2, "bits", 1.000, 0.000
ready = bits, U08, 2, [0:0]
crank = bits, U08, 2, [1:1]
startw = bits, U08, 2, [2:2]
warmup = bits, U08, 2, [3:3]
tpsaccaen = bits, U08, 2, [4:4]
tpsaccden = bits, U08, 2, [5:5]
mapaccaen = bits, U08, 2, [6:6]
mapaccden = bits, U08, 2, [7:7]
baroADC = scalar, U08, 3, "ADC", 1.000, 0.000
mapADC = scalar, U08, 4, "ADC", 1.000, 0.000
matADC = scalar, U08, 5, "ADC", 1.000, 0.000
cltADC = scalar, U08, 6, "ADC", 1.000, 0.000
tps = scalar, U08, 7, "%", 1.000, 0.000
batADC = scalar, U08, 8, "ADC", 1.000, 0.000
egoADC = scalar, U08, 9, "ADC", 1.000, 0.000
egoCorrection = scalar, U08, 10, "%", 1.000, 0.000
airCorrection = scalar, U08, 11, "%", 1.000, 0.000
warmupEnrich = scalar, U08, 12, "%", 1.000, 0.000
rpm100 = scalar, U08, 13, "r100", 1.000, 0.000
pulseWidth = scalar, U08, 14, "ms", 0.100, 0.000
accelEnrich = scalar, U08, 15, "%", 1.000, 0.000
baroCorrection = scalar, U08, 16, "%", 1.000, 0.000
gammaEnrich = scalar, U08, 17, "%", 1.000, 0.000
veCurr = scalar, U08, 18, "%", 1.000, 0.000
blank1 = scalar, U08, 19 ; Raw inputs, as they come from MS.
blank2 = scalar, U08, 20
blank3 = scalar, U08, 21
advance = scalar, U08, 22, "deg", 1.000, 0.000
; Computed output channels. See "megatuneExamples.ini" for all the
; pre-defined variables, search for "???" and you'll see them.
accDecEnrich = { accelEnrich + ((engine & 0b00100000) ? tdePct : 100) }
batteryVoltage = { batADC / 255.0 * 30.0 } ; Current MS power supply voltage.
coolant = { tempCvt(table(cltADC, "thermfactor.inc")-40) } ; Coolant sensor temperature in user units.
egoVoltage = { egoADC / 255.0 * 5.0 } ; EGO sensor voltage.
mat = { tempCvt(table(matADC, "matfactor.inc")-40) } ; Manifold temperature in user units.
rpm = { rpm100*100 } ; True RPM.
time = { timeNow } ; "timeNow" is a parameterless built-in function.
afrtarget = { 0 }
#include "lambdaSensors.ini"
#if MPX4250
barometer = { table(baroADC, "kpafactor4250.inc") }
map = { table(mapADC, "kpafactor4250.inc") } ; Manifold pressure in kPa.
#else
barometer = { table(baroADC, "kpafactor4115.inc") }
map = { table(mapADC, "kpafactor4115.inc") }
#endif
; throttle = { table(tps, "throttlefactor.inc") }
throttle = { tps }, "%"
idleDC = { (coolant < fastIdleT) * 100 }
altDiv = { alternate ? 2 : 1 }
cycleTime = { 60000.0 / rpm * (2.0-twoStroke) }
nSquirts = { nCylinders/divider }
dutyCycle = { 100.0*nSquirts/altDiv*pulseWidth/cycleTime }
;-------------------------------------------------------------------------------
[Datalog]
; Full datalog.
;
; Default user-defined log emulates the full datalog.
;
; The entries are saved in the datalog file in the order in
; which they appear in the list below.
;
; Channel - Case sensitive name of output channel to be logged.
; Label - String written to header line of log. Be careful
; about changing these, as programs like MSLVV and
; MSTweak key off specific column names.
; Type - Data type of output, converted before writing.
; Format - C-style output format of data.
;
; Channel Label Type Format
; -------------- ---------- ----- ------
entry = time, "Time", float, "%.3f"
entry = secl, "SecL", int, "%d"
entry = rpm100, "RPM", int, "%d"
entry = map, "MAP", int, "%d"
entry = throttle, "TP", int, "%d"
entry = egoVoltage, "O2", float, "%.3f"
entry = mat, "MAT", float, "%.1f"
entry = coolant, "CLT", float, "%.1f"
entry = engine, "Engine", int, "%d"
entry = egoCorrection, "Gego", int, "%d"
entry = airCorrection, "Gair", int, "%d"
entry = warmupEnrich, "Gwarm", int, "%d"
entry = baroCorrection, "Gbaro", int, "%d"
entry = gammaEnrich, "Gammae", int, "%d"
entry = accDecEnrich, "TPSacc", int, "%d"
entry = veCurr, "Gve", int, "%d"
entry = pulseWidth, "PW", float, "%.1f"
entry = blank2, "Gve2", int, "%d"
entry = pulseWidth, "PW2", float, "%.1f"
entry = dutyCycle, "DutyCycle1", float, "%.1f"
entry = dutyCycle, "DutyCycle2", float, "%.1f"
entry = blank1, "UserData1", int, "%d"
entry = blank2, "UserData2", int, "%d"
entry = blank3, "UserData3", int, "%d"

View File

@ -1,863 +0,0 @@
;-------------------------------------------------------------------------------
[MegaTune]
MTversion = 2.25 ; MegaTune itself; needs to match exec version.
queryCommand = "Q" ; B&G embedded code version 2.0/2.98x/3.00
signature = 20 ; Versions above return a single byte, 20T.
;-------------------------------------------------------------------------------
[Constants]
;----------------------------------------------------------------------------
; Constants Definition
; --------------------
;
; Scalar Values
; -------------
; The scaling and translation values are used as follows:
; msValue = userValue / scale - translate
; userValue = (msValue + translate) * scale
;
; I've got no good way to handle a few of these things yet.
;
; Temperatures are fine, check out the Fielding IAC example (fastIdleT).
;
; The TPS stuff is a problem, because we have to modify the ini file for
; each TPS installation and again whenever we move the TPS... I figured
; out a moderately palatable solution to presenting the frequency
; divider in the boost control values, turn it into a bit field and then
; enumerate the resulting frequencies.
;
; Array Values
; ------------
; Arrays are specified just like scalars, except that they have a "shape"
; entry in the fourth parameter. The shape allows you to define lists or
; tables, for example [8] defines a list with eight values and [2x4] defines
; a table with eight values (two rows and four columns). Tables may be
; stored in either "X-" or "Y-order." X-order means that memory is layed
; out like.
;
; [x1,y1] [x2,y1]...[xn,y1] [x1,y2]...
;
; Y-order would be
;
; [x1,y1] [x1,y2]...[x1,yn] [x2,y1]...
;
; To use the TableEditor, you must define two lists and a table, and
; the lengths of the lists must correspond to the shape of the table.
;
; Bit Fields
; ----------
; Bits are numbered 0-7, the rightmost being bit zero. The basic
; data word that stores bit fields must be unsigned.
;
; You need NOT supply the correct number of labels matching the
; number of bits you've specified (one bit requires 2 values, two
; bits requires 4 values and so on). If you neglect to supply enough
; labels, they will be synthesized using the sequence "1", "2" and so
; on based upon their position in the sequence (the cltType and matType
; will end up with identical lists).
;
; If you specify a label as "INVALID" (all upper case), then it will
; not be displayed in the combo box, so you can leave out values that
; make no sense.
;
;----------------------------------------------------------------------------
endianness = big
nPages = 2
burnCommand = "B"
; pageSize = 125
pageSize = 125, 125
pageActivationDelay = 10
; pageActivate = ""
pageActivate = "P\001", "P\002"
pageReadCommand = "V", "V"
pageValueWrite = "W%o%v", "W%o%v"
; pageChunkWrite = "" ; No chunk write for standard MS.
page = 1
; name = bits, type, offset, bits
; name = array, type, offset, shape, units, scale, translate, lo, hi, digits
; name = scalar, type, offset, units, scale, translate, lo, hi, digits
veTable = array, U08, 0, [8x8], "%", 1.0, 0.0, 0.0, 255.0, 0
rpmBins = array, U08, 64, [ 8], "RPM", 100.0, 0.0, 100.0, 25500.0, 0
#if SPEED_DENSITY
mapBins = array, U08, 72, [ 8], "kPa", 1.0, 0.0, 0.0, 255.0, 0
#elif ALPHA_N
tpsBins = array, U08, 72, [ 8], "TPS", 1.0, 0.0, 0.0, 255.0, 0
#elif AIR_FLOW_METER
#error "MSnS does not support MAF"
;#exit
#endif
crankCold = scalar, U08, 80, "ms", 0.1, 0.0, 0.0, 25.5, 1
crankHot = scalar, U08, 81, "ms", 0.1, 0.0, 0.0, 25.5, 1
asePct = scalar, U08, 82, "%", 1.0, 0.0, 0.0, 95.0, 0
aseCount = scalar, U08, 83, "", 1.0, 0.0, 0.0, 254.0, 0
wueBins = array, U08, 84, [ 10], "%", 1.0, 0.0, 100.0, 255.0, 0
taeBins = array, U08, 94, [ 4], "ms", 0.1, 0.0, 0.0, 25.5, 1
taeBins1 = scalar, U08, 94, "ms", 0.1, 0.0, 0.0, 25.5, 1
taeBins2 = scalar, U08, 95, "ms", 0.1, 0.0, 0.0, 25.5, 1
taeBins3 = scalar, U08, 96, "ms", 0.1, 0.0, 0.0, 25.5, 1
taeBins4 = scalar, U08, 97, "ms", 0.1, 0.0, 0.0, 25.5, 1
taeColdA = scalar, U08, 98, "ms", 0.1, 0.0, 0.0, 25.5, 1
tpsThresh = scalar, U08, 99, "v/s",0.1953125, 0.0, 0.2, 49.8, 3
taeTime = scalar, U08, 100, "ms", 0.1, 0.0, 0.0, 25.5, 1
tdePct = scalar, U08, 101, "%", 1.0, 0.0, 0.0, 255.0, 0
#if CELSIUS
egoTemp = scalar, U08, 102, "°C", 0.555, -72, -40, 102.0, 0
#else
egoTemp = scalar, U08, 102, "°F", 1.0, -40, -40, 215.0, 0
#endif
egoCount = scalar, U08, 103, "", 1.0, 0.0, 0.0, 255.0, 0
egoDelta = scalar, U08, 104, "%", 1.0, 0.0, 0.0, 255.0, 0
egoLimit = scalar, U08, 105, "%", 1.0, 0.0, 0.0, 255.0, 0
reqFuel = scalar, U08, 106, "ms", 0.1, 0.0, 0.0, 25.5, 1
divider = scalar, U08, 107, "", 1.0, 0.0
alternate = bits, U08, 108, [0:0], "Simultaneous", "Alternating"
injOpen = scalar, U08, 109, "ms", 0.1, 0.0, 0.1, 25.5, 1
injOCfuel = scalar, U08, 110, "ms", 0.1, 0.0, 0.0, 0.0, 0
injPwmP = scalar, U08, 111, "%", 1.0, 0.0, 0.0, 100.0, 0
injPwmT = scalar, U08, 112, "ms", 0.1, 0.0, 0.0, 25.5, 1
battFac = scalar, U08, 113, "ms/v",0.0166667, 0.0, 0.0, 1.0, 2
rpmk = scalar, U16, 114, "", 1.0, 0.0
; Config1
mapType = bits, U08, 116, [0:1], "115 kPa", "250 kPa", "INVALID", "INVALID"
twoStroke = bits, U08, 116, [2:2], "Four-stroke", "Two-stroke"
injType = bits, U08, 116, [3:3], "Port", "Throttle Body"
nCylinders = bits, U08, 116, [4:7+1]
; Config2
cltType = bits, U08, 117, [0:1], "GM", "Unknown1", "Unknown2", "Unknown3"
matType = bits, U08, 117, [2:3], "GM", "Unknown1", "Unknown2", "Unknown3"
nInjectors = bits, U08, 117, [4:7+1]
; Config3
engineType = bits, U08, 118, [0:0], "Even fire", "Odd fire"
egoType = bits, U08, 118, [1:1], "Narrow band", "Wide band"
algorithm = bits, U08, 118, [2:2], "Speed Density", "Alpha-N"
baroCorr = bits, U08, 118, [3:3], "Off", "On"
primePulse = scalar, U08, 119, "ms", 0.1, 0.0, 0.0, 25.5, 1
egoRPM = scalar, U08, 120, "RPM", 100.0, 0.0, 100, 25500, 0
#if CELSIUS
fastIdleT = scalar, U08, 121, "°C", 0.555, -72.0, -40, 102, 1
#else
fastIdleT = scalar, U08, 121, "°F", 1.0, -40.0, -40, 215, 0
#endif
egoSwitch = scalar, U08, 122, "v", 0.0196, 0.0, 0.0, 5.0, 3
taeColdM = scalar, U08, 123, "%", 1.0, 0.0, 0.0, 250.0, 0
;--------------------------------------------------
;Start Ignition table (Table 2)
;--------------------------------------------------
page = 2
advTable1 = array, U08, 0,[8x8], "deg", 1.0, 0.0, 0.0, 255.0, 0
rpmBins2 = array, U08, 64,[ 8], "RPM", 100.0, 0.0, 100, 25500, 0
#if SPEED_DENSITY
mapBins2 = array, U08, 72, [ 8], "kPa", 1.0, 0.0, 0.0, 255.0, 0
#elif ALPHA_N
tpsBins2 = array, U08, 72, [ 8], "TPS", 1.0, 0.0, 0.0, 255.0, 0
#elif AIR_FLOW_METER
#error "MSnS does not support MAF"
#exit
#endif
TrigAng = scalar, U08, 80, "Deg", 4, 0, 0, 360, 0
FixAng = scalar, U08, 81, "Deg", 0.352, -28.4, -10, 80, 0
Trim = scalar, S08, 82, "Deg", 0.352, 0, -45, 45, 0
CrankAng = scalar, U08, 83, "Deg", 0.352, -28.4, -10, 80, 0
IgHold = scalar, U08, 84, "", 1, 0, 0, 100, 0
Trig_plus = bits, U08, 85[0:1], "0", "+22.5", "INVALID", "+45"
TrigCrank = bits, U08, 85[2:2], "Trigger Return", "Time Based"
IgInv = bits, U08, 85[3:3], "No", "Yes"
oddfire = bits, U08, 85[4:4], "No", "Yes"
IdleAdv = scalar, U08, 86, "Deg", 0.352,-28.4, -10, 80, 0
IdleAdvTPS = scalar, U08, 87, "ADC", 1, 0, 0, 255, 0
IdleAdvRPM = scalar, U08, 88, "RPM", 100, 0, 0, 1200, 0
#if CELSIUS
IdleAdvCLT = scalar, U08, 89, "C", 0.555, -72, -40, 102, 1
#else
IdleAdvCLT = scalar, U08, 89, "F", 1, -40, -40, 215, 0
#endif
IdleDelayTime = scalar, U08, 90, "sec", 1, 0, 0, 5, 0
StgCycles = scalar, U08, 91, "cycles", 1, 0, 0, 255, 0
;Dwell control
;running dwell variable railed to 8 - who needs more than 8ms?
dwellcont = bits, U08, 92, [1:1], "Fixed duty*^", "Dwell control"
dwellcrank = scalar, U08, 93, "ms", 0.1, 0, 0, 25, 1
dwellrun = scalar, U08, 94, "ms", 0.1, 0, 0, 8, 1
numteeth = scalar, U08, 95, "teeth", 1.0, 0.0, 0.0, 255, 0
onetwo = scalar, U08, 96, "teeth", 1.0, 0.0, 0.0, 255, 0
crankRPM = scalar, U08, 97, "rpm", 100.0, 0.0, 100, 1000, 0
tpsflood = scalar, U08, 98, "raw", 1.0, 0.0, 0.0, 255.0, 0
;Rev Limits
SoftRevLim = scalar, U08, 99, "rpm", 100.0, 0.0, 100, 25500, 0
SoftLimRetard = scalar, U08, 100, "deg", 0.352, -28.4, -10, 80, 0
SoftLimMax = scalar, U08, 101, "s", 0.1, 0.0, 0.0, 25.5, 1
HardRevLim = scalar, U08, 102, "rpm", 100, 0.0, 100, 25500, 0
;-------------------------------------------------------------------------------
[Menu]
;----------------------------------------------------------------------------
; There are five pre-defined values that may be used to define your menus.
; The first four allow access to the "standard" dialog boxes, the last one
; merely draws a separator (horizontal line) in the menu.
;
; std_constants
; std_enrichments
; std_realtime
; std_warmup
;
; std_separator
;
; If you use any of the std_constants, std_enrichments or std_warmup
; editors, they may be optionally suffixed with a page number (only
; useful for multi-page code variants), which causes them to edit the
; specified page. If you leave off the page specifier, they edit logical
; page one as specified in the Constants section.
;
; There are four special menu names, which when used append to the standard
; menus of the same name instead of creating a new one. The menu names
; are "File", "Communications", "Tools" and "Help".
;
;----------------------------------------------------------------------------
menu = "&Settings"
subMenu = std_constants, "&Constants"
subMenu = std_enrichments, "&Enrichments"
menu = "&Tuning"
subMenu = std_realtime, "&Realtime Display"
subMenu = std_warmup, "&Warmup Enrichment"
subMenu = accelEnrichments, "&Acceleration Wizard"
subMenu = veTableTbl, "&VE Table", 0
subMenu = sparkTbl, "&Spark Table", 1
subMenu = RevLimiterS, "Rev Limits", 2
menu = "&Spark"
subMenu = sparkSettings, "&Spark Settings"
subMenu = sparkTbl, "Spark Table", 1
;subMenu = IdleAdvance, "Idle Advance settings",
;subMenu = Knock, "Kn&ock System"
;subMenu = IatCltIg, "&IAT/Clt Related Ignition"
subMenu = dwellSettings, "Dwell settings"
;subMenu = wheelsim, "Stim for wheel"
;subMenu = oddwheel, "Oddfire Wheel settings", 7, { wheelon && oddfire }
;-------------------------------------------------------------------------------
[UserDefined]
; define a MegaTune compatible version here
; no need to for std_enrichments, it is built in.
[UserDefinedTS]
; Enhanced TunerStudio dialogs can be defined here
; MegaTune will over look this section
; These dialogs will over-ride those in the UserDefined Section
; User defined ar loaded first, then if one by the same name is defiend here,
; it will replace the MegaTune definition
; dialog = name, Title, Layout
;
; valid options for layout are xAxis, yAxis, border
; for an xAxis, each field added will be added from right to left
; A yAxis layout will add fields from top to bottom
; A border layout will expect an additional constraint to determine placement
; valid border constraints are north, South, East, West, Center
; all 5 do not need to be filled.
; The field name can be either a constant reference, or a reference to another
; dialog which will be added.
; dialogs can be nested and can be mixed with fields
dialog = accelEnrichments, "Acceleration Enrichment"
field = "TPSdot Threshold", tpsThresh
field = "Accel Time", taeTime
field = "Cold Accel Enrichment", taeColdA
field = "Cold Accel Mult", taeColdM
field = "Decel Fuel Amount", tdePct
field = "Acceleration Enrichment Bins (ms)"
field = "2 v/s", taeBins1
field = "4 v/s", taeBins2
field = "8 v/s", taeBins3
field = "15 v/s", taeBins4
;time based AE
dialog = time_ae_south, ""
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_north, "", xAxis
panel = time_accel_tpsdot_curve, East, {tpsProportion > 0}
dialog = AEtime_settings, "Time-based Accel Enrichment", yAxis
panel = time_ae_north
panel = time_ae_south
dialog = crankPW, "Cranking Pulsewidths (ms)"
#if CELSIUS
field = "Priming Pulsewidth", primePulse
field = "Pulsewidth at -40°C", crankCold
field = "Pulsewidth at 77°C", crankHot
#else
field = "Priming Pulsewidth", primePulse
field = "Pulsewidth at -40°F", crankCold
field = "Pulsewidth at 170°F", crankHot
#endif
dialog = aseSettings, "Afterstart Enrichment"
field = "Enrichment %", asePct
field = "Number of Ignition Cycles", aseCount
dialog = nestedwarmup_curve, "Warmup Enrichment percent multiplier"
panel = warmup_curve
dialog = egoSettings, "Exhaust Gas Oxygen"
field = "EGO Sensor Type", egoType
field = "EGO Switch Point (v)", egoSwitch
field = "Coolant Temp Activation", egoTemp
field = "Ignition Events Per Step", egoCount
field = "EGO Step", egoDelta
field = "EGO ± Limit", egoLimit
field = "EGO Active Above", egoRPM
dialog = westEnrichments, "", yAxis
panel = crankPW
panel = aseSettings
panel = egoSettings
dialog = std_enrichments, "Enrichments", border ; xAxis would work here too, but wanted to give a border example
topicHelp = "helpEnrichments"
panel = westEnrichments, West
panel = accelEnrichments, East
dialog = sparkSettings,"Spark Settings",3
topicHelp = Shelp3
field = "Wheel decoder base teeth", numteeth
field = "Missing teeth", onetwo
field = "Trigger Angle"
field = "Trigger Angle ", TrigAng
field = "Note: This number will be rounded to the nearest 4 degrees"
field = "This number represents the angle ATDC when the 1st"
field = "tooth after the gap passes the sensor."
field = ""
;field = "Cranking Timing", TrigCrank
;field = "Cranking advance Angle (see F1)", CrankAng, { TrigCrank + edis + dwellcont }
field = "Hold Ignition", IgHold
field = "Spark Output Inverted (see F1)", IgInv
field = ""
field = "Fixed Angle (-10 = use map)", FixAng
field = "Trim Angle", Trim
dialog = dwellSettings,"Dwell Settings",4
topicHelp = DwellHelp
field = "Dwell control", dwellcont
field = "Or:"
field = " Cranking dwell", dwellcrank, { dwellcont }
field = " Running dwell", dwellrun, { dwellcont }
;field = "Minimum discharge period", mindischg, { dwellcont }
field = ""
field = "#Note"
field = "these times are for 12V. Battery voltage correction"
field = "is applied. At higher voltages the time is reduced"
field = "and when low it is increased"
dialog = RevLimiterS, "Rev Limiter", 4
topicHelp = Fhelp7
field = "Rev Limiter"
field = "Soft rev limit", SoftRevLim
field = "Soft limit absolute timing", SoftLimRetard
field = "Soft limit max time", SoftLimMax
field = "Hard Rev limit", HardRevLim
; [CurveEditor]
;time-based accel enrichment
curve = time_accel_tpsdot_curve, "TPS based AE"
columnLabel = "TPSdot", "Added"
xAxis = 0, 1200, 6
yAxis = 0, 48, 4
xBins = taeRates, TPSdot
yBins = taeBins
; curve = warmup_curve, "Warmup Enrichment Curve"
; columnLabel = "Coolant", "WUE %"
; xAxis = -40, {clthighlim}, 9
; yAxis = 0, 500, 6
; xBins = tempTable, coolant
; yBins = wueBins
; gauge = cltGauge
; -------------------------------------------------------------
; Help down here
help = helpEnrichments, "Enrichments Help"
text = "<strong>Priming Pulse</strong><br><br>"
text = "The duration in milliseconds of a priming pulse that is applied when the MS controller is powered up. If you dont want a priming pulse, set this field to zero. (Only available for version 2.0 and later of MegaSquirt controller code.)<br>"
text = "<br><strong>Cranking Pulsewidth</strong><br><br>"
text = "Cranking pulse width determines how long the injector will be open in milliseconds for each pulse while the engine is cranking (i.e., the RPM is below 300). The actual pulse width is determined by performing linear interpolation on the line described by the end points you enter for the "-40 degrees F" and "170 degrees F" values. For instance, if you enter 10.0 ms as the pulse width at -40 F and 2.0 ms at 170 F, the pulse width will be 6.0 ms when you start your engine at 65 F.<br>"
text = "Note: Cranking pulse occur at every ignition event, while running pulses only occur at the interval specified on the constants page; if you have a 4 cylinder engine and are taking the tachometer signal from the coil, then you will get four (4) cranking pulses per cycle and depending on settings one injection per cycle while running.<br>"
text = "The MS variables "CWU" and "CWH" hold the low temperature and high temperature pulse widths, respectively.<br>"
text = "<br><strong>Afterstart Enrichment</strong><br>"
text = "The afterstart enrichment is one that decays from its max value (specified in the "Enrichment (percent)" field) to zero in a linear fashion over a period defined in "Number of Ignition Cycles." If you specify 20% enrichment over 250 ignition cycles, then the first pulse is enriched by 20%, the 125th pulse is enriched by 10% and the 250th (and later) by zero percent (this assumes 1 event per cycle, or a 1 cylinder engine; divide by the number of ignition events per cycle to get the specific behavior for your motor).<br>"
text = "MS stores these values in the flash constants called "AWC" (Afterstart Warmup Count) and "AWEV" (Afterstart Warmup Enrichment Value).<br>"
text = "<br><strong>Exhaust Gas Oxygen Sensor Parameters</strong><br>"
text = "These parameters define the closed loop behavior of MS. You must have a narrow band O2 sensor hooked up for this mode to work in v.1.0 controller code; either a narrow band or wide band will work with v.2.0 of controller code. To disable closed loop operation altogether, set the EGO Step value to zero.<br>"
text = "<br><strong>EGO Sensor Type</strong><br>"
text = "Specify either a narrow band sensor or wide band sensor. Functionally this merely sets the direction sense of the sensor voltage. For narrow band sensors, the voltage rises as the mixture is richening and drops as the mixture becomes lean. The wide band setting corresponds to the opposite sense, i.e., voltage drops to indicate enrichment (this is how the DIY-WB operates, not necessarily all WB sensors!). (Available in v 2.0 controller code.)<br>"
text = "<br><strong>EGO Switch Point (v)</strong><br>"
text = "This is the switching point voltage that indicates stoichiometric combustion (approximately 14.7:1 with gasoline). For narrow band sensors this is 0.5 v*; for the DIY-WB wideband sensor it is 2.5 v (for other wideband sensors this voltage may be quite different). (This value is only active in v 2.0 controller code.)<br>"
text = "*This is true for zirconia NB sensors, which are used almost exclusively in modern vehicles. The titania NB sensor has a different voltage range (1-5 v), but is rarely used.<br>"
text = "<br><strong>Coolant Temp Activation (°F)</strong><br>"
text = "This is the temperature below which closed loop operation is disabled. If this value is too low, then closed loop will try to lean out the warmup enrichments and you may experience rough running. Typical value is 160 F and should somewhat above the point at which warmup enrichment stops (see the Warmup Enrichment Bins settings and find the lowest on which contains 100).<br>"
text = "The MS value "EGOTEMP" stores this quantity.<br>"
text = "<br><strong>Ignition Events Per Step</strong><br>"
text = "This value determines the rate at which the closed loop algorithm applies correction. The default value of 32, when used on a four cylinder engine with four ignition events per cycle, tells MS to wait for 8 cycles before changing the current correction factor.<br>"
text = "<br><strong>EGO Step (percent)</strong><br>"
text = "Once the closed loop algorithm has decided to change the correction factor, it adds or subtracts this percentage from the current value. This should move slowly to avoid unstable response, so make sure it is small, 1% being the default.<br>"
text = "<br><strong>EGO Limit (%)</strong><br>"
text = "Closed loop operation should not be substituted for proper tuning! This value limits the correction that can be made by the closed loop algorithm, the default of 10% indicates the correction factor cannot go outside the range 90-110%.<br>"
text = "<br><strong>EGO Active Above RPM</strong><br>"
text = "This value specifies the lower limit above which closed loop operation occurs. Typically, your engine will idle best when it is richer than stoich, so turning off closed loop for low RPMs allows this to happen. The default value for the RPM limit is 1200. (Available only in v 2.0 MS, older versions have a fixed 1200 RPM value in the controller code.)<br>"
text = "<br><strong>Warmup Enrichment Bins</strong><br>"
text = "Warmup enrichment is based on coolant temperature. Since warmup enrichment requirements are usually non-linear, several bins are provided to specify different rates in different temperature domains.<br>"
text = "Place values in the "-40" through "160 degrees F" fields, typically running from about 120 at -40 F to 100 at 100 F; make sure the values are all 100 or greater.<br>"
text = "The MS array "WWU" contains these enrichment values.<br>"
text = "<br><strong>Acceleration Enrichment</strong><br>"
text = "Acceleration enrichment (AE) occurs when you open the throttle "rapidly" to avoid bogging the engine. In v.1.01 MS, this is done solely based upon the rate of change in the throttle position sensor (also called TPSDOT).<br>"
text = "<br><strong>TPSDOT Thresh</strong><br>"
text = "This is the threshold in v/sec below which no acceleration enrichment will occur (you can move the throttle from idle to full open without acceleration enrichment, if you open it slowly enough). Depends grossly upon the range of your TPS, a typical value might be 1.2 v/sec.<br>"
text = "<strong>Tuning Note:</strong> While you are tuning the VE table you should set this threshold artificially high (maybe 40.0) to disable acceleration enrichment completely. After the VE table is fairly well-defined, set this back to 1.2 and begin tuning AE.<br>"
text = "MS stores this value in the "TPSTHRESH" variable.<br>"
text = "<br><strong>Accel Time (sec)</strong><br>"
text = "This value indicates how long the acceleration enrichment "squirt" will last. Typical values are around 1.0 second. MS stores this value in the variable "TPSACLK."<br>"
text = "<br><strong>Cold Accel Enrichment (ms)</strong><br>"
text = "The acceleration enrichment pulse also varies depending upon coolant temperature. The value specified here is the pulse width added to the value from the bin calculations at -40 F. The Cold Acceleration Enrichment amount is linearly interpolated from full amount at -40 F down to zero at 165 F. A typical value might be 2.0 ms.<br>"
text = "This value is stored in the "TPSACOLD" variable in MS.<br>"
text = "<br><strong>Cold Accel Multiplier (%)</strong><br>"
text = "Another means for increasing the amount of fuel delivered by the acceleration enrichment pulse is supplied by this value; it is likewise interpolated from the full specified amount at 40F down to zero at 165 F. Before the Cold Acceleration Enrichment value is added to the base acceleration enrichment pulsewidth, it is multiplied by this value.<br>"
text = "Total AE = Base AE * CAM + CAE<br>"
text = "The difference between the two types of AE cold modify can be easily seen with a few examples:<br>"
text = "1) Assume we have a calculated AE pulse of 5.0 ms. Say our coolant temperature is 40 F, giving a CAE pulse of 2.0 ms and CAM is turned off (100%). The result is 5.0+2.0 = 7.0 ms.<br>"
text = "2) Assume same base AE and temperature, but now we turn off CAE (0.0 ms) and set CAM to give 140%. The result is the same, we get 5.0*1.4 = 7.0 ms.<br>"
text = "3) Take the first case, but hit the accelerator faster, giving 8.0 ms base AE pulse. We now have a result of 8.0+2.0 = 10.0 ms.<br>"
text = "4) Take case 2, but with the higher base AE pulse, giving 8.0*1.4 = 11.2 ms.<br>"
text = "The bottom line is that the CAE modifier is constant and independent of the base pulse, where on the other hand, the CAM modifier has a proportional effect on the AE, bigger base pulse means bigger result.<br>"
text = "This value is stored in the 'ACMULT' variable in MS.<br>"
text = "<br><strong>Decel Fuel Amount (%)</strong><br>"
text = "When you let off the throttle rapidly (that is the closing rate exceeds TPSDOT Thresh) and the engine is turning faster than 1500 RPM, then deceleration fuel cutoff is performed by MS. Deceleration fuel amount is multiplied by the "normal" pulse width, that is, if the calculated pulse is 12.0 ms and you have 20% decel amount, then the resulting pulse width is 2.4 ms. A value of 100% causes the fuel to remain at its calculated value, and can cure bucking on deceleration in vehicles with manual transmissions; those with automatic transmissions may benefit in fuel economy by using values below 100%.<br>"
text = "The MS variable "TPSDQ" holds this value as a percentage. <br>"
text = "<br><strong>Acceleration Enrichment Bins (ms)</strong><br>"
text = "These bins specify the actual enrichment in terms of pulse width. They are linearly interpolated to determine a value that is ultimately added to the computed pulse width.<br>"
text = "The array of values is called "TPSAQ" as stored in MS."
[TableEditor]
; table_id, map3d_id, "title", page
table = veTableTbl, veTableMap, "VE Table", 1
; constant, variable
xBins = rpmBins, rpm
#if SPEED_DENSITY
yBins = mapBins, map
#else
yBins = tpsBins, tps
#endif
zBins = veTable
gridHeight = 2.0
gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees.
upDownLabel = "(RICHER)", "(LEANER)"
table = sparkTbl, sparkMap, "Ignition Advance Table", 2
xBins = rpmBins2, rpm
#if SPEED_DENSITY
yBins = mapBins2, map
#else ALPHA_N
yBins = tpsBins2, tps
#endif
zBins = advTable1
gridHeight = 3.0
upDownLabel = "ADVANCED", "RETARDED"
;-------------------------------------------------------------------------------
[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
baroADCGauge = baroADC, "Barometer ADC", "", 0, 255, -1, -1, 256, 256, 0, 0
mapADCGauge = mapADC, "MAP ADC", "", 0, 255, -1, -1, 256, 256, 0, 0
matADCGauge = matADC, "MAT ADC", "", 0, 255, -1, -1, 256, 256, 0, 0
cltADCGauge = cltADC, "CLT ADC", "", 0, 255, -1, -1, 256, 256, 0, 0
tpsADCGauge = tpsADC, "TPS ADC", "", 0, 255, -1, -1, 256, 256, 0, 0
batADCGauge = batADC, "BAT ADC", "", 0, 255, -1, -1, 256, 256, 0, 0
#if NARROW_BAND_EGO
egoGauge = egoVoltage, "Exhaust Gas Oxygen", "volts", 0, 1.0, 0.2, 0.3, 0.6, 0.8, 2, 2
#else
egoGauge = egoVoltage, "Exhaust Gas Oxygen", "volts", 0.5, 4.5, 0.0, 0.0, 5.0, 5.0, 2, 2
#endif
lambdaGauge = lambda, "Lambda", "", 0.5, 1.5, 0.5, 0.7, 2, 1.1, 2, 2
accelEnrichGauge = accDecEnrich, "Accel Enrich", "%", 50, 150, -1, -1, 999, 999, 0, 0
afrGauge = afr, "Air:Fuel Ratio", "", 10, 19.4, 12, 13, 15, 16, 2, 2
clockGauge = secl, "Clock", "Seconds", 0, 255, 10, 10, 245, 245, 0, 0
deadGauge = deadValue, "---", "", 0, 1, -1, -1, 2, 2, 0, 0
dutyCycleGauge = dutyCycle, "Duty Cycle", "%", 0, 100, -1, -1, 85, 90, 1, 1
egoCorrGauge = egoCorrection, "EGO Correction", "%", 50, 150, 90, 99, 101, 110, 0, 0
gammaEnrichGauge = gammaEnrich, "Gamma Enrichment", "%", 50, 150, -1, -1, 151, 151, 0, 0
mapGauge = map, "Engine MAP", "kPa", 0, 255, 0, 20, 200, 245, 0, 0
pulseWidthGauge = pulseWidth, "Pulse Width", "mSec", 0, 25.5, 1.0, 1.2, 20, 25, 1, 1
tachometer = rpm, "Engine Speed", "RPM", 0, 8000, 300, 600, 3000, 5000, 0, 0
throttleGauge = throttle, "Throttle Position", "%TPS", 0, 100, -1, 1, 90, 100, 0, 0
veBucketGauge = veTuneValue, "VE Value", "%", 0, 120, -1, -1, 999, 999, 0, 0
veGauge = veCurr, "VE Current", "%", 0, 120, -1, -1, 999, 999, 0, 0
voltMeter = batteryVoltage,"Battery Voltage", "volts", 7, 21, 8, 9, 15, 16, 2, 2
warmupEnrichGauge = warmupEnrich, "Warmup Enrichment", "%", 100, 150, -1, -1, 101, 105, 0, 0
#if CELSIUS
cltGauge = coolant, "Coolant Temp", "%TEMP", -40, 120, -15, 0, 95, 105, 0, 0
matGauge = mat, "Manifold Air Temp", "%TEMP", -40, 110, -15, 0, 95, 100, 0, 0
#else
cltGauge = coolant, "Coolant Temp", "%TEMP", -40, 250, 0, 30, 200, 220, 0, 0
matGauge = mat, "Manifold Air Temp", "%TEMP", -40, 215, 0, 30, 200, 210, 0, 0
#endif
advanceGauge = advance, "Spark Advance", "deg BTDC", 50, -10, 0, 0, 35, 45, 0,
;-------------------------------------------------------------------------------
[FrontPage]
#if NARROW_BAND_EGO
egoLEDs = 0.0, 1.0, 0.5 ; NB settings.
#else
; If you reverse these range values as you see below, then the LED
; bar will work as you expect, high on the right, low on the left.
egoLEDs = 4.0, 1.0, 2.5 ; WB settings.
#endif
; Gauges are numbered left to right, top to bottom.
;
; 1 2 3 4
; 5 6 7 8
gauge1 = tachometer
#if SPEED_DENSITY
gauge2 = throttleGauge
#else
gauge2 = tpsGauge
#endif
gauge3 = pulseWidthGauge
gauge4 = dutyCycleGauge
gauge5 = mapGauge
gauge6 = matGauge
gauge7 = cltGauge
gauge8 = gammaEnrichGauge
;----------------------------------------------------------------------------
; Indicators
; expr off-label on-label, off-bg, off-fg, on-bg, on-fg
indicator = { ready }, "Not Ready", "Ready", white, black, green, black
indicator = { crank }, "Not Cranking", "Cranking", white, black, green, black
indicator = { startw }, "ASE OFF", "ASE", white, black, green, black
indicator = { warmup }, "WUE OFF", "WUE", white, black, green, black
indicator = { tpsaccaen }, "TPS Accel", "TPS Accel", white, black, green, black
indicator = { mapaccaen }, "MAP Accel", "MAP Accel", 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 }, "", "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, 1.0
#else
egoBar = 0, 5.0
#endif
gammaEBar = 0, 200
mapBar = 0, 255
pulseWidthBar = 0, 25.5
rpmBar = 0, 8000
throttleBar = 0, 100
egoCorrBar = 0, 200
baroCorrBar = 0, 200
warmupCorrBar = 0, 200
airdenCorrBar = 0, 200
veCorrBar = 0, 200
accCorrBar = 0, 100
;-------------------------------------------------------------------------------
[Tuning]
#if NARROW_BAND_EGO
egoLEDs = 0.0, 1.0, 0.5 ; NB settings.
#else
; If you reverse these range values as you see below, then the LED
; bar will work as you expect, high on the right, low on the left.
egoLEDs = 4.0, 1.0, 2.5 ; WB settings.
#endif
font = "Courier", 14
spotDepth = 2 ; 0 = no indicators, 1 = Z only, 2 = XYZ indicators.
cursorDepth = 2 ; Same as spot depth.
; The four radio buttons on the tuning screen select a "page" of six
; gauges. The gauge numbering is the same as the front page, across
; then down.
; 1 2
; 3 4
; 5 6
;
; gaugeColumns allows you to hide or show gauges in column 2 (i.e.,
; gauges 2, 4 and 6).
gaugeColumns = 2 ; Only 1 or 2 are valid.
;----------------------------------------------------------------------------
; Notes on tuning screen gauges:
; pageButtons = Labels for radio buttons at bottom of tuning dialog.
;
; Gauge 2 previously switched automatically to be tpsGauge when alpha-n
; was enabled, but you need to do it manually now.
;----------------------------------------------------------------------------
; Page 1 Page 2 Page 3 Page 4
pageButtons = "&EGO", "&WUE", "PW&1", "PW&2"
gauge1 = tachometer, tachometer, tachometer, tachometer
gauge2 = mapGauge, mapGauge, mapGauge, mapGauge
gauge3 = egoGauge, egoGauge, egoGauge, egoGauge
gauge4 = egoCorrGauge, warmupEnrichGauge, pulseWidthGauge, pulseWidthGauge
gauge5 = veBucketGauge, veBucketGauge, veBucketGauge, veBucketGauge
gauge6 = accelEnrichGauge, accelEnrichGauge, dutyCycleGauge, dutyCycleGauge
;-------------------------------------------------------------------------------
[OutputChannels]
; The number of bytes MegaTune should expect as a result
; of sending the "A" command to MegaSquirt is determined
; by the value of ochBlockSize, so be very careful when
; you change it.
deadValue = { 0 } ; Convenient unchanging value.
ochGetCommand = "A"
ochBlockSize = 23
secl = scalar, U08, 0, "sec", 1.000, 0.000
squirt = scalar, U08, 1, "bits", 1.000, 0.000
engine = scalar, U08, 2, "bits", 1.000, 0.000
ready = bits, U08, 2, [0:0]
crank = bits, U08, 2, [1:1]
startw = bits, U08, 2, [2:2]
warmup = bits, U08, 2, [3:3]
tpsaccaen = bits, U08, 2, [4:4]
tpsaccden = bits, U08, 2, [5:5]
mapaccaen = bits, U08, 2, [6:6]
mapaccden = bits, U08, 2, [7:7]
baroADC = scalar, U08, 3, "ADC", 1.000, 0.000
mapADC = scalar, U08, 4, "ADC", 1.000, 0.000
matADC = scalar, U08, 5, "ADC", 1.000, 0.000
cltADC = scalar, U08, 6, "ADC", 1.000, 0.000
tps = scalar, U08, 7, "%", 1.000, 0.000
batADC = scalar, U08, 8, "ADC", 1.000, 0.000
egoADC = scalar, U08, 9, "ADC", 1.000, 0.000
egoCorrection = scalar, U08, 10, "%", 1.000, 0.000
airCorrection = scalar, U08, 11, "%", 1.000, 0.000
warmupEnrich = scalar, U08, 12, "%", 1.000, 0.000
rpm100 = scalar, U08, 13, "r100", 1.000, 0.000
pulseWidth = scalar, U08, 14, "ms", 0.100, 0.000
accelEnrich = scalar, U08, 15, "%", 1.000, 0.000
baroCorrection = scalar, U08, 16, "%", 1.000, 0.000
gammaEnrich = scalar, U08, 17, "%", 1.000, 0.000
veCurr = scalar, U08, 18, "%", 1.000, 0.000
blank1 = scalar, U08, 19 ; Raw inputs, as they come from MS.
blank2 = scalar, U08, 20
TPSdot = scalar, U08, 21, "%/s", 1.000, 0.000
advance = scalar, U08, 22, "deg", 1.000, 0.000
; Computed output channels. See "megatuneExamples.ini" for all the
; pre-defined variables, search for "???" and you'll see them.
accDecEnrich = { accelEnrich + ((engine & 0b00100000) ? tdePct : 100) }
batteryVoltage = { batADC / 255.0 * 30.0 } ; Current MS power supply voltage.
coolant = { tempCvt(table(cltADC, "thermfactor.inc")-40) } ; Coolant sensor temperature in user units.
egoVoltage = { egoADC / 255.0 * 5.0 } ; EGO sensor voltage.
mat = { tempCvt(table(matADC, "matfactor.inc")-40) } ; Manifold temperature in user units.
rpm = { rpm100*100 } ; True RPM.
time = { timeNow } ; "timeNow" is a parameterless built-in function.
afrtarget = { 0 }
#include "lambdaSensors.ini"
#if MPX4250
barometer = { table(baroADC, "kpafactor4250.inc") }
map = { table(mapADC, "kpafactor4250.inc") } ; Manifold pressure in kPa.
#else
barometer = { table(baroADC, "kpafactor4115.inc") }
map = { table(mapADC, "kpafactor4115.inc") }
#endif
; throttle = { table(tps, "throttlefactor.inc") }
throttle = { tps }, "%"
idleDC = { (coolant < fastIdleT) * 100 }
altDiv = { alternate ? 2 : 1 }
cycleTime = { 60000.0 / rpm * (2.0-twoStroke) }
nSquirts = { nCylinders/divider }
dutyCycle = { 100.0*nSquirts/altDiv*pulseWidth/cycleTime }
#if EXPANDED_CLT_TEMP
clt_exp = { 1 }
#else
clt_exp = { 0 }
#endif
#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
;-------------------------------------------------------------------------------
[Datalog]
; Full datalog.
;
; Default user-defined log emulates the full datalog.
;
; The entries are saved in the datalog file in the order in
; which they appear in the list below.
;
; Channel - Case sensitive name of output channel to be logged.
; Label - String written to header line of log. Be careful
; about changing these, as programs like MSLVV and
; MSTweak key off specific column names.
; Type - Data type of output, converted before writing.
; Format - C-style output format of data.
;
; Channel Label Type Format
; -------------- ---------- ----- ------
entry = time, "Time", float, "%.3f"
entry = secl, "SecL", int, "%d"
entry = rpm100, "RPM", int, "%d"
entry = map, "MAP", int, "%d"
entry = throttle, "TP", int, "%d"
entry = egoVoltage, "O2", float, "%.3f"
entry = mat, "MAT", float, "%.1f"
entry = coolant, "CLT", float, "%.1f"
entry = engine, "Engine", int, "%d"
entry = egoCorrection, "Gego", int, "%d"
entry = airCorrection, "Gair", int, "%d"
entry = warmupEnrich, "Gwarm", int, "%d"
entry = baroCorrection, "Gbaro", int, "%d"
entry = gammaEnrich, "Gammae", int, "%d"
entry = accDecEnrich, "TPSacc", int, "%d"
entry = veCurr, "Gve", int, "%d"
entry = pulseWidth, "PW", float, "%.1f"
entry = blank2, "Gve2", int, "%d"
entry = pulseWidth, "PW2", float, "%.1f"
entry = dutyCycle, "DutyCycle1", float, "%.1f"
entry = dutyCycle, "DutyCycle2", float, "%.1f"
entry = blank1, "UserData1", int, "%d"
entry = blank2, "UserData2", int, "%d"
entry = TPSdot, "UserData3", int, "%d"

View File

@ -1,916 +0,0 @@
;-------------------------------------------------------------------------------
[MegaTune]
MTversion = 2.25 ; MegaTune itself; needs to match exec version.
queryCommand = "Q"
signature = 20
;-------------------------------------------------------------------------------
[Constants]
;----------------------------------------------------------------------------
; Constants Definition
; --------------------
;
; Scalar Values
; -------------
; The scaling and translation values are used as follows:
; msValue = userValue / scale - translate
; userValue = (msValue + translate) * scale
;
;
; Temperatures are fine, check out the Fielding IAC example (fastIdleT).
;
; 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).
;
; If you specify a label as "INVALID" (all upper case), then it will
; not be displayed in the combo box, so you can leave out values that
; make no sense.
;
;----------------------------------------------------------------------------
endianness = big
nPages = 2
burnCommand = "B"
; pageSize = 125
pageSize = 128, 128
pageActivationDelay = 10
; pageActivate = ""
pageActivate = "P\001", "P\002"
pageReadCommand = "V", "V"
pageValueWrite = "W%o%v", "W%o%v"
; pageChunkWrite = "" ; No chunk write for standard MS.
page = 1
; name = bits, type, offset, bits
; name = array, type, offset, shape, units, scale, translate, lo, hi, digits
; name = scalar, type, offset, units, scale, translate, lo, hi, digits
veTable = array, U08, 0, [8x8], "%", 1.0, 0.0, 0.0, 255.0, 0
rpmBins = array, U08, 64, [ 8], "RPM", 100.0, 0.0, 100.0, 25500.0, 0
#if SPEED_DENSITY
mapBins = array, U08, 72, [ 8], "kPa", 1.0, 0.0, 0.0, 255.0, 0
#elif ALPHA_N
tpsBins = array, U08, 72, [ 8], "TPS", 1.0, 0.0, 0.0, 255.0, 0
#elif AIR_FLOW_METER
#error "MSnS does not support MAF"
;#exit
#endif
crankCold = scalar, U08, 80, "ms", 0.1, 0.0, 0.0, 25.5, 1
crankHot = scalar, U08, 81, "ms", 0.1, 0.0, 0.0, 25.5, 1
asePct = scalar, U08, 82, "%", 1.0, 0.0, 0.0, 95.0, 0
aseCount = scalar, U08, 83, "s", 1.0, 0.0, 0.0, 255, 0
wueBins = array, U08, 84, [ 10], "%", 1.0, 0.0, 0.0, 255, 0
unused1 = scalar, U08, 94, "ms", 0.1, 0.0, 0.0, 25.5, 1
unused2 = scalar, U08, 95, "ms", 0.1, 0.0, 0.0, 25.5, 1
unused3 = scalar, U08, 96, "ms", 0.1, 0.0, 0.0, 25.5, 1
unused4 = scalar, U08, 97, "ms", 0.1, 0.0, 0.0, 25.5, 1
taeColdA = scalar, U08, 98, "ms", 0.1, 0.0, 0.0, 25.5, 1
tpsThresh = scalar, U08, 99, "%/s", 1.0, 0.0, 0.0, 255, 0
taeTime = scalar, U08, 100, "ms", 0.1, 0.0, 0.0, 25.5, 1
tdePct = scalar, U08, 101, "%", 1.0, 0.0, 0.0, 255, 0
#if CELSIUS
egoTemp = scalar, U08, 102, "°C", 0.555, -72, -40, 102.0, 0
#else
egoTemp = scalar, U08, 102, "°F", 1.0, -40, -40, 215.0, 0
#endif
egoCount = scalar, U08, 103, "", 1.0, 0.0, 0.0, 255.0, 0
egoDelta = scalar, U08, 104, "%", 1.0, 0.0, 0.0, 255.0, 0
egoLimit = scalar, U08, 105, "%", 1.0, 0.0, 0.0, 255.0, 0
reqFuel = scalar, U08, 106, "ms", 0.1, 0.0, 0.0, 25.5, 1
divider = scalar, U08, 107, "", 1.0, 0.0
alternate = bits, U08, 108, [0:0], "Simultaneous", "Alternating"
injOpen = scalar, U08, 109, "ms", 0.1, 0.0, 0.1, 25.5, 1
injOCfuel = scalar, U08, 110, "ms", 0.1, 0.0, 0.0, 0.0, 0
injPwmP = scalar, U08, 111, "%", 1.0, 0.0, 0.0, 100.0, 0
injPwmT = scalar, U08, 112, "ms", 0.1, 0.0, 0.0, 25.5, 1
battFac = scalar, U08, 113, "ms/v",0.0166667, 0.0, 0.0, 1.0, 2
rpmk = scalar, U16, 114, "", 1.0, 0.0
; Config1
mapType = bits, U08, 116, [0:1], "115 kPa", "250 kPa", "INVALID", "INVALID"
twoStroke = bits, U08, 116, [2:2], "Four-stroke", "Two-stroke"
injType = bits, U08, 116, [3:3], "Port", "Throttle Body"
nCylinders = bits, U08, 116, [4:8], "INVALID","1","2","3","4","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID"
; Config2
cltType = bits, U08, 117, [0:1], "GM", "Unknown1", "Unknown2", "Unknown3"
matType = bits, U08, 117, [2:3], "GM", "Unknown1", "Unknown2", "Unknown3"
nInjectors = bits, U08, 117, [4:7+1]
; Config3
engineType = bits, U08, 118, [0:0], "Even fire", "Odd fire"
egoType = bits, U08, 118, [1:1], "Narrow band", "Wide band"
algorithm = bits, U08, 118, [2:2], "Speed Density", "Alpha-N"
baroCorr = bits, U08, 118, [3:3], "Off", "On"
primePulse = scalar, U08, 119, "ms", 0.1, 0.0, 0.0, 25.5, 1
egoRPM = scalar, U08, 120, "RPM", 100.0, 0.0, 100, 25500, 0
#if CELSIUS
fastIdleT = scalar, U08, 121, "°C", 0.555, -72.0, -40, 102, 1
#else
fastIdleT = scalar, U08, 121, "°F", 1.0, -40.0, -40, 215, 0
#endif
egoSwitch = scalar, U08, 122, "v", 0.0196, 0.0, 0.0, 5.0, 3
taeColdM = scalar, U08, 123, "%", 1.0, 0.0, 0.0, 250.0, 0
tpsMin = scalar, U08, 124, "ADC", 1.0, 0.0, 0.0, 255.0, 0
tpsMax = scalar, U08, 125, "ADC", 1.0, 0.0, 0.0, 255.0, 0
;--------------------------------------------------
;Start Ignition table (Table 2)
;--------------------------------------------------
page = 2
advTable1 = array, U08, 0,[8x8], "deg", 1.0, 0.0, 0.0, 255.0, 0
rpmBins2 = array, U08, 64,[ 8], "RPM", 100.0, 0.0, 100, 25500, 0
#if SPEED_DENSITY
mapBins2 = array, U08, 72, [ 8], "kPa", 1.0, 0.0, 0.0, 255.0, 0
#elif ALPHA_N
tpsBins2 = array, U08, 72, [ 8], "TPS", 1.0, 0.0, 0.0, 255.0, 0
#elif AIR_FLOW_METER
#error "MSnS does not support MAF"
#exit
#endif
TrigAng = scalar, U08, 80, "Deg", 4, 0, 0, 360, 0
FixAng = scalar, U08, 81, "Deg", 1, 0, 0, 80, 0
Trim = scalar, S08, 82, "Deg", 0.352, 0, -45, 45, 0
CrankAng = scalar, U08, 83, "Deg", 1, -28.4, -10, 80, 0
IgHold = scalar, U08, 84, "", 1, 0, 0, 100, 0
Trig_plus = bits, U08, 85[0:1], "0", "+22.5", "INVALID", "+45"
TrigCrank = bits, U08, 85[2:2], "Trigger Return", "Time Based"
IgInv = bits, U08, 85[3:3], "No", "Yes"
oddfire = bits, U08, 85[4:4], "No", "Yes"
IdleAdv = scalar, U08, 86, "Deg", 0.352,-28.4, -10, 80, 0
IdleAdvTPS = scalar, U08, 87, "ADC", 1, 0, 0, 255, 0
IdleAdvRPM = scalar, U08, 88, "RPM", 100, 0, 0, 1200, 0
#if CELSIUS
IdleAdvCLT = scalar, U08, 89, "C", 0.555, -72, -40, 102, 1
#else
IdleAdvCLT = scalar, U08, 89, "F", 1, -40, -40, 215, 0
#endif
IdleDelayTime = scalar, U08, 90, "sec", 1, 0, 0, 5, 0
StgCycles = scalar, U08, 91, "cycles", 1, 0, 0, 255, 0
; name = array, type, offset, shape, units, scale, translate, lo, hi, digits
; name = scalar, type, offset, units, scale, translate, lo, hi, digits
;Dwell control
;running dwell variable railed to 8 - who needs more than 8ms?
dwellcont = bits, U08, 92, [1:1], "Fixed duty*^", "Dwell control"
dwellcrank = scalar, U08, 93, "ms", 0.1, 0, 0, 25, 1
dwellrun = scalar, U08, 94, "ms", 0.1, 0, 0, 8, 1
numteeth = scalar, U08, 95, "teeth", 1.0, 0.0, 0.0, 255, 0
onetwo = scalar, U08, 96, "teeth", 1.0, 0.0, 0.0, 255, 0
crankRPM = scalar, U08, 97, "rpm", 100, 0.0, 100, 1000, 0
tpsflood = scalar, U08, 98, "%", 1.0, 0.0, 0.0, 255.0, 0
;Rev Limits
SoftRevLim = scalar, U08, 99, "rpm", 100, 0.0, 100, 25500, 0
SoftLimRetard = scalar, U08, 100, "deg", 0.352, -28.4, -10, 80, 0
SoftLimMax = scalar, U08, 101, "s", 0.1, 0.0, 0.0, 25.5, 1
HardRevLim = scalar, U08, 102, "rpm", 100, 0.0, 100, 25500, 0
;TPS based acceleration enrichment
taeBins = array, U08, 103, [ 4], "%/s", 10.0, 0.00000, 0.00, 2550.0, 0
taeRates = array, U08, 107, [ 4], "%", 1.0, 0.00000, 0.00, 255.0, 0 ; 4 bytes
wueRates = array, U08, 111, [10], "C", 1.0, 0.0, 100.0, 255.0, 0
unused121 = scalar, U08, 121, "none", 0, 0, 0, 0, 0
unused122 = scalar, U08, 122, "none", 0, 0, 0, 0, 0
unused123 = scalar, U08, 123, "none", 0, 0, 0, 0, 0
unused124 = scalar, U08, 124, "none", 0, 0, 0, 0, 0
unused125 = scalar, U08, 125, "none", 0, 0, 0, 0, 0
unused126 = scalar, U08, 126, "none", 0, 0, 0, 0, 0
unused127 = scalar, U08, 127, "none", 0, 0, 0, 0, 0
;-------------------------------------------------------------------------------
[Menu]
;----------------------------------------------------------------------------
; There are five pre-defined values that may be used to define your menus.
; The first four allow access to the "standard" dialog boxes, the last one
; merely draws a separator (horizontal line) in the menu.
;
; std_constants
; std_enrichments
; std_realtime
; std_warmup
;
; std_separator
;
; If you use any of the std_constants, std_enrichments or std_warmup
; editors, they may be optionally suffixed with a page number (only
; useful for multi-page code variants), which causes them to edit the
; specified page. If you leave off the page specifier, they edit logical
; page one as specified in the Constants section.
;
; There are four special menu names, which when used append to the standard
; menus of the same name instead of creating a new one. The menu names
; are "File", "Communications", "Tools" and "Help".
;
;----------------------------------------------------------------------------
menu = "&Settings"
subMenu = std_constants, "&Constants"
subMenu = triggerSettings, "&Trigger Setup"
menu = "&Tuning"
subMenu = std_realtime, "&Realtime Display"
subMenu = std_warmup, "&Warmup Enrichment"
subMenu = crankPW, "Cranking Settings"
subMenu = accelEnrichments, "&Acceleration Wizard"
subMenu = veTableTbl, "&VE Table", 0
subMenu = sparkTbl, "&Spark Table", 1
subMenu = RevLimiterS, "Rev Limits", 2
menu = "&Spark"
subMenu = sparkSettings, "&Spark Settings"
subMenu = sparkTbl, "Spark Table", 1
;subMenu = IdleAdvance, "Idle Advance settings",
;subMenu = Knock, "Kn&ock System"
;subMenu = IatCltIg, "&IAT/Clt Related Ignition"
subMenu = dwellSettings, "Dwell settings"
;subMenu = wheelsim, "Stim for wheel"
;subMenu = oddwheel, "Oddfire Wheel settings", 7, { wheelon && oddfire }
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}
;-------------------------------------------------------------------------------
[UserDefined]
; define a MegaTune compatible version here
; no need to for std_enrichments, it is built in.
[UserDefinedTS]
; Enhanced TunerStudio dialogs can be defined here
; MegaTune will over look this section
; These dialogs will over-ride those in the UserDefined Section
; User defined ar loaded first, then if one by the same name is defiend here,
; it will replace the MegaTune definition
; dialog = name, Title, Layout
;
; valid options for layout are xAxis, yAxis, border
; for an xAxis, each field added will be added from right to left
; A yAxis layout will add fields from top to bottom
; A border layout will expect an additional constraint to determine placement
; valid border constraints are north, South, East, West, Center
; all 5 do not need to be filled.
; The field name can be either a constant reference, or a reference to another
; dialog which will be added.
; dialogs can be nested and can be mixed with fields
dialog = accelEnrichments_south, ""
field = "TPSdot Threshold", tpsThresh
field = "Accel Time", taeTime
; field = "Cold Accel Enrichment", taeColdA
; field = "Cold Accel Mult", taeColdM
field = "Decel Fuel Amount", tdePct
dialog = accelEnrichments_north, "", xAxis
panel = time_accel_tpsdot_curve
;panel = time_accel_tpsdot_tbl
dialog = accelEnrichments, "Acceleration Enrichment"
panel = accelEnrichments_north, North
panel = accelEnrichments_south, South
dialog = crankPW, "Cranking Pulsewidths (ms)"
#if CELSIUS
field = "Cranking RPM (Max)", crankRPM
field = "Flood Clear level", tpsflood
field = ""
field = "Priming Pulsewidth", primePulse
field = "Pulsewidth at -40°C", crankCold
field = "Pulsewidth at 77°C", crankHot
field = ""
field = "Cranking Enrichment %", asePct
field = "Number of seconds to run", aseCount
#else
field = "Cranking RPM (Max)", crankRPM
field = "Flood Clear level", tpsflood
field = ""
field = "Priming Pulsewidth", primePulse
field = "Pulsewidth at -40°F", crankCold
field = "Pulsewidth at 170°F", crankHot
field = ""
field = "Cranking Enrichment %", asePct
field = "Number of seconds to run", aseCount
#endif
dialog = aseSettings, "Afterstart Enrichment"
field = "Enrichment %", asePct
field = "Number of Ignition Cycles", aseCount
dialog = egoSettings, "Exhaust Gas Oxygen"
field = "EGO Sensor Type", egoType
field = "EGO Switch Point (v)", egoSwitch
field = "Coolant Temp Activation", egoTemp
field = "Ignition Events Per Step", egoCount
field = "EGO Step", egoDelta
field = "EGO ± Limit", egoLimit
field = "EGO Active Above", egoRPM
dialog = triggerSettings,"Trigger Settings",3
topicHelp = Shelp3
field = "Wheel decoder base teeth", numteeth
field = "Missing teeth", onetwo
field = "Trigger Angle ", TrigAng
field = "Note: This number will be rounded to the nearest 4 degrees"
field = "This number represents the angle ATDC when the 1st"
field = "tooth after the gap passes the sensor."
field = ""
field = "Skip Revolutions", StgCycles
field = "Note: This is the number of revolutions that will be skipped during"
field = "cranking before the injectors and coils are fired"
dialog = sparkSettings,"Spark Settings",3
topicHelp = Shelp3
field = "Wheel decoder base teeth", numteeth
field = "Missing teeth", onetwo
field = "Trigger Angle"
field = "Trigger Angle ", TrigAng
field = "Note: This number will be rounded to the nearest 4 degrees"
field = "This number represents the angle ATDC when the 1st"
field = "tooth after the gap passes the sensor."
field = ""
;field = "Cranking Timing", TrigCrank
field = "Cranking advance Angle", CrankAng
;field = "Hold Ignition", IgHold
field = "Spark Output Inverted (see F1)", IgInv
field = ""
field = "Fixed Angle (0 = use map)", FixAng
;field = "Trim Angle", Trim
dialog = dwellSettings,"Dwell Settings",4
topicHelp = DwellHelp
field = "Dwell control", dwellcont
field = "Or:"
field = " Cranking dwell", dwellcrank, { dwellcont }
field = " Running dwell", dwellrun, { dwellcont }
;field = "Minimum discharge period", mindischg, { dwellcont }
field = ""
field = "#Note"
field = "these times are for 12V. Battery voltage correction"
field = "is applied. At higher voltages the time is reduced"
field = "and when low it is increased"
dialog = RevLimiterS, "Rev Limiter", 4
topicHelp = Fhelp7
field = "Rev Limiter"
field = "Soft rev limit", SoftRevLim
field = "Soft limit absolute timing", SoftLimRetard
field = "Soft limit max time", SoftLimMax
field = "Hard Rev limit", HardRevLim
; curve = warmup_curve, "Warmup Enrichment Curve"
; columnLabel = "Coolant", "WUE %"
; xAxis = -40, {clthighlim}, 9
; yAxis = 0, 500, 6
; xBins = tempTable, coolant
; yBins = wueBins
; gauge = cltGauge
; -------------------------------------------------------------
; Help down here
help = helpEnrichments, "Enrichments Help"
text = "<strong>Priming Pulse</strong><br><br>"
text = "The duration in milliseconds of a priming pulse that is applied when the MS controller is powered up. If you dont want a priming pulse, set this field to zero. (Only available for version 2.0 and later of MegaSquirt controller code.)<br>"
text = "<br><strong>Cranking Pulsewidth</strong><br><br>"
text = "Cranking pulse width determines how long the injector will be open in milliseconds for each pulse while the engine is cranking (i.e., the RPM is below 300). The actual pulse width is determined by performing linear interpolation on the line described by the end points you enter for the "-40 degrees F" and "170 degrees F" values. For instance, if you enter 10.0 ms as the pulse width at -40 F and 2.0 ms at 170 F, the pulse width will be 6.0 ms when you start your engine at 65 F.<br>"
text = "Note: Cranking pulse occur at every ignition event, while running pulses only occur at the interval specified on the constants page; if you have a 4 cylinder engine and are taking the tachometer signal from the coil, then you will get four (4) cranking pulses per cycle and depending on settings one injection per cycle while running.<br>"
text = "The MS variables "CWU" and "CWH" hold the low temperature and high temperature pulse widths, respectively.<br>"
text = "<br><strong>Afterstart Enrichment</strong><br>"
text = "The afterstart enrichment is one that decays from its max value (specified in the "Enrichment (percent)" field) to zero in a linear fashion over a period defined in "Number of Ignition Cycles." If you specify 20% enrichment over 250 ignition cycles, then the first pulse is enriched by 20%, the 125th pulse is enriched by 10% and the 250th (and later) by zero percent (this assumes 1 event per cycle, or a 1 cylinder engine; divide by the number of ignition events per cycle to get the specific behavior for your motor).<br>"
text = "MS stores these values in the flash constants called "AWC" (Afterstart Warmup Count) and "AWEV" (Afterstart Warmup Enrichment Value).<br>"
text = "<br><strong>Exhaust Gas Oxygen Sensor Parameters</strong><br>"
text = "These parameters define the closed loop behavior of MS. You must have a narrow band O2 sensor hooked up for this mode to work in v.1.0 controller code; either a narrow band or wide band will work with v.2.0 of controller code. To disable closed loop operation altogether, set the EGO Step value to zero.<br>"
text = "<br><strong>EGO Sensor Type</strong><br>"
text = "Specify either a narrow band sensor or wide band sensor. Functionally this merely sets the direction sense of the sensor voltage. For narrow band sensors, the voltage rises as the mixture is richening and drops as the mixture becomes lean. The wide band setting corresponds to the opposite sense, i.e., voltage drops to indicate enrichment (this is how the DIY-WB operates, not necessarily all WB sensors!). (Available in v 2.0 controller code.)<br>"
text = "<br><strong>EGO Switch Point (v)</strong><br>"
text = "This is the switching point voltage that indicates stoichiometric combustion (approximately 14.7:1 with gasoline). For narrow band sensors this is 0.5 v*; for the DIY-WB wideband sensor it is 2.5 v (for other wideband sensors this voltage may be quite different). (This value is only active in v 2.0 controller code.)<br>"
text = "*This is true for zirconia NB sensors, which are used almost exclusively in modern vehicles. The titania NB sensor has a different voltage range (1-5 v), but is rarely used.<br>"
text = "<br><strong>Coolant Temp Activation (°F)</strong><br>"
text = "This is the temperature below which closed loop operation is disabled. If this value is too low, then closed loop will try to lean out the warmup enrichments and you may experience rough running. Typical value is 160 F and should somewhat above the point at which warmup enrichment stops (see the Warmup Enrichment Bins settings and find the lowest on which contains 100).<br>"
text = "The MS value "EGOTEMP" stores this quantity.<br>"
text = "<br><strong>Ignition Events Per Step</strong><br>"
text = "This value determines the rate at which the closed loop algorithm applies correction. The default value of 32, when used on a four cylinder engine with four ignition events per cycle, tells MS to wait for 8 cycles before changing the current correction factor.<br>"
text = "<br><strong>EGO Step (percent)</strong><br>"
text = "Once the closed loop algorithm has decided to change the correction factor, it adds or subtracts this percentage from the current value. This should move slowly to avoid unstable response, so make sure it is small, 1% being the default.<br>"
text = "<br><strong>EGO Limit (%)</strong><br>"
text = "Closed loop operation should not be substituted for proper tuning! This value limits the correction that can be made by the closed loop algorithm, the default of 10% indicates the correction factor cannot go outside the range 90-110%.<br>"
text = "<br><strong>EGO Active Above RPM</strong><br>"
text = "This value specifies the lower limit above which closed loop operation occurs. Typically, your engine will idle best when it is richer than stoich, so turning off closed loop for low RPMs allows this to happen. The default value for the RPM limit is 1200. (Available only in v 2.0 MS, older versions have a fixed 1200 RPM value in the controller code.)<br>"
text = "<br><strong>Warmup Enrichment Bins</strong><br>"
text = "Warmup enrichment is based on coolant temperature. Since warmup enrichment requirements are usually non-linear, several bins are provided to specify different rates in different temperature domains.<br>"
text = "Place values in the "-40" through "160 degrees F" fields, typically running from about 120 at -40 F to 100 at 100 F; make sure the values are all 100 or greater.<br>"
text = "The MS array "WWU" contains these enrichment values.<br>"
text = "<br><strong>Acceleration Enrichment</strong><br>"
text = "Acceleration enrichment (AE) occurs when you open the throttle "rapidly" to avoid bogging the engine. In v.1.01 MS, this is done solely based upon the rate of change in the throttle position sensor (also called TPSDOT).<br>"
text = "<br><strong>TPSDOT Thresh</strong><br>"
text = "This is the threshold in v/sec below which no acceleration enrichment will occur (you can move the throttle from idle to full open without acceleration enrichment, if you open it slowly enough). Depends grossly upon the range of your TPS, a typical value might be 1.2 v/sec.<br>"
text = "<strong>Tuning Note:</strong> While you are tuning the VE table you should set this threshold artificially high (maybe 40.0) to disable acceleration enrichment completely. After the VE table is fairly well-defined, set this back to 1.2 and begin tuning AE.<br>"
text = "MS stores this value in the "TPSTHRESH" variable.<br>"
text = "<br><strong>Accel Time (sec)</strong><br>"
text = "This value indicates how long the acceleration enrichment "squirt" will last. Typical values are around 1.0 second. MS stores this value in the variable "TPSACLK."<br>"
text = "<br><strong>Cold Accel Enrichment (ms)</strong><br>"
text = "The acceleration enrichment pulse also varies depending upon coolant temperature. The value specified here is the pulse width added to the value from the bin calculations at -40 F. The Cold Acceleration Enrichment amount is linearly interpolated from full amount at -40 F down to zero at 165 F. A typical value might be 2.0 ms.<br>"
text = "This value is stored in the "TPSACOLD" variable in MS.<br>"
text = "<br><strong>Cold Accel Multiplier (%)</strong><br>"
text = "Another means for increasing the amount of fuel delivered by the acceleration enrichment pulse is supplied by this value; it is likewise interpolated from the full specified amount at 40F down to zero at 165 F. Before the Cold Acceleration Enrichment value is added to the base acceleration enrichment pulsewidth, it is multiplied by this value.<br>"
text = "Total AE = Base AE * CAM + CAE<br>"
text = "The difference between the two types of AE cold modify can be easily seen with a few examples:<br>"
text = "1) Assume we have a calculated AE pulse of 5.0 ms. Say our coolant temperature is 40 F, giving a CAE pulse of 2.0 ms and CAM is turned off (100%). The result is 5.0+2.0 = 7.0 ms.<br>"
text = "2) Assume same base AE and temperature, but now we turn off CAE (0.0 ms) and set CAM to give 140%. The result is the same, we get 5.0*1.4 = 7.0 ms.<br>"
text = "3) Take the first case, but hit the accelerator faster, giving 8.0 ms base AE pulse. We now have a result of 8.0+2.0 = 10.0 ms.<br>"
text = "4) Take case 2, but with the higher base AE pulse, giving 8.0*1.4 = 11.2 ms.<br>"
text = "The bottom line is that the CAE modifier is constant and independent of the base pulse, where on the other hand, the CAM modifier has a proportional effect on the AE, bigger base pulse means bigger result.<br>"
text = "This value is stored in the 'ACMULT' variable in MS.<br>"
text = "<br><strong>Decel Fuel Amount (%)</strong><br>"
text = "When you let off the throttle rapidly (that is the closing rate exceeds TPSDOT Thresh) and the engine is turning faster than 1500 RPM, then deceleration fuel cutoff is performed by MS. Deceleration fuel amount is multiplied by the "normal" pulse width, that is, if the calculated pulse is 12.0 ms and you have 20% decel amount, then the resulting pulse width is 2.4 ms. A value of 100% causes the fuel to remain at its calculated value, and can cure bucking on deceleration in vehicles with manual transmissions; those with automatic transmissions may benefit in fuel economy by using values below 100%.<br>"
text = "The MS variable "TPSDQ" holds this value as a percentage. <br>"
text = "<br><strong>Acceleration Enrichment Bins (ms)</strong><br>"
text = "These bins specify the actual enrichment in terms of pulse width. They are linearly interpolated to determine a value that is ultimately added to the computed pulse width.<br>"
text = "The array of values is called "TPSAQ" as stored in MS."
[CurveEditor]
;time-based accel enrichment
curve = time_accel_tpsdot_curve, "TPS based AE"
columnLabel = "TPSdot", "Added"
xAxis = 0, 1200, 6
yAxis = 0, 48, 4
xBins = taeBins, TPSdot
yBins = taeRates
;gauge = cltGauge
[TableEditor]
; table_id, map3d_id, "title", page
table = veTableTbl, veTableMap, "VE Table", 1
; constant, variable
xBins = rpmBins, rpm
#if SPEED_DENSITY
yBins = mapBins, map
#else
yBins = tpsBins, throttle
#endif
zBins = veTable
gridHeight = 2.0
gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees.
upDownLabel = "(RICHER)", "(LEANER)"
table = sparkTbl, sparkMap, "Ignition Advance Table", 2
xBins = rpmBins2, rpm
#if SPEED_DENSITY
yBins = mapBins2, map
#else ALPHA_N
yBins = tpsBins2, throttle
#endif
zBins = advTable1
gridHeight = 3.0
upDownLabel = "ADVANCED", "RETARDED"
;-------------------------------------------------------------------------------
[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
baroADCGauge = baroADC, "Barometer ADC", "", 0, 255, -1, -1, 256, 256, 0, 0
mapADCGauge = mapADC, "MAP ADC", "", 0, 255, -1, -1, 256, 256, 0, 0
#matADCGauge = matADC, "MAT ADC", "", 0, 255, -1, -1, 256, 256, 0, 0
#cltADCGauge = cltADC, "CLT ADC", "", 0, 255, -1, -1, 256, 256, 0, 0
tpsADCGauge = tpsADC, "TPS ADC", "", 0, 255, -1, -1, 256, 256, 0, 0
#batVoltGauge = batteryVoltage, "BAT V", "", 0, 255, -1, -1, 256, 256, 0, 0
;#if NARROW_BAND_EGO
; egoGauge = egoVoltage, "Exhaust Gas Oxygen", "volts", 0, 1.0, 0.2, 0.3, 0.6, 0.8, 2, 2
;#else
; egoGauge = egoVoltage, "Exhaust Gas Oxygen", "volts", 0.5, 4.5, 0.0, 0.0, 5.0, 5.0, 2, 2
;#endif
;lambdaGauge = lambda, "Lambda", "", 0.5, 1.5, 0.5, 0.7, 2, 1.1, 2, 2
accelEnrichGauge = accDecEnrich, "Accel Enrich", "%", 50, 150, -1, -1, 999, 999, 0, 0
afrGauge = afr, "Air:Fuel Ratio", "", 7, 25, 12, 13, 15, 16, 2, 2
clockGauge = secl, "Clock", "Seconds", 0, 255, 10, 10, 245, 245, 0, 0
deadGauge = deadValue, "---", "", 0, 1, -1, -1, 2, 2, 0, 0
dutyCycleGauge = dutyCycle, "Duty Cycle", "%", 0, 100, -1, -1, 85, 90, 1, 1
egoCorrGauge = egoCorrection, "EGO Correction", "%", 50, 150, 90, 99, 101, 110, 0, 0
gammaEnrichGauge = gammaEnrich, "Gamma Enrichment", "%", 50, 150, -1, -1, 151, 151, 0, 0
mapGauge = map, "Engine MAP", "kPa", 0, 255, 0, 20, 200, 245, 0, 0
pulseWidthGauge = pulseWidth, "Pulse Width", "mSec", 0, 25.5, 1.0, 1.2, 20, 25, 1, 1
tachometer = rpm, "Engine Speed", "RPM", 0, 8000, 300, 600, 3000, 5000, 0, 0
throttleGauge = throttle, "Throttle Position", "%TPS", 0, 100, -1, 1, 90, 100, 0, 0
tpsGauge = tps, "Throttle Position2", "%TPS", 0, 100, -1, 1, 90, 100, 0, 0
veBucketGauge = veTuneValue, "VE Value", "%", 0, 120, -1, -1, 999, 999, 0, 0
veGauge = veCurr, "VE Current", "%", 0, 120, -1, -1, 999, 999, 0, 0
voltMeter = batteryVoltage,"Battery Voltage", "volts", 0, 25, 8, 9, 15, 16, 2, 2
warmupEnrichGauge = warmupEnrich, "Warmup Enrichment", "%", 100, 150, -1, -1, 101, 105, 0, 0
#if CELSIUS
cltGauge = coolant, "Coolant Temp", "TEMP", -40, 120, -15, 0, 95, 105, 0, 0
matGauge = mat, "Manifold Air Temp", "TEMP", -40, 110, -15, 0, 95, 100, 0, 0
#else
cltGauge = coolant, "Coolant Temp", "TEMP", -40, 250, 0, 30, 200, 220, 0, 0
matGauge = mat, "Manifold Air Temp", "TEMP", -40, 215, 0, 30, 200, 210, 0, 0
#endif
advanceGauge = advance, "Spark Advance", "deg BTDC", 50, -10, 0, 0, 35, 45, 0,
loopGauge = loopsPerSecond,"Main loop speed", "Loops/S" , 0, 20000, -1, 500,1800, 4000, 0, 0
memoryGauge = freeRAM, "Free memory", "bytes" , 0, 8000, -1, 1000,8000, 1000, 0, 0
;-------------------------------------------------------------------------------
[FrontPage]
#if NARROW_BAND_EGO
egoLEDs = 0.0, 1.0, 0.5 ; NB settings.
#else
; If you reverse these range values as you see below, then the LED
; bar will work as you expect, high on the right, low on the left.
egoLEDs = 4.0, 1.0, 2.5 ; WB settings.
#endif
; Gauges are numbered left to right, top to bottom.
;
; 1 2 3 4
; 5 6 7 8
gauge1 = tachometer
#if SPEED_DENSITY
gauge2 = throttleGauge
#else
gauge2 = tpsGauge
#endif
gauge3 = pulseWidthGauge
gauge4 = dutyCycleGauge
gauge5 = mapGauge
gauge6 = matGauge
gauge7 = cltGauge
gauge8 = gammaEnrichGauge
;----------------------------------------------------------------------------
; Indicators
; expr off-label on-label, off-bg, off-fg, on-bg, on-fg
indicator = { ready }, "Not Ready", "Ready", white, black, green, black
indicator = { crank }, "Not Cranking", "Cranking", white, black, green, black
indicator = { startw }, "ASE OFF", "ASE", white, black, green, black
indicator = { warmup }, "WUE OFF", "WUE", white, black, green, black
indicator = { tpsaccaen }, "TPS Accel", "TPS Accel", white, black, green, black
indicator = { mapaccaen }, "MAP Accel", "MAP Accel", 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 > tpsflood }, "FLOOD OFF", "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, 1.0
#else
egoBar = 0, 5.0
#endif
gammaEBar = 0, 200
mapBar = 0, 255
pulseWidthBar = 0, 25.5
rpmBar = 0, 8000
throttleBar = 0, 100
egoCorrBar = 0, 200
baroCorrBar = 0, 200
warmupCorrBar = 0, 200
airdenCorrBar = 0, 200
veCorrBar = 0, 200
accCorrBar = 0, 100
;-------------------------------------------------------------------------------
[Tuning]
#if NARROW_BAND_EGO
egoLEDs = 0.0, 1.0, 0.5 ; NB settings.
#else
; If you reverse these range values as you see below, then the LED
; bar will work as you expect, high on the right, low on the left.
egoLEDs = 4.0, 1.0, 2.5 ; WB settings.
#endif
font = "Courier", 14
spotDepth = 2 ; 0 = no indicators, 1 = Z only, 2 = XYZ indicators.
cursorDepth = 2 ; Same as spot depth.
; The four radio buttons on the tuning screen select a "page" of six
; gauges. The gauge numbering is the same as the front page, across
; then down.
; 1 2
; 3 4
; 5 6
;
; gaugeColumns allows you to hide or show gauges in column 2 (i.e.,
; gauges 2, 4 and 6).
gaugeColumns = 2 ; Only 1 or 2 are valid.
;----------------------------------------------------------------------------
; Notes on tuning screen gauges:
; pageButtons = Labels for radio buttons at bottom of tuning dialog.
;
; Gauge 2 previously switched automatically to be tpsGauge when alpha-n
; was enabled, but you need to do it manually now.
;----------------------------------------------------------------------------
; Page 1 Page 2 Page 3 Page 4
pageButtons = "&EGO", "&WUE", "PW&1", "PW&2"
gauge1 = tachometer, tachometer, tachometer, tachometer
gauge2 = mapGauge, mapGauge, mapGauge, mapGauge
gauge3 = egoGauge, egoGauge, egoGauge, egoGauge
gauge4 = egoCorrGauge, warmupEnrichGauge, pulseWidthGauge, pulseWidthGauge
gauge5 = veBucketGauge, veBucketGauge, veBucketGauge, veBucketGauge
gauge6 = accelEnrichGauge, accelEnrichGauge, dutyCycleGauge, dutyCycleGauge
;-------------------------------------------------------------------------------
[OutputChannels]
; The number of bytes MegaTune should expect as a result
; of sending the "A" command to MegaSquirt is determined
; by the value of ochBlockSize, so be very careful when
; you change it.
deadValue = { 0 } ; Convenient unchanging value.
ochGetCommand = "A"
ochBlockSize = 28
secl = scalar, U08, 0, "sec", 1.000, 0.000
squirt = scalar, U08, 1, "bits", 1.000, 0.000
engine = scalar, U08, 2, "bits", 1.000, 0.000
ready = bits, U08, 2, [0:0]
crank = bits, U08, 2, [1:1]
startw = bits, U08, 2, [2:2]
warmup = bits, U08, 2, [3:3]
tpsaccaen = bits, U08, 2, [4:4]
tpsaccden = bits, U08, 2, [5:5]
mapaccaen = bits, U08, 2, [6:6]
mapaccden = bits, U08, 2, [7:7]
baroADC = scalar, U08, 3, "ADC", 1.000, 0.000
mapADC = scalar, U08, 4, "ADC", 1.000, 0.000
#matADC = scalar, U08, 5, "ADC", 1.000, 0.000
#cltADC = scalar, U08, 6, "ADC", 1.000, 0.000
#if CELSIUS
matRaw = scalar, U08, 5, "°C", 1.000, 0.000
coolantRaw = scalar, U08, 6, "°C", 1.000, 0.000
#else
matRaw = scalar, U08, 5, "°F", 1.000, 0.000
coolantRaw = scalar, U08, 6, "°F", 1.000, 0.000
#endif
tpsADC = scalar, U08, 7, "ADC", 1.000, 0.000
batteryVoltage = scalar, U08, 8, "V", 0.100, 0.000
#egoADC = scalar, U08, 9, "ADC", 1.000, 0.000
afr = scalar, U08, 9, "O2", 0.100, 0.000
egoCorrection = scalar, U08, 10, "%", 1.000, 0.000
airCorrection = scalar, U08, 11, "%", 1.000, 0.000
warmupEnrich = scalar, U08, 12, "%", 1.000, 0.000
rpm100 = scalar, U08, 13, "r100", 1.000, 0.000
pulseWidth = scalar, U08, 14, "ms", 0.2, 0.000
accelEnrich = scalar, U08, 15, "%", 1.000, 0.000
baroCorrection = scalar, U08, 16, "%", 1.000, 0.000
gammaEnrich = scalar, U08, 17, "%", 1.000, 0.000
veCurr = scalar, U08, 18, "%", 1.000, 0.000
blank1 = scalar, U08, 19 ; Raw inputs, as they come from MS.
blank2 = scalar, U08, 20
TPSdot = scalar, U08, 21, "%/s", 0.100, 0.000
advance = scalar, U08, 22, "deg", 1.000, 0.000
tps = scalar, U08, 23, "%", 1.000, 0.000
loopsPerSecond = scalar, S16, 24, "loops", 1.000, 0.000
freeRAM = scalar, S16, 26, "bytes", 1.000, 0.000
; Computed output channels. See "megatuneExamples.ini" for all the
; pre-defined variables, search for "???" and you'll see them.
accDecEnrich = { accelEnrich + ((engine & 0b00100000) ? tdePct : 100) }
#batteryVoltage = { batADC / 255.0 * 30.0 } ; Current MS power supply voltage.
coolant = { coolantRaw - 40 } ; Coolant sensor temperature in user units.
mat = { matRaw - 40 } ; Manifold temperature in user units.
; egoVoltage = { egoADC / 255.0 * 5.0 } ; EGO sensor voltage.
rpm = { rpm100*100 } ; True RPM.
time = { timeNow } ; "timeNow" is a parameterless built-in function.
;loopsPerSecond = { loopsPerSecond10*10 } ; True number of mainloops per second
afrtarget = { 0 }
; #include "lambdaSensors.ini"
#if MPX4250
barometer = { table(baroADC, "kpafactor4250.inc") }
map = { table(mapADC, "kpafactor4250.inc") } ; Manifold pressure in kPa.
#else
barometer = { table(baroADC, "kpafactor4115.inc") }
map = { table(mapADC, "kpafactor4115.inc") }
#endif
; throttle = { table(tpsADC, "throttlefactor.inc") }
throttle = { tps }, "%"
idleDC = { (coolant < fastIdleT) * 100 }
altDiv = { alternate ? 2 : 1 }
cycleTime = { 60000.0 / rpm * (2.0-twoStroke) }
nSquirts = { nCylinders/divider }
dutyCycle = { 100.0*nSquirts/altDiv*pulseWidth/cycleTime }
#if EXPANDED_CLT_TEMP
clt_exp = { 1 }
#else
clt_exp = { 0 }
#endif
#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
;-------------------------------------------------------------------------------
[Datalog]
; Full datalog.
;
; Default user-defined log emulates the full datalog.
;
; The entries are saved in the datalog file in the order in
; which they appear in the list below.
;
; Channel - Case sensitive name of output channel to be logged.
; Label - String written to header line of log. Be careful
; about changing these, as programs like MSLVV and
; MSTweak key off specific column names.
; Type - Data type of output, converted before writing.
; Format - C-style output format of data.
;
; Channel Label Type Format
; -------------- ---------- ----- ------
entry = time, "Time", float, "%.3f"
entry = secl, "SecL", int, "%d"
entry = rpm100, "RPM100", int, "%d"
entry = map, "MAP", int, "%d"
entry = tpsADC, "tpsADC", int, "%d"
entry = tps, "TPS", int, "%d"
entry = afr, "O2", float, "%.3f"
entry = mat, "MAT", float, "%.1f"
entry = coolant, "CLT", float, "%.1f"
entry = engine, "Engine", int, "%d"
entry = squirt, "Squirt", int, "%d"
entry = egoCorrection, "Gego", int, "%d"
entry = airCorrection, "Gair", int, "%d"
entry = warmupEnrich, "Gwarm", int, "%d"
entry = baroCorrection, "Gbaro", int, "%d"
entry = gammaEnrich, "Gammae", int, "%d"
entry = accDecEnrich, "TPSacc", int, "%d"
entry = veCurr, "VE", int, "%d"
entry = pulseWidth, "PW", float, "%.1f"
entry = blank2, "Unused", int, "%d"
entry = pulseWidth, "PW2", float, "%.1f"
entry = dutyCycle, "DutyCycle1", float, "%.1f"
entry = dutyCycle, "DutyCycle2", float, "%.1f"
entry = blank1, "tpsMin", int, "%d"
entry = blank2, "tpsMax", int, "%d"
entry = TPSdot, "TPS DOT", int, "%d"
entry = advance, "Ignition Advance", int,"%d"
[LoggerDefinition]
; valid logger types: composite, tooth, trigger, csv
;loggerDef = uniqueName, Display Name, type
loggerDef = tooth, "Tooth Logger", tooth
;dataReadCommand = "r\\x00\\xf4\\x00\\x00\\x04\\x00" ; standard TS command format
dataReadCommand = "T" ; Basic 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 = toothGap, "ToothTime", 0, 8, 1.0, "uS"

View File

@ -6,7 +6,7 @@
queryCommand = "Q"
;signature = 20
signature = "speeduino 201609-dev"
signature = "speeduino 201609"
versionInfo = "S" ; Put this in the title bar.
@ -336,9 +336,9 @@ page = 6
egoKI = scalar, U08, 2, "%", 1.0, 0.0, 0.0, 200.0, 0 ; * ( 1 byte)
egoKD = scalar, U08, 3, "%", 1.0, 0.0, 0.0, 200.0, 0 ; * ( 1 byte)
#if CELSIUS
egoTemp = scalar, U08, 4, "°C", 1.0, -40, -40, 102.0, 0
egoTemp = scalar, U08, 4, "C", 1.0, -40, -40, 102.0, 0
#else
egoTemp = scalar, U08, 4, "°F", 1.8, -22.23, -40, 215.0, 0
egoTemp = scalar, U08, 4, "F", 1.8, -22.23, -40, 215.0, 0
#endif
egoCount = scalar, U08, 5, "", 4.0, 0.0, 4.0, 255.0, 0 ; * ( 1 byte)
egoDelta = scalar, U08, 6, "%", 1.0, 0.0, 0.0, 255.0, 0 ; * ( 1 byte)
@ -431,11 +431,11 @@ page = 7
unused7-55e = bits, U08, 56, [6:6], "No", "Yes"
unused7-55f = bits, U08, 56, [7:7], "No", "Yes"
#if CELSIUS
fanSP = scalar, U08, 57, "°C", 1.0, -40, -40, 215.0, 0
fanHyster = scalar, U08, 58, "°C", 1.0, -40, -40, 215.0, 0
fanSP = scalar, U08, 57, "C", 1.0, -40, -40, 215.0, 0
fanHyster = scalar, U08, 58, "C", 1.0, -40, -40, 215.0, 0
#else
fanSP = scalar, U08, 57, "°F", 1.8, -22.23, -40, 215.0, 0
fanHyster = scalar, U08, 58, "°F", 1.8, -22.23, -40, 215.0, 0
fanSP = scalar, U08, 57, "F", 1.8, -22.23, -40, 215.0, 0
fanHyster = scalar, U08, 58, "F", 1.8, -22.23, -40, 215.0, 0
#endif
fanFreq = scalar, U08 , 59, "Hz", 2.0, 0.0, 10, 511, 0
#if CELSIUS
@ -732,12 +732,18 @@ menuDialog = main
field = "Cutoff RPM", dfcoRPM, { dfcoEnabled }
field = "RPM Hysteresis", dfcoHyster, { dfcoEnabled }
dialog = accelEnrichments_north_south, ""
liveGraph = pump_ae_Graph, "AE Graph"
graphLine = afr
graphLine = TPSdot, "%", -2000, 2000, auto, auto
dialog = accelEnrichments_north, "", xAxis
panel = time_accel_tpsdot_curve
;panel = time_accel_tpsdot_tbl
dialog = accelEnrichments, "Acceleration Enrichment"
panel = accelEnrichments_north, North
panel = accelEnrichments_north_south, Center
panel = accelEnrichments_center, Center
panel = accelEnrichments_south, South

View File

@ -1,149 +0,0 @@
/* FORD 1996 CKP crank signal simulator 36-1
by Ichabod mudd
*/
#include "Arduino.h"
#define PULSE_PIN 0
#define CAM_PIN 8
#define MPH_PIN 12
#define POT_PIN A0
#define teeth 60
#define missingTeeth 2
#define PULSE_DURATION 50
unsigned int MAX_DELAY;
unsigned int MIN_DELAY;
byte actualTeeth;
int mph_toggle = 1 ;
int val;
unsigned int pulse_gap;
int RPMdirection = 0;
// the setup routine runs once when you press reset:
void setup()
{
pinMode(PULSE_PIN, OUTPUT);
pinMode(CAM_PIN, OUTPUT);
pinMode(MPH_PIN, OUTPUT);
actualTeeth = teeth - missingTeeth;
if(actualTeeth == 58)
{
MAX_DELAY = 3500;
MIN_DELAY = 130;
}
else if(actualTeeth == 35)
{
MAX_DELAY = 4000;
MIN_DELAY = 29;
}
else if(actualTeeth == 11)
{
MAX_DELAY = 20000;
MIN_DELAY = 833;
}
Serial.begin(9600);
pulse_gap = MIN_DELAY;
}
//reluctor wheel
// subroutines first
//function to first go HiGH
void triggerHigh(int duration, int count)
{
switch (count)
{
case 1: // cam CMP pin 8
digitalWrite(CAM_PIN, HIGH);
break;
case 2:
digitalWrite(CAM_PIN, LOW);
digitalWrite(MPH_PIN, LOW); //VSS
break;
case 12:
digitalWrite(CAM_PIN, HIGH);
break;
case 13:
digitalWrite(CAM_PIN, LOW);
break;
case 24:
digitalWrite(CAM_PIN, HIGH);
break;
case 25:
digitalWrite(CAM_PIN, LOW);
break;
} // end cases
//hold CKP PIN high for this delay.
digitalWrite(PULSE_PIN, HIGH);
delayMicroseconds(PULSE_DURATION);
// now CKP go low
digitalWrite(PULSE_PIN, LOW);
// end function
}
//Simulates a 36 tooth reluctor wheel
//with a 1 tooth reference
// begin main loop program section
void loop()
{
// read potentiometer wiper pin 0?
// analog A/D channel 0
val = analogRead(POT_PIN);
pulse_gap = map(val, 0, 1023, MIN_DELAY, MAX_DELAY);
Serial.println(pulse_gap);
/*
if (RPMdirection == 0)
{
if (pulse_gap < MAX_DELAY) { pulse_gap++; }
else
{
RPMdirection = 1;
}
}
else
{
if (pulse_gap > MIN_DELAY) { pulse_gap--; }
else
{
RPMdirection = 0;
}
}
*/
// for loop 36 counts , 150 uS to 1000 uS or 5000 to 800 rpm
for (int i = 0; i < actualTeeth; i++)
{
// go high then low , in Symmetry
digitalWrite(PULSE_PIN, HIGH);
delayMicroseconds(PULSE_DURATION);
digitalWrite(PULSE_PIN, LOW);
if (pulse_gap < 15000) //delayMicroseconds() only works with values up to 16383. Switch to delay() at 15000 to be safe
{
delayMicroseconds( (pulse_gap - PULSE_DURATION) );
}
else
{
delay ( (pulse_gap - PULSE_DURATION) / 1000 );
}
}
// simulate the missing tooth next
delayMicroseconds( (pulse_gap * missingTeeth) );
}
// end main loop version 7 , now perfect 800 rpm to 5000
// added cam pulse 7/4/2013
// using Delay calls, suck but , this is easy.
// the switch case trick, gets the cam sensor working.
// the engine fires every 120 degr. on crank, 12 teeth, and 10 degr per tooth=120
// added MPH pin, for VSS signals to ECU

View File

@ -63,7 +63,7 @@ struct Schedule {
unsigned int endCompare;
};
Schedule *timer3Aqueue[4];
volatile Schedule *timer3Aqueue[4];
Schedule *timer3Bqueue[4];
Schedule *timer3Cqueue[4];
@ -86,27 +86,50 @@ Schedule ignitionSchedule8;
Schedule nullSchedule; //This is placed at the end of the queue. It's status will always be set to OFF and hence will never perform any action within an ISR
static inline unsigned int setQueue(Schedule *queue[], Schedule *schedule1, Schedule *schedule2, unsigned int CNT)
static inline unsigned int setQueue(volatile Schedule *queue[], Schedule *schedule1, Schedule *schedule2, unsigned int CNT)
{
//Create an array of all the upcoming targets, relative to the current count on the timer
unsigned int tmpQueue[4];
tmpQueue[0] = schedule1->startCompare - CNT;
tmpQueue[1] = schedule1->endCompare - CNT;
tmpQueue[2] = schedule2->startCompare - CNT;
tmpQueue[3] = schedule2->endCompare - CNT;
//Set the initial queue state. This order matches the tmpQueue order
queue[0] = schedule1;
queue[1] = schedule1;
queue[2] = schedule2;
queue[3] = schedule2;
if(schedule1->Status == OFF)
{
queue[0] = schedule2;
queue[1] = schedule2;
tmpQueue[0] = schedule2->startCompare - CNT;
tmpQueue[1] = schedule2->endCompare - CNT;
}
else
{
queue[0] = schedule1;
queue[1] = schedule1;
tmpQueue[0] = schedule1->startCompare - CNT;
tmpQueue[1] = schedule1->endCompare - CNT;
}
if(schedule2->Status == OFF)
{
queue[2] = schedule1;
queue[3] = schedule1;
tmpQueue[2] = schedule1->startCompare - CNT;
tmpQueue[3] = schedule1->endCompare - CNT;
}
else
{
queue[2] = schedule2;
queue[3] = schedule2;
tmpQueue[2] = schedule2->startCompare - CNT;
tmpQueue[3] = schedule2->endCompare - CNT;
}
//Sort the queues. Both queues are kept in sync.
//This implementes a sorting networking based on the Bose-Nelson swap algorithm
//See:
//This implementes a sorting networking based on the Bose-Nelson sorting network
//See: http://pages.ripco.net/~jgamble/nw.html
#define SWAP(x,y) if(tmpQueue[y] < tmpQueue[x]) { unsigned int tmp = tmpQueue[x]; tmpQueue[x] = tmpQueue[y]; tmpQueue[y] = tmp; Schedule *tmpS = queue[x]; queue[x] = queue[y]; queue[y] = tmpS; }
//SWAP(0, 1); //Likely not needed
//SWAP(2, 3); //Likely not needed
SWAP(0, 2);
SWAP(1, 3);
SWAP(1, 2);
@ -119,7 +142,7 @@ static inline unsigned int setQueue(Schedule *queue[], Schedule *schedule1, Sche
* The current item (0) is discarded
* The final queue slot is set to nullSchedule to indicate that no action should be taken
*/
static inline unsigned int popQueue(Schedule *queue[])
static inline unsigned int popQueue(volatile Schedule *queue[])
{
queue[0] = queue[1];
queue[1] = queue[2];

View File

@ -23,6 +23,8 @@ void initialiseSchedulers()
fuelSchedule2.Status = OFF;
fuelSchedule3.Status = OFF;
fuelSchedule5.Status = OFF;
fuelSchedule1.schedulesSet = 0;
fuelSchedule2.schedulesSet = 0;
fuelSchedule3.schedulesSet = 0;

View File

@ -1212,7 +1212,7 @@ void loop()
}
}
//if(channel5InjEnabled)
if(channel5InjEnabled)
{
tempCrankAngle = crankAngle - channel5InjDegrees;
if( tempCrankAngle < 0) { tempCrankAngle += CRANK_ANGLE_MAX; }