Nissan VVT trigger decoder #2887

that looks like one bug
This commit is contained in:
Andrey 2021-07-05 22:44:20 -04:00
parent 1b174bd4b3
commit cf2e2a6451
2 changed files with 5 additions and 2 deletions

View File

@ -101,3 +101,4 @@ bool isTriggerConfigChanged(DECLARE_ENGINE_PARAMETER_SIGNATURE);
bool isTriggerDecoderError(DECLARE_ENGINE_PARAMETER_SIGNATURE);
#define SYMMETRICAL_CRANK_SENSOR_DIVIDER 4
#define SYMMETRICAL_THREE_TIMES_CRANK_SENSOR_DIVIDER 6

View File

@ -88,8 +88,10 @@ extern WaveChart waveChart;
* 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;
if (mode == FOUR_STROKE_THREE_TIMES_CRANK_SENSOR) {
return SYMMETRICAL_THREE_TIMES_CRANK_SENSOR_DIVIDER / 2;
} else if (mode == FOUR_STROKE_SYMMETRICAL_CRANK_SENSOR) {
return SYMMETRICAL_CRANK_SENSOR_DIVIDER / 2;
} else if (mode == FOUR_STROKE_CAM_SENSOR) {
return 0.5;
} else if (mode == FOUR_STROKE_CRANK_SENSOR) {