only:Lamborghini Diablo 1995 CKP Pattern #5876

This commit is contained in:
Andrey 2024-01-15 16:07:34 -05:00
parent 100b7e9b6f
commit 1be5151e2b
2 changed files with 24 additions and 15 deletions

View File

@ -708,6 +708,9 @@ void TriggerWaveform::initializeTriggerWaveform(operation_mode_e triggerOperatio
break; break;
case trigger_type_e::TT_3_TOOTH_CRANK: case trigger_type_e::TT_3_TOOTH_CRANK:
configure3ToothCrank(this);
break;
case trigger_type_e::TT_6_TOOTH_CRANK: case trigger_type_e::TT_6_TOOTH_CRANK:
configure3ToothCrank(this); configure3ToothCrank(this);
break; break;

View File

@ -76,19 +76,25 @@ static int atTriggerVersions[NUM_EMULATOR_CHANNELS] = { 0 };
* todo: oh this method has only one usage? there must me another very similar method! * todo: oh this method has only one usage? there must me another very similar method!
*/ */
static float getRpmMultiplier(operation_mode_e mode) { static float getRpmMultiplier(operation_mode_e mode) {
if (mode == FOUR_STROKE_THREE_TIMES_CRANK_SENSOR) { switch (mode) {
return SYMMETRICAL_THREE_TIMES_CRANK_SENSOR_DIVIDER / 2; case FOUR_STROKE_SYMMETRICAL_CRANK_SENSOR:
} else if (mode == FOUR_STROKE_SYMMETRICAL_CRANK_SENSOR) {
return SYMMETRICAL_CRANK_SENSOR_DIVIDER / 2; return SYMMETRICAL_CRANK_SENSOR_DIVIDER / 2;
} else if (mode == FOUR_STROKE_TWELVE_TIMES_CRANK_SENSOR) { case FOUR_STROKE_THREE_TIMES_CRANK_SENSOR:
return SYMMETRICAL_THREE_TIMES_CRANK_SENSOR_DIVIDER / 2;
case FOUR_STROKE_SIX_TIMES_CRANK_SENSOR:
// todo: c'mon too much code duplication! at least reuse getCrankDivider when it works?!
return SYMMETRICAL_SIX_TIMES_CRANK_SENSOR_DIVIDER / 2;
case FOUR_STROKE_TWELVE_TIMES_CRANK_SENSOR:
return SYMMETRICAL_TWELVE_TIMES_CRANK_SENSOR_DIVIDER / 2; return SYMMETRICAL_TWELVE_TIMES_CRANK_SENSOR_DIVIDER / 2;
} else if (mode == FOUR_STROKE_CAM_SENSOR) { case FOUR_STROKE_CAM_SENSOR:
return 0.5; return 0.5;
} else if (mode == FOUR_STROKE_CRANK_SENSOR) { case OM_NONE:
case TWO_STROKE:
case FOUR_STROKE_CRANK_SENSOR:
// unit test coverage still runs if the value below is changed to '2' not a great sign! // unit test coverage still runs if the value below is changed to '2' not a great sign!
return 1; return 1;
} };
criticalError("We should not have reach this line");
return 1; return 1;
} }