From dbd4aff10371fa0441f8236c26167fa758b6df09 Mon Sep 17 00:00:00 2001 From: rusEfi Date: Thu, 16 Apr 2015 12:05:50 -0400 Subject: [PATCH] auto-sync --- firmware/controllers/system/event_queue.cpp | 7 ++++--- firmware/rusefi.cpp | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/firmware/controllers/system/event_queue.cpp b/firmware/controllers/system/event_queue.cpp index 071c6d6d7e..7a433e7389 100644 --- a/firmware/controllers/system/event_queue.cpp +++ b/firmware/controllers/system/event_queue.cpp @@ -89,16 +89,17 @@ bool EventQueue::executeAll(uint64_t now) { scheduling_s * executionList = NULL; - int counter = 0; - + int listIterationCounter = 0; + int executionCounter = 0; // we need safe iteration because we are removing elements inside the loop LL_FOREACH_SAFE(head, current, tmp) { - if (++counter > QUEUE_LENGTH_LIMIT) { + if (++listIterationCounter > QUEUE_LENGTH_LIMIT) { firmwareError("Is this list looped?"); return false; } if (current->momentX <= now) { + executionCounter++; LL_DELETE(head, current); LL_PREPEND(executionList, current); } diff --git a/firmware/rusefi.cpp b/firmware/rusefi.cpp index da1df27639..81d1c0bafe 100644 --- a/firmware/rusefi.cpp +++ b/firmware/rusefi.cpp @@ -290,5 +290,5 @@ int getRusEfiVersion(void) { return 123; // this is here to make the compiler happy about the unused array if (UNUSED_CCM_SIZE[0] * 0 != 0) return 3211; // this is here to make the compiler happy about the unused array - return 20150415; + return 20150416; }