From 274da1426dfcedb7a24ebdb49980014c22c7db76 Mon Sep 17 00:00:00 2001 From: rusefi Date: Mon, 14 Jan 2019 00:01:11 -0500 Subject: [PATCH] clean-up --- firmware/controllers/map_averaging.cpp | 2 +- firmware/development/sensor_chart.cpp | 2 +- firmware/development/wave_analyzer.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/firmware/controllers/map_averaging.cpp b/firmware/controllers/map_averaging.cpp index f20834be08..ce189d2a30 100644 --- a/firmware/controllers/map_averaging.cpp +++ b/firmware/controllers/map_averaging.cpp @@ -295,7 +295,7 @@ static void mapAveragingTriggerCallback(trigger_event_e ckpEventType, fixAngle(samplingEnd, "samplingEnd", CUSTOM_ERR_6563); // only if value is already prepared - int structIndex = getRevolutionCounter() % 2; + int structIndex = engine->rpmCalculator.getRevolutionCounter() % 2; // todo: schedule this based on closest trigger event, same as ignition works scheduleByAngle(rpm, &startTimer[i][structIndex], samplingStart, startAveraging, NULL, &engine->rpmCalculator); diff --git a/firmware/development/sensor_chart.cpp b/firmware/development/sensor_chart.cpp index 8037d966b5..0118f4c329 100644 --- a/firmware/development/sensor_chart.cpp +++ b/firmware/development/sensor_chart.cpp @@ -38,7 +38,7 @@ void scAddData(float angle, float value) { return; } - if (getRevolutionCounter() % engineConfiguration->sensorChartFrequency != 0) { + if (engine->rpmCalculator.getRevolutionCounter() % engineConfiguration->sensorChartFrequency != 0) { /** * We are here if we do NOT need to add an event to the analog chart */ diff --git a/firmware/development/wave_analyzer.cpp b/firmware/development/wave_analyzer.cpp index 1099f6ce40..d0ce1cb837 100644 --- a/firmware/development/wave_analyzer.cpp +++ b/firmware/development/wave_analyzer.cpp @@ -80,7 +80,7 @@ void WaveReader::onFallEvent() { efitick_t width = nowUs - widthEventTimeUs; last_wave_high_widthUs = width; - int revolutionCounter = getRevolutionCounter(); + int revolutionCounter = engine->rpmCalculator.getRevolutionCounter(); totalOnTimeAccumulatorUs += width; if (currentRevolutionCounter != revolutionCounter) {