so many wonderful discoveries

This commit is contained in:
Andrey 2021-06-27 00:54:38 -04:00
parent 8696ea4890
commit 82439b3ffd
3 changed files with 16 additions and 16 deletions

View File

@ -1153,21 +1153,6 @@ void prepareShapes(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
#endif
/**
* todo: why is this method NOT reciprocal to getCrankDivider?!
*/
float getRpmMultiplier(operation_mode_e mode) {
if (mode == FOUR_STROKE_SYMMETRICAL_CRANK_SENSOR) {
return 2;
} else if (mode == FOUR_STROKE_CAM_SENSOR) {
return 0.5;
} else if (mode == FOUR_STROKE_CRANK_SENSOR) {
// unit test coverage still runs if the value below is changed to '2' not a great sign!
return 1;
}
return 1;
}
void setOperationMode(engine_configuration_s *engineConfiguration, operation_mode_e mode) {
engineConfiguration->ambiguousOperationMode = mode;
}

View File

@ -21,7 +21,6 @@
#define MOCK_UNDEFINED -1
float getRpmMultiplier(operation_mode_e mode);
void setOperationMode(engine_configuration_s *engineConfiguration, operation_mode_e mode);
void prepareVoidConfiguration(engine_configuration_s *activeConfiguration);

View File

@ -88,6 +88,22 @@ static int atTriggerVersion = 0;
extern WaveChart waveChart;
#endif /* EFI_ENGINE_SNIFFER */
/**
* todo: why is this method NOT reciprocal to getCrankDivider?!
* todo: oh this method has only one usage? there must me another very similar method!
*/
static float getRpmMultiplier(operation_mode_e mode) {
if (mode == FOUR_STROKE_SYMMETRICAL_CRANK_SENSOR) {
return 2;
} else if (mode == FOUR_STROKE_CAM_SENSOR) {
return 0.5;
} else if (mode == FOUR_STROKE_CRANK_SENSOR) {
// unit test coverage still runs if the value below is changed to '2' not a great sign!
return 1;
}
return 1;
}
void setTriggerEmulatorRPM(int rpm DECLARE_ENGINE_PARAMETER_SUFFIX) {
engineConfiguration->triggerSimulatorFrequency = rpm;
/**