From bdf278bfe559d46dc3d3996fe6e78f50a22073ef Mon Sep 17 00:00:00 2001 From: rusefi Date: Sun, 21 May 2017 11:09:47 -0400 Subject: [PATCH] better name --- firmware/controllers/system/event_queue.cpp | 6 +++--- firmware/controllers/trigger/trigger_central.cpp | 7 ++++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/firmware/controllers/system/event_queue.cpp b/firmware/controllers/system/event_queue.cpp index 914081b7ce..4581488e1f 100644 --- a/firmware/controllers/system/event_queue.cpp +++ b/firmware/controllers/system/event_queue.cpp @@ -16,7 +16,7 @@ #include "efitime.h" #include "efilib2.h" -int maxHowFarOff = 0; +uint32_t maxSchedulingPrecisionLoss = 0; scheduling_s::scheduling_s() { callback = NULL; @@ -165,8 +165,8 @@ int EventQueue::executeAll(efitime_t now) { efiAssert(current->callback != NULL, "callback==null2", 0); uint32_t before = GET_TIMESTAMP(); current->isScheduled = false; - int howFarOff = now - current->momentX; - maxHowFarOff = maxI(maxHowFarOff, howFarOff); + uint32_t howFarOff = now - current->momentX; + maxSchedulingPrecisionLoss = maxI(maxSchedulingPrecisionLoss, howFarOff); #if EFI_UNIT_TEST || defined(__DOXYGEN__) printf("execute current=%d param=%d\r\n", (long)current, (long)current->param); #endif diff --git a/firmware/controllers/trigger/trigger_central.cpp b/firmware/controllers/trigger/trigger_central.cpp index 47d907401f..5ad8ae7c56 100644 --- a/firmware/controllers/trigger/trigger_central.cpp +++ b/firmware/controllers/trigger/trigger_central.cpp @@ -396,7 +396,7 @@ extern uint32_t maxEventCallbackDuration; extern uint32_t maxPrecisionCallbackDuration; #endif /* EFI_PROD_CODE */ -extern int maxHowFarOff; +extern uint32_t maxSchedulingPrecisionLoss; extern uint32_t *cyccnt; extern int vvtEventRiseCounter; @@ -407,6 +407,8 @@ void resetMaxValues() { maxEventCallbackDuration = triggerMaxDuration = 0; #endif /* EFI_PROD_CODE || EFI_SIMULATOR */ + maxSchedulingPrecisionLoss = 0; + #if EFI_CLOCK_LOCKS || defined(__DOXYGEN__) maxLockedDuration = 0; #endif /* EFI_CLOCK_LOCKS */ @@ -488,8 +490,7 @@ void triggerInfo(void) { scheduleMsg(logger, "primary logic input: %s", hwPortname(boardConfiguration->logicAnalyzerPins[0])); scheduleMsg(logger, "secondary logic input: %s", hwPortname(boardConfiguration->logicAnalyzerPins[1])); - scheduleMsg(logger, "zeroTestTime=%d maxHowFarOff=%d", engine->m.zeroTestTime, maxHowFarOff); - maxHowFarOff = 0; + scheduleMsg(logger, "zeroTestTime=%d maxSchedulingPrecisionLoss=%d", engine->m.zeroTestTime, maxSchedulingPrecisionLoss); scheduleMsg(logger, "advanceLookupTime=%d now=%d fuelCalcTime=%d", engine->m.advanceLookupTime, *cyccnt,