This commit is contained in:
rusefi 2019-01-14 00:01:11 -05:00
parent d1430b1b3d
commit 274da1426d
3 changed files with 3 additions and 3 deletions

View File

@ -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);

View File

@ -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
*/

View File

@ -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) {