only:minor progress

This commit is contained in:
rusefi 2024-04-25 17:45:14 -04:00
parent ab801bceb3
commit da34743332
2 changed files with 4 additions and 6 deletions

View File

@ -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)

View File

@ -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);
}