mirror of https://github.com/rusefi/rusefi.git
rename 2jz -> toyota 3 tooth
This commit is contained in:
parent
fadcca16db
commit
bc637c4e6b
|
@ -79,7 +79,7 @@ void setToyota_2jz_vics() {
|
||||||
engineConfiguration->triggerInputPins[1] = Gpio::Unassigned; // cam sensor will he handled by custom vtti code
|
engineConfiguration->triggerInputPins[1] = Gpio::Unassigned; // cam sensor will he handled by custom vtti code
|
||||||
|
|
||||||
engineConfiguration->camInputs[0] = Gpio::C6;
|
engineConfiguration->camInputs[0] = Gpio::C6;
|
||||||
engineConfiguration->vvtMode[0] = VVT_2JZ;
|
engineConfiguration->vvtMode[0] = VVT_TOYOTA_3_TOOTH;
|
||||||
|
|
||||||
// set global_trigger_offset_angle 155
|
// set global_trigger_offset_angle 155
|
||||||
engineConfiguration->globalTriggerAngleOffset = 155; // todo
|
engineConfiguration->globalTriggerAngleOffset = 155; // todo
|
||||||
|
|
|
@ -67,8 +67,8 @@ trigger_type_e getVvtTriggerType(vvt_mode_e vvtMode) {
|
||||||
switch (vvtMode) {
|
switch (vvtMode) {
|
||||||
case VVT_INACTIVE:
|
case VVT_INACTIVE:
|
||||||
return trigger_type_e::TT_HALF_MOON;
|
return trigger_type_e::TT_HALF_MOON;
|
||||||
case VVT_2JZ:
|
case VVT_TOYOTA_3_TOOTH:
|
||||||
return trigger_type_e::TT_VVT_JZ;
|
return trigger_type_e::TT_VVT_TOYOTA_3_TOOTH;
|
||||||
case VVT_MIATA_NB:
|
case VVT_MIATA_NB:
|
||||||
return trigger_type_e::TT_VVT_MIATA_NB;
|
return trigger_type_e::TT_VVT_MIATA_NB;
|
||||||
case VVT_BOSCH_QUICK_START:
|
case VVT_BOSCH_QUICK_START:
|
||||||
|
|
|
@ -327,10 +327,14 @@ enum class trigger_type_e : uint32_t {
|
||||||
// * Note: this trigger is used only by unit tests
|
// * Note: this trigger is used only by unit tests
|
||||||
// * see also TT_ONE a bit below
|
// * see also TT_ONE a bit below
|
||||||
TT_ONE_PLUS_ONE = 16,
|
TT_ONE_PLUS_ONE = 16,
|
||||||
// * VVT for 2JZ, three evenly spaces teeth
|
/**
|
||||||
TT_VVT_JZ = 17,
|
* VVT for 2JZ
|
||||||
|
* three evenly spaces teeth
|
||||||
|
*/
|
||||||
|
TT_VVT_TOYOTA_3_TOOTH = 17,
|
||||||
// just one channel with one perfectly 180 degree tooth with proper reliable Hall sensor, see also TT_NARROW_SINGLE_TOOTH
|
// just one channel with one perfectly 180 degree tooth with proper reliable Hall sensor, see also TT_NARROW_SINGLE_TOOTH
|
||||||
TT_HALF_MOON = 18,
|
TT_HALF_MOON = 18,
|
||||||
|
|
||||||
TT_DODGE_RAM = 19,
|
TT_DODGE_RAM = 19,
|
||||||
// * It looks like this is the VR shape if you have your wires flipped
|
// * It looks like this is the VR shape if you have your wires flipped
|
||||||
TT_60_2_VW = 20,
|
TT_60_2_VW = 20,
|
||||||
|
@ -416,7 +420,7 @@ enum class trigger_type_e : uint32_t {
|
||||||
// Renault F3R
|
// Renault F3R
|
||||||
TT_60_2_2_F3R = 75,
|
TT_60_2_2_F3R = 75,
|
||||||
TT_MITSU_4G63_CRANK = 76,
|
TT_MITSU_4G63_CRANK = 76,
|
||||||
/* pull-up'ed(inverted in): pull down 2x 30 deg before tdc on cam, till tdc.
|
/* pull-up'ed(inverted in): pull down 2x 30 deg before tdc on cam, till tdc.
|
||||||
e.g. Sovek, Saruman ignition blind type */
|
e.g. Sovek, Saruman ignition blind type */
|
||||||
TT_60DEG_TOOTH = 77,
|
TT_60DEG_TOOTH = 77,
|
||||||
TT_VVT_MITSUBISHI_4G69 = 78,
|
TT_VVT_MITSUBISHI_4G69 = 78,
|
||||||
|
|
|
@ -60,7 +60,7 @@ typedef enum __attribute__ ((__packed__)) {
|
||||||
/**
|
/**
|
||||||
* Toyota 2JZ has three cam tooth. We pick one of these three tooth to synchronize based on the expected angle position of the event
|
* Toyota 2JZ has three cam tooth. We pick one of these three tooth to synchronize based on the expected angle position of the event
|
||||||
*/
|
*/
|
||||||
VVT_2JZ = 2,
|
VVT_TOYOTA_3_TOOTH = 2,
|
||||||
/**
|
/**
|
||||||
* Mazda NB2 has three cam tooth. We synchronize based on gap ratio.
|
* Mazda NB2 has three cam tooth. We synchronize based on gap ratio.
|
||||||
* @see TT_VVT_MIATA_NB
|
* @see TT_VVT_MIATA_NB
|
||||||
|
|
|
@ -571,7 +571,7 @@ void TriggerWaveform::initializeTriggerWaveform(operation_mode_e triggerOperatio
|
||||||
configureDaihatsu4(this);
|
configureDaihatsu4(this);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case trigger_type_e::TT_VVT_JZ:
|
case trigger_type_e::TT_VVT_TOYOTA_3_TOOTH:
|
||||||
initializeSkippedToothTrigger(this, 3, 0, triggerOperationMode, SyncEdge::RiseOnly);
|
initializeSkippedToothTrigger(this, 3, 0, triggerOperationMode, SyncEdge::RiseOnly);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -116,7 +116,7 @@ static int getCrankDivider(operation_mode_e operationMode) {
|
||||||
|
|
||||||
static bool vvtWithRealDecoder(vvt_mode_e vvtMode) {
|
static bool vvtWithRealDecoder(vvt_mode_e vvtMode) {
|
||||||
return vvtMode != VVT_INACTIVE
|
return vvtMode != VVT_INACTIVE
|
||||||
&& vvtMode != VVT_2JZ /* VVT_2JZ is an unusual 3/0 missed tooth symmetrical wheel */
|
&& vvtMode != VVT_TOYOTA_3_TOOTH /* VVT_2JZ is an unusual 3/0 missed tooth symmetrical wheel */
|
||||||
&& vvtMode != VVT_HONDA_K_INTAKE
|
&& vvtMode != VVT_HONDA_K_INTAKE
|
||||||
&& vvtMode != VVT_MAP_V_TWIN
|
&& vvtMode != VVT_MAP_V_TWIN
|
||||||
&& vvtMode != VVT_SINGLE_TOOTH;
|
&& vvtMode != VVT_SINGLE_TOOTH;
|
||||||
|
@ -179,7 +179,7 @@ static angle_t adjustCrankPhase(int camIndex) {
|
||||||
case VVT_NISSAN_VQ:
|
case VVT_NISSAN_VQ:
|
||||||
case VVT_BOSCH_QUICK_START:
|
case VVT_BOSCH_QUICK_START:
|
||||||
case VVT_MIATA_NB:
|
case VVT_MIATA_NB:
|
||||||
case VVT_2JZ:
|
case VVT_TOYOTA_3_TOOTH:
|
||||||
case VVT_TOYOTA_4_1:
|
case VVT_TOYOTA_4_1:
|
||||||
case VVT_FORD_COYOTE:
|
case VVT_FORD_COYOTE:
|
||||||
case VVT_FORD_ST170:
|
case VVT_FORD_ST170:
|
||||||
|
@ -349,7 +349,7 @@ void hwHandleVvtCamSignal(TriggerValue front, efitick_t nowNt, int index) {
|
||||||
}
|
}
|
||||||
|
|
||||||
switch(engineConfiguration->vvtMode[camIndex]) {
|
switch(engineConfiguration->vvtMode[camIndex]) {
|
||||||
case VVT_2JZ:
|
case VVT_TOYOTA_3_TOOTH:
|
||||||
{
|
{
|
||||||
int from = engineConfiguration->camDecoder2jzPosition - engineConfiguration->camDecoder2jzPrecision;
|
int from = engineConfiguration->camDecoder2jzPosition - engineConfiguration->camDecoder2jzPrecision;
|
||||||
int to = engineConfiguration->camDecoder2jzPosition + engineConfiguration->camDecoder2jzPrecision;
|
int to = engineConfiguration->camDecoder2jzPosition + engineConfiguration->camDecoder2jzPrecision;
|
||||||
|
|
|
@ -284,7 +284,7 @@ end_struct
|
||||||
#define debug_mode_e_enum "INVALID", "TPS acceleration enrichment", "INVALID", "Stepper Idle Control", "Engine Load accl enrich", "Trigger Counters", "Soft Spark Cut", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "SD card", "sr5", "Knock", "INVALID", "Electronic Throttle", "Executor", "Bench Test / TS commands", "INVALID", "Analog inputs #1", "INSTANT_RPM", "INVALID", "Status", "INVALID", "INVALID", "MAP", "Metrics", "INVALID", "Ion Sense", "TLE8888", "Analog inputs #2", "Dwell Metric", "INVALID", "INVALID", "Boost Control", "INVALID", "INVALID", "ETB Autotune", "Composite Log", "INVALID", "INVALID", "INVALID", "Dyno_View", "Logic_Analyzer", "INVALID", "TCU", "Lua"
|
#define debug_mode_e_enum "INVALID", "TPS acceleration enrichment", "INVALID", "Stepper Idle Control", "Engine Load accl enrich", "Trigger Counters", "Soft Spark Cut", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "SD card", "sr5", "Knock", "INVALID", "Electronic Throttle", "Executor", "Bench Test / TS commands", "INVALID", "Analog inputs #1", "INSTANT_RPM", "INVALID", "Status", "INVALID", "INVALID", "MAP", "Metrics", "INVALID", "Ion Sense", "TLE8888", "Analog inputs #2", "Dwell Metric", "INVALID", "INVALID", "Boost Control", "INVALID", "INVALID", "ETB Autotune", "Composite Log", "INVALID", "INVALID", "INVALID", "Dyno_View", "Logic_Analyzer", "INVALID", "TCU", "Lua"
|
||||||
custom debug_mode_e 1 bits, U08, @OFFSET@, [0:5], @@debug_mode_e_enum@@
|
custom debug_mode_e 1 bits, U08, @OFFSET@, [0:5], @@debug_mode_e_enum@@
|
||||||
|
|
||||||
#define vvt_mode_e_enum "Inactive", "Single Tooth", "2JZ", "Miata NB2", "Mitsu 4G69", "Bosch Quick Start", "4/1", "ST 170", "Ford Barra 3+1", "Nissan VQ", "Honda K Intake", "Nissan MR18", "Mitsu 3A92", "VTwin by MAP", "Mitsu 6G75", "Mazda Skyactiv", "Honda K Exhaust", "Mitsubishi 4G92/93/94", "Mitsubishi 4G63", "Ford Coyote"
|
#define vvt_mode_e_enum "Inactive", "Single Tooth", "Toyota 3 Tooth", "Miata NB2", "Mitsu 4G69", "Bosch Quick Start", "4/1", "ST 170", "Ford Barra 3+1", "Nissan VQ", "Honda K Intake", "Nissan MR18", "Mitsu 3A92", "VTwin by MAP", "Mitsu 6G75", "Mazda Skyactiv", "Honda K Exhaust", "Mitsubishi 4G92/93/94", "Mitsubishi 4G63", "Ford Coyote"
|
||||||
custom vvt_mode_e 1 bits, U08, @OFFSET@, [0:5], @@vvt_mode_e_enum@@
|
custom vvt_mode_e 1 bits, U08, @OFFSET@, [0:5], @@vvt_mode_e_enum@@
|
||||||
|
|
||||||
! At the moment TIM1, TIM2, TIM3 and TIM9 are configured as ICU
|
! At the moment TIM1, TIM2, TIM3 and TIM9 are configured as ICU
|
||||||
|
|
|
@ -2359,8 +2359,8 @@ cmd_set_engine_type_default = "@@TS_IO_TEST_COMMAND_char@@@@ts_command_e_TS_
|
||||||
; todo: https://github.com/rusefi/rusefi/issues/2077
|
; todo: https://github.com/rusefi/rusefi/issues/2077
|
||||||
|
|
||||||
field = "Cam mode (intake)", vvtMode1, {trigger_type != @@trigger_type_e_TT_MAZDA_MIATA_NA@@}
|
field = "Cam mode (intake)", vvtMode1, {trigger_type != @@trigger_type_e_TT_MAZDA_MIATA_NA@@}
|
||||||
field = "2JZ Position", camDecoder2jzPosition, 1, {vvtMode1 == @@vvt_mode_e_VVT_2JZ@@}
|
field = "2JZ Position", camDecoder2jzPosition, 1, {vvtMode1 == @@vvt_mode_e_VVT_TOYOTA_3_TOOTH@@}
|
||||||
field = "2JZ Precision", camDecoder2jzPrecision, 1, {vvtMode1 == @@vvt_mode_e_VVT_2JZ@@}
|
field = "2JZ Precision", camDecoder2jzPrecision, 1, {vvtMode1 == @@vvt_mode_e_VVT_TOYOTA_3_TOOTH@@}
|
||||||
field = "Cam mode (exhaust)", vvtMode2, {trigger_type != @@trigger_type_e_TT_MAZDA_MIATA_NA@@}
|
field = "Cam mode (exhaust)", vvtMode2, {trigger_type != @@trigger_type_e_TT_MAZDA_MIATA_NA@@}
|
||||||
field = ""
|
field = ""
|
||||||
field = "Cam sensor bank 1 intake", camInputs1, { camInputs1 != 0 || (vvtMode1 != @@vvt_mode_e_VVT_INACTIVE@@ ) }
|
field = "Cam sensor bank 1 intake", camInputs1, { camInputs1 != 0 || (vvtMode1 != @@vvt_mode_e_VVT_INACTIVE@@ ) }
|
||||||
|
|
|
@ -9,7 +9,7 @@ TEST(realToyota3ToothCam, running) {
|
||||||
engineConfiguration->isFasterEngineSpinUpEnabled = true;
|
engineConfiguration->isFasterEngineSpinUpEnabled = true;
|
||||||
engineConfiguration->alwaysInstantRpm = true;
|
engineConfiguration->alwaysInstantRpm = true;
|
||||||
|
|
||||||
engineConfiguration->vvtMode[0] = VVT_2JZ;
|
engineConfiguration->vvtMode[0] = VVT_TOYOTA_3_TOOTH;
|
||||||
engineConfiguration->vvtOffsets[0] = 152.583f;
|
engineConfiguration->vvtOffsets[0] = 152.583f;
|
||||||
|
|
||||||
engineConfiguration->trigger.customTotalToothCount = 36;
|
engineConfiguration->trigger.customTotalToothCount = 36;
|
||||||
|
|
Loading…
Reference in New Issue