• R/O
  • SSH
  • HTTPS

Commit

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

PJSC(Pump Jet Solenoid Controller)はArduinoを使用したバイク用燃料噴射コントローラです。このプロジェクトは、オープンソースECUプロジェクト『Speeduino』をベースにしています。


Commit MetaInfo

Revision139 (tree)
Time2023-07-16 02:23:56
Authormaharu

Log Message

[PJSC v1.03]
- Suzuki GSX250Sカタナ トリガーデコーダーバグ修正
- 点火タイミングキャプチャ機能サポート
- 車速センサーノイズ対策

Change Summary

Incremental Difference

--- branches/Ver1.03/reference/PJSC.ini (revision 138)
+++ branches/Ver1.03/reference/PJSC.ini (revision 139)
@@ -447,7 +447,8 @@
447447 exValveCalibrationMode = bits, U08, 119, [7:7], "Off", "On" ;[PJSC v1.03]
448448 ;[PJSC v1.03] unused2_119 = bits, U08, 119, [7:7] ;[PJSC v1.03]
449449 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]
451452 inj1SquirtStartEnd = bits, U08, 121, [0:0], "End angle", "Start angle" ;[PJSC v1.01]
452453 inj2SquirtStartEnd = bits, U08, 121, [1:1], "End angle", "Start angle" ;[PJSC v1.01]
453454 inj3SquirtStartEnd = bits, U08, 121, [2:2], "End angle", "Start angle" ;[PJSC v1.01]
@@ -502,7 +503,7 @@
502503 TrigEdge = bits, U08, 5,[0:0], "RISING", "FALLING"
503504 TrigSpeed = bits, U08, 5,[1:1], "Crank Speed", "Cam Speed"
504505 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"
506507 TrigEdgeSec= bits, U08, 6,[0:0], "RISING", "FALLING"
507508 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"
508509 useResync = bits, U08, 6,[7:7], "No", "Yes"
@@ -1273,6 +1274,7 @@
12731274 requiresPowerCycle = algorithm3 ;[PJSC v1.01]
12741275 requiresPowerCycle = secondaryFuelUsage ;[PJSC v1.01]
12751276 requiresPowerCycle = table4Usage ;[PJSC v1.01]
1277+ requiresPowerCycle = useMAPasSync ;[PJSC v1.03]
12761278
12771279 requiresPowerCycle = caninput_sel0a
12781280 requiresPowerCycle = caninput_sel0b
@@ -1419,6 +1421,7 @@
14191421 #if table4_spark ;[PJSC v1.01] For switching table4
14201422 defaultValue = table4Usage, 1 ;[PJSC v1.01]
14211423 #endif ;[PJSC v1.01] For switching table4
1424+ defaultValue = useMAPasSync, 0 ;[PJSC v1.03]
14221425 defaultValue = inj1SquirtStartEnd, 0 ;[PJSC v1.01]
14231426 defaultValue = inj2SquirtStartEnd, 0 ;[PJSC v1.01]
14241427 defaultValue = inj3SquirtStartEnd, 0 ;[PJSC v1.01]
--- branches/Ver1.03/speeduino/decoders.h (revision 138)
+++ branches/Ver1.03/speeduino/decoders.h (revision 139)
@@ -157,13 +157,6 @@
157157 int getCrankAngle_KATANA(); //[PJSC ver1.02] For supporting KATANA trigger
158158 void triggerSetEndTeeth_KATANA(); //[PJSC ver1.02] For supporting KATANA trigger
159159
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-
167160 void captureExtTrigger(); //[PJSC] For External Trigger
168161 void captureDutyPulseONtime(); //[PJSC] For capturing duty pulse
169162 void captureDutyPulseOFFtime(); //[PJSC] For capturing duty pulse
@@ -183,6 +176,7 @@
183176 volatile unsigned long targetGap;
184177 volatile unsigned long compositeLastToothTime;
185178 volatile unsigned long flipGap; //[PJSC v1.02]
179+//****************** [PJSC v1.03] ******************
186180 volatile unsigned long curIgnTime = 0; //[PJSC v1.03] For misfire detection
187181 volatile unsigned long lastIgnTime = 0; //[PJSC v1.03] For misfire detection
188182 volatile unsigned long curSpeedTime = 0; //[PJSC v1.03] For capturing viecle speed
@@ -189,6 +183,33 @@
189183 volatile unsigned long lastSpeedTime = 0; //[PJSC v1.03] For capturing viecle speed
190184 volatile unsigned long speedPulseGap = 0; //[PJSC v1.03] For capturing viecle speed
191185
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+
192213 volatile int toothCurrentCount = 0; //The current number of teeth (Onec sync has been achieved, this can never actually be 0
193214 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
194215 volatile unsigned long toothSystemLastToothTime = 0; //As below, but used for decoders where not every tooth count is used for calculation
--- branches/Ver1.03/speeduino/globals.h (revision 138)
+++ branches/Ver1.03/speeduino/globals.h (revision 139)
@@ -511,6 +511,8 @@
511511 byte exValvePositionADC; //[PJSC] For External Trigger
512512 int extTriggerAngle; //[PJSC] For External Trigger
513513 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
514516 byte dutyCaptureCount; //[PJSC] For capturing duty pulse
515517 byte dutyCaptureCount2; //[PJSC] For capturing duty pulse
516518 int dutyFreq; //[PJSC] For capturing duty pulse
@@ -734,7 +736,8 @@
734736 byte exValveCalibrationMode: 1; // |[PJSC v1.03] For capturing viecle speed
735737 //[PJSC v1.03] byte unused2_118: 1; // |[PJSC v1.03]
736738 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; // |
738741 byte inj1SquirtStartEnd: 1; // |
739742 byte inj2SquirtStartEnd: 1; // |
740743 byte inj3SquirtStartEnd: 1; // V