From 557eadecfc4069643887e3866e520e3b9235ac7f Mon Sep 17 00:00:00 2001 From: rusEfi Date: Sat, 24 Sep 2016 01:02:43 -0400 Subject: [PATCH] auto-sync --- firmware/controllers/system/event_queue.cpp | 7 ++++++- win32_functional_tests/simulator/global.h | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/firmware/controllers/system/event_queue.cpp b/firmware/controllers/system/event_queue.cpp index 83d4228b08..7ca163a0c7 100644 --- a/firmware/controllers/system/event_queue.cpp +++ b/firmware/controllers/system/event_queue.cpp @@ -44,8 +44,10 @@ bool EventQueue::insertTask(scheduling_s *scheduling, efitime_t timeX, schfunc_t #endif /* EFI_UNIT_TEST */ efiAssert(callback != NULL, "NULL callback", false); +// please note that simulator does not use this code at all - simulator uses signal_executor_sleep + if (scheduling->isScheduled) { -#if EFI_UNIT_TEST || EFI_SIMULATOR || defined(__DOXYGEN__) +#if EFI_UNIT_TEST || defined(__DOXYGEN__) printf("Already scheduled was %d\r\n", (int)scheduling->momentX); printf("Already scheduled now %d\r\n", (int)timeX); #endif /* EFI_UNIT_TEST || EFI_SIMULATOR */ @@ -163,6 +165,9 @@ int EventQueue::executeAll(efitime_t now) { current->isScheduled = false; int howFarOff = now - current->momentX; maxHowFarOff = maxI(maxHowFarOff, howFarOff); +#if EFI_UNIT_TEST || defined(__DOXYGEN__) + printf("execute %d %d\r\n", (int)current, (int)current->param); +#endif current->callback(current->param); // even with overflow it's safe to subtract here lastEventQueueTime = GET_TIMESTAMP() - before; diff --git a/win32_functional_tests/simulator/global.h b/win32_functional_tests/simulator/global.h index 445f27cc2b..d51a8a9f78 100644 --- a/win32_functional_tests/simulator/global.h +++ b/win32_functional_tests/simulator/global.h @@ -6,6 +6,7 @@ #include #include +#include "efifeatures.h" #include "rusefi_enums.h" #include "auto_generated_enums.h" #include "obd_error_codes.h"