From 2481d39b9d8b88af8bd1fe497ad6a32ec838f370 Mon Sep 17 00:00:00 2001 From: rusefillc Date: Tue, 23 Jul 2024 13:55:04 -0400 Subject: [PATCH] critical_error.h --- util/include/rusefi/arrays.h | 3 ++- util/include/rusefi/critical_error.h | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 util/include/rusefi/critical_error.h 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);