auto-sync
This commit is contained in:
parent
d9d7ffaeae
commit
557eadecfc
|
@ -44,8 +44,10 @@ bool EventQueue::insertTask(scheduling_s *scheduling, efitime_t timeX, schfunc_t
|
||||||
#endif /* EFI_UNIT_TEST */
|
#endif /* EFI_UNIT_TEST */
|
||||||
efiAssert(callback != NULL, "NULL callback", false);
|
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 (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 was %d\r\n", (int)scheduling->momentX);
|
||||||
printf("Already scheduled now %d\r\n", (int)timeX);
|
printf("Already scheduled now %d\r\n", (int)timeX);
|
||||||
#endif /* EFI_UNIT_TEST || EFI_SIMULATOR */
|
#endif /* EFI_UNIT_TEST || EFI_SIMULATOR */
|
||||||
|
@ -163,6 +165,9 @@ int EventQueue::executeAll(efitime_t now) {
|
||||||
current->isScheduled = false;
|
current->isScheduled = false;
|
||||||
int howFarOff = now - current->momentX;
|
int howFarOff = now - current->momentX;
|
||||||
maxHowFarOff = maxI(maxHowFarOff, howFarOff);
|
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);
|
current->callback(current->param);
|
||||||
// even with overflow it's safe to subtract here
|
// even with overflow it's safe to subtract here
|
||||||
lastEventQueueTime = GET_TIMESTAMP() - before;
|
lastEventQueueTime = GET_TIMESTAMP() - before;
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
|
#include "efifeatures.h"
|
||||||
#include "rusefi_enums.h"
|
#include "rusefi_enums.h"
|
||||||
#include "auto_generated_enums.h"
|
#include "auto_generated_enums.h"
|
||||||
#include "obd_error_codes.h"
|
#include "obd_error_codes.h"
|
||||||
|
|
Loading…
Reference in New Issue