PJSC(Pump Jet Solenoid Controller)はArduinoを使用したバイク用燃料噴射コントローラです。このプロジェクトは、オープンソースECUプロジェクト『Speeduino』をベースにしています。
[PJSC v1.03]
- Suzuki GSX250Sカタナ トリガーデコーダーバグ修正
- 点火タイミングキャプチャ機能サポート
- 車速センサーノイズ対策
@@ -447,7 +447,8 @@ | ||
447 | 447 | exValveCalibrationMode = bits, U08, 119, [7:7], "Off", "On" ;[PJSC v1.03] |
448 | 448 | ;[PJSC v1.03] unused2_119 = bits, U08, 119, [7:7] ;[PJSC v1.03] |
449 | 449 | table4Usage = bits, U08, 120, [0:0], "Fuel", "Spark" ;[PJSC v1.01] |
450 | - unused2_120 = bits, U08, 120, [1:7] ;[PJSC v1.01] | |
450 | + useMAPasSync = bits, U08, 120, [1:1], "No", "Yes" ;[PJSC v1.03] | |
451 | + unused2_120 = bits, U08, 120, [2:7] ;[PJSC v1.01] | |
451 | 452 | inj1SquirtStartEnd = bits, U08, 121, [0:0], "End angle", "Start angle" ;[PJSC v1.01] |
452 | 453 | inj2SquirtStartEnd = bits, U08, 121, [1:1], "End angle", "Start angle" ;[PJSC v1.01] |
453 | 454 | inj3SquirtStartEnd = bits, U08, 121, [2:2], "End angle", "Start angle" ;[PJSC v1.01] |
@@ -502,7 +503,7 @@ | ||
502 | 503 | TrigEdge = bits, U08, 5,[0:0], "RISING", "FALLING" |
503 | 504 | TrigSpeed = bits, U08, 5,[1:1], "Crank Speed", "Cam Speed" |
504 | 505 | IgInv = bits, U08, 5,[2:2], "Going Low", "Going High" |
505 | - 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" | |
506 | + 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", "NSR250R", "KATANA", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" | |
506 | 507 | TrigEdgeSec= bits, U08, 6,[0:0], "RISING", "FALLING" |
507 | 508 | 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" |
508 | 509 | useResync = bits, U08, 6,[7:7], "No", "Yes" |
@@ -1273,6 +1274,7 @@ | ||
1273 | 1274 | requiresPowerCycle = algorithm3 ;[PJSC v1.01] |
1274 | 1275 | requiresPowerCycle = secondaryFuelUsage ;[PJSC v1.01] |
1275 | 1276 | requiresPowerCycle = table4Usage ;[PJSC v1.01] |
1277 | + requiresPowerCycle = useMAPasSync ;[PJSC v1.03] | |
1276 | 1278 | |
1277 | 1279 | requiresPowerCycle = caninput_sel0a |
1278 | 1280 | requiresPowerCycle = caninput_sel0b |
@@ -1419,6 +1421,7 @@ | ||
1419 | 1421 | #if table4_spark ;[PJSC v1.01] For switching table4 |
1420 | 1422 | defaultValue = table4Usage, 1 ;[PJSC v1.01] |
1421 | 1423 | #endif ;[PJSC v1.01] For switching table4 |
1424 | + defaultValue = useMAPasSync, 0 ;[PJSC v1.03] | |
1422 | 1425 | defaultValue = inj1SquirtStartEnd, 0 ;[PJSC v1.01] |
1423 | 1426 | defaultValue = inj2SquirtStartEnd, 0 ;[PJSC v1.01] |
1424 | 1427 | defaultValue = inj3SquirtStartEnd, 0 ;[PJSC v1.01] |
@@ -157,13 +157,6 @@ | ||
157 | 157 | int getCrankAngle_KATANA(); //[PJSC ver1.02] For supporting KATANA trigger |
158 | 158 | void triggerSetEndTeeth_KATANA(); //[PJSC ver1.02] For supporting KATANA trigger |
159 | 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 | 160 | void captureExtTrigger(); //[PJSC] For External Trigger |
168 | 161 | void captureDutyPulseONtime(); //[PJSC] For capturing duty pulse |
169 | 162 | void captureDutyPulseOFFtime(); //[PJSC] For capturing duty pulse |
@@ -183,6 +176,7 @@ | ||
183 | 176 | volatile unsigned long targetGap; |
184 | 177 | volatile unsigned long compositeLastToothTime; |
185 | 178 | volatile unsigned long flipGap; //[PJSC v1.02] |
179 | +//****************** [PJSC v1.03] ****************** | |
186 | 180 | volatile unsigned long curIgnTime = 0; //[PJSC v1.03] For misfire detection |
187 | 181 | volatile unsigned long lastIgnTime = 0; //[PJSC v1.03] For misfire detection |
188 | 182 | volatile unsigned long curSpeedTime = 0; //[PJSC v1.03] For capturing viecle speed |
@@ -189,6 +183,33 @@ | ||
189 | 183 | volatile unsigned long lastSpeedTime = 0; //[PJSC v1.03] For capturing viecle speed |
190 | 184 | volatile unsigned long speedPulseGap = 0; //[PJSC v1.03] For capturing viecle speed |
191 | 185 | |
186 | +volatile unsigned long nextGap; | |
187 | +volatile unsigned long ignGap; | |
188 | +volatile unsigned long curGap3; | |
189 | +volatile unsigned long curGap5; | |
190 | +volatile unsigned long targetGap3; | |
191 | +volatile unsigned long targetGap5; | |
192 | +volatile unsigned long lastGap3; | |
193 | +volatile unsigned long toothLastMinusTwoToothTime; | |
194 | +volatile unsigned long toothLastMinusThreeToothTime; | |
195 | +volatile byte angleRef_tooth; | |
196 | +volatile byte angleRef_tooth2; | |
197 | +volatile byte maxGap3_tooth; | |
198 | +volatile byte maxGap3Ratio_tooth; | |
199 | +volatile byte initialRotationToothCount; | |
200 | +volatile bool preSync; | |
201 | +volatile bool preSyncLoss; | |
202 | +volatile bool firstSyncDetect; | |
203 | +volatile uint16_t maxGap3Ratio; | |
204 | + | |
205 | +int16_t toothNextGapRatios[12]; | |
206 | +int16_t maxGap3Angle; | |
207 | + | |
208 | +#define MULTIPLY_128 7 | |
209 | +#define INITIAL_TOOTH_KATANA 1 | |
210 | +#define GAP_THRESH_BITSHIFT_15 15 | |
211 | +//****************** [PJSC v1.03] ****************** | |
212 | + | |
192 | 213 | volatile int toothCurrentCount = 0; //The current number of teeth (Onec sync has been achieved, this can never actually be 0 |
193 | 214 | 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 |
194 | 215 | volatile unsigned long toothSystemLastToothTime = 0; //As below, but used for decoders where not every tooth count is used for calculation |
@@ -511,6 +511,8 @@ | ||
511 | 511 | byte exValvePositionADC; //[PJSC] For External Trigger |
512 | 512 | int extTriggerAngle; //[PJSC] For External Trigger |
513 | 513 | int extTriggerAngle_last; //[PJSC] For External Trigger |
514 | + uint16_t extTriggerRPM; //[PJSC v1.03] For External Trigger | |
515 | + uint16_t extTriggerLoad; //[PJSC v1.03] For External Trigger | |
514 | 516 | byte dutyCaptureCount; //[PJSC] For capturing duty pulse |
515 | 517 | byte dutyCaptureCount2; //[PJSC] For capturing duty pulse |
516 | 518 | int dutyFreq; //[PJSC] For capturing duty pulse |
@@ -734,7 +736,8 @@ | ||
734 | 736 | byte exValveCalibrationMode: 1; // |[PJSC v1.03] For capturing viecle speed |
735 | 737 | //[PJSC v1.03] byte unused2_118: 1; // |[PJSC v1.03] |
736 | 738 | byte table4Usage: 1; // | For switching usage of 3rd table Ignition/Fuel |
737 | - byte unused2_119: 7; // | | |
739 | + byte useMAPasSync: 1; // |[PJSC v1.03] | |
740 | + byte unused2_119: 6; // | | |
738 | 741 | byte inj1SquirtStartEnd: 1; // | |
739 | 742 | byte inj2SquirtStartEnd: 1; // | |
740 | 743 | byte inj3SquirtStartEnd: 1; // V |