PJSC(Pump Jet Solenoid Controller)はArduinoを使用したバイク用燃料噴射コントローラです。このプロジェクトは、オープンソースECUプロジェクト『Speeduino』をベースにしています。
[PJSC v1.02] As release version
| @@ -6,8 +6,8 @@ | ||
| 6 | 6 | MTversion = 2.25 |
| 7 | 7 | |
| 8 | 8 | queryCommand = "Q" |
| 9 | -;[PJSC v1.01] signature = "speeduino 201902" | |
| 10 | - signature = "speeduino - PJSC v1.01" ;[PJSC v1.01] | |
| 9 | + signature = "speeduino 201902" | |
| 10 | +;[PJSC v1.01] signature = "PJSC v102" ;[PJSC v1.02] | |
| 11 | 11 | versionInfo = "S" ;This info is what is displayed to user |
| 12 | 12 | |
| 13 | 13 | [TunerStudio] |
| @@ -29,12 +29,16 @@ | ||
| 29 | 29 | |
| 30 | 30 | settingGroup = resetcontrol_group, "Reset Control Features" |
| 31 | 31 | settingOption = resetcontrol_standard, "Basic Options Only" |
| 32 | - settingOption = resetcontrol_adv, "Advanced Features (16u2 Firmware Update Required)" | |
| 32 | +;[PJSC v1.02] settingOption = resetcontrol_adv, "Advanced Features (16u2 Firmware Update Required)" | |
| 33 | 33 | |
| 34 | 34 | settingGroup = table4_usage_group, "Selection of table4 usage" ;[PJSC v1.01] For switching 4th table |
| 35 | -;[PJSC v1.01]For debug settingOption = table4_spark, "Spark advance table" ;[PJSC v1.01] For switching 4th table | |
| 35 | +;[PJSC v1.01] For debug settingOption = table4_spark, "Spark advance table" ;[PJSC v1.01] For switching 4th table | |
| 36 | 36 | settingOption = table4_fuel, "VE table4" ;[PJSC v1.01] For switching 4th table |
| 37 | 37 | |
| 38 | + settingGroup = menuoption_group, "Tuning menu option" ;[PJSC v1.02] | |
| 39 | + settingOption = full_option, "Full option" ;[PJSC v1.02] | |
| 40 | +;[PJSC v1.02] settingOption = simple_menu, "Simple menu" ;[PJSC v1.02] | |
| 41 | + | |
| 38 | 42 | [PcVariables] |
| 39 | 43 | ; valid types: boolean, double, int, list |
| 40 | 44 | ; |
| @@ -49,6 +53,9 @@ | ||
| 49 | 53 | rpmhigh = scalar, U16, "rpm", 1, 0, 0, 30000, 0 |
| 50 | 54 | rpmwarn = scalar, U16, "rpm", 1, 0, 0, 30000, 0 |
| 51 | 55 | rpmdang = scalar, U16, "rpm", 1, 0, 0, 30000, 0 |
| 56 | + maphigh = scalar, U16, "kPa", 1, 0, 0, 30000, 0 ;[PJSC v1.02] | |
| 57 | + mapwarn = scalar, U16, "kPa", 1, 0, 0, 30000, 0 ;[PJSC v1.02] | |
| 58 | + mapdang = scalar, U16, "kPa", 1, 0, 0, 30000, 0 ;[PJSC v1.02] | |
| 52 | 59 | |
| 53 | 60 | idleUnits = bits, U08, [0:2], "None", "On/Off", "Duty Cycle", "Duty Cycle", "Steps", "Steps" |
| 54 | 61 |
| @@ -334,10 +341,13 @@ | ||
| 334 | 341 | unused2_75 = bits, U08, 75, [7:7] ;[PJSC v1.01] |
| 335 | 342 | exTrigModeSelect = bits, U08, 76, [0:1], "Disable", "Spark timing capture", "MAP select switch", "INVALID" ;[PJSC] |
| 336 | 343 | externalTrigEdge = bits, U08, 76, [2:2], "Rising", "Falling" ; | |
| 337 | - exValveCaptureEnabled = bits, U08, 76, [3:3], "Disable", "Exhaust Valve Position capture" ; | | |
| 338 | - exValveCalibrationMode = bits, U08, 76, [4:4], "Off", "On" ;[PJSC] | |
| 339 | - unused2_76 = bits, U08, 76, [5:7] ;[PJSC v1.01] | |
| 340 | - dutyPulseCaptureEnabled = bits, U08, 77, [0:0], "Disable", "PWM input" ; | | |
| 344 | +;[PJSC v1.02] exValveCaptureEnabled = bits, U08, 76, [3:3], "Disable", "Exhaust Valve Position capture" ; | | |
| 345 | +;[PJSC v1.02] exValveCalibrationMode = bits, U08, 76, [4:4], "Off", "On" ;[PJSC] | |
| 346 | +;[PJSC v1.02] unused2_76 = bits, U08, 76, [5:7] ;[PJSC v1.01] | |
| 347 | + exValveCalibrationMode = bits, U08, 76, [3:3], "Off", "On" ;[PJSC v1.02] | |
| 348 | + analogInputPortSelect = bits, U08, 76, [4:5], "Disable", "Exhaust Valve Position capture", "Secondary AFR/O2", "INVALID" ;[PJSC v1.02] | |
| 349 | + unused2_76 = bits, U08, 76, [6:7] ;[PJSC v1.02] | |
| 350 | + dutyPulseCaptureEnabled = bits, U08, 77, [0:0], "Disable", "PWM input" ;[PJSC v1.01] | |
| 341 | 351 | dutyPulseCaptureEnabled2 = bits, U08, 77, [1:1], "Disable", "PWM input" ; | |
| 342 | 352 | dutyPulseOnLevel = bits, U08, 77, [2:2], "High", "Low" ; | |
| 343 | 353 | dutyPulseOnLevel2 = bits, U08, 77, [3:3], "High", "Low" ; V |
| @@ -434,7 +444,10 @@ | ||
| 434 | 444 | inj2SquirtStartEnd = bits, U08, 121, [1:1], "End angle", "Start angle" ;[PJSC v1.01] |
| 435 | 445 | inj3SquirtStartEnd = bits, U08, 121, [2:2], "End angle", "Start angle" ;[PJSC v1.01] |
| 436 | 446 | inj4SquirtStartEnd = bits, U08, 121, [3:3], "End angle", "Start angle" ;[PJSC v1.01] |
| 437 | - unused2_121 = bits, U08, 121, [4:7] ;[PJSC v1.01] | |
| 447 | + afr_sensor_selection1 = bits, U08, 121, [4:4], "Primary", "Secondary" ;[PJSC v1.02] For AFR sensor selection | |
| 448 | + afr_sensor_selection2 = bits, U08, 121, [5:5], "Primary", "Secondary" ;[PJSC v1.02] | |
| 449 | + afr_sensor_selection3 = bits, U08, 121, [6:6], "Primary", "Secondary" ;[PJSC v1.02] | |
| 450 | + afr_sensor_selection4 = bits, U08, 121, [7:7], "Primary", "Secondary" ;[PJSC v1.02] | |
| 438 | 451 | unused2_122 = array, U08, 122, [6], "%", 1.0, 0.0, 0.0, 255, 0 ;[PJSC v1.01] |
| 439 | 452 | |
| 440 | 453 |
| @@ -470,7 +483,7 @@ | ||
| 470 | 483 | TrigEdge = bits, U08, 5,[0:0], "RISING", "FALLING" |
| 471 | 484 | TrigSpeed = bits, U08, 5,[1:1], "Crank Speed", "Cam Speed" |
| 472 | 485 | IgInv = bits, U08, 5,[2:2], "Going Low", "Going High" |
| 473 | - TrigPattern= bits, U08, 5,[3:7], "Missing Tooth", "Basic Distributor", "Dual Wheel", "GM 7X", "4G63 / Miata / 3000GT", "GM 24X", "Jeep 2000", "Audi 135", "Honda D17", "Miata 99-05", "Mazda AU", "Non-360 Dual", "Nissan 360", "Subaru 6/7", "Daihatsu +1", "Harley EVO", "36-2-2-2", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" | |
| 486 | + TrigPattern= bits, U08, 5,[3:7], "Missing Tooth", "Basic Distributor", "Dual Wheel", "GM 7X", "4G63 / Miata / 3000GT", "GM 24X", "Jeep 2000", "Audi 135", "Honda D17", "Miata 99-05", "Mazda AU", "Non-360 Dual", "Nissan 360", "Subaru 6/7", "Daihatsu +1", "Harley EVO", "36-2-2-2", "NSR", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" | |
| 474 | 487 | TrigEdgeSec= bits, U08, 6,[0:0], "RISING", "FALLING" |
| 475 | 488 | fuelPumpPin= bits , U08, 6,[1:6], "Board Default", "INVALID", "INVALID", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", "36", "37", "38", "39", "40", "41", "42", "43", "44", "45", "46", "47", "48", "49", "50", "51", "52", "53", "54", "A8", "A9", "A10", "A11", "A12", "A13", "A14", "A15", "INVALID" |
| 476 | 489 | useResync = bits, U08, 6,[7:7], "No", "Yes" |
| @@ -551,7 +564,10 @@ | ||
| 551 | 564 | |
| 552 | 565 | baroDenBins = array, U08, 71, [9], "kPa", 1.0, 0.0, 0.0, 255.0, 0 ;[PJSC v1.01] Bins for the Barometric density correction curve |
| 553 | 566 | baroDenRates = array, U08, 80, [9], "%", 1.0, 0.0, 0.0, 255.0, 0 ;[PJSC v1.01] Values for the \Barometric density correction curve |
| 554 | - unused4-89 = array, U08, 89, [38], "%", 1.0, 0.0, 0.0, 255, 0 ;[PJSC v1.01] | |
| 567 | +;[PJSC v1.02] unused4-89 = array, U08, 89, [38], "%", 1.0, 0.0, 0.0, 255, 0 ;[PJSC v1.01] | |
| 568 | + crankingFilter = bits, U08, 89, [0:0], "Enable", "Disable" ;[PJSC v1.02] | |
| 569 | + unused4-89 = bits, U08, 89, [1:7] ;[PJSC v1.02] | |
| 570 | + unused4-90 = array, U08, 90, [37], "%", 1.0, 0.0, 0.0, 255, 0 ;[PJSC v1.02] | |
| 555 | 571 | |
| 556 | 572 | ;-------------------------------------------------- |
| 557 | 573 | ;Start AFR page |
| @@ -1212,10 +1228,11 @@ | ||
| 1212 | 1228 | requiresPowerCycle = idleUpEnabled |
| 1213 | 1229 | requiresPowerCycle = pjscFreq ;[PJSC] |
| 1214 | 1230 | requiresPowerCycle = squirtDeviceType ; | |
| 1215 | - requiresPowerCycle = multiVEmapEnabled ; | | |
| 1216 | - requiresPowerCycle = exTrigModeSelect ; | | |
| 1217 | - requiresPowerCycle = exValveCaptureEnabled ; | | |
| 1218 | - requiresPowerCycle = dutyPulseCaptureEnabled ; V | |
| 1231 | + requiresPowerCycle = multiVEmapEnabled ; V | |
| 1232 | + requiresPowerCycle = exTrigModeSelect ;[PJSC] | |
| 1233 | +;[PJSC v1.02] requiresPowerCycle = exValveCaptureEnabled ; | | |
| 1234 | + requiresPowerCycle = analogInputPortSelect ;[PJSC v1.02] | |
| 1235 | + requiresPowerCycle = dutyPulseCaptureEnabled ;[PJSC] | |
| 1219 | 1236 | requiresPowerCycle = dutyPulseCaptureEnabled2 ;[PJSC] |
| 1220 | 1237 | requiresPowerCycle = muxout1selection ;[PJSC v1.01] |
| 1221 | 1238 | requiresPowerCycle = muxout2selection ;[PJSC v1.01] |
| @@ -1330,10 +1347,11 @@ | ||
| 1330 | 1347 | defaultValue = veMapSelection3_2Pri, 0 ; | |
| 1331 | 1348 | defaultValue = veMapSelection3_2Sec, 0 ; | |
| 1332 | 1349 | defaultValue = veMapSelection4_2Pri, 0 ; | |
| 1333 | - defaultValue = veMapSelection4_2Sec, 0 ; | | |
| 1334 | - defaultValue = exTrigModeSelect, 0 ; | | |
| 1335 | - defaultValue = exValveCaptureEnabled, 1 ; | | |
| 1336 | - defaultValue = dutyPulseCaptureEnabled, 0 ; V | |
| 1350 | + defaultValue = veMapSelection4_2Sec, 0 ; V | |
| 1351 | + defaultValue = exTrigModeSelect, 0 ;[PJSC] | |
| 1352 | +;[PJSC v1.02] defaultValue = exValveCaptureEnabled, 1 ; | | |
| 1353 | + defaultValue = analogInputPortSelect, 1 ;[PJSC v1.02] | |
| 1354 | + defaultValue = dutyPulseCaptureEnabled, 0 ;[PJSC] | |
| 1337 | 1355 | defaultValue = dutyPulseCaptureEnabled2, 0 ;[PJSC] |
| 1338 | 1356 | defaultValue = exValveCalibrationMode, 0 ;[PJSC v1.01] |
| 1339 | 1357 | defaultValue = exValvePosMin, 0 ; | |
| @@ -1439,6 +1457,13 @@ | ||
| 1439 | 1457 | defaultValue = AUXin14Alias Aux14 |
| 1440 | 1458 | defaultValue = AUXin15Alias Aux15 |
| 1441 | 1459 | |
| 1460 | + defaultValue = rpmwarn, 3000 ;[PJSC v1.02] | |
| 1461 | + defaultValue = rpmdang, 5000 ; | |
| 1462 | + defaultValue = rpmhigh, 8000 ; | |
| 1463 | + defaultValue = mapwarn, 200 ; | |
| 1464 | + defaultValue = mapdang, 245 ; | |
| 1465 | + defaultValue = maphigh, 255 ;[PJSC v1.02] | |
| 1466 | + | |
| 1442 | 1467 | [Menu] |
| 1443 | 1468 | |
| 1444 | 1469 | ;---------------------------------------------------------------------------- |
| @@ -1474,9 +1499,15 @@ | ||
| 1474 | 1499 | ;subMenu = OLED, "OLED Setup" |
| 1475 | 1500 | subMenu = airdensity_curve, "IAT Density" |
| 1476 | 1501 | subMenu = barodensity_curve, "Baro Density", { baroCorr } ;[PJSC v1.01] |
| 1502 | + | |
| 1503 | + subMenu = std_separator ;[PJSC v1.02] | |
| 1504 | + subMenu = gaugeLimits, "Gauge Limits" ; | | |
| 1505 | +#if full_option ;[PJSC v1.02] For simple menu | |
| 1506 | + subMenu = std_separator ; V | |
| 1477 | 1507 | subMenu = reset_control, "Reset Control" |
| 1508 | + subMenu = io_summary, "I/O Summary" ;[PJSC v1.02] | |
| 1509 | +#endif ;[PJSC v1.02] For simple menu | |
| 1478 | 1510 | |
| 1479 | - | |
| 1480 | 1511 | menu = "&Tuning" |
| 1481 | 1512 | subMenu = std_realtime, "Realtime Display" |
| 1482 | 1513 | subMenu = std_separator ;[PJSC v1.01] |
| @@ -1498,9 +1529,11 @@ | ||
| 1498 | 1529 | subMenu = veTable4Dialog, "&VE Table 4", 0, { multiVEmapEnabled } ;[PJSC v1.01] |
| 1499 | 1530 | #endif ;[PJSC v1.01] For switching table4 |
| 1500 | 1531 | subMenu = afrTable1Tbl, "AFR Table", 5 |
| 1532 | +#if full_option ;[PJSC v1.02] For simple menu | |
| 1501 | 1533 | subMenu = std_separator |
| 1502 | 1534 | ;[PJSC v1.01] subMenu = inj_trimad, "Sequential fuel trim", 9 |
| 1503 | 1535 | subMenu = stagingTableDialog, "Staged Injection", 10, { nCylinders <= 4 } ; Can't do staging on more than 4 cylinder engines |
| 1536 | +#endif ;[PJSC v1.02] For simple menu | |
| 1504 | 1537 | |
| 1505 | 1538 | #if table4_spark ;[PJSC v1.01] For switching table4 |
| 1506 | 1539 | menu = "&Spark" |
| @@ -1866,7 +1899,9 @@ | ||
| 1866 | 1899 | |
| 1867 | 1900 | dialog = engine_constants_west, "" |
| 1868 | 1901 | panel = std_injection, North |
| 1902 | +#if full_option ;[PJSC v1.02] For simple menu | |
| 1869 | 1903 | panel = engine_constants_southwest |
| 1904 | +#endif ;[PJSC v1.02] For simple menu | |
| 1870 | 1905 | |
| 1871 | 1906 | dialog = engine_constants_northeast, "Oddfire Angles" |
| 1872 | 1907 | field = "Channel 2 angle", oddfire2, { engineType == 1 } |
| @@ -1882,7 +1917,9 @@ | ||
| 1882 | 1917 | |
| 1883 | 1918 | dialog = engine_constants, "", border |
| 1884 | 1919 | panel = engine_constants_west, West |
| 1920 | +#if full_option ;[PJSC v1.02] For simple menu | |
| 1885 | 1921 | panel = engine_constants_east, East |
| 1922 | +#endif ;[PJSC v1.02] For simple menu | |
| 1886 | 1923 | |
| 1887 | 1924 | dialog = muxWarningMessage, "" ;[PJSC v1.01] |
| 1888 | 1925 | field = "Don't select the same function for MUX out1 and MUX out2!" ; | |
| @@ -1908,7 +1945,8 @@ | ||
| 1908 | 1945 | field = "Duty pulse ON Level ch2", dutyPulseOnLevel2 ;[PJSC] |
| 1909 | 1946 | |
| 1910 | 1947 | dialog = analogInputPort1select, "" ;[PJSC v1.01] |
| 1911 | - field = "", exValveCaptureEnabled ; | | |
| 1948 | +;[PJSC v1.02] field = "", exValveCaptureEnabled ; | | |
| 1949 | + field = "", analogInputPortSelect ;[PJSC v1.02] | |
| 1912 | 1950 | ; | |
| 1913 | 1951 | dialog = digitalInputPort1select, "" ; | |
| 1914 | 1952 | field = "", exTrigModeSelect ; | |
| @@ -1928,7 +1966,8 @@ | ||
| 1928 | 1966 | dialog = analogInputPort1_controls, "Analog Input Port1", border ; | |
| 1929 | 1967 | panel = analogInputPort1select, West ; | |
| 1930 | 1968 | field = "" ; | |
| 1931 | - panel = captExValveSetting, East, { exValveCaptureEnabled == 1 } ; | | |
| 1969 | +;[PJSC v1.02] panel = captExValveSetting, East, { exValveCaptureEnabled == 1 } ; | | |
| 1970 | + panel = captExValveSetting, East, { analogInputPortSelect == 1 } ;[PJSC v1.02] | |
| 1932 | 1971 | ; | |
| 1933 | 1972 | dialog = analogInputPort1_r, "Reference ADC Gauges" ; | |
| 1934 | 1973 | gauge = exValveADCGauge ; | |
| @@ -2140,13 +2179,15 @@ | ||
| 2140 | 2179 | dialog = injCloseAngles_west, "" ;[PJSC v1.01] |
| 2141 | 2180 | field = "Channel 1", inj1SquirtStartEnd, { squirtDeviceType == 0 } ; | |
| 2142 | 2181 | field = "Channel 2", inj2SquirtStartEnd, { (nCylinders > 1 || nInjectors > 1) && indInjAng && squirtDeviceType == 0 } ; | |
| 2143 | - field = "Channel 3", inj3SquirtStartEnd, { indInjAng && (nCylinders > 4 || nCylinders == 3 || nInjectors > 2 || ((nCylinders == 4) && (injLayout == 3))) && squirtDeviceType == 0 } ; V | |
| 2182 | +;[PJSC v1.02] field = "Channel 3", inj3SquirtStartEnd, { indInjAng && (nCylinders > 4 || nCylinders == 3 || nInjectors > 2 || ((nCylinders == 4) && (injLayout == 3))) && squirtDeviceType == 0 } ; V | |
| 2183 | + field = "Channel 3", inj3SquirtStartEnd, { indInjAng && (nCylinders > 2 || nInjectors > 2 && (injLayout > 0)) && squirtDeviceType == 0 } ; V [PJSC v1.02] | |
| 2144 | 2184 | field = "Channel 4", inj4SquirtStartEnd, { indInjAng && (nCylinders > 4 || ((nCylinders == 4 || nInjectors > 3) && (injLayout > 0))) && squirtDeviceType == 0 } ;[PJSC v1.01] |
| 2145 | 2185 | |
| 2146 | 2186 | dialog = injCloseAngles_east, "" ;[PJSC v1.01] |
| 2147 | 2187 | field = "", inj1Ang, { squirtDeviceType == 0 } ; | |
| 2148 | 2188 | field = "", inj2Ang, { (nCylinders > 1 || nInjectors > 1) && indInjAng && squirtDeviceType == 0 } ; | |
| 2149 | - field = "", inj3Ang, { indInjAng && (nCylinders > 4 || nCylinders == 3 || nInjectors > 2 || ((nCylinders == 4) && (injLayout == 3))) && squirtDeviceType == 0 } ; V | |
| 2189 | +;[PJSC v1.02] field = "", inj3Ang, { indInjAng && (nCylinders > 4 || nCylinders == 3 || nInjectors > 2 || ((nCylinders == 4) && (injLayout == 3))) && squirtDeviceType == 0 } ; V | |
| 2190 | + field = "", inj3Ang, { indInjAng && (nCylinders > 2 || nInjectors > 2 && (injLayout > 0)) && squirtDeviceType == 0 } ; V [PJSC v1.02] | |
| 2150 | 2191 | field = "", inj4Ang, { indInjAng && (nCylinders > 4 || ((nCylinders == 4 || nInjectors > 3) && (injLayout > 0))) && squirtDeviceType == 0 } ;[PJSC v1.01] |
| 2151 | 2192 | |
| 2152 | 2193 | dialog = injCloseAngles, "Injector squirt angle", xAxis ;[PJSC v1.01] |
| @@ -2204,6 +2245,12 @@ | ||
| 2204 | 2245 | field = "PID Proportional Gain", egoKP, { egoType && (egoAlgorithm == 2) } |
| 2205 | 2246 | field = "PID Integral", egoKI, { egoType && (egoAlgorithm == 2) } |
| 2206 | 2247 | field = "PID Derivative", egoKD, { egoType && (egoAlgorithm == 2) } |
| 2248 | + field = "" ;[PJSC v1.02]For AFR sensor selection | |
| 2249 | + field = "AFR sensor selection for tune analyze VE" ;[PJSC v1.02] | | |
| 2250 | + field = "AFR sensor for VE Table 1", afr_sensor_selection1 ;[PJSC v1.02] | | |
| 2251 | + field = "AFR sensor for VE Table 2", afr_sensor_selection2 ;[PJSC v1.02] | | |
| 2252 | + field = "AFR sensor for VE Table 3", afr_sensor_selection3 ;[PJSC v1.02] V | |
| 2253 | + field = "AFR sensor for VE Table 4", afr_sensor_selection4 ;[PJSC v1.02]For AFR sensor selection | |
| 2207 | 2254 | |
| 2208 | 2255 | dialog = fanSettings,"Fan Settings",7 |
| 2209 | 2256 | field = "Fan Mode", fanEnable |
| @@ -2290,6 +2337,7 @@ | ||
| 2290 | 2337 | field = "Trigger Angle ", TrigAng |
| 2291 | 2338 | field = "This number represents the angle ATDC when " |
| 2292 | 2339 | field = "tooth #1 passes the primary sensor." |
| 2340 | +#if full_option ;[PJSC v1.02] For simple menu | |
| 2293 | 2341 | field = "" |
| 2294 | 2342 | field = "Skip Revolutions", SkipCycles |
| 2295 | 2343 | field = "Note: This is the number of revolutions that will be skipped during" |
| @@ -2296,9 +2344,11 @@ | ||
| 2296 | 2344 | field = "cranking before the injectors and coils are fired" |
| 2297 | 2345 | field = "Trigger edge", TrigEdge { TrigPattern != 4 } ;4G63 uses both edges |
| 2298 | 2346 | field = "Secondary trigger edge", TrigEdgeSec, { (TrigPattern == 0 && TrigSpeed == 0) || TrigPattern == 2 || TrigPattern == 9 || TrigPattern == 12 } ;Missing tooth, dual wheel and Miata 9905 |
| 2299 | - field = "Missing Tooth Secondary type" trigPatternSec, { (TrigPattern == 0&& TrigSpeed == 0) } | |
| 2347 | + field = "Missing Tooth Secondary type" trigPatternSec, { (TrigPattern == 0&& TrigSpeed == 0) } | |
| 2300 | 2348 | field = "Trigger Filter", TrigFilter, { TrigPattern != 13 } |
| 2349 | + field = "Trigger Filter during cranking", crankingFilter, { TrigPattern != 13 } ;[PJSC v1.02] | |
| 2301 | 2350 | field = "Re-sync every cycle", useResync, { TrigPattern == 2 || TrigPattern == 4 || TrigPattern == 7 || TrigPattern == 12 || TrigPattern == 9 || TrigPattern == 13 } ;Dual wheel, 4G63, Audi 135, Nissan 360, Miata 99-05 |
| 2351 | +#endif ;[PJSC v1.02] For simple menu | |
| 2302 | 2352 | |
| 2303 | 2353 | #if table4_spark ;[PJSC v1.01] For switching table4 |
| 2304 | 2354 | dialog = sparkSettings,"Spark Settings",4 |
| @@ -2525,30 +2575,30 @@ | ||
| 2525 | 2575 | panel = aseSettings |
| 2526 | 2576 | |
| 2527 | 2577 | ;Fuel trim composite dialog |
| 2528 | - dialog = inj_trim1TblTitle, "Channel #1" | |
| 2529 | - panel = fuelTrimTable1Tbl, { fuelTrimEnabled } | |
| 2530 | - dialog = inj_trim2TblTitle, "Channel #2" | |
| 2531 | - panel = fuelTrimTable2Tbl, { fuelTrimEnabled } | |
| 2532 | - dialog = inj_trim3TblTitle, "Channel #3" | |
| 2533 | - panel = fuelTrimTable3Tbl, { fuelTrimEnabled } | |
| 2534 | - dialog = inj_trim4TblTitle, "Channel #4" | |
| 2535 | - panel = fuelTrimTable4Tbl, { fuelTrimEnabled } | |
| 2578 | +;[PJSC v1.02] dialog = inj_trim1TblTitle, "Channel #1" | |
| 2579 | +;[PJSC v1.02] panel = fuelTrimTable1Tbl, { fuelTrimEnabled } | |
| 2580 | +;[PJSC v1.02] dialog = inj_trim2TblTitle, "Channel #2" | |
| 2581 | +;[PJSC v1.02] panel = fuelTrimTable2Tbl, { fuelTrimEnabled } | |
| 2582 | +;[PJSC v1.02] dialog = inj_trim3TblTitle, "Channel #3" | |
| 2583 | +;[PJSC v1.02] panel = fuelTrimTable3Tbl, { fuelTrimEnabled } | |
| 2584 | +;[PJSC v1.02] dialog = inj_trim4TblTitle, "Channel #4" | |
| 2585 | +;[PJSC v1.02] panel = fuelTrimTable4Tbl, { fuelTrimEnabled } | |
| 2586 | +;[PJSC v1.02] | |
| 2587 | +;[PJSC v1.02] dialog = inj_trimadt, "", xAxis | |
| 2588 | +;[PJSC v1.02] panel = inj_trim1TblTitle | |
| 2589 | +;[PJSC v1.02] panel = inj_trim2TblTitle | |
| 2590 | +;[PJSC v1.02] dialog = inj_trimadb, "", xAxis | |
| 2591 | +;[PJSC v1.02] panel = inj_trim3TblTitle | |
| 2592 | +;[PJSC v1.02] panel = inj_trim4TblTitle | |
| 2593 | +;[PJSC v1.02] | |
| 2594 | +;[PJSC v1.02] dialog = inj_trim_enable, "" | |
| 2595 | +;[PJSC v1.02] field = "Individual fuel trim enabled", fuelTrimEnabled, { injLayout == 3 } | |
| 2596 | +;[PJSC v1.02] | |
| 2597 | +;[PJSC v1.02] dialog = inj_trimad,"Injector Cyl 1-4 Trims", yAxis | |
| 2598 | +;[PJSC v1.02] panel = inj_trim_enable, North | |
| 2599 | +;[PJSC v1.02] panel = inj_trimadt, Center | |
| 2600 | +;[PJSC v1.02] panel = inj_trimadb, South | |
| 2536 | 2601 | |
| 2537 | - dialog = inj_trimadt, "", xAxis | |
| 2538 | - panel = inj_trim1TblTitle | |
| 2539 | - panel = inj_trim2TblTitle | |
| 2540 | - dialog = inj_trimadb, "", xAxis | |
| 2541 | - panel = inj_trim3TblTitle | |
| 2542 | - panel = inj_trim4TblTitle | |
| 2543 | - | |
| 2544 | - dialog = inj_trim_enable, "" | |
| 2545 | - field = "Individual fuel trim enabled", fuelTrimEnabled, { injLayout == 3 } | |
| 2546 | - | |
| 2547 | - dialog = inj_trimad,"Injector Cyl 1-4 Trims", yAxis | |
| 2548 | - panel = inj_trim_enable, North | |
| 2549 | - panel = inj_trimadt, Center | |
| 2550 | - panel = inj_trimadb, South | |
| 2551 | - | |
| 2552 | 2602 | ;;Injector staging |
| 2553 | 2603 | dialog = stagingTableDialog_north, "" |
| 2554 | 2604 | field = "Staging enabled", stagingEnabled |
| @@ -3250,7 +3300,25 @@ | ||
| 3250 | 3300 | dialog = Auxin_config, "",yAxis |
| 3251 | 3301 | panel = Auxin_north |
| 3252 | 3302 | panel = Auxin_south |
| 3253 | - | |
| 3303 | + | |
| 3304 | + dialog = gaugeLimits, "Gauge Limits" ;[PJSC v1.02] Gause limit | |
| 3305 | + field = "#RPM" ; | | |
| 3306 | + field = "Warning", rpmwarn ; | | |
| 3307 | + field = "Danger", rpmdang ; | | |
| 3308 | + field = "High", rpmhigh ; | | |
| 3309 | + field = "#MAP" ; | | |
| 3310 | + field = "Warning", mapwarn ; | | |
| 3311 | + field = "Danger", mapdang ; | | |
| 3312 | + field = "High", maphigh ; V | |
| 3313 | + field = !"Reload project to update gauges" ;[PJSC v1.02] | |
| 3314 | + | |
| 3315 | + dialog = io_summary, "I/O Summary" | |
| 3316 | + displayOnlyField = "fuelPumpPin", fuelPumpPin, {fpPrime} ;[PJSC v1.02] | |
| 3317 | + displayOnlyField = "fanPin", fanPin, {fanEnable} ; | | |
| 3318 | + displayOnlyField = "tachoPin", tachoPin ; | | |
| 3319 | + displayOnlyField = "idleUpPin", idleUpPin, {idleUpEnabled} ; V | |
| 3320 | + displayOnlyField = "baroPin", baroPin,{useExtBaro} ;[PJSC v1.02] | |
| 3321 | + | |
| 3254 | 3322 | ;------------------------------------------------------------------------------- |
| 3255 | 3323 | ; General help text |
| 3256 | 3324 |
| @@ -3702,7 +3770,7 @@ | ||
| 3702 | 3770 | gammaEnrichGauge = gammaEnrich, "Gamma Enrichment", "%", 50, 150, -1, -1, 151, 151, 0, 0 |
| 3703 | 3771 | pulseWidthGauge = pulseWidth, "Pulse Width", "mSec", 0, 35.0, 1.0, 1.2, 20, 25, 3, 3 |
| 3704 | 3772 | ;[PJSC v1.01] tachometer = rpm, "Engine Speed", "RPM", 0, 8000, 300, 600, 3000, 5000, 0, 0 |
| 3705 | - tachometer = rpm, "Engine Speed", "RPM", 0, 13000, 600, 1000,11000,12000, 0, 0 ;[PJSC v1.01] | |
| 3773 | + tachometer = rpm, "Engine Speed", "RPM", 0, {rpmhigh},600, 1000,{rpmwarn},{rpmdang}, 0, 0 ;[PJSC v1.02] | |
| 3706 | 3774 | veGauge = veCurr, "VE Current", "%", 0, 120, -1, -1, 999, 999, 0, 0 |
| 3707 | 3775 | veGauge2 = veCurr2, "VE2 Current", "%", 0, 120, -1, -1, 999, 999, 0, 0 ;[PJSC] |
| 3708 | 3776 | veGauge3 = veCurr3, "VE3 Current", "%", 0, 120, -1, -1, 999, 999, 0, 0 ;[PJSC v1.01] |
| @@ -3714,12 +3782,16 @@ | ||
| 3714 | 3782 | flexEnrich, = flexFuelCor, "Flex Correction", "%", 0, 200, 130, 140, 140, 150, 0, 0 |
| 3715 | 3783 | advanceGauge = advance, "Spark Advance", "deg BTDC", 50, -10, 0, 0, 35, 45, 0, 0 |
| 3716 | 3784 | dwellGauge = dwell, "Ign Dwell", "mSec", 0, 35.0, 1.0, 1.2, 20, 25, 3, 3 |
| 3785 | + boostTargetGauge = boostTarget, "Target Boost", "kPa", 0, {maphigh}, 0, 20, {mapwarn}, {mapdang}, 0, 0 ;[PJSC v1.02] | |
| 3786 | + boostDutyGauge = boostDuty, "Boost Duty Cycle", "%", 0, 100, -1, -1, 101, 110, 1, 1 ;[PJSC v1.02] | |
| 3787 | + afrTargetGauge = afrTarget, "Target AFR", "", 7, 25, 12, 13, 15, 16, 2, 2 ;[PJSC v1.02] | |
| 3717 | 3788 | |
| 3718 | 3789 | gaugeCategory = "Sensor inputs" |
| 3719 | - mapGauge = map, "Engine MAP", "kPa", 0, 255, 0, 20, 200, 245, 0, 0 | |
| 3790 | + mapGauge = map, "Engine MAP", "kPa", 0,{maphigh}, 0, 20,{mapwarn},{mapdang}, 0, 0 ;[PJSC v1.02] | |
| 3720 | 3791 | mapGauge_psi = map_psi, "Engine MAP (PSI)", "PSI", -15, 100, 0, 20, 200, 245, 0, 0 |
| 3721 | 3792 | mapGauge_bar = map_bar, "Engine MAP (BAR)", "Bar", -1, 3, -1, -1, 5, 5, 2, 2 |
| 3722 | 3793 | mapGauge_vacBoost = map_vacboost, "Engine MAP (in-Hg/PSI)", "in-Hg/PSI", -30, 30, -30, -30, 30, 30, 1, 1 |
| 3794 | + baroGauge = baro, "Baro Pressure", "kPa", 0,{maphigh}, 0, 20,{mapwarn},{mapdang}, 0, 0 ;[PJSC v1.02] | |
| 3723 | 3795 | batteryVoltage = batteryVoltage,"Battery Voltage", "volts", 0, 25, 8, 9, 15, 16, 2, 2 |
| 3724 | 3796 | |
| 3725 | 3797 | tpsADCGauge = tpsADC, "TPS ADC", "", 0, 255, -1, -1, 256, 256, 0, 0 |
| @@ -3737,7 +3809,12 @@ | ||
| 3737 | 3809 | dutyRatioGauge2 = dutyRatio2, "Duty Ratio 2", "%", 0, 100, 5, 10, 90, 95, 0, 0 ;[PJSC]For capturing duty pulse |
| 3738 | 3810 | baroGauge = baro, "Barometric Pressure", "kPa", 0, 200, 20, 60, 140, 180, 1, 0 ;[PJSC]Add the gage for barometric sensor |
| 3739 | 3811 | injcountGauge = testCnt, "Injection Count", "pulses", 0, 1000, 65535, 65535,65535, 65535,0, 0 ;[PJSC v1.01] For test mode |
| 3740 | - | |
| 3812 | + afrAnalyzeGauge1 = afr_analyze1, "Air:Fuel Ratio for VE1", "", 7, 25, 12, 13, 15, 16, 2, 2 ;[PJSC v1.02] For AFR sensor selection | |
| 3813 | + afrAnalyzeGauge2 = afr_analyze2, "Air:Fuel Ratio for VE2", "", 7, 25, 12, 13, 15, 16, 2, 2 ;[PJSC v1.02] For AFR sensor selection | |
| 3814 | + afrAnalyzeGauge3 = afr_analyze3, "Air:Fuel Ratio for VE3", "", 7, 25, 12, 13, 15, 16, 2, 2 ;[PJSC v1.02] For AFR sensor selection | |
| 3815 | + afrAnalyzeGauge4 = afr_analyze4, "Air:Fuel Ratio for VE4", "", 7, 25, 12, 13, 15, 16, 2, 2 ;[PJSC v1.02] For AFR sensor selection | |
| 3816 | + syncLossGauge = syncLossCounter, "Sync Loss Count", "", 0, 120, -1, -1, 999, 999, 0, 0 ;[PJSC v1.02] | |
| 3817 | + | |
| 3741 | 3818 | #if CELSIUS |
| 3742 | 3819 | cltGauge = coolant, "Coolant Temp", "TEMP", -40, 215, -15, 0, 95, 105, 0, 0 |
| 3743 | 3820 | iatGauge = iat, "Inlet Air Temp", "TEMP", -40, 215, -15, 0, 95, 100, 0, 0 |
| @@ -3835,7 +3912,7 @@ | ||
| 3835 | 3912 | |
| 3836 | 3913 | ochGetCommand = "r\$tsCanId\x30%2o%2c" |
| 3837 | 3914 | ;[PJSC] ochBlockSize = 90 |
| 3838 | - ochBlockSize = 112 ;[PJSC v1.01] Extend block size for Test mode | |
| 3915 | + ochBlockSize = 116 ;[PJSC v1.02] Extend block size | |
| 3839 | 3916 | |
| 3840 | 3917 | secl = scalar, U08, 0, "sec", 1.000, 0.000 |
| 3841 | 3918 | status1 = scalar, U08, 1, "bits", 1.000, 0.000 |
| @@ -3949,6 +4026,10 @@ | ||
| 3949 | 4026 | afr2 = scalar, U08, 107, "O2", 0.100, 0.000 ;[PJSC v1.01] |
| 3950 | 4027 | fuelLoad2 = scalar, S16, 108, { bitStringValue( algorithmUnits2 , algorithm2 ) }, 1.000, 0.000 ;[PJSC v1.01]For dual fuel load |
| 3951 | 4028 | fuelLoad3 = scalar, S16, 110, { bitStringValue( algorithmUnits2 , algorithm3 ) }, 1.000, 0.000 ;[PJSC v1.01]For dual fuel load |
| 4029 | + afr_analyze1 = scalar, U08, 112, "O2 for VE Table 1", 0.100, 0.000 ;[PJSC v1.02]For AFR sensor selection | |
| 4030 | + afr_analyze2 = scalar, U08, 113, "O2 for VE Table 2", 0.100, 0.000 ;[PJSC v1.02]For AFR sensor selection | |
| 4031 | + afr_analyze3 = scalar, U08, 114, "O2 for VE Table 3", 0.100, 0.000 ;[PJSC v1.02]For AFR sensor selection | |
| 4032 | + afr_analyze4 = scalar, U08, 115, "O2 for VE Table 4", 0.100, 0.000 ;[PJSC v1.02]For AFR sensor selection | |
| 3952 | 4033 | |
| 3953 | 4034 | |
| 3954 | 4035 | #if CELSIUS |
| @@ -4019,6 +4100,7 @@ | ||
| 4019 | 4100 | entry = MAPxRPM, "MAPxRPM", int, "%d" |
| 4020 | 4101 | entry = tps, "TPS", int, "%d" |
| 4021 | 4102 | entry = afr, "O2", float, "%.3f" |
| 4103 | + entry = afr2, "O2_2", float, "%.3f" ;[PJSC v1.02] | |
| 4022 | 4104 | entry = lambda, "Lambda", float, "%.3f" |
| 4023 | 4105 | entry = iat, "IAT", int, "%d" |
| 4024 | 4106 | entry = coolant, "CLT", int, "%d" |
| @@ -4058,7 +4140,8 @@ | ||
| 4058 | 4140 | entry = baro, "Baro Pressure",int, "%d" |
| 4059 | 4141 | entry = nitrousOn, "Nitrous On", int, "%d", { n2o_enable > 0 } |
| 4060 | 4142 | entry = syncLossCounter, "Sync Loss #", int, "%d" |
| 4061 | - entry = valvePosition, "ExValve Pos", int, "%d", { exValveCaptureEnabled } ;[PJSC] | |
| 4143 | + entry = valvePosition, "ExValve Pos", int, "%d", { analogInputPortSelect == 1};[PJSC v1.02] | |
| 4144 | +;[PJSC v1.02] entry = valvePosition, "ExValve Pos", int, "%d", { exValveCaptureEnabled } ;[PJSC] | |
| 4062 | 4145 | entry = sparkedAngle, "Spark Angle", int, "%d", { exTrigModeSelect == 1 } ;[PJSC] |
| 4063 | 4146 | entry = dutyFreq, "Duty Frequency", int, "%d", { dutyPulseCaptureEnabled } ;[PJSC] |
| 4064 | 4147 | entry = dutyRatio, "Duty Ratio", int, "%d", { dutyPulseCaptureEnabled } ;[PJSC] |
| @@ -4132,7 +4215,8 @@ | ||
| 4132 | 4215 | |
| 4133 | 4216 | [VeAnalyze] |
| 4134 | 4217 | ; tableName, lambdaTargetTableName, lambdaChannel, egoCorrectionChannel, activeCondition |
| 4135 | - veAnalyzeMap = veTable1Tbl, afrTable1Tbl, afr, egoCorrection | |
| 4218 | +;[PJSC v1.02] veAnalyzeMap = veTable1Tbl, afrTable1Tbl, afr, egoCorrection | |
| 4219 | + veAnalyzeMap = veTable1Tbl, afrTable1Tbl, afr_analyze1, egoCorrection ;[PJSC v1.02] | |
| 4136 | 4220 | lambdaTargetTables = afrTable1Tbl, afrTSCustom, |
| 4137 | 4221 | filter = std_xAxisMin ; Auto build with appropriate axis channels |
| 4138 | 4222 | ;filter = minRPMFilter, "Minimum RPM", rpm, < , 500, , true |
| @@ -4168,8 +4252,9 @@ | ||
| 4168 | 4252 | ;------------- WUE VEAL not currently working ---------------- |
| 4169 | 4253 | |
| 4170 | 4254 | ;[PJSC v1.01]------------------------------------------------------------------------ |
| 4171 | -; tableName, lambdaTargetTableName, lambdaChannel, egoCorrectionChannel, activeCondition | |
| 4172 | - veAnalyzeMap = veTable2Tbl, afrTable1Tbl, afr, egoCorrection | |
| 4255 | + ; tableName, lambdaTargetTableName, lambdaChannel, egoCorrectionChannel, activeCondition | |
| 4256 | +;[PJSC v1.02] veAnalyzeMap = veTable2Tbl, afrTable1Tbl, afr, egoCorrection | |
| 4257 | + veAnalyzeMap = veTable2Tbl, afrTable1Tbl, afr_analyze2, egoCorrection ;[PJSC v1.02] | |
| 4173 | 4258 | lambdaTargetTables = afrTable1Tbl, afrTSCustom, |
| 4174 | 4259 | filter = std_xAxisMin ; Auto build with appropriate axis channels |
| 4175 | 4260 | ;filter = minRPMFilter, "Minimum RPM", rpm, < , 500, , true |
| @@ -4188,8 +4273,9 @@ | ||
| 4188 | 4273 | filter = overrunFilter, "Overrun" , pulseWidth, = , 0, , false |
| 4189 | 4274 | filter = std_Custom ; Standard Custom Expression Filter. |
| 4190 | 4275 | |
| 4191 | -; tableName, lambdaTargetTableName, lambdaChannel, egoCorrectionChannel, activeCondition | |
| 4192 | - veAnalyzeMap = veTable3Tbl, afrTable1Tbl, afr, egoCorrection | |
| 4276 | + ; tableName, lambdaTargetTableName, lambdaChannel, egoCorrectionChannel, activeCondition | |
| 4277 | +;[PJSC v1.02] veAnalyzeMap = veTable3Tbl, afrTable1Tbl, afr, egoCorrection | |
| 4278 | + veAnalyzeMap = veTable3Tbl, afrTable1Tbl, afr_analyze3, egoCorrection ;[PJSC v1.02] | |
| 4193 | 4279 | lambdaTargetTables = afrTable1Tbl, afrTSCustom, |
| 4194 | 4280 | filter = std_xAxisMin ; Auto build with appropriate axis channels |
| 4195 | 4281 | ;filter = minRPMFilter, "Minimum RPM", rpm, < , 500, , true |
| @@ -4209,8 +4295,9 @@ | ||
| 4209 | 4295 | filter = std_Custom ; Standard Custom Expression Filter. |
| 4210 | 4296 | |
| 4211 | 4297 | #if table4_fuel |
| 4212 | -; tableName, lambdaTargetTableName, lambdaChannel, egoCorrectionChannel, activeCondition | |
| 4213 | - veAnalyzeMap = sparkTbl, afrTable1Tbl, afr, egoCorrection | |
| 4298 | + ; tableName, lambdaTargetTableName, lambdaChannel, egoCorrectionChannel, activeCondition | |
| 4299 | +;[PJSC v1.02] veAnalyzeMap = sparkTbl, afrTable1Tbl, afr, egoCorrection | |
| 4300 | + veAnalyzeMap = sparkTbl, afrTable1Tbl, afr_analyze4, egoCorrection ;[PJSC v1.02] | |
| 4214 | 4301 | lambdaTargetTables = afrTable1Tbl, afrTSCustom, |
| 4215 | 4302 | filter = std_xAxisMin ; Auto build with appropriate axis channels |
| 4216 | 4303 | ;filter = minRPMFilter, "Minimum RPM", rpm, < , 500, , true |
| @@ -19,7 +19,7 @@ | ||
| 19 | 19 | #define ve3MapPage 11 //[PJSC v1.01] Config Page 12 |
| 20 | 20 | |
| 21 | 21 | //[PJSC]#define SERIAL_PACKET_SIZE 90 //Must match ochBlockSize in ini file |
| 22 | -#define SERIAL_PACKET_SIZE 112 //[PJSC v1.01] Extend serial packet block size for Test mode | |
| 22 | +#define SERIAL_PACKET_SIZE 116 //[PJSC v1.02] Extend serial packet block size | |
| 23 | 23 | |
| 24 | 24 | byte currentPage = 1;//Not the same as the speeduino config page numbers |
| 25 | 25 | bool isMap = true; |
| @@ -143,12 +143,33 @@ | ||
| 143 | 143 | int getCrankAngle_ThirtySixMinus222(); |
| 144 | 144 | void triggerSetEndTeeth_ThirtySixMinus222(); |
| 145 | 145 | |
| 146 | -void captureExtTrigger(); //[PJSC] For External Trigger | |
| 147 | -void captureDutyPulseONtime(); //[PJSC] For capturing duty pulse | |
| 148 | -void captureDutyPulseOFFtime(); //[PJSC] For capturing duty pulse | |
| 149 | -void captureDutyPulseONtime2(); //[PJSC] For capturing duty pulse | |
| 150 | -void captureDutyPulseOFFtime2(); //[PJSC] For capturing duty pulse | |
| 146 | +void triggerSetup_NSR(); //[PJSC ver1.02] For supporting NSR trigger | |
| 147 | +void triggerPri_NSR(); //[PJSC ver1.02] For supporting NSR trigger | |
| 148 | +void triggerSec_NSR(); //[PJSC ver1.02] For supporting NSR trigger | |
| 149 | +uint16_t getRPM_NSR(); //[PJSC ver1.02] For supporting NSR trigger | |
| 150 | +int getCrankAngle_NSR(); //[PJSC ver1.02] For supporting NSR trigger | |
| 151 | +void triggerSetEndTeeth_NSR(); //[PJSC ver1.02] For supporting NSR trigger | |
| 151 | 152 | |
| 153 | +void triggerSetup_KATANA(); //[PJSC ver1.02] For supporting KATANA trigger | |
| 154 | +void triggerPri_KATANA(); //[PJSC ver1.02] For supporting KATANA trigger | |
| 155 | +void triggerSec_KATANA(); //[PJSC ver1.02] For supporting KATANA trigger | |
| 156 | +uint16_t getRPM_KATANA(); //[PJSC ver1.02] For supporting KATANA trigger | |
| 157 | +int getCrankAngle_KATANA(); //[PJSC ver1.02] For supporting KATANA trigger | |
| 158 | +void triggerSetEndTeeth_KATANA(); //[PJSC ver1.02] For supporting KATANA trigger | |
| 159 | + | |
| 160 | +void triggerSetup_KATANA2(); //[PJSC ver1.02] For supporting KATANA trigger | |
| 161 | +void triggerPri_KATANA2(); //[PJSC ver1.02] For supporting KATANA trigger | |
| 162 | +void triggerSec_KATANA2(); //[PJSC ver1.02] For supporting KATANA trigger | |
| 163 | +uint16_t getRPM_KATANA2(); //[PJSC ver1.02] For supporting KATANA trigger | |
| 164 | +int getCrankAngle_KATANA2(); //[PJSC ver1.02] For supporting KATANA trigger | |
| 165 | +void triggerSetEndTeeth_KATANA2(); //[PJSC ver1.02] For supporting KATANA trigger | |
| 166 | + | |
| 167 | +void captureExtTrigger(); //[PJSC] For External Trigger | |
| 168 | +void captureDutyPulseONtime(); //[PJSC] For capturing duty pulse | |
| 169 | +void captureDutyPulseOFFtime(); //[PJSC] For capturing duty pulse | |
| 170 | +void captureDutyPulseONtime2(); //[PJSC] For capturing duty pulse | |
| 171 | +void captureDutyPulseOFFtime2(); //[PJSC] For capturing duty pulse | |
| 172 | + | |
| 152 | 173 | unsigned long MAX_STALL_TIME = 500000UL; //The maximum time (in uS) that the system will continue to function before the engine is considered stalled/stopped. This is unique to each decoder, depending on the number of teeth etc. 500000 (half a second) is used as the default value, most decoders will be much less. |
| 153 | 174 | |
| 154 | 175 | volatile unsigned long curTime; |
| @@ -158,6 +179,7 @@ | ||
| 158 | 179 | volatile unsigned long lastGap; |
| 159 | 180 | volatile unsigned long targetGap; |
| 160 | 181 | volatile unsigned long compositeLastToothTime; |
| 182 | +volatile unsigned long flipGap; //[PJSC v1.02] | |
| 161 | 183 | |
| 162 | 184 | volatile int toothCurrentCount = 0; //The current number of teeth (Onec sync has been achieved, this can never actually be 0 |
| 163 | 185 | volatile byte toothSystemCount = 0; //Used for decoders such as Audi 135 where not every tooth is used for calculating crank angle. This variable stores the actual number of teeth, not the number being used to calculate crank angle |
| @@ -180,6 +202,7 @@ | ||
| 180 | 202 | volatile int triggerActualTeeth; |
| 181 | 203 | volatile unsigned long triggerFilterTime; // The shortest time (in uS) that pulses will be accepted (Used for debounce filtering) |
| 182 | 204 | volatile unsigned long triggerSecFilterTime; // The shortest time (in uS) that pulses will be accepted (Used for debounce filtering) for the secondary input |
| 205 | +volatile unsigned long trigger12FilterTime; //[PJSC v1.02] | |
| 183 | 206 | volatile bool validTrigger; //Is set true when the last trigger (Primary or secondary) was valid (ie passed filters) |
| 184 | 207 | unsigned int triggerSecFilterTime_duration; // The shortest valid time (in uS) pulse DURATION |
| 185 | 208 | volatile uint16_t triggerToothAngle; //The number of crank degrees that elapse per tooth |
| @@ -277,6 +277,10 @@ | ||
| 277 | 277 | #define MUXOUT_VVT 6 //[PJSC v1.01] MUX output selection |
| 278 | 278 | #define MUXOUT_TACH 7 //[PJSC v1.01] MUX output selection |
| 279 | 279 | |
| 280 | +#define ANALOG_INPUT_OFF 0 //[PJSC v1.02] Analog input selection | |
| 281 | +#define ANALOG_EXVALVE 1 //[PJSC v1.02] Analog input selection | |
| 282 | +#define ANALOG_O2_SEC 2 //[PJSC v1.02] Analog input selection | |
| 283 | + | |
| 280 | 284 | struct table3D fuelTable; //16x16 fuel map |
| 281 | 285 | struct table3D fuelTable2; //16x16 fuel map2 [PJSC] |
| 282 | 286 | struct table3D fuelTable3; //16x16 fuel map3 [PJSC v1.01] |
| @@ -523,6 +527,10 @@ | ||
| 523 | 527 | byte veMapSelectionSw1Sec[4]; //[PJSC v1.01] | |
| 524 | 528 | byte veMapSelectionSw2Pri[4]; //[PJSC v1.01] V |
| 525 | 529 | byte veMapSelectionSw2Sec[4]; //[PJSC v1.01] For x4 Fuel table support |
| 530 | + byte afr_analyze1; //[PJSC v1.02] For AFR sensor selection | |
| 531 | + byte afr_analyze2; // | | |
| 532 | + byte afr_analyze3; // V | |
| 533 | + byte afr_analyze4; //[PJSC v1.02] For AFR sensor selection | |
| 526 | 534 | |
| 527 | 535 | //Helpful bitwise operations: |
| 528 | 536 | //Useful reference: http://playground.arduino.cc/Code/BitMath |
| @@ -649,10 +657,12 @@ | ||
| 649 | 657 | byte fuelCorrectionEnabled: 1; // |[PJSC v1.01] |
| 650 | 658 | byte unused2_75: 1; // | |
| 651 | 659 | byte exTrigModeSelect : 2; // | For External Trigger |
| 652 | - byte externalTrigEdge: 1; // | 0: Rising, 1: Falling | |
| 653 | - byte exValveCaptureEnabled: 1; // | For capturing Exhaust valve position | |
| 654 | - byte exValveCalibrationMode: 1; //[PJSC] Support Exhaust Valve calibrationmode | |
| 655 | - byte unused2_76: 3; // | | |
| 660 | + byte externalTrigEdge: 1; // | 0: Rising, 1: Falling | |
| 661 | +//[PJSC v1.02] byte exValveCaptureEnabled: 1; // | For capturing Exhaust valve position | |
| 662 | + byte exValveCalibrationMode: 1; // | For support Exhaust Valve calibrationmode | |
| 663 | +//[PJSC v1.02] byte unused2_76: 3; // | | |
| 664 | + byte analogInputPortSelection: 2; // |[PJSC v1.02] For Analog input port selection | |
| 665 | + byte unused2_76: 2; // |[PJSC v1.02] | |
| 656 | 666 | byte dutyPulseCaptureEnabled: 1; // | For capturing duty pulse ch1 |
| 657 | 667 | byte dutyPulseCaptureEnabled2: 1; // | For capturing duty pulse ch2 |
| 658 | 668 | byte dutyPulseOnLevel: 1; // | For capturing duty pulse ch1, 0: high, 1: low |
| @@ -690,19 +700,19 @@ | ||
| 690 | 700 | byte muxout2Selection: 4; // | MUX output2 selection |
| 691 | 701 | byte muxout3Selection: 4; // |[PJSC v1.01] MUX output3 selection |
| 692 | 702 | byte muxout4Selection: 4; // |[PJSC v1.01] MUX output4 selection |
| 693 | -//[PJSC v1.01] byte baroDenBins[9]; // | For Barometric extend correnction | |
| 694 | -//[PJSC v1.01] byte baroDenRates[9]; // | For Barometric extend correnction | |
| 695 | 703 | byte fuelAlgorithm2: 3; //[PJSC v1.01] For Secondary Fuel Algorithm |
| 696 | 704 | byte fuelAlgorithm3: 3; // | |
| 697 | 705 | byte unused2_118: 2; // | |
| 698 | 706 | byte table4Usage: 1; // | For switching usage of 3rd table Ignition/Fuel |
| 699 | - byte unused2_119: 7; // V | |
| 700 | -//[PJSC v1.01] byte unused2_122[6]; //[PJSC v1.01] For test mode | |
| 701 | - byte inj1SquirtStartEnd: 1; //[PJSC v1.01] | |
| 707 | + byte unused2_119: 7; // | | |
| 708 | + byte inj1SquirtStartEnd: 1; // | | |
| 702 | 709 | byte inj2SquirtStartEnd: 1; // | |
| 703 | - byte inj3SquirtStartEnd: 1; // | | |
| 704 | - byte inj4SquirtStartEnd: 1; // | | |
| 705 | - byte unused2_121: 4; // V | |
| 710 | + byte inj3SquirtStartEnd: 1; // V | |
| 711 | + byte inj4SquirtStartEnd: 1; //[PJSC v1.01] | |
| 712 | + byte afr_sensor_selection1: 1; //[PJSC v1.02] | |
| 713 | + byte afr_sensor_selection2: 1; //[PJSC v1.02] | |
| 714 | + byte afr_sensor_selection3: 1; //[PJSC v1.02] | |
| 715 | + byte afr_sensor_selection4: 1; //[PJSC v1.02] | |
| 706 | 716 | byte unused2_122[6]; //[PJSC v1.01] |
| 707 | 717 | |
| 708 | 718 | #if defined(CORE_AVR) |
| @@ -780,7 +790,10 @@ | ||
| 780 | 790 | //[PJSC v1.01] byte unused2_64[57]; |
| 781 | 791 | byte baroDenBins[9]; //[PJSC v1.01] For Barometric extend correnction |
| 782 | 792 | byte baroDenRates[9]; //[PJSC v1.01] For Barometric extend correnction |
| 783 | - byte unused2_82[39]; | |
| 793 | +//[PJSC v1.02] byte unused2_82[39]; | |
| 794 | + byte crankingFilter : 1; //[PJSC v1.02] | |
| 795 | + byte unused2_82 : 7; //[PJSC v1.02] | |
| 796 | + byte unused2_83[38]; //[PJSC v1.02] | |
| 784 | 797 | |
| 785 | 798 | #if defined(CORE_AVR) |
| 786 | 799 | }; |
| @@ -1116,6 +1129,7 @@ | ||
| 1116 | 1129 | byte pinMuxout2; //[PJSC v1.01] For MUX output setting |
| 1117 | 1130 | byte pinMuxout3; //[PJSC v1.01] For MUX output setting |
| 1118 | 1131 | byte pinMuxout4; //[PJSC v1.01] For MUX output setting |
| 1132 | +byte pinAnalogInput1; //[PJSC v1.02] For Analog input selection | |
| 1119 | 1133 | |
| 1120 | 1134 | // global variables // from speeduino.ino |
| 1121 | 1135 | extern struct statuses currentStatus; // from speeduino.ino |
| @@ -12,7 +12,8 @@ | ||
| 12 | 12 | //These are utility functions that prevent other files from having to use EEPROM.h directly |
| 13 | 13 | byte readLastBaro(); |
| 14 | 14 | void storeLastBaro(byte); |
| 15 | -void storeCalibrationValue(byte, byte); | |
| 15 | +//[PJSC v1.02]void storeCalibrationValue(byte, byte); | |
| 16 | +void storeCalibrationValue(uint16_t, byte); //[PJSC v1.02] | |
| 16 | 17 | byte readEEPROMVersion(); |
| 17 | 18 | void storeEEPROMVersion(byte); |
| 18 | 19 |