minor improvement

This commit is contained in:
rusefi 2017-12-02 18:59:42 -05:00
parent 3232d0d59d
commit beb05c70d6
1 changed files with 1 additions and 1 deletions

View File

@ -241,8 +241,8 @@ static void mapAveragingCallback(trigger_event_e ckpEventType,
}
angle_t samplingEnd = samplingStart + samplingDuration;
fixAngle(samplingEnd, "samplingEnd");
if (!cisnan(samplingEnd)) {
fixAngle(samplingEnd, "samplingEnd");
// only if value is already prepared
int structIndex = getRevolutionCounter() % 2;
// todo: schedule this based on closest trigger event, same as ignition works