auto-sync

This commit is contained in:
rusEfi 2016-07-09 14:02:36 -04:00
parent 1fa9851ae9
commit 516024840c
5 changed files with 83 additions and 1 deletions

View File

@ -121,6 +121,8 @@ case Force_4b_trigger_type:
return "Force_4b_trigger_type";
case TT_HONDA_CBR_600:
return "TT_HONDA_CBR_600";
case TT_HONDA_CBR_600_CUSTOM:
return "TT_HONDA_CBR_600_CUSTOM";
case TT_DODGE_NEON_1995:
return "TT_DODGE_NEON_1995";
case TT_GM_LS_24:

View File

@ -183,7 +183,9 @@ typedef enum {
TT_2JZ_1_12 = 29,
TT_UNUSED = 30, // this is used if we want to iterate over all trigger types
TT_HONDA_CBR_600_CUSTOM = 30,
TT_UNUSED = 31, // this is used if we want to iterate over all trigger types
Force_4b_trigger_type = ENUM_32_BITS,

View File

@ -512,6 +512,10 @@ void TriggerShape::initializeTriggerShape(Logging *logger DECLARE_ENGINE_PARAMET
configureHondaCbr600(triggerShape PASS_ENGINE_PARAMETER);
break;
case TT_HONDA_CBR_600_CUSTOM:
configureHondaCbr600custom(triggerShape PASS_ENGINE_PARAMETER);
break;
case TT_MITSU:
initializeMitsubishi4g18(triggerShape);
break;

View File

@ -169,4 +169,77 @@ void configureHondaCbr600(TriggerShape *s DECLARE_ENGINE_PARAMETER_S) {
}
void configureHondaCbr600custom(TriggerShape *s DECLARE_ENGINE_PARAMETER_S) {
float w = 720 / 2 / 24;
// s->initialize(FOUR_STROKE_CAM_SENSOR, false);
s->initialize(FOUR_STROKE_CAM_SENSOR, true);
s->useOnlyPrimaryForSync = true;
s->isSynchronizationNeeded = true;
s->setTriggerSynchronizationGap2(0.7, 1);
float a = 0;
a += w;
s->addEvent(a, T_SECONDARY, TV_RISE);
a += w;
s->addEvent(a - 1, T_SECONDARY, TV_FALL); // 30
a += w;
s->addEvent(a, T_SECONDARY, TV_RISE);
s->addEvent(52.4, T_PRIMARY, TV_FALL);
a += w;
s->addEvent(a - 1, T_SECONDARY, TV_FALL); // 60
for (int i = 0;i<10;i++) {
a += w;
s->addEvent(a, T_SECONDARY, TV_RISE);
a += w;
s->addEvent(a, T_SECONDARY, TV_FALL);
}
a += w;
s->addEvent(a, T_SECONDARY, TV_RISE);
s->addEvent(381.34f, T_PRIMARY, TV_RISE);
a += w;
s->addEvent(a - 1, T_SECONDARY, TV_FALL);
for (int i = 0;i<1;i++) {
a += w;
s->addEvent(a, T_SECONDARY, TV_RISE);
a += w;
s->addEvent(a, T_SECONDARY, TV_FALL);
}
a += w;
s->addEvent(a, T_SECONDARY, TV_RISE);
s->addEvent(449.1f, T_PRIMARY, TV_FALL);
a += w;
s->addEvent(a, T_SECONDARY, TV_FALL);
for (int i = 0;i<8;i++) {
a += w;
s->addEvent(a, T_SECONDARY, TV_RISE);
a += w;
s->addEvent(a, T_SECONDARY, TV_FALL);
}
a += w;
s->addEvent(a, T_SECONDARY, TV_RISE);
a += w;
s->addEvent(a - 1, T_SECONDARY, TV_FALL);
s->addEvent(720.0f, T_PRIMARY, TV_RISE);
}

View File

@ -17,5 +17,6 @@ void configureHondaAccordCD(TriggerShape *s, bool withOneEventSignal, bool withF
float d);
void configureHondaCbr600(TriggerShape *s DECLARE_ENGINE_PARAMETER_S);
void configureHondaCbr600custom(TriggerShape *s DECLARE_ENGINE_PARAMETER_S);
#endif /* CONTROLLERS_TRIGGER_TRIGGER_HONDA_H_ */