From bce63b112ae0c79e9d16bfb4b67ec3f74c869a99 Mon Sep 17 00:00:00 2001 From: rusefi Date: Sun, 22 Sep 2019 16:52:22 -0400 Subject: [PATCH] ETB target is using integer values #945 refactoring - ADC mocking is a mess --- firmware/hw_layer/algo/adc_math.h | 3 +-- unit_tests/boards.h | 3 +-- unit_tests/efifeatures.h | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/firmware/hw_layer/algo/adc_math.h b/firmware/hw_layer/algo/adc_math.h index e1f9ae5df6..b722543243 100644 --- a/firmware/hw_layer/algo/adc_math.h +++ b/firmware/hw_layer/algo/adc_math.h @@ -20,7 +20,6 @@ float getVoltage(const char *msg, adc_channel_e channel DECLARE_ENGINE_PARAMETER_SUFFIX); -// DECLARE_ENGINE_PARAMETER_SUFFIX -float getVoltageDivided(const char *msg, adc_channel_e channel); +float getVoltageDivided(const char *msg, adc_channel_e channel DECLARE_ENGINE_PARAMETER_SUFFIX); #endif /* ADC_MATH_H_ */ diff --git a/unit_tests/boards.h b/unit_tests/boards.h index fde5819c0f..579840c2e7 100644 --- a/unit_tests/boards.h +++ b/unit_tests/boards.h @@ -9,11 +9,10 @@ #define BOARDS_H_ #include "engine_configuration.h" +#include "adc_math.h" #define ADC_CHANNEL_VREF 0 -float getVoltageDivided(const char *msg, adc_channel_e channel DECLARE_ENGINE_PARAMETER_SUFFIX); -float getVoltage(const char *msg, adc_channel_e channel DECLARE_ENGINE_PARAMETER_SUFFIX); int getAdcValue(const char *msg, adc_channel_e channel); #endif /* BOARDS_H_ */ diff --git a/unit_tests/efifeatures.h b/unit_tests/efifeatures.h index 4f79e19f19..9e00d3bc6e 100644 --- a/unit_tests/efifeatures.h +++ b/unit_tests/efifeatures.h @@ -20,7 +20,7 @@ #define SPARK_EXTREME_LOGGING TRUE -#define EFI_ENABLE_MOCK_ADC FALSE +#define EFI_ENABLE_MOCK_ADC TRUE #define EFI_ENABLE_CRITICAL_ENGINE_STOP TRUE #define EFI_ENABLE_ENGINE_WARNING TRUE