auto-sync
This commit is contained in:
parent
76ec00977a
commit
836dabdc1d
|
@ -34,6 +34,7 @@ void setToyota_jzs147EngineConfiguration(DECLARE_ENGINE_PARAMETER_F) {
|
||||||
|
|
||||||
// temporary while I am fixing trigger bug
|
// temporary while I am fixing trigger bug
|
||||||
setOperationMode(engineConfiguration, FOUR_STROKE_CRANK_SENSOR);
|
setOperationMode(engineConfiguration, FOUR_STROKE_CRANK_SENSOR);
|
||||||
|
//set_trigger_type 16
|
||||||
engineConfiguration->trigger.type = TT_TOOTHED_WHEEL;
|
engineConfiguration->trigger.type = TT_TOOTHED_WHEEL;
|
||||||
engineConfiguration->trigger.customTotalToothCount = 36;
|
engineConfiguration->trigger.customTotalToothCount = 36;
|
||||||
engineConfiguration->trigger.customSkippedToothCount = 2;
|
engineConfiguration->trigger.customSkippedToothCount = 2;
|
||||||
|
|
|
@ -175,8 +175,10 @@ case TT_UNUSED:
|
||||||
return "TT_UNUSED";
|
return "TT_UNUSED";
|
||||||
case TT_NISSAN:
|
case TT_NISSAN:
|
||||||
return "TT_NISSAN";
|
return "TT_NISSAN";
|
||||||
case TT_2JZ:
|
case TT_2JZ_1_12:
|
||||||
return "TT_2JZ";
|
return "TT_2JZ_1_12";
|
||||||
|
case TT_2JZ_3_34:
|
||||||
|
return "TT_2JZ_3_34";
|
||||||
case TT_ROVER_K:
|
case TT_ROVER_K:
|
||||||
return "TT_ROVER_K";
|
return "TT_ROVER_K";
|
||||||
}
|
}
|
||||||
|
|
|
@ -173,7 +173,7 @@ typedef enum {
|
||||||
|
|
||||||
TT_NISSAN = 24,
|
TT_NISSAN = 24,
|
||||||
|
|
||||||
TT_2JZ = 25,
|
TT_2JZ_3_34 = 25,
|
||||||
|
|
||||||
TT_ROVER_K = 26,
|
TT_ROVER_K = 26,
|
||||||
|
|
||||||
|
@ -181,7 +181,10 @@ typedef enum {
|
||||||
|
|
||||||
TT_HONDA_CBR_600 = 28,
|
TT_HONDA_CBR_600 = 28,
|
||||||
|
|
||||||
TT_UNUSED = 29, // this is used if we want to iterate over all trigger types
|
TT_2JZ_1_12 = 29,
|
||||||
|
|
||||||
|
TT_UNUSED = 30, // this is used if we want to iterate over all trigger types
|
||||||
|
|
||||||
|
|
||||||
Force_4b_trigger_type = ENUM_32_BITS,
|
Force_4b_trigger_type = ENUM_32_BITS,
|
||||||
} trigger_type_e;
|
} trigger_type_e;
|
||||||
|
|
|
@ -522,8 +522,12 @@ void TriggerShape::initializeTriggerShape(Logging *logger DECLARE_ENGINE_PARAMET
|
||||||
initialize36_2_2_2(triggerShape);
|
initialize36_2_2_2(triggerShape);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TT_2JZ:
|
case TT_2JZ_3_34:
|
||||||
initialize2jzGE(triggerShape);
|
initialize2jzGE3_34(triggerShape);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case TT_2JZ_1_12:
|
||||||
|
initialize2jzGE1_12(triggerShape);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TT_NISSAN:
|
case TT_NISSAN:
|
||||||
|
|
|
@ -11,7 +11,31 @@
|
||||||
|
|
||||||
EXTERN_ENGINE;
|
EXTERN_ENGINE;
|
||||||
|
|
||||||
void initialize2jzGE(TriggerShape *s) {
|
void initialize2jzGE1_12(TriggerShape *s) {
|
||||||
|
s->initialize(FOUR_STROKE_CAM_SENSOR, true);
|
||||||
|
|
||||||
|
float crankD = 360 / 12 / 2; // 15
|
||||||
|
|
||||||
|
float crankAngle = 10;
|
||||||
|
|
||||||
|
for (int i = 0; i < 2; i++) {
|
||||||
|
s->addEvent(crankAngle + crankD, T_SECONDARY, TV_RISE, -1, 721);
|
||||||
|
crankAngle += crankD;
|
||||||
|
s->addEvent(crankAngle + crankD, T_SECONDARY, TV_FALL, -1, 721); // 120
|
||||||
|
crankAngle += crankD;
|
||||||
|
} // 2 + 10
|
||||||
|
|
||||||
|
|
||||||
|
s->addEvent(75, T_PRIMARY, TV_RISE, -1, 721);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
s->addEvent(720, T_PRIMARY, TV_FALL, -1, 721);
|
||||||
|
|
||||||
|
s->isSynchronizationNeeded = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
void initialize2jzGE3_34(TriggerShape *s) {
|
||||||
s->initialize(FOUR_STROKE_CAM_SENSOR, true);
|
s->initialize(FOUR_STROKE_CAM_SENSOR, true);
|
||||||
|
|
||||||
float camD = 720 / 6; // 120
|
float camD = 720 / 6; // 120
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
|
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
|
|
||||||
void initialize2jzGE(TriggerShape *s);
|
void initialize2jzGE1_12(TriggerShape *s);
|
||||||
|
void initialize2jzGE3_34(TriggerShape *s);
|
||||||
|
|
||||||
#endif /* CONTROLLERS_TRIGGER_TRIGGER_TOYOTA_H_ */
|
#endif /* CONTROLLERS_TRIGGER_TRIGGER_TOYOTA_H_ */
|
||||||
|
|
Loading…
Reference in New Issue