From 896a55d78e1f03c8cd262f670d2aeb14e4e2bad0 Mon Sep 17 00:00:00 2001 From: rusefillc Date: Mon, 9 Nov 2020 22:53:23 -0500 Subject: [PATCH] GDI Epic #1448 --- firmware/config/boards/skeleton/efifeatures.h | 2 ++ firmware/config/stm32f4ems/efifeatures.h | 2 ++ firmware/controllers/engine_controller.cpp | 2 ++ firmware/controllers/engine_cycle/high_pressure_fuel_pump.cpp | 4 ++++ 4 files changed, 10 insertions(+) diff --git a/firmware/config/boards/skeleton/efifeatures.h b/firmware/config/boards/skeleton/efifeatures.h index 4bf67be177..13adb931c7 100644 --- a/firmware/config/boards/skeleton/efifeatures.h +++ b/firmware/config/boards/skeleton/efifeatures.h @@ -64,6 +64,8 @@ #define EFI_POTENTIOMETER FALSE // MC33816 Programmable Gate Driver over SPI #define EFI_MC33816 FALSE + +#define EFI_HPFP FALSE // MAX31855 Thermocouple interface over SPI #define EFI_MAX_31855 FALSE // MCP3208 ADC over SPI diff --git a/firmware/config/stm32f4ems/efifeatures.h b/firmware/config/stm32f4ems/efifeatures.h index 70dac954f7..29487b322b 100644 --- a/firmware/config/stm32f4ems/efifeatures.h +++ b/firmware/config/stm32f4ems/efifeatures.h @@ -31,6 +31,8 @@ #define EFI_MC33816 TRUE +#define EFI_HPFP TRUE + #define HAL_USE_USB_MSD FALSE #define EFI_ENABLE_CRITICAL_ENGINE_STOP TRUE diff --git a/firmware/controllers/engine_controller.cpp b/firmware/controllers/engine_controller.cpp index 830ad8847e..85e5292315 100644 --- a/firmware/controllers/engine_controller.cpp +++ b/firmware/controllers/engine_controller.cpp @@ -625,7 +625,9 @@ void commonInitEngineController(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_S */ initSparkLogic(sharedLogger); initMainEventListener(sharedLogger PASS_ENGINE_PARAMETER_SUFFIX); +#dif EFI_HPFP initHPFP(PASS_ENGINE_PARAMETER_SIGNATURE); +#endif // EFI_HPFP } #endif /* EFI_ENGINE_CONTROL */ diff --git a/firmware/controllers/engine_cycle/high_pressure_fuel_pump.cpp b/firmware/controllers/engine_cycle/high_pressure_fuel_pump.cpp index ade9b99faf..8274778e15 100644 --- a/firmware/controllers/engine_cycle/high_pressure_fuel_pump.cpp +++ b/firmware/controllers/engine_cycle/high_pressure_fuel_pump.cpp @@ -11,6 +11,8 @@ #include "high_pressure_fuel_pump.h" #include "spark_logic.h" +#if EFI_HPFP + EXTERN_ENGINE ; @@ -73,3 +75,5 @@ void initHPFP(DECLARE_ENGINE_PARAMETER_SIGNATURE) { handle(actor); } } + +#endif // EFI_HPFP