auto-sync
This commit is contained in:
parent
26d09bbc6f
commit
d4ff699ff2
|
@ -228,7 +228,7 @@ void setMiata1990(engine_configuration_s *engineConfiguration, board_configurati
|
|||
}
|
||||
|
||||
void setFordEscortGt(engine_configuration_s *engineConfiguration, board_configuration_s *boardConfiguration) {
|
||||
engineConfiguration->trigger.type = TT_FORD_ESCORT_GT;
|
||||
engineConfiguration->trigger.type = TT_FORD_ESCORT_GT_T;
|
||||
|
||||
common079721_2351(engineConfiguration, boardConfiguration);
|
||||
|
||||
|
@ -246,9 +246,14 @@ void setFordEscortGt(engine_configuration_s *engineConfiguration, board_configur
|
|||
// boardConfiguration->triggerInputPins[1] = GPIOA_5; // 2E White CKP
|
||||
|
||||
// in case of SOHC distributor we only have one signal
|
||||
boardConfiguration->triggerInputPins[0] = GPIOA_5; // 2E White CKP
|
||||
boardConfiguration->triggerInputPins[1] = GPIO_UNASSIGNED;
|
||||
engineConfiguration->needSecondTriggerInput = false;
|
||||
// boardConfiguration->triggerInputPins[0] = GPIOA_5; // 2E White CKP
|
||||
// boardConfiguration->triggerInputPins[1] = GPIO_UNASSIGNED;
|
||||
// engineConfiguration->needSecondTriggerInput = false;
|
||||
|
||||
// in case of SOHC distributor we only have one signal
|
||||
boardConfiguration->triggerInputPins[0] = GPIOC_6;
|
||||
boardConfiguration->triggerInputPins[1] = GPIOA_5; // 2E White CKP
|
||||
engineConfiguration->needSecondTriggerInput = true;
|
||||
|
||||
engineConfiguration->map.sensor.type = MT_DENSO183;
|
||||
|
||||
|
|
|
@ -87,8 +87,10 @@ case TT_DODGE_NEON_2003:
|
|||
return "TT_DODGE_NEON_2003";
|
||||
case TT_FORD_ASPIRE:
|
||||
return "TT_FORD_ASPIRE";
|
||||
case TT_FORD_ESCORT_GT:
|
||||
return "TT_FORD_ESCORT_GT";
|
||||
case TT_MAZDA_SOHC:
|
||||
return "TT_MAZDA_SOHC";
|
||||
case TT_FORD_ESCORT_GT_T:
|
||||
return "TT_FORD_ESCORT_GT_T";
|
||||
case TT_GM_7X:
|
||||
return "TT_GM_7X";
|
||||
case TT_HONDA_ACCORD_CD:
|
||||
|
|
|
@ -110,7 +110,7 @@ typedef enum {
|
|||
TT_MAZDA_MIATA_NB = 4,
|
||||
TT_GM_7X = 5,
|
||||
TT_MINI_COOPER_R50 = 6,
|
||||
TT_FORD_ESCORT_GT = 7,
|
||||
TT_MAZDA_SOHC = 7,
|
||||
TT_TOOTHED_WHEEL_60_2 = 8,
|
||||
TT_TOOTHED_WHEEL_36_1 = 9,
|
||||
|
||||
|
@ -124,6 +124,9 @@ typedef enum {
|
|||
|
||||
TT_DODGE_NEON_2003 = 14,
|
||||
|
||||
TT_FORD_ESCORT_GT_T = 15,
|
||||
|
||||
|
||||
Force_4b_trigger_type = ENUM_32_BITS,
|
||||
} trigger_type_e;
|
||||
|
||||
|
|
|
@ -303,10 +303,14 @@ void initializeTriggerShape(Logging *logger, engine_configuration_s const *engin
|
|||
configureGmTriggerShape(triggerShape);
|
||||
break;
|
||||
|
||||
case TT_FORD_ESCORT_GT:
|
||||
case TT_FORD_ESCORT_GT_T:
|
||||
configureMazdaProtegeLx(triggerShape);
|
||||
break;
|
||||
|
||||
case TT_MAZDA_SOHC:
|
||||
configureMazdaProtegeSOHC(triggerShape);
|
||||
break;
|
||||
|
||||
case TT_MINI_COOPER_R50:
|
||||
configureMiniCooperTriggerShape(triggerShape);
|
||||
break;
|
||||
|
|
|
@ -85,6 +85,34 @@ void initializeMazdaMiataNbShape(TriggerShape *s) {
|
|||
s->addEvent(720.0f, T_PRIMARY, TV_LOW);
|
||||
}
|
||||
|
||||
void configureMazdaProtegeSOHC(TriggerShape *s) {
|
||||
|
||||
// todo: move to into configuration definition s->needSecondTriggerInput = FALSE;
|
||||
|
||||
s->reset(FOUR_STROKE_CAM_SENSOR);
|
||||
// s->initialState[0] = 1;
|
||||
|
||||
// float w = 720 / 4 * 0.215;
|
||||
float a = 5;
|
||||
|
||||
float z = 0.093;
|
||||
a = 180;
|
||||
s->addEvent(a - z * 720, T_PRIMARY, TV_HIGH);
|
||||
s->addEvent(a, T_PRIMARY, TV_LOW);
|
||||
|
||||
a += 180;
|
||||
s->addEvent(a - z * 720, T_PRIMARY, TV_HIGH);
|
||||
s->addEvent(a, T_PRIMARY, TV_LOW);
|
||||
a += 180;
|
||||
s->addEvent(a - z * 720, T_PRIMARY, TV_HIGH);
|
||||
s->addEvent(a, T_PRIMARY, TV_LOW);
|
||||
a += 180;
|
||||
s->addEvent(a - z * 720, T_PRIMARY, TV_HIGH);
|
||||
s->addEvent(a, T_PRIMARY, TV_LOW);
|
||||
|
||||
s->isSynchronizationNeeded = false;
|
||||
}
|
||||
|
||||
void configureMazdaProtegeLx(TriggerShape *s) {
|
||||
|
||||
// todo: move to into configuration definition s->needSecondTriggerInput = FALSE;
|
||||
|
@ -107,23 +135,27 @@ void configureMazdaProtegeLx(TriggerShape *s) {
|
|||
// s->addEvent(a, T_SECONDARY, TV_LOW);
|
||||
// s->addEvent(a + w, T_SECONDARY, TV_HIGH);
|
||||
|
||||
float z = 0.093;
|
||||
float z = 0.093; // 67 deg
|
||||
|
||||
a = 180;
|
||||
s->addEvent(a - z * 720, T_PRIMARY, TV_HIGH);
|
||||
s->addEvent(a, T_PRIMARY, TV_LOW);
|
||||
s->addEvent(a - z * 720, T_SECONDARY, TV_HIGH);
|
||||
s->addEvent(a, T_SECONDARY, TV_LOW);
|
||||
|
||||
s->addEvent(a + 10, T_PRIMARY, TV_HIGH);
|
||||
s->addEvent(a + 80, T_PRIMARY, TV_LOW);
|
||||
|
||||
|
||||
a += 180;
|
||||
s->addEvent(a - z * 720, T_PRIMARY, TV_HIGH);
|
||||
s->addEvent(a, T_PRIMARY, TV_LOW);
|
||||
s->addEvent(a - z * 720, T_SECONDARY, TV_HIGH);
|
||||
s->addEvent(a, T_SECONDARY, TV_LOW);
|
||||
|
||||
a += 180;
|
||||
s->addEvent(a - z * 720, T_PRIMARY, TV_HIGH);
|
||||
s->addEvent(a, T_PRIMARY, TV_LOW);
|
||||
s->addEvent(a - z * 720, T_SECONDARY, TV_HIGH);
|
||||
s->addEvent(a, T_SECONDARY, TV_LOW);
|
||||
|
||||
a += 180;
|
||||
s->addEvent(a - z * 720, T_PRIMARY, TV_HIGH);
|
||||
s->addEvent(a, T_PRIMARY, TV_LOW);
|
||||
s->addEvent(a - z * 720, T_SECONDARY, TV_HIGH);
|
||||
s->addEvent(a, T_SECONDARY, TV_LOW);
|
||||
|
||||
s->isSynchronizationNeeded = false;
|
||||
}
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
|
||||
void initializeMazdaMiataNaShape(TriggerShape *s);
|
||||
void initializeMazdaMiataNbShape(TriggerShape *s);
|
||||
void configureMazdaProtegeSOHC(TriggerShape *s);
|
||||
void configureMazdaProtegeLx(TriggerShape *s);
|
||||
|
||||
#endif /* TRIGGER_MAZDA_H_ */
|
||||
|
|
|
@ -518,7 +518,7 @@ void testTriggerDecoder(void) {
|
|||
test1995FordInline6TriggerDecoder();
|
||||
testMazdaMianaNbDecoder();
|
||||
testGY6_139QMB();
|
||||
testTriggerDecoder2("testFordEscortGt", FORD_ESCORT_GT, 0, 0.6280, 0);
|
||||
testTriggerDecoder2("testFordEscortGt", FORD_ESCORT_GT, 2, 0.9028, 0.3720);
|
||||
testTriggerDecoder2("testMiniCooper", MINI_COOPER_R50, 121, 0.5222, 0.4959);
|
||||
testTriggerDecoder2("testRoverV8", ROVER_V8, 0, 0.4861, 0);
|
||||
testTriggerDecoder2("testCitroen", CITROEN_TU3JP, 0, 0.4833, 0);
|
||||
|
|
Loading…
Reference in New Issue