mirror of https://github.com/rusefi/rusefi.git
only:minor progress
This commit is contained in:
parent
ab801bceb3
commit
da34743332
|
@ -50,8 +50,8 @@ int getRusEfiVersion(void);
|
|||
#define efiAssert(code, condition, message, result) { if (!(condition)) { firmwareError(code, message); return result; } }
|
||||
#define efiAssertVoid(code, condition, message) { if (!(condition)) { firmwareError(code, message); return; } }
|
||||
#else /* EFI_ENABLE_ASSERTS */
|
||||
#define efiAssert(code, condition, message, result) { }
|
||||
#define efiAssertVoid(code, condition, message) { UNUSED(condition);}
|
||||
#define efiAssert(code, condition, message, result) { UNUSED(code);UNUSED(condition);UNUSED(message);UNUSED(result); }
|
||||
#define efiAssertVoid(code, condition, message) { UNUSED(condition);UNUSED(message);}
|
||||
#endif /* EFI_ENABLE_ASSERTS */
|
||||
|
||||
#define criticalAssert(condition, message, result) efiAssert(ObdCode::OBD_PCM_Processor_Fault, condition, message, result)
|
||||
|
|
|
@ -39,8 +39,6 @@ static bool isTimerPending = false;
|
|||
static int timerCallbackCounter = 0;
|
||||
static int timerRestartCounter = 0;
|
||||
|
||||
static const char * msg;
|
||||
|
||||
static int timerFreezeCounter = 0;
|
||||
static int setHwTimerCounter = 0;
|
||||
static bool hwStarted = false;
|
||||
|
@ -112,7 +110,7 @@ class MicrosecondTimerWatchdogController : public PeriodicTimerController {
|
|||
return;
|
||||
}
|
||||
|
||||
msg = isTimerPending ? "No_cb too long" : "Timer not awhile";
|
||||
const char* msg = isTimerPending ? "No_cb too long" : "Timer not awhile";
|
||||
// 2 seconds of inactivity would not look right
|
||||
efiAssertVoid(ObdCode::CUSTOM_TIMER_WATCHDOG, nowNt < lastSetTimerTimeNt + 2 * CORE_CLOCK, msg);
|
||||
}
|
||||
|
@ -141,7 +139,7 @@ static efitimems_t testSchedulingStart;
|
|||
static void timerValidationCallback(void*) {
|
||||
testSchedulingHappened = true;
|
||||
efitimems_t actualTimeSinceScheduling = (getTimeNowMs() - testSchedulingStart);
|
||||
|
||||
|
||||
if (absI(actualTimeSinceScheduling - TEST_CALLBACK_DELAY) > TEST_CALLBACK_DELAY * TIMER_PRECISION_THRESHOLD) {
|
||||
firmwareError(ObdCode::CUSTOM_ERR_TIMER_TEST_CALLBACK_WRONG_TIME, "hwTimer broken precision: %ld ms", actualTimeSinceScheduling);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue