only: trigger refactoring reducing code duplication
This commit is contained in:
parent
c15aa75922
commit
132d9bc809
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue