only: trigger refactoring reducing code duplication

This commit is contained in:
Andrey 2024-01-15 17:54:30 -05:00
parent c15aa75922
commit 132d9bc809
1 changed files with 1 additions and 5 deletions

View File

@ -78,14 +78,10 @@ static int atTriggerVersions[NUM_EMULATOR_CHANNELS] = { 0 };
static float getRpmMultiplier(operation_mode_e mode) {
switch (mode) {
case FOUR_STROKE_SYMMETRICAL_CRANK_SENSOR:
return getCrankDivider(mode) / 2;
case FOUR_STROKE_THREE_TIMES_CRANK_SENSOR:
return getCrankDivider(mode) / 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 getCrankDivider(mode) / 2;
case FOUR_STROKE_CAM_SENSOR:
return 0.5;
case OM_NONE: