• 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

Revision67 (tree)
Time2019-07-11 10:36:27
Authormaharu

Log Message

[PJSC v1.01c] Preparing for MUX output test mode.

Change Summary

Incremental Difference

--- branches/Ver1.00_base/reference/PJSC.ini (revision 66)
+++ branches/Ver1.00_base/reference/PJSC.ini (revision 67)
@@ -414,25 +414,28 @@
414414 #if table4_spark ;[PJSC v1.01c]
415415 muxout1selection = bits, U08, 117, [0:3], "Disable", "IDLE control", "Thermo Fan control", "Launch control", "Fuel pump control", "Boost control", "VVT control", "Tach output", "INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID"
416416 muxout2selection = bits, U08, 117, [4:7], "Disable", "IDLE control", "Thermo Fan control", "Launch control", "Fuel pump control", "Boost control", "VVT control", "Tach output", "INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID"
417+ muxout3selection = bits, U08, 118, [0:3], "Disable", "IDLE control", "Thermo Fan control", "Launch control", "Fuel pump control", "Boost control", "VVT control", "Tach output", "INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID"
418+ muxout4selection = bits, U08, 118, [4:7], "Disable", "IDLE control", "Thermo Fan control", "Launch control", "Fuel pump control", "Boost control", "VVT control", "Tach output", "INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID"
417419 #endif ;[PJSC v1.01c]
418420 #if table4_fuel ;[PJSC v1.01c]
419421 muxout1selection = bits, U08, 117, [0:3], "Disable", "IDLE control", "Thermo Fan control", "INVALID", "Fuel pump control", "Boost control", "VVT control", "Tach output", "INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID" ;[PJSC v1.01c]
420422 muxout2selection = bits, U08, 117, [4:7], "Disable", "IDLE control", "Thermo Fan control", "INVALID", "Fuel pump control", "Boost control", "VVT control", "Tach output", "INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID" ;[PJSC v1.01c]
423+ muxout3selection = bits, U08, 118, [0:3], "Disable", "IDLE control", "Thermo Fan control", "INVALID", "Fuel pump control", "Boost control", "VVT control", "Tach output", "INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID" ;[PJSC v1.01c]
424+ muxout4selection = bits, U08, 118, [4:7], "Disable", "IDLE control", "Thermo Fan control", "INVALID", "Fuel pump control", "Boost control", "VVT control", "Tach output", "INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID" ;[PJSC v1.01c]
421425 #endif ;[PJSC v1.01c]
422426 //[PJSC v1.01c] baroDenBins = array, U08, 102, [9], "kPa", 1.0, 0.0, 0.0, 255.0, 0 ;[PJSC v1.10] Bins for the Barometric density correction curve
423427 //[PJSC v1.01c] baroDenRates = array, U08, 111, [9], "%", 1.0, 0.0, 0.0, 255.0, 0 ;[PJSC v1.10] Values for the \Barometric density correction curve
424- algorithm2 = bits, U08, 118, [0:2], $loadSourceNames ;[PJSC v1.10] For Dual Fuel Load
425- algorithm3 = bits, U08, 118, [3:5], $loadSourceNames ;[PJSC v1.10]
426- unused2_120 = bits, U08, 118, [6:7] ;[PJSC v1.10]
427- table4Usage = bits, U08, 119, [0:0], "Fuel", "Spark" ;[PJSC v1.10]
428- unused2_121 = bits, U08, 119, [1:7] ;[PJSC v1.10]
429- inj1SquirtStartEnd = bits, U08, 120, [0:0], "End angle", "Start angle" ;[PJSC v1.01c]
430- inj2SquirtStartEnd = bits, U08, 120, [1:1], "End angle", "Start angle" ;[PJSC v1.01c]
431- inj3SquirtStartEnd = bits, U08, 120, [2:2], "End angle", "Start angle" ;[PJSC v1.01c]
432- inj4SquirtStartEnd = bits, U08, 120, [3:3], "End angle", "Start angle" ;[PJSC v1.01c]
433- unused2_122 = bits, U08, 120, [4:7] ;[PJSC v1.01c]
434-;[PJSC v1.01c] unused2_122 = array, U08, 122, [6], "%", 1.0, 0.0, 0.0, 255, 0 ;[PJSC v1.10]
435- unused2_123 = array, U08, 121, [7], "%", 1.0, 0.0, 0.0, 255, 0 ;[PJSC v1.01c]
428+ algorithm2 = bits, U08, 119, [0:2], $loadSourceNames ;[PJSC v1.10] For Dual Fuel Load
429+ algorithm3 = bits, U08, 119, [3:5], $loadSourceNames ;[PJSC v1.10]
430+ unused2_119 = bits, U08, 119, [6:7] ;[PJSC v1.10]
431+ table4Usage = bits, U08, 120, [0:0], "Fuel", "Spark" ;[PJSC v1.10]
432+ unused2_120 = bits, U08, 120, [1:7] ;[PJSC v1.10]
433+ inj1SquirtStartEnd = bits, U08, 121, [0:0], "End angle", "Start angle" ;[PJSC v1.01c]
434+ inj2SquirtStartEnd = bits, U08, 121, [1:1], "End angle", "Start angle" ;[PJSC v1.01c]
435+ inj3SquirtStartEnd = bits, U08, 121, [2:2], "End angle", "Start angle" ;[PJSC v1.01c]
436+ inj4SquirtStartEnd = bits, U08, 121, [3:3], "End angle", "Start angle" ;[PJSC v1.01c]
437+ unused2_121 = bits, U08, 121, [4:7] ;[PJSC v1.01c]
438+ unused2_122 = array, U08, 122, [6], "%", 1.0, 0.0, 0.0, 255, 0 ;[PJSC v1.10]
436439
437440
438441 ;Page 2 is the fuel map and axis bins only
@@ -1216,6 +1219,8 @@
12161219 requiresPowerCycle = dutyPulseCaptureEnabled2 ;[PJSC]
12171220 requiresPowerCycle = muxout1selection ;[PJSC v1.10]
12181221 requiresPowerCycle = muxout2selection ;[PJSC v1.10]
1222+ requiresPowerCycle = muxout3selection ;[PJSC v1.01c]
1223+ requiresPowerCycle = muxout4selection ;[PJSC v1.01c]
12191224 requiresPowerCycle = algorithm2 ;[PJSC v1.10]
12201225 requiresPowerCycle = algorithm3 ;[PJSC v1.10]
12211226 requiresPowerCycle = secondaryFuelUsage ;[PJSC v1.10]
@@ -1357,6 +1362,8 @@
13571362 defaultValue = testinjcnt, 0 ; |
13581363 defaultValue = muxout1selection, 0 ; V
13591364 defaultValue = muxout2selection, 0 ;[PJSC v1.10]
1365+ defaultValue = muxout3selection, 0 ;[PJSC v1.01c]
1366+ defaultValue = muxout4selection, 0 ;[PJSC v1.01c]
13601367 #if table4_fuel ;[PJSC v1.10] For switching table4
13611368 defaultValue = table4Usage, 0 ;[PJSC v1.10]
13621369 #endif ;[PJSC v1.10] For switching table4
@@ -1872,26 +1879,28 @@
18721879 panel = engine_constants_west, West
18731880 panel = engine_constants_east, East
18741881
1875- dialog = muxWarningMessage, "" ;[PJSC v1.10]
1876- field = "Don't select the same function for MUX out1 and MUX out2!" ; |
1877- ; |
1878- dialog = muxoutSetting, "MUX Output Port Setting" ; |
1879- field = "MUX out1", muxout1selection ; |
1880- field = "MUX out2", muxout2selection ; V
1881- panel = muxWarningMessage, ;[PJSC v1.10]
1882+ dialog = muxWarningMessage, "" ;[PJSC v1.10]
1883+ field = "Don't select the same function for MUX out1 and MUX out2!" ; |
1884+ ; |
1885+ dialog = muxoutSetting, "MUX Output Port Setting" ; |
1886+ field = "MUX out1", muxout1selection ; V
1887+ field = "MUX out2", muxout2selection ;[PJSC v1.10]
1888+ field = "MUX out3", muxout3selection, { pinLayout == 64 } ;[PJSC v1.01c]
1889+ field = "MUX out4", muxout4selection, { pinLayout == 64 } ;[PJSC v1.01c]
1890+ panel = muxWarningMessage, ;[PJSC v1.10]
18821891
1883- dialog = captExValveSetting, "Capture Exhaust Valve Position Control" ;[PJSC]
1884- field = "Exhaust valve calibration mode", exValveCalibrationMode ; |
1885- field = "Closed exhaust valve ADC count", exValvePosMin ; |
1886- field = "Open exhaust valve ADC count", exValvePosMax ; |
1887- ; |
1888- dialog = captSparkSetting, "Capture External Spark Control" ; |
1889- field = "Spark capture trigger edge", externalTrigEdge ; |
1890- field = "Spark capture hysteresis", exTrigHysteresis ; |
1891- ; |
1892- dialog = captDutyPulseSetting, "Capture Duty Pulse Control" ; |
1893- field = "Duty pulse ON Level ch1", dutyPulseOnLevel ; V
1894- field = "Duty pulse ON Level ch2", dutyPulseOnLevel2 ;[PJSC]
1892+ dialog = captExValveSetting, "Capture Exhaust Valve Position Control" ;[PJSC]
1893+ field = "Exhaust valve calibration mode", exValveCalibrationMode ; |
1894+ field = "Closed exhaust valve ADC count", exValvePosMin ; |
1895+ field = "Open exhaust valve ADC count", exValvePosMax ; |
1896+ ; |
1897+ dialog = captSparkSetting, "Capture External Spark Control" ; |
1898+ field = "Spark capture trigger edge", externalTrigEdge ; |
1899+ field = "Spark capture hysteresis", exTrigHysteresis ; |
1900+ ; |
1901+ dialog = captDutyPulseSetting, "Capture Duty Pulse Control" ; |
1902+ field = "Duty pulse ON Level ch1", dutyPulseOnLevel ; V
1903+ field = "Duty pulse ON Level ch2", dutyPulseOnLevel2 ;[PJSC]
18951904
18961905 dialog = analogInputPort1select, "" ;[PJSC v1.10]
18971906 field = "", exValveCaptureEnabled ; |
--- branches/Ver1.00_base/speeduino/board_avr2560.h (revision 66)
+++ branches/Ver1.00_base/speeduino/board_avr2560.h (revision 67)
@@ -123,6 +123,24 @@
123123 #define VVT_TIMER_COMPARE OCR1B
124124 #define VVT_TIMER_COUNTER TCNT1
125125
126+ #define MUX1_TIMER_ENABLE() TIMSK1 |= (1 << OCIE1A) //[PJSC v1.01c]
127+ #define MUX1_TIMER_DISABLE() TIMSK1 &= ~(1 << OCIE1A) // |
128+ #define MUX2_TIMER_ENABLE() TIMSK1 |= (1 << OCIE1B) // |
129+ #define MUX2_TIMER_DISABLE() TIMSK1 &= ~(1 << OCIE1B) // |
130+ #define MUX3_TIMER_ENABLE() TIMSK1 |= (1 << OCIE1A) // |
131+ #define MUX3_TIMER_DISABLE() TIMSK1 &= ~(1 << OCIE1A) // |
132+ #define MUX4_TIMER_ENABLE() TIMSK1 |= (1 << OCIE1B) // |
133+ #define MUX4_TIMER_DISABLE() TIMSK1 &= ~(1 << OCIE1B) // |
134+ // |
135+ #define MUX1_COMPARE OCR1A // |
136+ #define MUX1_COUNTER TCNT1 // |
137+ #define MUX2_COMPARE OCR1B // |
138+ #define MUX2_COUNTER TCNT1 // |
139+ #define MUX3_COMPARE OCR1A // |
140+ #define MUX3_COUNTER TCNT1 // |
141+ #define MUX4_COMPARE OCR1B // V
142+ #define MUX4_COUNTER TCNT1 //[PJSC v1.01c]
143+
126144 /*
127145 ***********************************************************************************************************
128146 * Idle
--- branches/Ver1.00_base/speeduino/globals.h (revision 66)
+++ branches/Ver1.00_base/speeduino/globals.h (revision 67)
@@ -353,6 +353,15 @@
353353 volatile byte tempVEvalue[4]; //[PJSC v1.10] Multi VE Map support
354354 volatile unsigned int dualFuelLoadVE; //[PJSC v1.10] Dual Fuel Load support
355355
356+volatile PORT_TYPE *mux1_pin_port; //[PJSC v1.01c]
357+volatile byte mux1_pin_mask; // |
358+volatile PORT_TYPE *mux2_pin_port; // |
359+volatile byte mux2_pin_mask; // |
360+volatile PORT_TYPE *mux3_pin_port; // |
361+volatile byte mux3_pin_mask; // |
362+volatile PORT_TYPE *mux4_pin_port; // V
363+volatile byte mux4_pin_mask; //[PJSC v1.01c]
364+
356365 //These need to be here as they are used in both speeduino.ino and scheduler.ino
357366 bool channel1InjEnabled = true;
358367 bool channel2InjEnabled = false;
@@ -688,6 +697,8 @@
688697 uint16_t testinjcnt; // |
689698 byte muxout1Selection: 4; // | MUX output1 selection
690699 byte muxout2Selection: 4; // | MUX output2 selection
700+ byte muxout3Selection: 4; // |[PJSC v1.01c] MUX output3 selection
701+ byte muxout4Selection: 4; // |[PJSC v1.01c] MUX output4 selection
691702 //[PJSC v1.01c] byte baroDenBins[9]; // | For Barometric extend correnction
692703 //[PJSC v1.01c] byte baroDenRates[9]; // | For Barometric extend correnction
693704 byte fuelAlgorithm2: 3; //[PJSC v1.10] For Secondary Fuel Algorithm
@@ -700,8 +711,8 @@
700711 byte inj2SquirtStartEnd: 1; // |
701712 byte inj3SquirtStartEnd: 1; // |
702713 byte inj4SquirtStartEnd: 1; // |
703- byte unused2_120: 4; // V
704- byte unused2_121[7]; //[PJSC v1.01c]
714+ byte unused2_121: 4; // V
715+ byte unused2_122[6]; //[PJSC v1.01c]
705716
706717 #if defined(CORE_AVR)
707718 };
@@ -1112,6 +1123,8 @@
11121123 byte pinCaptureDuty2; //[PJSC] For capturing duty pulse
11131124 byte pinMuxout1; //[PJSC v1.10] For MUX output setting
11141125 byte pinMuxout2; //[PJSC v1.10] For MUX output setting
1126+byte pinMuxout3; //[PJSC v1.01c] For MUX output setting
1127+byte pinMuxout4; //[PJSC v1.01c] For MUX output setting
11151128
11161129 // global variables // from speeduino.ino
11171130 extern struct statuses currentStatus; // from speeduino.ino
--- branches/Ver1.00_base/speeduino/scheduledIO.h (revision 66)
+++ branches/Ver1.00_base/speeduino/scheduledIO.h (revision 67)
@@ -76,6 +76,16 @@
7676 #define coil4Low() (*ign4_pin_port &= ~(ign4_pin_mask))
7777 #define coil4High() (*ign4_pin_port |= (ign4_pin_mask))
7878
79+//[PJSC v1.01c] For MUX output test mode
80+#define openMux1() *mux1_pin_port |= (mux1_pin_mask);
81+#define closeMux1() *mux1_pin_port &= ~(mux1_pin_mask);
82+#define openMux2() *mux2_pin_port |= (mux2_pin_mask);
83+#define closeMux2() *mux2_pin_port &= ~(mux2_pin_mask);
84+#define openMux3() *mux3_pin_port |= (mux3_pin_mask);
85+#define closeMux3() *mux3_pin_port &= ~(mux3_pin_mask);
86+#define openMux4() *mux4_pin_port |= (mux4_pin_mask);
87+#define closeMux4() *mux4_pin_port &= ~(mux4_pin_mask);
88+
7989 void nullCallback();
8090
8191 static byte coilHIGH = HIGH;
--- branches/Ver1.00_base/speeduino/scheduler.h (revision 66)
+++ branches/Ver1.00_base/speeduino/scheduler.h (revision 67)
@@ -230,6 +230,18 @@
230230 long pjsc2_pwm_target_value;
231231 long pjsc3_pwm_target_value;
232232 long pjsc4_pwm_target_value;
233+volatile bool mux1_pwm_state; //[PJSC v1.01c]
234+volatile bool mux2_pwm_state; // |
235+volatile bool mux3_pwm_state; // |
236+volatile bool mux4_pwm_state; // |
237+volatile unsigned int mux1_pwm_cur_value; // |
238+volatile unsigned int mux2_pwm_cur_value; // |
239+volatile unsigned int mux3_pwm_cur_value; // |
240+volatile unsigned int mux4_pwm_cur_value; // |
241+long mux1_pwm_target_value; // |
242+long mux2_pwm_target_value; // |
243+long mux3_pwm_target_value; // V
244+long mux4_pwm_target_value; //[PJSC v1.01c]
233245 //[PJSC] For PJSC
234246
235247 //[PJSC v1.10]
@@ -237,15 +249,27 @@
237249 void pjsc2Toggle();
238250 void pjsc3Toggle();
239251 void pjsc4Toggle();
252+void mux1Toggle(); //[PJSC v1.01c]
253+void mux2Toggle(); // |
254+void mux3Toggle(); // V
255+void mux4Toggle(); //[PJSC v1.01c]
240256 void setPjsc1Duty();
241257 void setPjsc2Duty();
242258 void setPjsc3Duty();
243259 void setPjsc4Duty();
260+void setCoil1Duty(); //[PJSC v1.01c]
261+void setCoil2Duty(); // |
262+void setCoil3Duty(); // |
263+void setCoil4Duty(); // |
264+void setMux1Duty(); // |
265+void setMux2Duty(); // |
266+void setMux3Duty(); // V
267+void setMux4Duty(); //[PJSC v1.01c]
244268 void injTstPulseToggle1();
245269 void injTstPulseToggle2();
246270 void injTstPulseToggle3();
247271 void injTstPulseToggle4();
248-void injTstControlPWM(byte injCh);
272+void hardWareTstControlPWM(byte injCh);
249273 void injTstControlPulse(byte injCh);
250274
251275 #define DISABLE_TIMER_FUEL1TO4() FUEL1_TIMER_DISABLE(); FUEL2_TIMER_DISABLE(); FUEL3_TIMER_DISABLE(); FUEL4_TIMER_DISABLE()