auto-sync

This commit is contained in:
rusEfi 2016-08-26 16:03:22 -04:00
parent 85603a28bd
commit a1fdfa0ef1
1 changed files with 6 additions and 3 deletions

View File

@ -300,9 +300,12 @@ void TriggerState::decodeTriggerEvent(trigger_event_e const signal, efitime_t no
toothed_previous_time = nowNt; toothed_previous_time = nowNt;
} }
if (!isValidIndex(PASS_ENGINE_PARAMETER_F) && !isInitializingTrigger) { if (!isValidIndex(PASS_ENGINE_PARAMETER_F) && !isInitializingTrigger) {
warning(CUSTOM_SYNC_ERROR, "sync error: index #%d above total size %d", currentCycle.current_index, TRIGGER_SHAPE(size)); // let's not show a warning if we are just starting to spin
lastDecodingErrorTime = getTimeNowNt(); if (engine->rpmCalculator.rpmValue != 0) {
someSortOfTriggerError = true; warning(CUSTOM_SYNC_ERROR, "sync error: index #%d above total size %d", currentCycle.current_index, TRIGGER_SHAPE(size));
lastDecodingErrorTime = getTimeNowNt();
someSortOfTriggerError = true;
}
} }
if (someSortOfTriggerError) { if (someSortOfTriggerError) {
if (getTimeNowNt() - lastDecodingErrorTime > US2NT(US_PER_SECOND_LL)) { if (getTimeNowNt() - lastDecodingErrorTime > US2NT(US_PER_SECOND_LL)) {