diff --git a/util/include/rusefi/arrays.h b/util/include/rusefi/arrays.h index 9000675..74e27de 100644 --- a/util/include/rusefi/arrays.h +++ b/util/include/rusefi/arrays.h @@ -4,6 +4,7 @@ #include #include "scaled_channel.h" +#include "critical_error.h" /** * Copies an array from src to dest. The lengths of the arrays must match. @@ -52,7 +53,7 @@ template constexpr void clear(T* obj) { #ifdef WE_HAVE_CRITICAL_ERROR_METHOD if (obj == nullptr) { - criticalError("clear nullptr"); + efiCriticalError("clear nullptr"); return; } #endif // WE_HAVE_CRITICAL_ERROR_METHOD diff --git a/util/include/rusefi/critical_error.h b/util/include/rusefi/critical_error.h new file mode 100644 index 0000000..4d31948 --- /dev/null +++ b/util/include/rusefi/critical_error.h @@ -0,0 +1,4 @@ +#pragma once + +// todo: implement var arg version of this method in main firmware +void efiCriticalError(const char *message);