RUIC 0.5.0 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. checksums.yaml +4 -4
  2. data/HISTORY +23 -0
  3. data/README.md +2 -2
  4. data/lib/ruic.rb +11 -3
  5. data/lib/ruic/application.rb +28 -22
  6. data/lib/ruic/attributes.rb +10 -2
  7. data/lib/ruic/behaviors.rb +2 -15
  8. data/lib/ruic/effect.rb +32 -0
  9. data/lib/ruic/interfaces.rb +51 -13
  10. data/lib/ruic/presentation.rb +46 -20
  11. data/lib/ruic/renderplugin.rb +18 -0
  12. data/lib/ruic/ripl.rb +45 -0
  13. data/lib/ruic/statemachine.rb +142 -25
  14. data/lib/ruic/version.rb +1 -1
  15. data/test/customclasses.ruic +0 -1
  16. data/test/filtering.ruic +0 -1
  17. data/test/futureassets.ruic +0 -1
  18. data/test/nonmaster.ruic +0 -1
  19. data/test/paths.ruic +0 -2
  20. data/test/projects/MissingAssets/Existing.uip +87 -0
  21. data/test/projects/MissingAssets/MissingAssets.uia +21 -0
  22. data/test/projects/MissingAssets/MissingAssets.uia-user +14 -0
  23. data/test/projects/MissingAssets/RoundedPlane-1/RoundedPlane-1.import +18 -0
  24. data/test/projects/MissingAssets/RoundedPlane-1/meshes/RoundedPlane.mesh +0 -0
  25. data/test/projects/MissingAssets/effects/effects.txt +3 -0
  26. data/test/projects/MissingAssets/effects/existing.effect +38 -0
  27. data/test/projects/MissingAssets/fonts/Arimo-Regular.ttf +0 -0
  28. data/test/projects/MissingAssets/fonts/Chivo-Black.ttf +0 -0
  29. data/test/projects/MissingAssets/fonts/OFL.txt +92 -0
  30. data/test/projects/MissingAssets/maps/effects/brushnoise.dds +0 -0
  31. data/test/projects/MissingAssets/maps/existing.png +0 -0
  32. data/test/projects/MissingAssets/maps/existing2.png +0 -0
  33. data/test/projects/MissingAssets/maps/maps.txt +2 -0
  34. data/test/projects/MissingAssets/maps/materials/concrete_plain.png +0 -0
  35. data/test/projects/MissingAssets/maps/materials/concrete_plain_bump.png +0 -0
  36. data/test/projects/MissingAssets/maps/materials/spherical_checker.png +0 -0
  37. data/test/projects/MissingAssets/maps/unused.png +0 -0
  38. data/test/projects/MissingAssets/materials/concrete.material +251 -0
  39. data/test/projects/MissingAssets/materials/materials.txt +3 -0
  40. data/test/projects/MissingAssets/scripts/existing1.lua +2 -0
  41. data/test/projects/MissingAssets/scripts/existing2.lua +470 -0
  42. data/test/projects/MissingAssets/states/existing.scxml +4 -0
  43. data/test/projects/MissingAssets/tests/interface-navigation.scxml-test +3 -0
  44. data/test/properties.ruic +0 -2
  45. data/test/referencematerials.ruic +0 -2
  46. data/test/usage.ruic +38 -4
  47. metadata +53 -3
  48. data/lib/ruic/ripl-after-result.rb +0 -25
@@ -0,0 +1,2 @@
1
+ require 'existing2'
2
+ require 'missing2'
@@ -0,0 +1,470 @@
1
+ -- Copyright (c) 2013 NVIDIA, Inc.
2
+ -- Provided under the MIT License: http://opensource.org/licenses/MIT
3
+
4
+ -- If we do not have the CAN bindings (from the CAN .dll or .so) then
5
+ -- this simulation code will be used to fire similar CAN events for testing.
6
+ if not CAN then
7
+ output( "CAN module not loaded, continuing with Lua simulation." )
8
+
9
+ -- *************************************************************************************************
10
+ -- *** CUSTOMIZE THE CODE BELOW ********************************************************************
11
+ -- *************************************************************************************************
12
+
13
+ local thePresentationAssetId = 'main' -- <presentation id="..."/> in the .uia for the initial presentation
14
+ local theRepeatDelay = 250 -- Milliseconds before a held key starts firing repeat events
15
+ local theRepeatPerSecond = 10 -- Number of events to fire each second while a key is held
16
+
17
+ function self:getSimulations()
18
+ -- See the reference manual for the keyboard KEY_ constants available.
19
+ return {
20
+ -- Menu Controls
21
+ { key=KEY_TAB, messages={"input.menu"} },
22
+ { key=KEY_LEFT, messages={"input.prev"} },
23
+ { key=KEY_RIGHT, messages={"input.next"} },
24
+ { key=KEY_UP, messages={"input.up"} },
25
+ { key=KEY_DOWN, messages={"input.down"} },
26
+ { key=KEY_BACK, messages={"input.back"} },
27
+ { key=KEY_RETURN, messages={"input.ok"} },
28
+
29
+ -- Gears; each key press cycles through the messages
30
+ { key=KEY_G, messages={"gear.p", "gear.r", "gear.n", "gear.d"} },
31
+
32
+ -- Warnings; each key press cycles through the messages
33
+ { key=KEY_A, messages={"abs.on", "abs.off"} },
34
+ { key=KEY_Y, messages={"battery.on", "battery.off"} },
35
+ { key=KEY_R, messages={"brakefluid.on", "brakefluid.off"} },
36
+ { key=KEY_E, messages={"checkengine.on", "checkengine.off"} },
37
+ { key=KEY_C, messages={"cruise.on", "cruise.off"} },
38
+ { key=KEY_D, messages={"fuellevel.on", "fuellevel.off"} },
39
+ { key=KEY_Q, messages={"seatbelt.on", "seatbelt.off"} },
40
+ { key=KEY_L, messages={"oilpressure.on", "oilpressure.off"} },
41
+ { key=KEY_T, messages={"lowtire.on", "lowtire.off"} },
42
+ { key=KEY_W, messages={"washerfluid.on", "washerfluid.off"} },
43
+ { key=KEY_O, messages={"parkingbrake.on", "parkingbrake.off"} },
44
+
45
+ -- Indicators; each key press cycles through the messages
46
+ { key=KEY_J, messages={"blinker.left.on", "blinker.off"} },
47
+ { key=KEY_K, messages={"blinker.right.on", "blinker.off"} },
48
+ { key=KEY_P, messages={"blinker.hazard.on", "blinker.off"} },
49
+ { key=KEY_U, messages={"highbeam.on", "highbeam.off"} },
50
+ { key=KEY_H, messages={"headlamp.on", "headlamp.off"} },
51
+
52
+ -- Media
53
+ { key=KEY_V, messages={"media.volume.increase"} },
54
+ { key=KEY_B, messages={"media.volume.decrease"} },
55
+ { key=KEY_N, messages={"media.pause"} },
56
+ { key=KEY_M, messages={"media.play"} },
57
+
58
+ -- Property values to simulate changes over time; new value is generated each frame
59
+ { update=self.speedSim, messages={"vehicleSpeed"} },
60
+ { update=self.tachSim, messages={"engineSpeed"} },
61
+ { update=self.odoSim, messages={"odo"} },
62
+ { update=self.odoSim, messages={"trip"} },
63
+ { update=self.fuelSim, messages={"fuelLevel"} },
64
+ { update=self.coolantSim, messages={"coolantTemp"} },
65
+ { update=self.oilSim, messages={"oilTemp"} },
66
+ { update=self.tireTempSim, messages={"tireTemp"} },
67
+ }
68
+ end
69
+
70
+ function self.speedSim( inController, inElapsedTime )
71
+ -- data based on 60fps
72
+ actualFrameNumber = math.floor(inElapsedTime * 60)
73
+ local theSample = (actualFrameNumber-1) % #self.vehicleSpeedData + 1
74
+ inController.value = self.vehicleSpeedData[theSample] * .06
75
+ end
76
+
77
+ function self.tachSim( inController, inElapsedTime )
78
+ -- data based on 60fps
79
+ actualFrameNumber = math.floor(inElapsedTime * 60)
80
+ local theSample = (actualFrameNumber-1) % #self.engineSpeedData + 1
81
+ inController.value = self.engineSpeedData[theSample] / 100
82
+ end
83
+
84
+ function self.odoSim( inController, inElapsedTime )
85
+ inController.value = inController.value + .0002
86
+ end
87
+
88
+ function self.fuelSim( inController, inElapsedTime )
89
+ inController.value = self.linearSampler( 0, 100, 60, inElapsedTime )
90
+ end
91
+
92
+ function self.tempSim( inController, inElapsedTime )
93
+ inController.value = self.sineSampler( 0, 260, 40, inElapsedTime )
94
+ end
95
+
96
+ function self.coolantSim( inController, inElapsedTime )
97
+ inController.value = self.sineSampler( 0, 300, 40, inElapsedTime )
98
+ end
99
+
100
+ function self.oilSim( inController, inElapsedTime )
101
+ inController.value = self.sineSampler( 0, 300, 200, inElapsedTime )
102
+ end
103
+
104
+ function self.tireTempSim( inController, inElapsedTime )
105
+ inController.value = self.sineSampler( 0, 300, 200, inElapsedTime )
106
+ end
107
+
108
+ -- *************************************************************************************************
109
+ -- *** END USER CUSTOMIZATIONS *********************************************************************
110
+ -- *************************************************************************************************
111
+
112
+ local theCatalog = {}
113
+ local theMessages = {}
114
+ CAN = {}
115
+ ------------------------------------------------------------------------------------------
116
+ -- Return the current message catalog; typically only called a single time at startup
117
+ ------------------------------------------------------------------------------------------
118
+ function CAN.getCatalog()
119
+ return theCatalog
120
+ end
121
+
122
+ ------------------------------------------------------------------------------------------
123
+ -- Return the current queue of messages and clear the list for the next call.
124
+ -- This is typically called every frame.
125
+ ------------------------------------------------------------------------------------------
126
+ function CAN.getMessages( inTime )
127
+ local theFrameMessages = theMessages
128
+ theMessages = {} -- Clear the current message buffer for the next frame
129
+
130
+ return theFrameMessages
131
+ end
132
+
133
+ ----------------------------------------------------------------
134
+ -- Called once at startup to initialize the settings
135
+ ----------------------------------------------------------------
136
+ function self:onInitialize()
137
+ self.bindings = {} -- key-based simulations, indexed by key code
138
+ self.controllers = {} -- list of update-based simulations
139
+ self.repeatTimeByBinding = {}
140
+
141
+ self.repeatDelay = theRepeatDelay / 1000
142
+ self.repeatPeriod = 1 / theRepeatPerSecond
143
+
144
+ for _,theEntry in ipairs(self:getSimulations()) do
145
+ -- Build the catalog messages from each entry
146
+ for _,theMessage in ipairs(theEntry.messages) do
147
+ theCatalog[theMessage] = theMessage
148
+ end
149
+
150
+ -- Build the key bindings from applicable entries
151
+ if theEntry.key then
152
+ self.bindings[theEntry.key] = {messages=theEntry.messages, value=0}
153
+
154
+ -- Else if this does not have a key binding and is updated each frame
155
+ elseif theEntry.update then
156
+ table.insert( self.controllers, {messages=theEntry.messages, value=0, update=theEntry.update} )
157
+ end
158
+ end
159
+
160
+ -- Register for key presses
161
+ local theScene = getElement( thePresentationAssetId..":Scene" )
162
+ registerForEvent( "onKeyDown", theScene, self.onKeyDown )
163
+ registerForEvent( "onKeyUp", theScene, self.onKeyUp )
164
+ end
165
+
166
+ function self:onKeyDown( inEventTarget, inKeyCode )
167
+ self:fireBinding( self.bindings[inKeyCode], self.repeatDelay )
168
+ end
169
+
170
+ function self:onKeyUp( inEventTarget, inKeyCode )
171
+ local theBinding = self.bindings[inKeyCode]
172
+ if theBinding then self.repeatTimeByBinding[theBinding] = nil end
173
+ end
174
+
175
+ function self:fireBinding( inBinding, inRepeatTime)
176
+ if inBinding then
177
+ local _,now = getElapsedTime()
178
+ -- Increment the state of the binding, wrapping as needed
179
+ inBinding.value = (inBinding.value % #inBinding.messages) + 1
180
+
181
+ -- Add the resulting message to the queue; do not pass a data field,
182
+ -- else this will be treated as a data value instead of an event
183
+ table.insert( theMessages, {command=inBinding.messages[inBinding.value]} )
184
+ self.repeatTimeByBinding[inBinding] = now + inRepeatTime
185
+ end
186
+ end
187
+
188
+ ----------------------------------------------------------------
189
+ -- Called once per frame to update the simulations
190
+ ----------------------------------------------------------------
191
+ function self:onUpdate()
192
+ local _,now = getElapsedTime()
193
+
194
+ for _,theController in ipairs(self.controllers) do
195
+ -- Update the value of the controller by calling its update function
196
+ theController.update( theController, now )
197
+
198
+ -- Generate messages for every associated message for this controller
199
+ for _,theMessage in ipairs(theController.messages) do
200
+ table.insert( theMessages, {command=theMessage, data=theController.value} )
201
+ end
202
+ end
203
+
204
+ -- If any binding keys are still down (waiting to repeat) check them
205
+ if next(self.repeatTimeByBinding) then
206
+ for theBinding,repeatTime in pairs(self.repeatTimeByBinding) do
207
+ if repeatTime <= now then self:fireBinding(theBinding,self.repeatPeriod) end
208
+ end
209
+ end
210
+ end
211
+
212
+ -- A sine wave for for simulating various inputs
213
+ function self.sineSampler( inMin, inMax, inPeriod, inElapsedTime )
214
+ local theAmplitude = (inMax - inMin)/2
215
+ return inMin + theAmplitude * (math.cos( inElapsedTime*(math.pi*2)/inPeriod - math.pi ) + 1)
216
+ end
217
+
218
+ -- Simulate from Max value to Min value linearly over Period seconds, looping
219
+ function self.linearSampler( inMin, inMax, inPeriod, inElapsedTime )
220
+ local theAmplitude = inMax - inMin
221
+ return inMin + (theAmplitude - inElapsedTime*(theAmplitude/inPeriod)) % theAmplitude
222
+ end
223
+
224
+ self.vehicleSpeedData = {
225
+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
226
+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,4,6,8,10,12,14,16,18,24,32,40,48,56,64,72,80,
227
+ 88,96,104,112,120,128,136,144,152,160,168,176,184,192,200,208,216,224,232,240,
228
+ 248,256,264,272,280,288,296,304,312,320,328,336,344,352,360,368,376,384,392,400,
229
+ 408,416,424,432,440,448,456,462,468,474,480,486,492,498,504,510,516,522,528,534,
230
+ 540,546,552,558,564,570,576,582,588,594,600,606,612,618,624,630,636,642,648,654,
231
+ 660,666,672,678,684,690,696,702,708,714,720,726,732,738,744,750,756,762,768,774,
232
+ 780,786,792,798,804,810,816,820,824,828,832,836,840,844,848,852,856,860,864,868,
233
+ 872,876,880,884,888,892,896,900,904,908,912,916,920,924,928,932,936,940,944,948,
234
+ 952,956,960,964,968,972,976,980,984,988,992,996,1000,1004,1008,1012,1016,1020,
235
+ 1024,1028,1032,1036,1040,1044,1048,1052,1056,1054,1052,1050,1048,1046,1044,1042,
236
+ 1040,1038,1036,1034,1032,1030,1028,1026,1024,1022,1020,1018,1016,1014,1012,1010,
237
+ 1008,1006,1004,1002,1000,998,996,994,992,990,988,986,984,982,980,978,976,974,
238
+ 972,970,968,966,964,962,960,958,956,954,952,950,948,946,944,942,940,938,936,934,
239
+ 932,930,928,926,924,922,920,918,916,914,912,910,908,906,904,902,900,898,896,894,
240
+ 892,890,888,886,884,882,880,878,876,874,872,870,868,866,864,862,860,858,856,854,
241
+ 852,850,848,846,844,842,840,838,836,834,832,830,828,826,824,822,820,818,816,823,
242
+ 830,837,844,851,858,865,872,879,886,893,900,907,914,921,928,935,942,949,956,963,
243
+ 970,977,984,991,998,1005,1012,1019,1026,1033,1040,1047,1054,1061,1068,1075,1082,
244
+ 1089,1096,1103,1110,1117,1124,1131,1138,1145,1152,1159,1166,1173,1180,1187,1194,
245
+ 1201,1208,1215,1222,1229,1236,1246,1256,1266,1276,1286,1296,1306,1316,1326,1336,
246
+ 1346,1356,1366,1376,1386,1396,1406,1416,1426,1436,1446,1456,1466,1476,1486,1496,
247
+ 1506,1516,1526,1536,1546,1556,1566,1576,1586,1596,1606,1616,1626,1636,1646,1656,
248
+ 1666,1676,1686,1696,1706,1716,1726,1736,1746,1756,1766,1776,1786,1796,1806,1816,
249
+ 1826,1836,1836,1836,1836,1834,1832,1830,1828,1826,1824,1822,1820,1818,1816,1814,
250
+ 1812,1810,1808,1806,1804,1802,1800,1798,1796,1794,1792,1790,1788,1786,1784,1782,
251
+ 1780,1778,1776,1774,1772,1770,1768,1766,1764,1762,1760,1758,1756,1754,1752,1750,
252
+ 1748,1746,1744,1742,1740,1738,1736,1734,1732,1730,1728,1726,1724,1722,1723,1724,
253
+ 1725,1726,1728,1730,1732,1734,1736,1738,1740,1742,1744,1746,1748,1750,1753,1756,
254
+ 1759,1762,1765,1768,1771,1774,1777,1780,1783,1786,1789,1792,1795,1798,1801,1804,
255
+ 1807,1810,1813,1816,1819,1822,1825,1828,1831,1834,1837,1840,1843,1846,1849,1852,
256
+ 1855,1858,1861,1864,1867,1870,1873,1876,1879,1882,1885,1888,1891,1894,1897,1900,
257
+ 1903,1906,1909,1912,1915,1918,1921,1924,1927,1930,1933,1936,1939,1942,1945,1948,
258
+ 1951,1954,1957,1960,1963,1966,1969,1972,1975,1978,1981,1984,1987,1990,1993,1996,
259
+ 1999,2002,2005,2008,2011,2014,2017,2020,2023,2026,2029,2032,2035,2038,2041,2044,
260
+ 2047,2050,2053,2056,2059,2062,2064,2066,2068,2070,2072,2074,2076,2078,2080,2082,
261
+ 2084,2086,2088,2090,2092,2094,2096,2098,2100,2102,2104,2106,2108,2110,2112,2114,
262
+ 2116,2118,2120,2122,2124,2126,2128,2130,2132,2134,2136,2138,2140,2142,2144,2146,
263
+ 2148,2150,2152,2154,2156,2158,2160,2162,2164,2166,2168,2170,2172,2174,2176,2178,
264
+ 2180,2182,2184,2186,2188,2190,2192,2194,2196,2198,2200,2202,2204,2206,2208,2210,
265
+ 2212,2214,2216,2218,2220,2222,2224,2226,2228,2230,2232,2234,2236,2238,2240,2242,
266
+ 2244,2246,2248,2250,2252,2254,2256,2258,2260,2262,2264,2266,2268,2270,2272,2274,
267
+ 2276,2278,2280,2282,2284,2286,2288,2290,2292,2294,2296,2298,2300,2302,2301,2300,
268
+ 2299,2298,2297,2296,2295,2294,2293,2292,2291,2290,2289,2288,2287,2286,2285,2284,
269
+ 2283,2282,2281,2280,2279,2278,2277,2276,2275,2274,2273,2272,2271,2270,2269,2268,
270
+ 2267,2266,2265,2264,2263,2262,2261,2260,2259,2258,2257,2256,2255,2254,2253,2252,
271
+ 2251,2250,2249,2248,2247,2246,2245,2244,2243,2242,2239,2236,2233,2230,2227,2224,
272
+ 2221,2218,2215,2212,2209,2206,2203,2200,2197,2194,2191,2188,2185,2182,2179,2176,
273
+ 2173,2170,2167,2164,2161,2158,2155,2152,2149,2146,2143,2140,2137,2134,2131,2128,
274
+ 2125,2122,2119,2116,2113,2110,2107,2104,2101,2098,2095,2092,2089,2086,2083,2080,
275
+ 2077,2074,2071,2068,2065,2062,2058,2054,2050,2046,2042,2038,2034,2030,2026,2022,
276
+ 2018,2014,2010,2006,2001,1996,1991,1986,1981,1976,1971,1966,1961,1956,1951,1946,
277
+ 1941,1936,1931,1926,1921,1916,1911,1906,1901,1896,1891,1886,1881,1876,1871,1866,
278
+ 1861,1856,1851,1846,1841,1836,1831,1826,1821,1816,1811,1806,1801,1796,1791,1786,
279
+ 1781,1776,1776,1776,1776,1776,1776,1776,1776,1776,1776,1776,1776,1776,1776,1776,
280
+ 1776,1776,1776,1776,1776,1776,1776,1776,1776,1776,1776,1776,1776,1776,1776,1776,
281
+ 1776,1776,1776,1776,1776,1776,1776,1776,1776,1776,1776,1776,1776,1776,1776,1776,
282
+ 1776,1776,1776,1776,1776,1776,1776,1776,1776,1776,1776,1776,1776,1776,1779,1782,
283
+ 1785,1788,1791,1794,1797,1800,1803,1806,1809,1812,1815,1818,1821,1824,1827,1830,
284
+ 1833,1836,1839,1842,1845,1848,1851,1854,1857,1860,1863,1866,1869,1872,1875,1878,
285
+ 1881,1884,1887,1890,1893,1896,1899,1902,1905,1908,1911,1914,1917,1920,1923,1926,
286
+ 1929,1932,1935,1938,1941,1944,1947,1950,1953,1956,1958,1960,1962,1964,1966,1968,
287
+ 1970,1972,1974,1976,1978,1980,1982,1984,1986,1988,1990,1992,1994,1996,1998,2000,
288
+ 2002,2004,2006,2008,2010,2012,2014,2016,2018,2020,2022,2024,2026,2028,2030,2032,
289
+ 2034,2036,2038,2040,2042,2044,2046,2048,2050,2052,2054,2056,2058,2060,2062,2064,
290
+ 2066,2068,2070,2072,2074,2076,2078,2080,2082,2084,2086,2088,2090,2092,2094,2096,
291
+ 2098,2100,2102,2104,2106,2108,2110,2112,2114,2116,2118,2120,2122,2124,2126,2128,
292
+ 2130,2132,2134,2136,2138,2140,2142,2144,2146,2148,2150,2152,2154,2156,2158,2160,
293
+ 2162,2164,2166,2168,2170,2172,2174,2176,2178,2180,2182,2184,2186,2188,2190,2192,
294
+ 2194,2196,2198,2200,2202,2204,2206,2208,2210,2212,2214,2216,2218,2220,2222,2224,
295
+ 2226,2228,2230,2232,2234,2236,2238,2240,2242,2244,2246,2248,2250,2252,2254,2256,
296
+ 2258,2260,2262,2264,2266,2268,2270,2272,2274,2276,2278,2280,2282,2284,2286,2288,
297
+ 2290,2292,2294,2296,2298,2300,2301,2302,2303,2304,2305,2306,2307,2308,2309,2310,
298
+ 2311,2312,2313,2314,2315,2316,2317,2318,2319,2320,2321,2322,2323,2324,2325,2326,
299
+ 2327,2328,2329,2330,2331,2332,2333,2334,2335,2336,2337,2338,2339,2340,2341,2342,
300
+ 2343,2344,2345,2346,2347,2348,2349,2350,2351,2352,2353,2354,2355,2356,2357,2358,
301
+ 2359,2360,2361,2362,2363,2364,2365,2366,2367,2368,2366,2364,2362,2360,2358,2356,
302
+ 2354,2352,2350,2348,2346,2344,2342,2340,2338,2336,2334,2332,2330,2328,2326,2324,
303
+ 2322,2320,2318,2316,2314,2312,2310,2308,2306,2304,2302,2300,2298,2296,2294,2292,
304
+ 2290,2288,2286,2284,2282,2280,2278,2276,2274,2272,2270,2268,2266,2264,2262,2260,
305
+ 2258,2256,2254,2252,2250,2248,2240,2230,2220,2210,2200,2190,2180,2170,2160,2150,
306
+ 2140,2130,2120,2110,2100,2090,2080,2070,2060,2050,2040,2030,2020,2010,2000,1990,
307
+ 1980,1970,1960,1950,1940,1930,1920,1910,1900,1890,1880,1870,1860,1850,1840,1830,
308
+ 1820,1810,1800,1790,1780,1770,1760,1750,1740,1730,1720,1710,1700,1690,1680,1670,
309
+ 1660,1650,1645,1640,1635,1630,1625,1620,1615,1610,1605,1600,1595,1590,1585,1580,
310
+ 1575,1570,1565,1560,1555,1550,1545,1540,1535,1530,1525,1520,1515,1510,1505,1500,
311
+ 1495,1490,1485,1480,1475,1470,1465,1460,1455,1450,1445,1440,1435,1430,1425,1420,
312
+ 1415,1410,1405,1400,1395,1390,1385,1380,1375,1370,1365,1360,1355,1350,1345,1340,
313
+ 1335,1330,1325,1320,1315,1310,1305,1300,1295,1290,1285,1280,1275,1270,1265,1260,
314
+ 1255,1250,1245,1240,1235,1230,1225,1220,1215,1210,1205,1200,1195,1190,1185,1180,
315
+ 1175,1170,1165,1160,1155,1150,1145,1140,1135,1130,1125,1120,1115,1110,1105,1100,
316
+ 1090,1088,1086,1084,1082,1080,1078,1076,1074,1072,1070,1065,1060,1055,1050,1045,
317
+ 1040,1035,1030,1025,1020,1015,1010,1005,1000,995,990,985,980,975,970,965,960,
318
+ 955,950,945,940,935,930,925,920,915,910,905,900,895,890,885,880,875,870,865,860,
319
+ 855,850,845,840,835,830,825,820,815,810,805,800,795,790,785,780,775,772,769,766,
320
+ 763,760,757,754,751,748,745,742,739,736,733,730,727,724,721,718,715,712,709,706,
321
+ 703,700,697,694,691,688,685,682,679,676,673,670,667,664,661,658,655,652,649,646,
322
+ 643,640,637,634,631,628,625,622,619,616,613,610,607,604,601,598,595,597,599,601,
323
+ 603,605,607,609,611,613,615,617,619,621,623,625,627,629,631,633,635,637,639,641,
324
+ 643,645,647,649,651,653,655,657,659,661,663,665,667,669,671,673,675,677,679,681,
325
+ 683,685,687,689,691,693,695,697,699,701,703,705,707,709,711,713,715,715,715,715,
326
+ 715,715,715,715,715,715,715,715,715,715,715,715,715,715,715,715,715,715,715,715,
327
+ 715,715,715,715,715,715,715,715,715,715,715,715,715,715,715,715,715,715,715,715,
328
+ 715,715,715,715,715,715,715,715,715,715,715,715,715,715,715,715,715,710,705,700,
329
+ 695,690,685,680,675,670,665,660,655,650,645,640,635,630,625,620,615,610,605,600,
330
+ 595,590,585,580,575,570,565,560,555,550,545,540,535,530,525,520,515,510,505,500,
331
+ 495,490,485,480,475,470,465,460,455,450,445,440,435,430,425,420,415,417,419,421,
332
+ 423,425,427,429,431,433,435,437,439,441,443,445,447,449,451,453,455,457,459,461,
333
+ 463,465,467,469,471,473,475,477,479,481,483,485,487,489,491,493,495,497,499,501,
334
+ 503,505,507,509,511,513,515,517,519,521,523,525,527,529,531,533,535,536,532,528,
335
+ 524,520,516,512,508,504,500,496,492,488,484,480,476,472,468,464,460,456,452,448,
336
+ 444,440,436,432,428,424,420,416,412,408,404,400,396,392,388,384,380,376,372,368,
337
+ 364,360,356,352,348,344,340,336,332,328,324,320,316,312,308,304,300,295,290,285,
338
+ 280,275,270,265,260,255,250,245,240,235,230,225,220,215,210,205,200,195,190,185,
339
+ 180,175,170,165,160,155,150,145,140,135,130,125,120,115,110,105,100,95,90,85,80,
340
+ 75,70,65,60,55,50,45,40,35,30,25,20,15,10,5,0
341
+ }
342
+
343
+ self.engineSpeedData = {
344
+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
345
+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,20,30,40,50,60,70,80,90,120,160,200,240,280,320,
346
+ 360,400,440,480,520,560,600,640,680,720,760,800,840,880,920,960,1000,1040,1080,
347
+ 1120,1160,1200,1240,1280,1320,1360,1400,1440,1480,1520,1560,1600,1640,1680,1720,
348
+ 1760,1800,1840,1880,1920,1960,2000,2040,2080,2120,2160,2200,2240,2280,2320,2360,
349
+ 2380,2400,2420,2440,2460,2480,2500,2520,2540,2560,2580,2600,2620,2640,2660,2680,
350
+ 2700,2720,2740,2760,2780,2800,2820,2840,2860,2880,2900,2920,2940,2960,2980,3000,
351
+ 3020,3040,3060,3080,3100,3120,3140,3160,3180,3200,3220,3240,3260,3280,3300,3320,
352
+ 3340,3360,3380,3400,3420,3440,3460,3480,3500,3520,3540,3560,3570,3580,3590,3600,
353
+ 3610,3620,3630,3640,3650,3660,3670,3680,3690,3700,3710,3720,3730,3740,3750,3760,
354
+ 3770,3780,3790,3800,3810,3820,3830,3840,3850,3860,3870,3880,3890,3900,3910,3920,
355
+ 3930,3940,3950,3960,3970,3980,3990,4000,4010,4020,4030,4040,4050,4060,4070,4080,
356
+ 4090,4100,4110,4120,4130,4140,4150,4160,4155,4150,4145,4140,4135,4130,4125,4120,
357
+ 4115,4110,4105,4100,4095,4090,4085,4080,4075,4070,4065,4060,4055,4050,4045,4040,
358
+ 4035,4030,4025,4020,4015,4010,4005,4000,3995,3990,3985,3980,3975,3970,3965,3960,
359
+ 3955,3950,3945,3940,3935,3930,3925,3920,3915,3910,3905,3900,3895,3890,3885,3880,
360
+ 3875,3870,3865,3860,3850,3840,3830,3820,3810,3800,3790,3780,3770,3760,3750,3740,
361
+ 3730,3720,3710,3700,3690,3680,3670,3660,3650,3640,3630,3620,3610,3600,3590,3580,
362
+ 3570,3560,3550,3540,3530,3520,3510,3500,3490,3480,3470,3460,3450,3440,3430,3420,
363
+ 3410,3400,3390,3380,3370,3360,3350,3340,3330,3320,3310,3300,3290,3280,3270,3260,
364
+ 3300,3340,3380,3420,3460,3500,3540,3580,3620,3660,3700,3740,3780,3820,3860,3900,
365
+ 3940,3980,4020,4060,4100,4140,4180,4220,4260,4300,4340,4380,4420,4460,4500,4540,
366
+ 4580,4620,4660,4700,4740,4780,4820,4860,4900,4940,4980,5020,5060,5100,5140,5180,
367
+ 5220,5260,5300,5340,5380,5420,5460,5500,5540,5580,5620,5660,5690,5720,5750,5780,
368
+ 5810,5840,5870,5900,5930,5960,5990,6020,6050,6080,6110,6140,6170,6200,6230,6260,
369
+ 6290,6320,6350,6380,6410,6440,6470,6500,6530,6560,6590,6620,6650,6680,6710,6740,
370
+ 6770,6800,6830,6860,6890,6920,6950,6980,6990,7000,7010,7020,7030,7040,7050,7060,
371
+ 7070,7080,7090,7100,7110,7120,7130,7140,7125,7110,7095,7080,7065,7050,7035,7020,
372
+ 7005,6990,6975,6960,6945,6930,6915,6900,6885,6870,6855,6845,6835,6825,6815,6805,
373
+ 6795,6785,6775,6765,6755,6745,6735,6725,6715,6705,6695,6685,6675,6665,6655,6650,
374
+ 6645,6640,6635,6630,6625,6620,6615,6610,6605,6600,6595,6590,6585,6580,6575,6570,
375
+ 6570,6570,6570,6570,6570,6575,6575,6580,6585,6590,6595,6600,6605,6610,6615,6620,
376
+ 6625,6630,6635,6640,6645,6650,6655,6660,6665,6670,6675,6680,6685,6690,6695,6700,
377
+ 6705,6710,6715,6720,6725,6730,6735,6740,6745,6750,6755,6760,6765,6770,6775,6780,
378
+ 6785,6790,6795,6800,6805,6810,6815,6820,6825,6830,6835,6840,6845,6850,6855,6860,
379
+ 6864,6868,6872,6876,6880,6884,6888,6892,6896,6900,6904,6908,6912,6916,6920,6924,
380
+ 6928,6932,6936,6940,6944,6948,6952,6956,6960,6964,6968,6972,6976,6980,6984,6988,
381
+ 6992,6996,7000,7004,7008,7012,7016,7020,7024,7028,7032,7036,7040,7044,7048,7052,
382
+ 7056,7060,7064,7068,7072,7076,7080,7084,7088,7092,7096,7100,7103,7106,7109,7112,
383
+ 7115,7118,7121,7124,7127,7130,7133,7136,7139,7142,7145,7148,7151,7154,7157,7160,
384
+ 7163,7166,7169,7172,7175,7178,7181,7184,7187,7190,7193,7196,7199,7202,7205,7208,
385
+ 7211,7214,7217,7220,7223,7226,7229,7232,7235,7238,7241,7244,7247,7250,7253,7256,
386
+ 7259,7262,7265,7268,7271,7274,7277,7280,7283,7286,7289,7292,7295,7298,7301,7304,
387
+ 7307,7310,7313,7316,7319,7322,7325,7328,7331,7334,7337,7340,7343,7346,7349,7352,
388
+ 7355,7358,7361,7364,7367,7370,7373,7376,7379,7382,7385,7388,7391,7394,7397,7400,
389
+ 7403,7406,7409,7412,7415,7418,7421,7424,7427,7430,7433,7436,7439,7442,7445,7448,
390
+ 7451,7454,7457,7460,7455,7450,7445,7440,7435,7430,7425,7420,7415,7410,7405,7400,
391
+ 7395,7390,7385,7380,7375,7370,7365,7360,7355,7350,7345,7340,7335,7330,7325,7320,
392
+ 7315,7310,7304,7298,7292,7286,7280,7274,7268,7262,7256,7250,7244,7238,7232,7226,
393
+ 7220,7214,7208,7202,7196,7190,7184,7178,7172,7166,7160,7154,7148,7140,7130,7120,
394
+ 7100,7080,7060,7040,7020,7000,6980,6960,6940,6920,6900,6880,6860,6840,6820,6800,
395
+ 6780,6760,6740,6720,6700,6680,6660,6640,6620,6600,6580,6560,6540,6520,6500,6480,
396
+ 6460,6440,6420,6400,6380,6360,6340,6320,6300,6280,6260,6240,6220,6200,6180,6160,
397
+ 6140,6120,6100,6080,6060,6040,6020,6000,5980,5960,5940,5920,5902,5884,5866,5848,
398
+ 5830,5812,5794,5776,5758,5740,5722,5704,5686,5668,5650,5632,5614,5596,5578,5560,
399
+ 5542,5524,5506,5488,5470,5452,5434,5416,5398,5380,5362,5344,5326,5308,5290,5272,
400
+ 5254,5236,5218,5200,5182,5164,5146,5128,5110,5092,5074,5056,5038,5020,5002,4984,
401
+ 4966,4948,4930,4912,4894,4876,4858,4840,4840,4840,4840,4840,4840,4840,4840,4840,
402
+ 4840,4840,4840,4840,4840,4840,4840,4840,4840,4840,4840,4840,4840,4840,4840,4840,
403
+ 4840,4840,4840,4840,4840,4840,4840,4840,4840,4840,4840,4840,4840,4840,4840,4840,
404
+ 4840,4840,4840,4840,4840,4840,4840,4840,4840,4840,4840,4840,4840,4840,4840,4840,
405
+ 4840,4840,4840,4840,4845,4850,4855,4860,4865,4870,4875,4880,4885,4890,4895,4900,
406
+ 4905,4910,4915,4920,4925,4930,4935,4940,4945,4950,4955,4960,4965,4970,4975,4980,
407
+ 4985,4990,4995,5000,5005,5010,5015,5020,5025,5030,5035,5040,5045,5050,5055,5060,
408
+ 5070,5080,5100,5120,5140,5160,5180,5200,5220,5240,5260,5280,5300,5320,5340,5360,
409
+ 5375,5390,5405,5420,5435,5450,5465,5480,5495,5510,5525,5540,5555,5570,5585,5600,
410
+ 5615,5630,5645,5660,5675,5690,5705,5720,5735,5750,5765,5780,5795,5810,5825,5840,
411
+ 5855,5870,5885,5900,5915,5930,5945,5960,5975,5990,6005,6020,6035,6050,6065,6080,
412
+ 6095,6110,6125,6140,6155,6170,6185,6200,6215,6230,6245,6260,6272,6284,6296,6308,
413
+ 6320,6332,6344,6356,6368,6380,6392,6404,6416,6428,6440,6452,6464,6476,6488,6500,
414
+ 6512,6524,6536,6548,6560,6572,6584,6596,6608,6620,6632,6644,6656,6668,6680,6692,
415
+ 6704,6716,6728,6740,6752,6764,6776,6788,6800,6812,6824,6836,6848,6860,6872,6884,
416
+ 6896,6908,6920,6932,6944,6956,6968,6980,6988,6996,7004,7012,7020,7028,7036,7044,
417
+ 7052,7060,7068,7076,7084,7092,7100,7108,7116,7124,7132,7140,7148,7156,7164,7172,
418
+ 7180,7188,7196,7204,7212,7220,7228,7236,7244,7252,7260,7268,7276,7284,7292,7300,
419
+ 7308,7316,7324,7332,7340,7348,7356,7364,7372,7380,7388,7396,7404,7412,7420,7428,
420
+ 7436,7444,7452,7460,7465,7470,7475,7480,7485,7490,7495,7500,7505,7510,7515,7520,
421
+ 7525,7530,7535,7540,7545,7550,7555,7560,7565,7570,7575,7580,7585,7590,7595,7600,
422
+ 7605,7610,7615,7620,7625,7630,7635,7640,7645,7650,7655,7660,7665,7670,7675,7680,
423
+ 7685,7690,7695,7700,7705,7710,7715,7720,7725,7730,7735,7740,7745,7750,7755,7760,
424
+ 7750,7740,7730,7720,7710,7700,7690,7680,7670,7660,7650,7640,7630,7620,7610,7600,
425
+ 7590,7580,7570,7560,7550,7540,7530,7520,7510,7500,7490,7480,7470,7460,7450,7440,
426
+ 7430,7420,7410,7400,7390,7380,7370,7360,7350,7340,7330,7320,7310,7300,7290,7280,
427
+ 7270,7260,7250,7240,7230,7220,7210,7200,7190,7180,7170,7160,7090,7030,6970,6910,
428
+ 6850,6790,6730,6670,6610,6550,6490,6430,6370,6310,6250,6190,6130,6070,6010,5950,
429
+ 5890,5830,5770,5710,5650,5590,5530,5470,5410,5350,5290,5230,5170,5110,5050,4990,
430
+ 4930,4870,4810,4750,4690,4630,4570,4510,4450,4390,4330,4270,4210,4150,4090,4030,
431
+ 3970,3910,3850,3790,3730,3670,3610,3550,3540,3530,3520,3510,3500,3490,3480,3470,
432
+ 3460,3450,3440,3430,3420,3410,3400,3390,3380,3370,3360,3350,3340,3330,3320,3310,
433
+ 3300,3290,3280,3270,3260,3250,3240,3230,3220,3210,3200,3190,3180,3170,3160,3150,
434
+ 3140,3130,3120,3110,3100,3090,3080,3070,3060,3050,3040,3030,3020,3010,3000,2990,
435
+ 2980,2970,2960,2950,2947,2944,2941,2938,2935,2932,2929,2926,2923,2920,2917,2914,
436
+ 2911,2908,2905,2902,2899,2896,2893,2890,2887,2884,2881,2878,2875,2872,2869,2866,
437
+ 2863,2860,2857,2854,2851,2848,2845,2842,2839,2836,2833,2830,2827,2824,2821,2818,
438
+ 2815,2812,2809,2806,2803,2800,2797,2794,2791,2788,2780,2770,2760,2750,2740,2730,
439
+ 2720,2710,2700,2690,2680,2670,2660,2650,2640,2630,2620,2610,2600,2590,2580,2570,
440
+ 2560,2550,2540,2530,2520,2510,2500,2490,2480,2470,2460,2450,2440,2430,2420,2410,
441
+ 2400,2390,2380,2370,2360,2350,2340,2330,2320,2310,2300,2290,2280,2270,2260,2250,
442
+ 2240,2230,2220,2210,2200,2190,2180,2170,2160,2150,2140,2130,2128,2126,2124,2122,
443
+ 2120,2118,2116,2114,2112,2110,2108,2106,2104,2102,2100,2098,2096,2094,2092,2090,
444
+ 2088,2086,2084,2082,2080,2078,2076,2074,2072,2070,2068,2066,2064,2062,2060,2058,
445
+ 2056,2054,2052,2050,2048,2046,2044,2042,2040,2038,2036,2034,2032,2030,2028,2026,
446
+ 2024,2022,2020,2018,2016,2014,2012,2010,2013,2016,2019,2022,2025,2028,2031,2034,
447
+ 2037,2040,2043,2046,2049,2052,2055,2058,2061,2064,2067,2070,2073,2076,2079,2082,
448
+ 2085,2088,2091,2094,2097,2100,2103,2106,2109,2112,2115,2118,2121,2124,2127,2130,
449
+ 2133,2136,2139,2142,2145,2148,2151,2154,2157,2160,2163,2166,2169,2172,2175,2178,
450
+ 2181,2184,2187,2190,2190,2190,2190,2190,2190,2190,2190,2190,2190,2190,2190,2190,
451
+ 2190,2190,2190,2190,2190,2190,2190,2190,2190,2190,2190,2190,2190,2190,2190,2190,
452
+ 2190,2190,2190,2190,2190,2190,2190,2190,2190,2190,2190,2190,2190,2190,2190,2190,
453
+ 2190,2190,2190,2190,2190,2190,2190,2190,2190,2190,2190,2190,2190,2190,2190,2190,
454
+ 2185,2180,2175,2170,2165,2160,2155,2150,2145,2140,2135,2130,2125,2120,2115,2110,
455
+ 2105,2100,2095,2090,2085,2080,2075,2070,2065,2060,2055,2050,2045,2040,2035,2030,
456
+ 2025,2020,2015,2010,2005,2000,1995,1990,1985,1980,1975,1970,1965,1960,1955,1950,
457
+ 1945,1940,1935,1930,1925,1920,1915,1910,1905,1900,1895,1890,1894,1898,1902,1906,
458
+ 1910,1914,1918,1922,1926,1930,1934,1938,1942,1946,1950,1954,1958,1962,1966,1970,
459
+ 1974,1978,1982,1986,1990,1994,1998,2002,2006,2010,2014,2018,2022,2026,2030,2034,
460
+ 2038,2042,2046,2050,2054,2058,2062,2066,2070,2074,2078,2082,2086,2090,2094,2098,
461
+ 2102,2106,2110,2114,2118,2122,2126,2130,2125,2120,2115,2110,2105,2100,2095,2090,
462
+ 2085,2080,2075,2070,2065,2060,2055,2050,2045,2040,2035,2030,2025,2020,2015,2010,
463
+ 2005,2000,1995,1990,1985,1980,1975,1970,1965,1960,1955,1950,1945,1940,1935,1930,
464
+ 1925,1920,1915,1910,1905,1900,1894,1888,1882,1876,1870,1864,1858,1852,1846,1840,
465
+ 1830,1820,1810,1800,1770,1740,1710,1680,1650,1620,1590,1560,1530,1500,1470,1440,
466
+ 1410,1380,1350,1320,1290,1260,1230,1200,1170,1140,1110,1080,1050,1020,990,960,
467
+ 930,900,870,840,810,780,750,720,690,660,630,600,570,540,510,480,450,420,390,360,
468
+ 330,300,270,240,210,180,150,120,90,60,30,0
469
+ }
470
+ end