From af5a4c50f578304fb9eabd887bf30e346c08ff71 Mon Sep 17 00:00:00 2001 From: rusefi Date: Sat, 8 Dec 2018 17:19:20 -0500 Subject: [PATCH] 3 hours of my life :( --- firmware/controllers/algo/rusefi_true.h | 21 +++++++++++++++++++++ unit_tests/efifeatures.h | 4 +++- unit_tests/global.h | 2 -- 3 files changed, 24 insertions(+), 3 deletions(-) create mode 100644 firmware/controllers/algo/rusefi_true.h diff --git a/firmware/controllers/algo/rusefi_true.h b/firmware/controllers/algo/rusefi_true.h new file mode 100644 index 0000000000..f00899610d --- /dev/null +++ b/firmware/controllers/algo/rusefi_true.h @@ -0,0 +1,21 @@ +/* + * rusefi_true.h + * + * @date Dec 8, 2018 + * @author Andrey Belomutskiy, (c) 2012-2018 + */ + +#ifndef CONTROLLERS_ALGO_RUSEFI_TRUE_H_ +#define CONTROLLERS_ALGO_RUSEFI_TRUE_H_ + +// we still have a minor mess with headers, this header should better be included as high as possible + +#ifndef FALSE +#define FALSE (0) +#endif /* FALSE */ + +#ifndef TRUE +#define TRUE (!(FALSE)) +#endif /* TRUE */ + +#endif /* CONTROLLERS_ALGO_RUSEFI_TRUE_H_ */ diff --git a/unit_tests/efifeatures.h b/unit_tests/efifeatures.h index 119d4a2083..e6e4d48fd6 100644 --- a/unit_tests/efifeatures.h +++ b/unit_tests/efifeatures.h @@ -2,12 +2,14 @@ * @file efifeatures.h * * @date Mar 7, 2014 - * @author Andrey Belomutskiy, (c) 2012-2017 + * @author Andrey Belomutskiy, (c) 2012-2018 */ #ifndef EFIFEATURES_H_ #define EFIFEATURES_H_ +#include "rusefi_true.h" + #define EFI_ENABLE_ASSERTS TRUE #define SPARK_EXTREME_LOGGING TRUE diff --git a/unit_tests/global.h b/unit_tests/global.h index ee2197f950..c447d1a5f6 100644 --- a/unit_tests/global.h +++ b/unit_tests/global.h @@ -55,8 +55,6 @@ void print(const char *fmt, ...); typedef int bool_t; #define EFI_ERROR_CODE 0xffffffff -#define TRUE 1 -#define FALSE 0 #define CCM_OPTIONAL