diff --git a/firmware/bootloader/src/dfu.cpp b/firmware/bootloader/src/dfu.cpp index 0f0f1e4447..280a2b01ee 100644 --- a/firmware/bootloader/src/dfu.cpp +++ b/firmware/bootloader/src/dfu.cpp @@ -1,6 +1,6 @@ -#include "global.h" +#include "pch.h" + #include "hardware.h" -#include "efi_gpio.h" #include "flash_int.h" diff --git a/firmware/bootloader/src/main.cpp b/firmware/bootloader/src/main.cpp index d5a2348d8a..01ccc60fe3 100644 --- a/firmware/bootloader/src/main.cpp +++ b/firmware/bootloader/src/main.cpp @@ -1,7 +1,7 @@ -#include "global.h" +#include "pch.h" + #include "hardware.h" -#include "efi_gpio.h" #ifdef __cplusplus extern "C" diff --git a/firmware/config/boards/hellen/hellen121nissan/board_configuration.cpp b/firmware/config/boards/hellen/hellen121nissan/board_configuration.cpp index 77c3fb055f..f8d227d5ce 100644 --- a/firmware/config/boards/hellen/hellen121nissan/board_configuration.cpp +++ b/firmware/config/boards/hellen/hellen121nissan/board_configuration.cpp @@ -10,12 +10,8 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#include "global.h" -#include "engine.h" -#include "engine_math.h" -#include "allsensors.h" +#include "pch.h" #include "fsio_impl.h" -#include "engine_configuration.h" static void hellenWbo() { engineConfiguration->enableAemXSeries = true; diff --git a/firmware/config/boards/hellen/hellen121vag/board_configuration.cpp b/firmware/config/boards/hellen/hellen121vag/board_configuration.cpp index 011d290b22..d2ac85ba1c 100644 --- a/firmware/config/boards/hellen/hellen121vag/board_configuration.cpp +++ b/firmware/config/boards/hellen/hellen121vag/board_configuration.cpp @@ -10,12 +10,8 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#include "global.h" -#include "engine.h" -#include "engine_math.h" -#include "allsensors.h" +#include "pch.h" #include "fsio_impl.h" -#include "engine_configuration.h" static void hellenWbo() { engineConfiguration->enableAemXSeries = true; diff --git a/firmware/config/boards/hellen/hellen128/board_configuration.cpp b/firmware/config/boards/hellen/hellen128/board_configuration.cpp index 20510e8279..8f362848c7 100644 --- a/firmware/config/boards/hellen/hellen128/board_configuration.cpp +++ b/firmware/config/boards/hellen/hellen128/board_configuration.cpp @@ -10,12 +10,8 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#include "global.h" -#include "engine.h" -#include "engine_math.h" -#include "allsensors.h" +#include "pch.h" #include "fsio_impl.h" -#include "engine_configuration.h" static void hellenWbo() { engineConfiguration->enableAemXSeries = true; diff --git a/firmware/config/boards/hellen/hellen64_miataNA6_94/board_configuration.cpp b/firmware/config/boards/hellen/hellen64_miataNA6_94/board_configuration.cpp index 8ec4c6f872..92945b4ea1 100644 --- a/firmware/config/boards/hellen/hellen64_miataNA6_94/board_configuration.cpp +++ b/firmware/config/boards/hellen/hellen64_miataNA6_94/board_configuration.cpp @@ -10,12 +10,8 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#include "global.h" -#include "engine.h" -#include "engine_math.h" -#include "allsensors.h" +#include "pch.h" #include "fsio_impl.h" -#include "engine_configuration.h" static void setInjectorPins() { engineConfiguration->injectionPins[0] = GPIOG_7; diff --git a/firmware/config/boards/hellen/hellen72/board_configuration.cpp b/firmware/config/boards/hellen/hellen72/board_configuration.cpp index e7e5fd1b56..a938a063f5 100644 --- a/firmware/config/boards/hellen/hellen72/board_configuration.cpp +++ b/firmware/config/boards/hellen/hellen72/board_configuration.cpp @@ -10,12 +10,8 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#include "global.h" -#include "engine.h" -#include "engine_math.h" -#include "allsensors.h" +#include "pch.h" #include "fsio_impl.h" -#include "engine_configuration.h" static void hellenWbo() { engineConfiguration->enableAemXSeries = true; diff --git a/firmware/config/boards/microrusefi/board_configuration.cpp b/firmware/config/boards/microrusefi/board_configuration.cpp index b317f489ac..60a20d8145 100644 --- a/firmware/config/boards/microrusefi/board_configuration.cpp +++ b/firmware/config/boards/microrusefi/board_configuration.cpp @@ -18,12 +18,8 @@ * @author Matthew Kennedy, (c) 2019 */ -#include "global.h" -#include "engine.h" -#include "engine_math.h" -#include "allsensors.h" +#include "pch.h" #include "fsio_impl.h" -#include "engine_configuration.h" static void setInjectorPins() { engineConfiguration->injectionPins[0] = TLE8888_PIN_1; diff --git a/firmware/config/boards/nucleo_f767/board_configuration.cpp b/firmware/config/boards/nucleo_f767/board_configuration.cpp index 97ff0f36a5..b5ba5444cd 100644 --- a/firmware/config/boards/nucleo_f767/board_configuration.cpp +++ b/firmware/config/boards/nucleo_f767/board_configuration.cpp @@ -6,12 +6,8 @@ * @author andreika, (c) 2018 */ -#include "global.h" -#include "engine.h" -#include "engine_math.h" -#include "allsensors.h" +#include "pch.h" #include "fsio_impl.h" -#include "engine_configuration.h" // Warning! This is a test config! diff --git a/firmware/config/boards/nucleo_h743/board_configuration.cpp b/firmware/config/boards/nucleo_h743/board_configuration.cpp index b721fd65a8..bebc8f2820 100644 --- a/firmware/config/boards/nucleo_h743/board_configuration.cpp +++ b/firmware/config/boards/nucleo_h743/board_configuration.cpp @@ -1,4 +1,4 @@ -#include "adc_inputs.h" +#include "pch.h" /** * @brief Board-specific pin configuration code overrides. Needed by bootloader code. diff --git a/firmware/config/boards/prometheus/board_configuration.cpp b/firmware/config/boards/prometheus/board_configuration.cpp index 75c99b4a57..2717be565a 100644 --- a/firmware/config/boards/prometheus/board_configuration.cpp +++ b/firmware/config/boards/prometheus/board_configuration.cpp @@ -7,12 +7,8 @@ * @author andreika, (c) 2017 */ -#include "global.h" -#include "engine.h" -#include "engine_math.h" -#include "allsensors.h" +#include "pch.h" #include "fsio_impl.h" -#include "engine_configuration.h" #ifdef STM32F469xx static bool is469 = true; diff --git a/firmware/config/boards/proteus/board_configuration.cpp b/firmware/config/boards/proteus/board_configuration.cpp index c423d6f609..80ecb0b523 100644 --- a/firmware/config/boards/proteus/board_configuration.cpp +++ b/firmware/config/boards/proteus/board_configuration.cpp @@ -6,9 +6,7 @@ * @author Matthew Kennedy, (c) 2019 */ -#include "engine_configuration.h" -#include "engine_math.h" -#include "allsensors.h" +#include "pch.h" #include "fsio_impl.h" static const brain_pin_e injPins[] = { diff --git a/firmware/config/boards/subaru_eg33/board_configuration.cpp b/firmware/config/boards/subaru_eg33/board_configuration.cpp index 60f4bf41f7..39fe3dea38 100644 --- a/firmware/config/boards/subaru_eg33/board_configuration.cpp +++ b/firmware/config/boards/subaru_eg33/board_configuration.cpp @@ -7,12 +7,8 @@ * @author Andrey Gusakov, 2021 */ -#include "global.h" -#include "engine.h" -#include "engine_math.h" -#include "allsensors.h" +#include "pch.h" #include "fsio_impl.h" -#include "engine_configuration.h" #include "smart_gpio.h" #include "drivers/gpio/mc33810.h" diff --git a/firmware/config/engines/GY6_139QMB.cpp b/firmware/config/engines/GY6_139QMB.cpp index 0e82e7f3d8..7b62ea6bfa 100644 --- a/firmware/config/engines/GY6_139QMB.cpp +++ b/firmware/config/engines/GY6_139QMB.cpp @@ -11,11 +11,9 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#include "global.h" +#include "pch.h" + #include "GY6_139QMB.h" -#include "engine_math.h" -#include "engine_configuration.h" -#include "allsensors.h" #include "advance_map.h" static void setDefault139qmbMaps(DECLARE_CONFIG_PARAMETER_SIGNATURE) { diff --git a/firmware/config/engines/bmw_m73_mre.cpp b/firmware/config/engines/bmw_m73_mre.cpp index 9576f5a188..d21201d16e 100644 --- a/firmware/config/engines/bmw_m73_mre.cpp +++ b/firmware/config/engines/bmw_m73_mre.cpp @@ -60,6 +60,8 @@ * */ +#include "pch.h" + #include "bmw_m73.h" #include "fsio_impl.h" diff --git a/firmware/config/engines/chevrolet_camaro_4.cpp b/firmware/config/engines/chevrolet_camaro_4.cpp index 124b1b6a4f..2826b93889 100644 --- a/firmware/config/engines/chevrolet_camaro_4.cpp +++ b/firmware/config/engines/chevrolet_camaro_4.cpp @@ -8,8 +8,9 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ +#include "pch.h" + #include "chevrolet_camaro_4.h" -#include "engine_math.h" #include "custom_engine.h" void setCamaro4(DECLARE_CONFIG_PARAMETER_SIGNATURE) { diff --git a/firmware/config/engines/citroenBerlingoTU3JP.cpp b/firmware/config/engines/citroenBerlingoTU3JP.cpp index 31515dd001..16c59c9bb0 100644 --- a/firmware/config/engines/citroenBerlingoTU3JP.cpp +++ b/firmware/config/engines/citroenBerlingoTU3JP.cpp @@ -9,11 +9,10 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#include "engine_math.h" -#include "thermistors.h" +#include "pch.h" + #include "citroenBerlingoTU3JP.h" #include "custom_engine.h" -#include "settings.h" #if IGN_LOAD_COUNT == DEFAULT_IGN_LOAD_COUNT static const uint8_t default_tps_advance_table[16][16] = { diff --git a/firmware/config/engines/custom_engine.cpp b/firmware/config/engines/custom_engine.cpp index 5e353a28da..2dcddb81cd 100644 --- a/firmware/config/engines/custom_engine.cpp +++ b/firmware/config/engines/custom_engine.cpp @@ -11,10 +11,9 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#include "pin_repository.h" +#include "pch.h" + #include "custom_engine.h" -#include "allsensors.h" -#include "engine_math.h" #include "fsio_impl.h" #if EFI_ELECTRONIC_THROTTLE_BODY diff --git a/firmware/config/engines/dodge_neon.cpp b/firmware/config/engines/dodge_neon.cpp index 9296770527..d0fe8b97af 100644 --- a/firmware/config/engines/dodge_neon.cpp +++ b/firmware/config/engines/dodge_neon.cpp @@ -12,13 +12,9 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#include "global.h" +#include "pch.h" #include "dodge_neon.h" -#include "engine_configuration.h" -#include "thermistors.h" -#include "engine_math.h" -#include "allsensors.h" #include "custom_engine.h" diff --git a/firmware/config/engines/dodge_ram.cpp b/firmware/config/engines/dodge_ram.cpp index 9a8da91f28..2ea3aab549 100644 --- a/firmware/config/engines/dodge_ram.cpp +++ b/firmware/config/engines/dodge_ram.cpp @@ -7,11 +7,10 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#include "global.h" +#include "pch.h" + #include "dodge_ram.h" #include "custom_engine.h" -#include "allsensors.h" -#include "engine_math.h" void setDodgeRam1996(DECLARE_CONFIG_PARAMETER_SIGNATURE) { setFrankensoConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE); diff --git a/firmware/config/engines/ford_1995_inline_6.cpp b/firmware/config/engines/ford_1995_inline_6.cpp index e55275dbc0..05c749c8d7 100644 --- a/firmware/config/engines/ford_1995_inline_6.cpp +++ b/firmware/config/engines/ford_1995_inline_6.cpp @@ -11,10 +11,9 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#include "global.h" +#include "pch.h" + #include "ford_1995_inline_6.h" -#include "engine_math.h" -#include "allsensors.h" /** * @brief Default values for persistent properties diff --git a/firmware/config/engines/ford_aspire.cpp b/firmware/config/engines/ford_aspire.cpp index 88f4e897de..d994fc8b53 100644 --- a/firmware/config/engines/ford_aspire.cpp +++ b/firmware/config/engines/ford_aspire.cpp @@ -9,14 +9,11 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#include "global.h" +#include "pch.h" #include "ford_aspire.h" -#include "allsensors.h" -#include "engine_math.h" #include "advance_map.h" -#include "engine_configuration.h" #if IGN_LOAD_COUNT == DEFAULT_IGN_LOAD_COUNT static const int8_t default_aspire_timing_table[16][16] = { diff --git a/firmware/config/engines/ford_festiva.cpp b/firmware/config/engines/ford_festiva.cpp index a7a9f30881..6a2a7ffb41 100644 --- a/firmware/config/engines/ford_festiva.cpp +++ b/firmware/config/engines/ford_festiva.cpp @@ -11,11 +11,9 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ +#include "pch.h" + #include "ford_festiva.h" -#include "thermistors.h" -#include "engine_math.h" -#include "maf.h" -#include "ego.h" #include "fsio_impl.h" #include "mazda_miata.h" #include "custom_engine.h" diff --git a/firmware/config/engines/honda_600.cpp b/firmware/config/engines/honda_600.cpp index 44d2299000..b232ea0884 100644 --- a/firmware/config/engines/honda_600.cpp +++ b/firmware/config/engines/honda_600.cpp @@ -7,10 +7,10 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ +#include "pch.h" + #include "engine_template.h" #include "honda_600.h" -#include "allsensors.h" -#include "engine_math.h" #include "custom_engine.h" #if EFI_PROD_CODE diff --git a/firmware/config/engines/honda_accord.cpp b/firmware/config/engines/honda_accord.cpp index 146314c84b..8d303fbe91 100644 --- a/firmware/config/engines/honda_accord.cpp +++ b/firmware/config/engines/honda_accord.cpp @@ -27,11 +27,9 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#include "global.h" -#include "thermistors.h" +#include "pch.h" + #include "honda_accord.h" -#include "engine_math.h" -#include "settings.h" #include "advance_map.h" #include "custom_engine.h" diff --git a/firmware/config/engines/lada_kalina.cpp b/firmware/config/engines/lada_kalina.cpp index 7ccbb7f105..a16ebcbfa2 100644 --- a/firmware/config/engines/lada_kalina.cpp +++ b/firmware/config/engines/lada_kalina.cpp @@ -7,6 +7,8 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ +#include "pch.h" + #include "lada_kalina.h" #include "custom_engine.h" #include "fsio_impl.h" diff --git a/firmware/config/engines/mazda_626.cpp b/firmware/config/engines/mazda_626.cpp index 74cbc9b864..229387d045 100644 --- a/firmware/config/engines/mazda_626.cpp +++ b/firmware/config/engines/mazda_626.cpp @@ -7,13 +7,11 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#include "global.h" +#include "pch.h" + #include "mazda_626.h" -#include "engine_math.h" #include "custom_engine.h" -#include "allsensors.h" #include "fsio_impl.h" -#include "settings.h" void setMazda626EngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) { setFrankensoConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE); diff --git a/firmware/config/engines/mazda_miata.cpp b/firmware/config/engines/mazda_miata.cpp index 49a47bf96d..b2b3f18fe5 100644 --- a/firmware/config/engines/mazda_miata.cpp +++ b/firmware/config/engines/mazda_miata.cpp @@ -14,12 +14,11 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#include "global.h" +#include "pch.h" + #include "fsio_impl.h" #include "mazda_miata.h" -#include "engine_math.h" #include "advance_map.h" -#include "allsensors.h" #include "custom_engine.h" diff --git a/firmware/config/engines/mazda_miata_1_6.cpp b/firmware/config/engines/mazda_miata_1_6.cpp index 208f3e8dbd..0fc5775b0a 100644 --- a/firmware/config/engines/mazda_miata_1_6.cpp +++ b/firmware/config/engines/mazda_miata_1_6.cpp @@ -12,9 +12,10 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ +#include "pch.h" + #include "custom_engine.h" #include "fsio_impl.h" -#include "thermistors.h" #include "mazda_miata_1_6.h" #include "mazda_miata_base_maps.h" diff --git a/firmware/config/engines/mazda_miata_base_maps.cpp b/firmware/config/engines/mazda_miata_base_maps.cpp index 455895ec74..be2c363e73 100644 --- a/firmware/config/engines/mazda_miata_base_maps.cpp +++ b/firmware/config/engines/mazda_miata_base_maps.cpp @@ -5,8 +5,7 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#include "engine_configuration.h" -#include "table_helper.h" +#include "pch.h" // todo: use these defaults wider? make them global defaults maybe? static const float hardCodedcrankingFuelBins[8] = {-20.0, -10.0, 3.6799927, 22.77002, 34.049805, 49.95996, 65.0, 90.0}; diff --git a/firmware/config/engines/mazda_miata_custom_hunchback.cpp b/firmware/config/engines/mazda_miata_custom_hunchback.cpp index 75ad5466af..157d38c7fc 100644 --- a/firmware/config/engines/mazda_miata_custom_hunchback.cpp +++ b/firmware/config/engines/mazda_miata_custom_hunchback.cpp @@ -14,11 +14,11 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ +#include "pch.h" + #include "mazda_miata_vvt.h" #include "custom_engine.h" #include "fsio_impl.h" -#include "ego.h" -#include "thermistors.h" // todo: why would this not work? //extern const float mazda_miata_nb2_RpmBins[FUEL_RPM_COUNT]; diff --git a/firmware/config/engines/mazda_miata_nb.cpp b/firmware/config/engines/mazda_miata_nb.cpp index 1a10332ed3..ed7272f8eb 100644 --- a/firmware/config/engines/mazda_miata_nb.cpp +++ b/firmware/config/engines/mazda_miata_nb.cpp @@ -12,8 +12,9 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ +#include "pch.h" + #include "mazda_miata_nb.h" -#include "thermistors.h" void setMazdaMiataNb1EngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) { setDefaultFrankensoConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE); diff --git a/firmware/config/engines/mazda_miata_vvt.cpp b/firmware/config/engines/mazda_miata_vvt.cpp index f765fbf359..27e7bab9b2 100644 --- a/firmware/config/engines/mazda_miata_vvt.cpp +++ b/firmware/config/engines/mazda_miata_vvt.cpp @@ -46,11 +46,11 @@ * idle solenoid PC13 on middle harness plug. diodes seem to be in the harness */ +#include "pch.h" + #include "mazda_miata_vvt.h" #include "custom_engine.h" #include "fsio_impl.h" -#include "ego.h" -#include "thermistors.h" #include "mazda_miata_base_maps.h" #include "hip9011_logic.h" diff --git a/firmware/config/engines/me7pnp.cpp b/firmware/config/engines/me7pnp.cpp index e33e764b30..b44ccf9e68 100644 --- a/firmware/config/engines/me7pnp.cpp +++ b/firmware/config/engines/me7pnp.cpp @@ -5,13 +5,10 @@ * Author: Ola */ -#include "me7pnp.h" +#include "pch.h" -#include "engine.h" -#include "engine_math.h" -#include "allsensors.h" +#include "me7pnp.h" #include "fsio_impl.h" -#include "engine_configuration.h" #include "cj125.h" /** diff --git a/firmware/config/engines/mitsubishi.cpp b/firmware/config/engines/mitsubishi.cpp index 6e2d80fce7..c9569ae6b1 100644 --- a/firmware/config/engines/mitsubishi.cpp +++ b/firmware/config/engines/mitsubishi.cpp @@ -9,10 +9,10 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#include "global.h" +#include "pch.h" + #include "fsio_impl.h" #include "mitsubishi.h" -#include "allsensors.h" void setMitsubishiConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) { setDefaultFrankensoConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE); diff --git a/firmware/config/engines/nissan_primera.cpp b/firmware/config/engines/nissan_primera.cpp index c9a494d5b2..09bffb3bce 100644 --- a/firmware/config/engines/nissan_primera.cpp +++ b/firmware/config/engines/nissan_primera.cpp @@ -8,7 +8,7 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#include "global.h" +#include "pch.h" #include "nissan_primera.h" diff --git a/firmware/config/engines/sachs.cpp b/firmware/config/engines/sachs.cpp index d920eb64c1..8f39e2e284 100644 --- a/firmware/config/engines/sachs.cpp +++ b/firmware/config/engines/sachs.cpp @@ -8,9 +8,9 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ +#include "pch.h" + #include "sachs.h" -#include "allsensors.h" -#include "engine_math.h" void setSachs(DECLARE_CONFIG_PARAMETER_SIGNATURE) { setDefaultFrankensoConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE); diff --git a/firmware/config/engines/subaru.cpp b/firmware/config/engines/subaru.cpp index 6f3f516987..57adc33c93 100644 --- a/firmware/config/engines/subaru.cpp +++ b/firmware/config/engines/subaru.cpp @@ -8,9 +8,10 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ +#include "pch.h" + #include "subaru.h" #include "custom_engine.h" -#include "allsensors.h" void setSubaru2003Wrx(DECLARE_CONFIG_PARAMETER_SIGNATURE) { setFrankenso_01_LCD(engineConfiguration); diff --git a/firmware/config/engines/test_engine.cpp b/firmware/config/engines/test_engine.cpp index 8834560c6e..8303757405 100644 --- a/firmware/config/engines/test_engine.cpp +++ b/firmware/config/engines/test_engine.cpp @@ -11,9 +11,8 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#include "engine_configuration.h" +#include "pch.h" #include "test_engine.h" -#include "engine_math.h" // TEST_ENGINE void setTestEngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) { diff --git a/firmware/config/engines/toyota_jzs147.cpp b/firmware/config/engines/toyota_jzs147.cpp index 28bce0bf61..954bb079d0 100644 --- a/firmware/config/engines/toyota_jzs147.cpp +++ b/firmware/config/engines/toyota_jzs147.cpp @@ -17,9 +17,10 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ +#include "pch.h" + #include "toyota_jzs147.h" #include "custom_engine.h" -#include "thermistors.h" #include "mazda_miata_vvt.h" static void common2jz(DECLARE_CONFIG_PARAMETER_SIGNATURE) { diff --git a/firmware/config/engines/vw.cpp b/firmware/config/engines/vw.cpp index 3dfd452c04..c34f479269 100644 --- a/firmware/config/engines/vw.cpp +++ b/firmware/config/engines/vw.cpp @@ -7,11 +7,10 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#include "global.h" +#include "pch.h" + #include "vw.h" #include "custom_engine.h" -#include "ego.h" -#include "engine_math.h" // VW_ABA // set engine_type 32 diff --git a/firmware/config/engines/vw_b6.cpp b/firmware/config/engines/vw_b6.cpp index 8ecd45ba89..a442064828 100644 --- a/firmware/config/engines/vw_b6.cpp +++ b/firmware/config/engines/vw_b6.cpp @@ -5,11 +5,11 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#include "engine.h" +#include "pch.h" + #include "vw_b6.h" #include "custom_engine.h" #include "table_helper.h" -#include "map.h" /** * set engine_type 62 diff --git a/firmware/console/binary/bluetooth.cpp b/firmware/console/binary/bluetooth.cpp index 51d09014e9..f5fc80aba3 100644 --- a/firmware/console/binary/bluetooth.cpp +++ b/firmware/console/binary/bluetooth.cpp @@ -10,14 +10,13 @@ * @author andreika, (c) 2017 */ -#include "global.h" +#include "pch.h" + #include "os_access.h" -#include "allsensors.h" #include "tunerstudio.h" #include "tunerstudio_io.h" #include "bluetooth.h" -#include "engine_configuration.h" #include "thread_priority.h" #if EFI_BLUETOOTH_SETUP diff --git a/firmware/console/binary/serial_can.cpp b/firmware/console/binary/serial_can.cpp index 3d637c958d..5535afe263 100644 --- a/firmware/console/binary/serial_can.cpp +++ b/firmware/console/binary/serial_can.cpp @@ -10,7 +10,7 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#include "global.h" +#include "pch.h" #include "os_access.h" #include "serial_can.h" diff --git a/firmware/console/binary/signature.cpp b/firmware/console/binary/signature.cpp index 796e9aca63..dd12a94297 100644 --- a/firmware/console/binary/signature.cpp +++ b/firmware/console/binary/signature.cpp @@ -29,7 +29,7 @@ #define SIGNATURE_H QUOTE(SIGNATURE_NAME SHORT_BOARD_NAME SIGNATURE_EXT) #if !EFI_UNIT_TEST -#include SIGNATURE_H +#include "signature_proteus_f4.h" #pragma message ("TS_SIGNATURE: " TS_SIGNATURE) diff --git a/firmware/console/binary/tooth_logger.cpp b/firmware/console/binary/tooth_logger.cpp index 9215d3c322..32a8a5d0ce 100644 --- a/firmware/console/binary/tooth_logger.cpp +++ b/firmware/console/binary/tooth_logger.cpp @@ -5,18 +5,12 @@ * @author Matthew Kennedy */ +#include "pch.h" + #include "tooth_logger.h" -#include "global.h" -#include "perf_trace.h" - #if EFI_TOOTH_LOGGER -#include -#include "efitime.h" -#include "efilib.h" -#include "tunerstudio_outputs.h" - typedef struct __attribute__ ((packed)) { uint16_t timestamp; } tooth_logger_s; diff --git a/firmware/console/binary/tooth_logger.h b/firmware/console/binary/tooth_logger.h index 5c91d0c53d..b8c17810b6 100644 --- a/firmware/console/binary/tooth_logger.h +++ b/firmware/console/binary/tooth_logger.h @@ -7,11 +7,7 @@ #pragma once -#include -#include -#include "efitime.h" #include "rusefi_enums.h" -#include "engine.h" #if EFI_UNIT_TEST #include "logicdata.h" diff --git a/firmware/console/binary/tunerstudio.cpp b/firmware/console/binary/tunerstudio.cpp index 021cc0da2d..761e16d10e 100644 --- a/firmware/console/binary/tunerstudio.cpp +++ b/firmware/console/binary/tunerstudio.cpp @@ -59,10 +59,9 @@ * */ -#include "global.h" +#include "pch.h" #include "os_access.h" -#include "allsensors.h" #include "tunerstudio.h" #include "tunerstudio_impl.h" @@ -70,7 +69,6 @@ #include "flash_main.h" #include "tunerstudio_io.h" -#include "tunerstudio_outputs.h" #include "malfunction_central.h" #include "console_io.h" #include "crc.h" @@ -80,13 +78,11 @@ #include "electronic_throttle.h" #include -#include "engine_configuration.h" #include "bench_test.h" #include "svnversion.h" #include "loggingcentral.h" #include "status_loop.h" #include "mmc_card.h" -#include "perf_trace.h" #include "thread_priority.h" #include "signature.h" diff --git a/firmware/console/binary/tunerstudio_commands.cpp b/firmware/console/binary/tunerstudio_commands.cpp index 63c13934eb..2b55109b0b 100644 --- a/firmware/console/binary/tunerstudio_commands.cpp +++ b/firmware/console/binary/tunerstudio_commands.cpp @@ -1,4 +1,4 @@ -#include "global.h" +#include "pch.h" #include "tunerstudio_impl.h" #include "tunerstudio.h" diff --git a/firmware/console/binary/tunerstudio_io.cpp b/firmware/console/binary/tunerstudio_io.cpp index b272940395..57814d480c 100644 --- a/firmware/console/binary/tunerstudio_io.cpp +++ b/firmware/console/binary/tunerstudio_io.cpp @@ -5,7 +5,7 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#include "engine.h" +#include "pch.h" #include "os_access.h" #include "tunerstudio_io.h" diff --git a/firmware/console/binary_log/binary_logging.cpp b/firmware/console/binary_log/binary_logging.cpp index 08267119fd..9c7a1098bb 100644 --- a/firmware/console/binary_log/binary_logging.cpp +++ b/firmware/console/binary_log/binary_logging.cpp @@ -3,11 +3,10 @@ * See also mlq_file_format.txt */ +#include "pch.h" + #include "binary_logging.h" -#include "tunerstudio_outputs.h" #include "log_field.h" -#include "efilib.h" -#include "efitime.h" #include "crc.h" #include "buffered_writer.h" diff --git a/firmware/console/console_io.cpp b/firmware/console/console_io.cpp index 3433297981..09c46733d0 100644 --- a/firmware/console/console_io.cpp +++ b/firmware/console/console_io.cpp @@ -34,7 +34,8 @@ * If not, see . */ -#include "engine.h" +#include "pch.h" + #include "console_io.h" #include "os_util.h" #include "tunerstudio.h" diff --git a/firmware/console/eficonsole.cpp b/firmware/console/eficonsole.cpp index 5057604e16..93c8c30f9f 100644 --- a/firmware/console/eficonsole.cpp +++ b/firmware/console/eficonsole.cpp @@ -21,7 +21,8 @@ * If not, see . */ -#include "globalaccess.h" +#include "pch.h" + #include "os_access.h" #include "eficonsole.h" #include "console_io.h" diff --git a/firmware/console/status_loop.cpp b/firmware/console/status_loop.cpp index c87c09f1ad..ef3882affd 100644 --- a/firmware/console/status_loop.cpp +++ b/firmware/console/status_loop.cpp @@ -28,7 +28,6 @@ #include "status_loop.h" #include "hip9011_logic.h" -#include "adc_inputs.h" #if EFI_LOGIC_ANALYZER #include "logic_analyzer.h" #endif /* EFI_LOGIC_ANALYZER */ diff --git a/firmware/console/usb_console.cpp b/firmware/console/usb_console.cpp index 7ceb63d823..395c4a214e 100644 --- a/firmware/console/usb_console.cpp +++ b/firmware/console/usb_console.cpp @@ -1,4 +1,4 @@ -#include "global.h" +#include "pch.h" #if EFI_USB_SERIAL diff --git a/firmware/controllers/actuators/alternator_controller.h b/firmware/controllers/actuators/alternator_controller.h index 4c018c5375..c13e7231c1 100644 --- a/firmware/controllers/actuators/alternator_controller.h +++ b/firmware/controllers/actuators/alternator_controller.h @@ -10,7 +10,6 @@ #pragma once -#include "engine.h" void initAlternatorCtrl(); void startAlternatorPin(void); void stopAlternatorPin(void); diff --git a/firmware/controllers/actuators/boost_control.h b/firmware/controllers/actuators/boost_control.h index add39d2577..6b39773583 100644 --- a/firmware/controllers/actuators/boost_control.h +++ b/firmware/controllers/actuators/boost_control.h @@ -6,7 +6,6 @@ */ #pragma once -#include "engine.h" #include "periodic_task.h" #include "closed_loop_controller.h" #include "pid.h" diff --git a/firmware/controllers/actuators/dc_motors.h b/firmware/controllers/actuators/dc_motors.h index 56ec8f5ab1..912219fb69 100644 --- a/firmware/controllers/actuators/dc_motors.h +++ b/firmware/controllers/actuators/dc_motors.h @@ -8,7 +8,6 @@ #pragma once #include -#include "global.h" class DcMotor; diff --git a/firmware/controllers/actuators/idle_hardware.h b/firmware/controllers/actuators/idle_hardware.h index ab41422e56..e0f3b693a0 100644 --- a/firmware/controllers/actuators/idle_hardware.h +++ b/firmware/controllers/actuators/idle_hardware.h @@ -9,8 +9,6 @@ #pragma once -#include "engine.h" - void initIdleHardware(DECLARE_ENGINE_PARAMETER_SIGNATURE); bool isIdleHardwareRestartNeeded(); bool isIdleMotorBusy(DECLARE_ENGINE_PARAMETER_SIGNATURE); diff --git a/firmware/controllers/algo/accel_enrichment.h b/firmware/controllers/algo/accel_enrichment.h index 2856078e2b..532ad49cbf 100644 --- a/firmware/controllers/algo/accel_enrichment.h +++ b/firmware/controllers/algo/accel_enrichment.h @@ -9,7 +9,6 @@ #pragma once -#include "global.h" #include "cyclic_buffer.h" #include "table_helper.h" #include "wall_fuel_generated.h" diff --git a/firmware/controllers/algo/advance_map.h b/firmware/controllers/algo/advance_map.h index 1ee6680128..2f37a18a10 100644 --- a/firmware/controllers/algo/advance_map.h +++ b/firmware/controllers/algo/advance_map.h @@ -7,8 +7,6 @@ #pragma once -#include "engine.h" - angle_t getAdvance(int rpm, float engineLoad DECLARE_ENGINE_PARAMETER_SUFFIX); void initTimingMap(DECLARE_ENGINE_PARAMETER_SIGNATURE); float getTopAdvanceForBore(chamber_style_e style, int octane, double compression, double bore); diff --git a/firmware/controllers/algo/airmass/airmass.h b/firmware/controllers/algo/airmass/airmass.h index bf6791ef17..dc71cf3bba 100644 --- a/firmware/controllers/algo/airmass/airmass.h +++ b/firmware/controllers/algo/airmass/airmass.h @@ -1,7 +1,5 @@ #pragma once -#include "engine.h" - class ValueProvider3D; struct AirmassResult { diff --git a/firmware/controllers/algo/airmass/speed_density_base.cpp b/firmware/controllers/algo/airmass/speed_density_base.cpp index d54aae04de..37e0ef5314 100644 --- a/firmware/controllers/algo/airmass/speed_density_base.cpp +++ b/firmware/controllers/algo/airmass/speed_density_base.cpp @@ -7,7 +7,7 @@ * @author Matthew Kennedy, (C) 2020 */ -#include "global.h" +#include "pch.h" #include "speed_density_base.h" /** diff --git a/firmware/controllers/algo/engine2.cpp b/firmware/controllers/algo/engine2.cpp index 90fefc6e83..82a3b08dcd 100644 --- a/firmware/controllers/algo/engine2.cpp +++ b/firmware/controllers/algo/engine2.cpp @@ -8,7 +8,7 @@ // todo: move this code to more proper locations #include "pch.h" -#include "thermistors.h" + #include "speed_density.h" #include "fuel_math.h" #include "advance_map.h" diff --git a/firmware/controllers/algo/engine_parts.h b/firmware/controllers/algo/engine_parts.h index d2041ea7ca..f7507997a3 100644 --- a/firmware/controllers/algo/engine_parts.h +++ b/firmware/controllers/algo/engine_parts.h @@ -7,8 +7,6 @@ #pragma once -#include "global.h" -#include "engine_configuration_generated_structures.h" #include "cyclic_buffer.h" #include "timer.h" diff --git a/firmware/controllers/algo/fuel/fuel_computer.cpp b/firmware/controllers/algo/fuel/fuel_computer.cpp index 95a5f32db1..1143927426 100644 --- a/firmware/controllers/algo/fuel/fuel_computer.cpp +++ b/firmware/controllers/algo/fuel/fuel_computer.cpp @@ -1,5 +1,6 @@ +#include "pch.h" + #include "fuel_computer.h" -#include "map.h" mass_t FuelComputerBase::getCycleFuel(mass_t airmass, int rpm, float load) const { load = getTargetLambdaLoadAxis(load); diff --git a/firmware/controllers/algo/fuel/fuel_computer.h b/firmware/controllers/algo/fuel/fuel_computer.h index f3893a3958..04a69688e2 100644 --- a/firmware/controllers/algo/fuel/fuel_computer.h +++ b/firmware/controllers/algo/fuel/fuel_computer.h @@ -1,7 +1,5 @@ #pragma once -#include "engine.h" - class ValueProvider3D; using mass_t = float; diff --git a/firmware/controllers/algo/fuel/injector_model.h b/firmware/controllers/algo/fuel/injector_model.h index 037911f972..1fdce380fb 100644 --- a/firmware/controllers/algo/fuel/injector_model.h +++ b/firmware/controllers/algo/fuel/injector_model.h @@ -1,6 +1,5 @@ #pragma once -#include "engine.h" #include "expected.h" struct IInjectorModel { diff --git a/firmware/controllers/algo/nmea.cpp b/firmware/controllers/algo/nmea.cpp index b4e71ed70d..26dd5870b8 100644 --- a/firmware/controllers/algo/nmea.cpp +++ b/firmware/controllers/algo/nmea.cpp @@ -19,7 +19,7 @@ * * see #testGpsParser */ -#include "global.h" +#include "pch.h" #include #include "nmea.h" diff --git a/firmware/controllers/algo/runtime_state.cpp b/firmware/controllers/algo/runtime_state.cpp index 6cc996858e..6aef5b8a38 100644 --- a/firmware/controllers/algo/runtime_state.cpp +++ b/firmware/controllers/algo/runtime_state.cpp @@ -5,7 +5,7 @@ * @author Andrey Belomutskiy, (c) 2012-2021 */ -#include "global.h" +#include "pch.h" #include "runtime_state.h" // todo: revive implementation! we shall measure how far is actual execution timestamp from desired execution timestamp diff --git a/firmware/controllers/can/obd2.cpp b/firmware/controllers/can/obd2.cpp index 38b0ad47c3..c77eb9f389 100644 --- a/firmware/controllers/can/obd2.cpp +++ b/firmware/controllers/can/obd2.cpp @@ -30,7 +30,6 @@ #include "can_msg_tx.h" #include "vehicle_speed.h" #include "fuel_math.h" -#include "thermistors.h" static const int16_t supportedPids0120[] = { PID_MONITOR_STATUS, diff --git a/firmware/controllers/can/obd2.h b/firmware/controllers/can/obd2.h index 167937a3d6..931f36b9a0 100644 --- a/firmware/controllers/can/obd2.h +++ b/firmware/controllers/can/obd2.h @@ -7,8 +7,6 @@ #pragma once -#include "global.h" - #define OBD_TEST_REQUEST 0x7DF #define OBD_TEST_RESPONSE 0x7E8 diff --git a/firmware/controllers/core/common_headers.h b/firmware/controllers/core/common_headers.h index f814abb824..85dff6ca8d 100644 --- a/firmware/controllers/core/common_headers.h +++ b/firmware/controllers/core/common_headers.h @@ -21,7 +21,6 @@ #include #include -#include "error_handling.h" #include "auto_generated_enums.h" #include "auto_generated_commonenum.h" #include "efilib.h" diff --git a/firmware/controllers/core/error_handling.h b/firmware/controllers/core/error_handling.h index 47bc63f9fe..3c65b19233 100644 --- a/firmware/controllers/core/error_handling.h +++ b/firmware/controllers/core/error_handling.h @@ -7,7 +7,6 @@ #pragma once -#include "global.h" #include "obd_error_codes.h" #ifdef __cplusplus diff --git a/firmware/controllers/core/fsio_core.cpp b/firmware/controllers/core/fsio_core.cpp index 195f8c6275..9b04d0d5b8 100644 --- a/firmware/controllers/core/fsio_core.cpp +++ b/firmware/controllers/core/fsio_core.cpp @@ -13,7 +13,7 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#include "global.h" +#include "pch.h" #if EFI_FSIO #include "os_access.h" diff --git a/firmware/controllers/core/fsio_core.h b/firmware/controllers/core/fsio_core.h index b18a2f4276..4e83c23426 100644 --- a/firmware/controllers/core/fsio_core.h +++ b/firmware/controllers/core/fsio_core.h @@ -7,9 +7,6 @@ #pragma once -#include "engine.h" -#include "fl_stack.h" - #define MAX_TABLE_INDEX 4 typedef enum { diff --git a/firmware/controllers/core/fsio_impl.h b/firmware/controllers/core/fsio_impl.h index 76ddda2d37..b418bb88d0 100644 --- a/firmware/controllers/core/fsio_impl.h +++ b/firmware/controllers/core/fsio_impl.h @@ -10,8 +10,6 @@ #include "fsio_core.h" #include "expected.h" -#include "engine.h" -#include "table_helper.h" #include "system_fsio.h" // see useFSIO4ForSeriousEngineWarning diff --git a/firmware/controllers/core/state_sequence.cpp b/firmware/controllers/core/state_sequence.cpp index 0c71a2591b..b9d08adac9 100644 --- a/firmware/controllers/core/state_sequence.cpp +++ b/firmware/controllers/core/state_sequence.cpp @@ -5,7 +5,7 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#include "global.h" +#include "pch.h" #include "state_sequence.h" #include "trigger_structure.h" diff --git a/firmware/controllers/engine_controller.cpp b/firmware/controllers/engine_controller.cpp index 0e1bbb44e4..198493bc64 100644 --- a/firmware/controllers/engine_controller.cpp +++ b/firmware/controllers/engine_controller.cpp @@ -83,8 +83,6 @@ #include "init.h" #endif /* EFI_UNIT_TEST */ -#include "adc_inputs.h" - #if EFI_PROD_CODE #include "pwm_tester.h" #include "lcd_controller.h" diff --git a/firmware/controllers/engine_controller.h b/firmware/controllers/engine_controller.h index 1b21d431f4..eaf587a211 100644 --- a/firmware/controllers/engine_controller.h +++ b/firmware/controllers/engine_controller.h @@ -8,8 +8,6 @@ #pragma once -#include "engine.h" - char * getPinNameByAdcChannel(const char *msg, adc_channel_e hwChannel, char *buffer); void initPeriodicEvents(DECLARE_ENGINE_PARAMETER_SIGNATURE); void initEngineContoller(DECLARE_ENGINE_PARAMETER_SIGNATURE); @@ -31,4 +29,3 @@ void setMockIatVoltage(float voltage DECLARE_ENGINE_PARAMETER_SUFFIX); void setMockCltVoltage(float voltage DECLARE_ENGINE_PARAMETER_SUFFIX); void printCurrentState(Logging *logging, int seconds, const char *engineTypeName, const char *firmwareBuildId); - diff --git a/firmware/controllers/engine_cycle/aux_valves.h b/firmware/controllers/engine_cycle/aux_valves.h index 6748f1ae58..b581bf0d35 100644 --- a/firmware/controllers/engine_cycle/aux_valves.h +++ b/firmware/controllers/engine_cycle/aux_valves.h @@ -7,8 +7,6 @@ #pragma once -#include "engine.h" - void initAuxValves(DECLARE_ENGINE_PARAMETER_SIGNATURE); void recalculateAuxValveTiming(DECLARE_ENGINE_PARAMETER_SIGNATURE); void auxPlainPinTurnOn(AuxActor *current); diff --git a/firmware/controllers/engine_cycle/high_pressure_fuel_pump.cpp b/firmware/controllers/engine_cycle/high_pressure_fuel_pump.cpp index 9c52c0dcf2..cee0fa30cc 100644 --- a/firmware/controllers/engine_cycle/high_pressure_fuel_pump.cpp +++ b/firmware/controllers/engine_cycle/high_pressure_fuel_pump.cpp @@ -8,10 +8,10 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#include "pin_repository.h" +#include "pch.h" + #include "high_pressure_fuel_pump.h" #include "spark_logic.h" -#include "map.h" #if EFI_HPFP diff --git a/firmware/controllers/engine_cycle/high_pressure_fuel_pump.h b/firmware/controllers/engine_cycle/high_pressure_fuel_pump.h index e6103e8912..50003abff2 100644 --- a/firmware/controllers/engine_cycle/high_pressure_fuel_pump.h +++ b/firmware/controllers/engine_cycle/high_pressure_fuel_pump.h @@ -7,6 +7,4 @@ #pragma once -#include "engine.h" - void initHPFP(DECLARE_ENGINE_PARAMETER_SIGNATURE); diff --git a/firmware/controllers/engine_cycle/main_trigger_callback.h b/firmware/controllers/engine_cycle/main_trigger_callback.h index 4fc6d235a2..6fa9567c61 100644 --- a/firmware/controllers/engine_cycle/main_trigger_callback.h +++ b/firmware/controllers/engine_cycle/main_trigger_callback.h @@ -9,8 +9,6 @@ #pragma once -#include "engine.h" - #include "event_registry.h" void initMainEventListener(DECLARE_ENGINE_PARAMETER_SIGNATURE); diff --git a/firmware/controllers/engine_cycle/map_averaging.cpp b/firmware/controllers/engine_cycle/map_averaging.cpp index 71cd804a40..870c1f2514 100644 --- a/firmware/controllers/engine_cycle/map_averaging.cpp +++ b/firmware/controllers/engine_cycle/map_averaging.cpp @@ -29,7 +29,6 @@ #include "map_averaging.h" #include "trigger_central.h" -#include "adc_inputs.h" #if EFI_SENSOR_CHART #include "sensor_chart.h" diff --git a/firmware/controllers/engine_cycle/map_averaging.h b/firmware/controllers/engine_cycle/map_averaging.h index 55d02cca2c..05c07457ba 100644 --- a/firmware/controllers/engine_cycle/map_averaging.h +++ b/firmware/controllers/engine_cycle/map_averaging.h @@ -7,8 +7,6 @@ #pragma once -#include "engine.h" - #if EFI_MAP_AVERAGING #if HAL_USE_ADC diff --git a/firmware/controllers/engine_cycle/spark_logic.h b/firmware/controllers/engine_cycle/spark_logic.h index 2391d7d12b..345dc83697 100644 --- a/firmware/controllers/engine_cycle/spark_logic.h +++ b/firmware/controllers/engine_cycle/spark_logic.h @@ -7,8 +7,6 @@ #pragma once -#include "engine.h" - void onTriggerEventSparkLogic(bool limitedSpark, uint32_t trgEventIndex, int rpm, efitick_t edgeTimestamp DECLARE_ENGINE_PARAMETER_SUFFIX); void turnSparkPinHigh(IgnitionEvent *event); void fireSparkAndPrepareNextSchedule(IgnitionEvent *event); diff --git a/firmware/controllers/flash_main.h b/firmware/controllers/flash_main.h index 48ab7436de..1667dfc5dc 100644 --- a/firmware/controllers/flash_main.h +++ b/firmware/controllers/flash_main.h @@ -8,8 +8,6 @@ #pragma once -#include "engine.h" - void readFromFlash(); void initFlash(); diff --git a/firmware/controllers/gauges/malfunction_central.cpp b/firmware/controllers/gauges/malfunction_central.cpp index 7e93680884..f3dc3a4900 100644 --- a/firmware/controllers/gauges/malfunction_central.cpp +++ b/firmware/controllers/gauges/malfunction_central.cpp @@ -8,6 +8,8 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ +#include "pch.h" + #include "malfunction_central.h" static error_codes_set_s error_codes_set; diff --git a/firmware/controllers/gauges/malfunction_central.h b/firmware/controllers/gauges/malfunction_central.h index 0e88d9795a..e77fdc1374 100644 --- a/firmware/controllers/gauges/malfunction_central.h +++ b/firmware/controllers/gauges/malfunction_central.h @@ -8,7 +8,6 @@ #pragma once -#include "global.h" #include "obd_error_codes.h" #define MAX_ERROR_CODES_COUNT 10 diff --git a/firmware/controllers/gauges/malfunction_indicator.h b/firmware/controllers/gauges/malfunction_indicator.h index b6dc14581f..85d4352f49 100644 --- a/firmware/controllers/gauges/malfunction_indicator.h +++ b/firmware/controllers/gauges/malfunction_indicator.h @@ -10,8 +10,6 @@ #pragma once -#include "engine.h" - #if EFI_MALFUNCTION_INDICATOR bool isMilEnabled(); diff --git a/firmware/controllers/gauges/tachometer.h b/firmware/controllers/gauges/tachometer.h index a3574f693d..87be69aa47 100644 --- a/firmware/controllers/gauges/tachometer.h +++ b/firmware/controllers/gauges/tachometer.h @@ -7,7 +7,5 @@ #pragma once -#include "engine.h" - void initTachometer(DECLARE_ENGINE_PARAMETER_SIGNATURE); void tachSignalCallback(DECLARE_ENGINE_PARAMETER_SIGNATURE); diff --git a/firmware/controllers/lua/lua_hooks.cpp b/firmware/controllers/lua/lua_hooks.cpp index 5e6bb893df..c02e5c3601 100644 --- a/firmware/controllers/lua/lua_hooks.cpp +++ b/firmware/controllers/lua/lua_hooks.cpp @@ -4,7 +4,6 @@ #include "lua_hooks.h" #include "loggingcentral.h" -#include "adc_inputs.h" #include "fuel_math.h" #include "airmass.h" #include "lua_airmass.h" diff --git a/firmware/controllers/math/closed_loop_fuel.h b/firmware/controllers/math/closed_loop_fuel.h index a77b586969..94cb4d4c97 100644 --- a/firmware/controllers/math/closed_loop_fuel.h +++ b/firmware/controllers/math/closed_loop_fuel.h @@ -1,9 +1,5 @@ #pragma once -#include "engine_ptr.h" -#include "sensor.h" -#include "rusefi_generated.h" - struct stft_s; struct ClosedLoopFuelResult { diff --git a/firmware/controllers/math/engine_math.h b/firmware/controllers/math/engine_math.h index 0e4486a421..478e3f6267 100644 --- a/firmware/controllers/math/engine_math.h +++ b/firmware/controllers/math/engine_math.h @@ -7,11 +7,7 @@ #pragma once -#include "engine_configuration.h" - #include "trigger_structure.h" -#include "table_helper.h" -#include "engine.h" void setAlgorithm(engine_load_mode_e algo DECLARE_CONFIG_PARAMETER_SUFFIX); diff --git a/firmware/controllers/math/speed_density.h b/firmware/controllers/math/speed_density.h index 5654314f53..d8ced7cc08 100644 --- a/firmware/controllers/math/speed_density.h +++ b/firmware/controllers/math/speed_density.h @@ -7,7 +7,6 @@ #pragma once -#include "engine.h" #include "airmass.h" #include "speed_density_base.h" diff --git a/firmware/controllers/sensors/Lps25Sensor.cpp b/firmware/controllers/sensors/Lps25Sensor.cpp index 113921b83e..669229b5a2 100644 --- a/firmware/controllers/sensors/Lps25Sensor.cpp +++ b/firmware/controllers/sensors/Lps25Sensor.cpp @@ -2,8 +2,9 @@ * @file Lps25Sensor.cpp */ +#include "pch.h" + #include "Lps25Sensor.h" -#include "global.h" Lps25Sensor::Lps25Sensor(Lps25& sensor) : StoredValueSensor(SensorType::BarometricPressure, MS2NT(1000)) diff --git a/firmware/controllers/sensors/converters/linear_func.cpp b/firmware/controllers/sensors/converters/linear_func.cpp index 11aa63dccc..afff57f5a0 100644 --- a/firmware/controllers/sensors/converters/linear_func.cpp +++ b/firmware/controllers/sensors/converters/linear_func.cpp @@ -1,6 +1,6 @@ -#include "linear_func.h" +#include "pch.h" -#include "interpolation.h" +#include "linear_func.h" void LinearFunc::configure(float in1, float out1, float in2, float out2, float minOutput, float maxOutput) { m_minOutput = minOutput; diff --git a/firmware/controllers/sensors/converters/thermistor_func.cpp b/firmware/controllers/sensors/converters/thermistor_func.cpp index 407cd3dacf..d62f99321a 100644 --- a/firmware/controllers/sensors/converters/thermistor_func.cpp +++ b/firmware/controllers/sensors/converters/thermistor_func.cpp @@ -2,9 +2,9 @@ * @author Matthew Kennedy, (c) 2019 */ -#include "thermistor_func.h" +#include "pch.h" -#include "thermistors.h" +#include "thermistor_func.h" #include diff --git a/firmware/controllers/sensors/ego.cpp b/firmware/controllers/sensors/ego.cpp index 1b4aa2cc57..4456d695df 100644 --- a/firmware/controllers/sensors/ego.cpp +++ b/firmware/controllers/sensors/ego.cpp @@ -13,8 +13,6 @@ */ #include "pch.h" -#include "ego.h" -#include "adc_inputs.h" #include "cyclic_buffer.h" #if EFI_CJ125 diff --git a/firmware/controllers/sensors/map.cpp b/firmware/controllers/sensors/map.cpp index efbc0850ac..fae8f10348 100644 --- a/firmware/controllers/sensors/map.cpp +++ b/firmware/controllers/sensors/map.cpp @@ -7,8 +7,6 @@ */ #include "pch.h" -#include "adc_inputs.h" - #if EFI_PROD_CODE #include "digital_input_icu.h" #include "digital_input_exti.h" diff --git a/firmware/controllers/sensors/sensor_info_printing.cpp b/firmware/controllers/sensors/sensor_info_printing.cpp index e14f4a4076..bea677ff0e 100644 --- a/firmware/controllers/sensors/sensor_info_printing.cpp +++ b/firmware/controllers/sensors/sensor_info_printing.cpp @@ -1,14 +1,12 @@ -#include "global.h" +#include "pch.h" #include "proxy_sensor.h" #include "functional_sensor.h" #include "redundant_sensor.h" #include "redundant_ford_tps.h" -#include "rpm_calculator.h" #include "Lps25Sensor.h" #include "linear_func.h" #include "resistance_func.h" #include "thermistor_func.h" -#include "efilib.h" #include "loggingcentral.h" void ProxySensor::showInfo(const char* sensorName) const { diff --git a/firmware/controllers/sensors/thermistors.cpp b/firmware/controllers/sensors/thermistors.cpp index 26f3df559a..f9929c01c2 100644 --- a/firmware/controllers/sensors/thermistors.cpp +++ b/firmware/controllers/sensors/thermistors.cpp @@ -12,8 +12,6 @@ #include "pch.h" -#include "thermistors.h" - void setDodgeSensor(ThermistorConf *thermistorConf, float pullup) { thermistorConf->config = {-40, 30, 120, 336660, 7550, 390, pullup}; } diff --git a/firmware/controllers/sensors/thermistors.h b/firmware/controllers/sensors/thermistors.h index 2a553d5f3d..966b0a50db 100644 --- a/firmware/controllers/sensors/thermistors.h +++ b/firmware/controllers/sensors/thermistors.h @@ -7,12 +7,8 @@ #pragma once -#include "global.h" - #define KELV 273.15f -#include "engine.h" - /** * converts Kelvin temperature into Celsius temperature */ diff --git a/firmware/controllers/settings.cpp b/firmware/controllers/settings.cpp index 90d7d11660..6ed448f4a4 100644 --- a/firmware/controllers/settings.cpp +++ b/firmware/controllers/settings.cpp @@ -11,13 +11,9 @@ #if !EFI_UNIT_TEST #include "os_access.h" #include "eficonsole.h" -#include "adc_inputs.h" -#include "thermistors.h" -#include "adc_inputs.h" #include "trigger_decoder.h" #include "console_io.h" #include "idle_thread.h" -#include "allsensors.h" #include "alternator_controller.h" #include "trigger_emulator_algo.h" diff --git a/firmware/controllers/system/timer/event_queue.cpp b/firmware/controllers/system/timer/event_queue.cpp index 83e034c15c..e8a7bde985 100644 --- a/firmware/controllers/system/timer/event_queue.cpp +++ b/firmware/controllers/system/timer/event_queue.cpp @@ -11,12 +11,11 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#include "global.h" +#include "pch.h" #include "os_access.h" #include "event_queue.h" #include "efitime.h" #include "os_util.h" -#include "perf_trace.h" #if EFI_UNIT_TEST extern int timeNowUs; diff --git a/firmware/controllers/system/timer/scheduler.cpp b/firmware/controllers/system/timer/scheduler.cpp index 491ce498fc..68fd997871 100644 --- a/firmware/controllers/system/timer/scheduler.cpp +++ b/firmware/controllers/system/timer/scheduler.cpp @@ -3,6 +3,8 @@ * * @date October 1, 2020 */ +#include "pch.h" + #include "scheduler.h" void action_s::execute() { diff --git a/firmware/controllers/system/timer/scheduler.h b/firmware/controllers/system/timer/scheduler.h index 514c258d95..8357d16afe 100644 --- a/firmware/controllers/system/timer/scheduler.h +++ b/firmware/controllers/system/timer/scheduler.h @@ -6,8 +6,6 @@ */ #pragma once -#include "global.h" - typedef void (*schfunc_t)(void *); class action_s { diff --git a/firmware/controllers/trigger/trigger_emulator_algo.h b/firmware/controllers/trigger/trigger_emulator_algo.h index d752f2302a..c68fbabb00 100644 --- a/firmware/controllers/trigger/trigger_emulator_algo.h +++ b/firmware/controllers/trigger/trigger_emulator_algo.h @@ -7,8 +7,6 @@ #pragma once -#include "engine.h" - class PwmConfig; class MultiChannelStateSequence; diff --git a/firmware/development/engine_emulator.cpp b/firmware/development/engine_emulator.cpp index d892fb3609..b4283cc30b 100644 --- a/firmware/development/engine_emulator.cpp +++ b/firmware/development/engine_emulator.cpp @@ -8,7 +8,7 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#include "global.h" +#include "pch.h" #include "engine_emulator.h" #include "poten.h" diff --git a/firmware/development/engine_sniffer.cpp b/firmware/development/engine_sniffer.cpp index 7ca6b7f8de..980c8905eb 100644 --- a/firmware/development/engine_sniffer.cpp +++ b/firmware/development/engine_sniffer.cpp @@ -24,18 +24,14 @@ * If not, see . */ -#include "engine.h" -#include "global.h" +#include "pch.h" #include "os_access.h" #include "engine_sniffer.h" -#include "adc_inputs.h" #if EFI_ENGINE_SNIFFER -#include "engine_configuration.h" #include "eficonsole.h" #include "status_loop.h" -#include "perf_trace.h" #define CHART_DELIMETER '!' diff --git a/firmware/development/hw_layer/poten.cpp b/firmware/development/hw_layer/poten.cpp index 5e1e250e28..0361e34fd5 100644 --- a/firmware/development/hw_layer/poten.cpp +++ b/firmware/development/hw_layer/poten.cpp @@ -6,13 +6,10 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#include "global.h" +#include "pch.h" #include "os_access.h" #include "poten.h" #include "eficonsole.h" -#include "pin_repository.h" -#include "engine_configuration.h" -#include "engine.h" #include "hardware.h" #include "mpu_util.h" diff --git a/firmware/development/logic_analyzer.cpp b/firmware/development/logic_analyzer.cpp index fcace8be9d..b47d369aef 100644 --- a/firmware/development/logic_analyzer.cpp +++ b/firmware/development/logic_analyzer.cpp @@ -11,17 +11,12 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#include "global.h" -#include "engine.h" +#include "pch.h" #include "logic_analyzer.h" #include "os_access.h" #include "eficonsole.h" -#include "pin_repository.h" -#include "allsensors.h" -#include "engine_configuration.h" #include "trigger_central.h" #include "os_util.h" -#include "engine_math.h" #include "rpm_calculator.h" #include "engine_sniffer.h" diff --git a/firmware/development/rfi_perftest.cpp b/firmware/development/rfi_perftest.cpp index b07792957e..dfbe6e5c7e 100644 --- a/firmware/development/rfi_perftest.cpp +++ b/firmware/development/rfi_perftest.cpp @@ -7,17 +7,14 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#include "global.h" +#include "pch.h" #include "rfi_perftest.h" -#include "engine_math.h" #include "fuel_math.h" #include "eficonsole.h" #include "time.h" -#include "efi_gpio.h" #include "console_io.h" -#include "engine.h" #if EFI_PERF_METRICS #include "test.h" diff --git a/firmware/development/sensor_chart.cpp b/firmware/development/sensor_chart.cpp index aeef843eab..9c4b563f6a 100644 --- a/firmware/development/sensor_chart.cpp +++ b/firmware/development/sensor_chart.cpp @@ -5,11 +5,9 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#include "global.h" +#include "pch.h" #include "os_access.h" #include "sensor_chart.h" -#include "engine.h" -#include "rpm_calculator.h" #if EFI_SENSOR_CHART #include "status_loop.h" diff --git a/firmware/hw_layer/adc/adc_inputs.cpp b/firmware/hw_layer/adc/adc_inputs.cpp index 78243c8aeb..a9b58d443f 100644 --- a/firmware/hw_layer/adc/adc_inputs.cpp +++ b/firmware/hw_layer/adc/adc_inputs.cpp @@ -19,23 +19,16 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#include "global.h" +#include "pch.h" #if HAL_USE_ADC #include "os_access.h" -#include "engine.h" -#include "adc_inputs.h" #include "adc_subscription.h" #include "AdcConfiguration.h" #include "mpu_util.h" #include "periodic_thread_controller.h" -#include "pin_repository.h" -#include "engine_math.h" -#include "engine_controller.h" -#include "maf.h" -#include "perf_trace.h" #include "thread_priority.h" /* Depth of the conversion buffer, channels are sampled X times each.*/ diff --git a/firmware/hw_layer/adc/adc_inputs.h b/firmware/hw_layer/adc/adc_inputs.h index efbd1b694b..53c08c4da8 100644 --- a/firmware/hw_layer/adc/adc_inputs.h +++ b/firmware/hw_layer/adc/adc_inputs.h @@ -62,8 +62,6 @@ void removeChannel(const char *name, adc_channel_e setting); #define adcToVoltsDivided(adc) (adcToVolts(adc) * engineConfiguration->analogInputDividerCoefficient) -#else -#define getAdcValue(msg, channel) 0 #endif /* HAL_USE_ADC */ void printFullAdcReport(void); diff --git a/firmware/hw_layer/adc/adc_subscription.cpp b/firmware/hw_layer/adc/adc_subscription.cpp index 04dfe1ec23..25ce9bc234 100644 --- a/firmware/hw_layer/adc/adc_subscription.cpp +++ b/firmware/hw_layer/adc/adc_subscription.cpp @@ -1,8 +1,7 @@ +#include "pch.h" + #include "adc_subscription.h" -#include "adc_inputs.h" -#include "engine.h" -#include "perf_trace.h" #include "biquad.h" #if EFI_UNIT_TEST diff --git a/firmware/hw_layer/cdm_ion_sense.cpp b/firmware/hw_layer/cdm_ion_sense.cpp index 62c10525d3..8259f637c3 100644 --- a/firmware/hw_layer/cdm_ion_sense.cpp +++ b/firmware/hw_layer/cdm_ion_sense.cpp @@ -9,8 +9,9 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ +#include "pch.h" + #include "cdm_ion_sense.h" -#include "engine.h" CdmState::CdmState() { accumilatingAtRevolution = 0; diff --git a/firmware/hw_layer/debounce.cpp b/firmware/hw_layer/debounce.cpp index 6d5b11834f..a68f7fb103 100644 --- a/firmware/hw_layer/debounce.cpp +++ b/firmware/hw_layer/debounce.cpp @@ -5,9 +5,9 @@ * @date Aug 31, 2020 * @author David Holdeman, (c) 2020 */ +#include "pch.h" + #include "debounce.h" -#include "pin_repository.h" -#include "engine_configuration.h" #include "hardware.h" ButtonDebounce* ButtonDebounce::s_firstDebounce = nullptr; diff --git a/firmware/hw_layer/digital_input/digital_input.cpp b/firmware/hw_layer/digital_input/digital_input.cpp index 0a87d25d10..018d631b83 100644 --- a/firmware/hw_layer/digital_input/digital_input.cpp +++ b/firmware/hw_layer/digital_input/digital_input.cpp @@ -5,6 +5,8 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ +#include "pch.h" + #include "digital_input.h" void digital_input_s::setWidthCallback(VoidInt handler, void *arg) { diff --git a/firmware/hw_layer/digital_input/digital_input.h b/firmware/hw_layer/digital_input/digital_input.h index 3325222e24..e8a8be4e37 100644 --- a/firmware/hw_layer/digital_input/digital_input.h +++ b/firmware/hw_layer/digital_input/digital_input.h @@ -8,7 +8,6 @@ #pragma once -#include "global.h" #include "listener_array.h" struct digital_input_s { diff --git a/firmware/hw_layer/digital_input/digital_input_icu.cpp b/firmware/hw_layer/digital_input/digital_input_icu.cpp index c1c74c4f17..0825fad6d0 100644 --- a/firmware/hw_layer/digital_input/digital_input_icu.cpp +++ b/firmware/hw_layer/digital_input/digital_input_icu.cpp @@ -24,15 +24,14 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#include "digital_input_icu.h" +#include "pch.h" -#include "fl_stack.h" +#include "digital_input_icu.h" #if EFI_ICU_INPUTS && HAL_USE_ICU #include "mpu_util.h" #include "eficonsole.h" -#include "pin_repository.h" static void icuWidthCallback(ICUDriver *driver); static void icuPeriordCallBack(ICUDriver *driver); diff --git a/firmware/hw_layer/digital_input/trigger/trigger_input.cpp b/firmware/hw_layer/digital_input/trigger/trigger_input.cpp index 6ffd6e98a7..050707d976 100644 --- a/firmware/hw_layer/digital_input/trigger/trigger_input.cpp +++ b/firmware/hw_layer/digital_input/trigger/trigger_input.cpp @@ -5,7 +5,7 @@ * @author Andrey Belomutskiy, (c) 2012-2021 */ -#include "global.h" +#include "pch.h" #include "trigger_input.h" /* TODO: diff --git a/firmware/hw_layer/digital_input/trigger/trigger_input.h b/firmware/hw_layer/digital_input/trigger/trigger_input.h index 41ec70efe3..2e3e28d5eb 100644 --- a/firmware/hw_layer/digital_input/trigger/trigger_input.h +++ b/firmware/hw_layer/digital_input/trigger/trigger_input.h @@ -8,12 +8,9 @@ #pragma once -#include "engine.h" -#include "pin_repository.h" #include "trigger_structure.h" #include "trigger_central.h" - #define TRIGGER_BAIL_IF_DISABLED \ if (!engine->hwTriggerInputEnabled) { \ return; \ diff --git a/firmware/hw_layer/digital_input/trigger/trigger_input_comp.cpp b/firmware/hw_layer/digital_input/trigger/trigger_input_comp.cpp index d49d94ec92..dc366ada8c 100644 --- a/firmware/hw_layer/digital_input/trigger/trigger_input_comp.cpp +++ b/firmware/hw_layer/digital_input/trigger/trigger_input_comp.cpp @@ -7,7 +7,7 @@ * @author andreika */ -#include "global.h" +#include "pch.h" #if (EFI_SHAFT_POSITION_INPUT && HAL_USE_COMP) || defined(__DOXYGEN__) diff --git a/firmware/hw_layer/digital_input/trigger/trigger_input_exti.cpp b/firmware/hw_layer/digital_input/trigger/trigger_input_exti.cpp index 034b331e06..42d513c4e1 100644 --- a/firmware/hw_layer/digital_input/trigger/trigger_input_exti.cpp +++ b/firmware/hw_layer/digital_input/trigger/trigger_input_exti.cpp @@ -10,7 +10,7 @@ * @author Andrey Belomutskiy, (c) 2012-2021 */ -#include "global.h" +#include "pch.h" #if EFI_SHAFT_POSITION_INPUT && (HAL_TRIGGER_USE_PAL == TRUE) diff --git a/firmware/hw_layer/digital_input/trigger/trigger_input_icu.cpp b/firmware/hw_layer/digital_input/trigger/trigger_input_icu.cpp index 19a6f9ae44..0d03cab3ab 100644 --- a/firmware/hw_layer/digital_input/trigger/trigger_input_icu.cpp +++ b/firmware/hw_layer/digital_input/trigger/trigger_input_icu.cpp @@ -12,7 +12,7 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#include "global.h" +#include "pch.h" int icuRisingCallbackCounter = 0; int icuFallingCallbackCounter = 0; diff --git a/firmware/hw_layer/drivers/can/can_hw.cpp b/firmware/hw_layer/drivers/can/can_hw.cpp index b6e553499f..d3c5302f59 100644 --- a/firmware/hw_layer/drivers/can/can_hw.cpp +++ b/firmware/hw_layer/drivers/can/can_hw.cpp @@ -12,18 +12,15 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#include "global.h" +#include "pch.h" #if EFI_CAN_SUPPORT #include "can.h" -#include "engine_configuration.h" -#include "pin_repository.h" #include "can_hw.h" #include "can_msg_tx.h" #include "string.h" #include "mpu_util.h" -#include "engine.h" #include "thread_priority.h" static int canReadCounter = 0; diff --git a/firmware/hw_layer/drivers/can/can_hw.h b/firmware/hw_layer/drivers/can/can_hw.h index 5844d52daa..223cb3fc69 100644 --- a/firmware/hw_layer/drivers/can/can_hw.h +++ b/firmware/hw_layer/drivers/can/can_hw.h @@ -8,9 +8,6 @@ #pragma once #include "efifeatures.h" -#if EFI_TUNER_STUDIO -#include "tunerstudio_outputs.h" -#endif /* EFI_TUNER_STUDIO */ void initCan(void); void setCanType(int type); diff --git a/firmware/hw_layer/drivers/gpio/core.cpp b/firmware/hw_layer/drivers/gpio/core.cpp index 84c479a17c..fad51475a6 100644 --- a/firmware/hw_layer/drivers/gpio/core.cpp +++ b/firmware/hw_layer/drivers/gpio/core.cpp @@ -6,7 +6,7 @@ * @author Andrey Gusakov, (c) 2019 */ -#include "global.h" +#include "pch.h" #include "gpio/gpio_ext.h" #include "smart_gpio.h" diff --git a/firmware/hw_layer/drivers/gpio/drv8860.cpp b/firmware/hw_layer/drivers/gpio/drv8860.cpp index e3e96abf69..f6503a79f2 100644 --- a/firmware/hw_layer/drivers/gpio/drv8860.cpp +++ b/firmware/hw_layer/drivers/gpio/drv8860.cpp @@ -12,10 +12,9 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#include "global.h" +#include "pch.h" #include "gpio/gpio_ext.h" #include "gpio/drv8860.h" -#include "pin_repository.h" #include "os_util.h" #include "thread_priority.h" diff --git a/firmware/hw_layer/drivers/gpio/mc33810.cpp b/firmware/hw_layer/drivers/gpio/mc33810.cpp index 9d021f73bf..8013eb4100 100644 --- a/firmware/hw_layer/drivers/gpio/mc33810.cpp +++ b/firmware/hw_layer/drivers/gpio/mc33810.cpp @@ -10,10 +10,9 @@ * @author Andrey Gusakov , (c) 2020 */ -#include "global.h" +#include "pch.h" #include "gpio/gpio_ext.h" #include "gpio/mc33810.h" -#include "pin_repository.h" #include "os_util.h" #include "thread_priority.h" diff --git a/firmware/hw_layer/drivers/gpio/tle6240.cpp b/firmware/hw_layer/drivers/gpio/tle6240.cpp index 61308e2010..b5d8c48667 100644 --- a/firmware/hw_layer/drivers/gpio/tle6240.cpp +++ b/firmware/hw_layer/drivers/gpio/tle6240.cpp @@ -20,10 +20,9 @@ * @author Andrey Gusakov, (c) 2019 */ -#include "global.h" +#include "pch.h" #include "gpio/gpio_ext.h" #include "gpio/tle6240.h" -#include "pin_repository.h" #include "os_util.h" #include "thread_priority.h" diff --git a/firmware/hw_layer/drivers/gpio/tle8888.cpp b/firmware/hw_layer/drivers/gpio/tle8888.cpp index eeff42ea4f..47f52d4d36 100644 --- a/firmware/hw_layer/drivers/gpio/tle8888.cpp +++ b/firmware/hw_layer/drivers/gpio/tle8888.cpp @@ -29,7 +29,7 @@ * Andrey Gusakov, (c) 2019 */ -#include "global.h" +#include "pch.h" #include "gpio/tle8888.h" @@ -38,7 +38,6 @@ #include "persistent_configuration.h" #include "hardware.h" #include "gpio/gpio_ext.h" -#include "pin_repository.h" #include "os_util.h" #include "thread_priority.h" diff --git a/firmware/hw_layer/drivers/lcd/HD44780.cpp b/firmware/hw_layer/drivers/lcd/HD44780.cpp index 09c03b3b40..dec2b6482e 100644 --- a/firmware/hw_layer/drivers/lcd/HD44780.cpp +++ b/firmware/hw_layer/drivers/lcd/HD44780.cpp @@ -7,16 +7,13 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#include "global.h" +#include "pch.h" #if EFI_HD44780_LCD #include "HD44780.h" -#include "pin_repository.h" #include "string.h" -#include "engine.h" - enum { LCD_HD44780_DISPLAY_CLEAR = 0x01, LCD_HD44780_SHIFT_CURSOR_RIGHT = 0x06, diff --git a/firmware/hw_layer/drivers/serial/serial_hw.cpp b/firmware/hw_layer/drivers/serial/serial_hw.cpp index d5dc28282c..cf92eac672 100644 --- a/firmware/hw_layer/drivers/serial/serial_hw.cpp +++ b/firmware/hw_layer/drivers/serial/serial_hw.cpp @@ -6,17 +6,14 @@ * @author Konstantin Smola, (c) 2020 */ -#include "global.h" +#include "pch.h" #if EFI_AUX_SERIAL #include "serial.h" -#include "engine_configuration.h" -#include "pin_repository.h" #include "serial_hw.h" #include "string.h" #include "mpu_util.h" -#include "engine.h" static bool isSerialEnabled = false; static bool isSerialTXEnabled = false; diff --git a/firmware/hw_layer/hardware.cpp b/firmware/hw_layer/hardware.cpp index 3688a429f3..ecc9bdfec4 100644 --- a/firmware/hw_layer/hardware.cpp +++ b/firmware/hw_layer/hardware.cpp @@ -6,13 +6,11 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#include "global.h" - +#include "pch.h" #include "os_access.h" #include "trigger_input.h" #include "servo.h" -#include "adc_inputs.h" #include "can_hw.h" #include "hardware.h" #include "rtc_helper.h" @@ -44,14 +42,11 @@ #include "histogram.h" #include "gps_uart.h" #include "HD44780.h" -#include "settings.h" #include "joystick.h" #include "cdm_ion_sense.h" #include "trigger_central.h" #include "svnversion.h" -#include "engine_configuration.h" #include "vvt.h" -#include "perf_trace.h" #include "trigger_emulator_algo.h" #include "boost_control.h" #include "software_knock.h" diff --git a/firmware/hw_layer/hardware.h b/firmware/hw_layer/hardware.h index 03572e343b..85503ca676 100644 --- a/firmware/hw_layer/hardware.h +++ b/firmware/hw_layer/hardware.h @@ -7,8 +7,6 @@ #pragma once -#include "global.h" - void startHardware(DECLARE_ENGINE_PARAMETER_SIGNATURE); void stopHardware(DECLARE_ENGINE_PARAMETER_SIGNATURE); @@ -47,8 +45,6 @@ brain_pin_e getSckPin(spi_device_e device); #ifdef __cplusplus -#include "engine.h" - void applyNewHardwareSettings(DECLARE_ENGINE_PARAMETER_SIGNATURE); // Initialize hardware that doesn't require configuration to be loaded diff --git a/firmware/hw_layer/mass_storage/mass_storage_device.cpp b/firmware/hw_layer/mass_storage/mass_storage_device.cpp index 92e287ceb3..38aafedf1a 100644 --- a/firmware/hw_layer/mass_storage/mass_storage_device.cpp +++ b/firmware/hw_layer/mass_storage/mass_storage_device.cpp @@ -7,6 +7,8 @@ * This file implements a USB mass storage device with multiple LUNs, so multiple drives can be mounted at once. */ +#include "pch.h" + #include "mass_storage_device.h" #if HAL_USE_USB_MSD diff --git a/firmware/hw_layer/mass_storage/mass_storage_device.h b/firmware/hw_layer/mass_storage/mass_storage_device.h index 1693822446..4de46db9f6 100644 --- a/firmware/hw_layer/mass_storage/mass_storage_device.h +++ b/firmware/hw_layer/mass_storage/mass_storage_device.h @@ -7,8 +7,6 @@ * This file implements a USB mass storage device with multiple LUNs, so multiple drives can be mounted at once. */ -#include "ch.hpp" -#include "hal.h" #include "hal_usb_msd.h" #include "thread_controller.h" diff --git a/firmware/hw_layer/mass_storage/mass_storage_init.cpp b/firmware/hw_layer/mass_storage/mass_storage_init.cpp index 6dcab3edb2..6dc29c9c01 100644 --- a/firmware/hw_layer/mass_storage/mass_storage_init.cpp +++ b/firmware/hw_layer/mass_storage/mass_storage_init.cpp @@ -1,7 +1,8 @@ +#include "pch.h" + #include "mass_storage_init.h" #include "mass_storage_device.h" #include "null_device.h" -#include "tunerstudio_outputs.h" #if HAL_USE_USB_MSD diff --git a/firmware/hw_layer/mass_storage/null_device.cpp b/firmware/hw_layer/mass_storage/null_device.cpp index 6248e47cae..c6ba938d09 100644 --- a/firmware/hw_layer/mass_storage/null_device.cpp +++ b/firmware/hw_layer/mass_storage/null_device.cpp @@ -8,9 +8,7 @@ * Use it when you need to mount *something* but don't have an SD card available. */ -#include "hal.h" - -#include "global.h" +#include "pch.h" #include diff --git a/firmware/hw_layer/microsecond_timer/microsecond_timer.cpp b/firmware/hw_layer/microsecond_timer/microsecond_timer.cpp index 95d6e3d2bc..4a47e2d8ef 100644 --- a/firmware/hw_layer/microsecond_timer/microsecond_timer.cpp +++ b/firmware/hw_layer/microsecond_timer/microsecond_timer.cpp @@ -11,14 +11,14 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#include "global.h" +#include "pch.h" #include "microsecond_timer.h" #include "port_microsecond_timer.h" #if EFI_PROD_CODE #include "periodic_task.h" -#include "engine.h" + // Just in case we have a mechanism to validate that hardware timer is clocked right and all the // conversions between wall clock and hardware frequencies are done right // delay in milliseconds diff --git a/firmware/hw_layer/microsecond_timer/microsecond_timer_gpt.cpp b/firmware/hw_layer/microsecond_timer/microsecond_timer_gpt.cpp index ddbfbc08d7..89e2e7803b 100644 --- a/firmware/hw_layer/microsecond_timer/microsecond_timer_gpt.cpp +++ b/firmware/hw_layer/microsecond_timer/microsecond_timer_gpt.cpp @@ -1,4 +1,4 @@ -#include "global.h" +#include "pch.h" #include "port_microsecond_timer.h" #if EFI_PROD_CODE && HAL_USE_GPT diff --git a/firmware/hw_layer/mmc_card.cpp b/firmware/hw_layer/mmc_card.cpp index 741b1c0775..bf1e89ec89 100644 --- a/firmware/hw_layer/mmc_card.cpp +++ b/firmware/hw_layer/mmc_card.cpp @@ -12,7 +12,7 @@ * todo: extract some logic into a controller file */ -#include "global.h" +#include "pch.h" #if EFI_FILE_LOGGING @@ -20,10 +20,8 @@ #include #include #include "mmc_card.h" -#include "pin_repository.h" #include "ff.h" #include "hardware.h" -#include "engine_configuration.h" #include "status_loop.h" #include "buffered_writer.h" #include "mass_storage_init.h" diff --git a/firmware/hw_layer/pin_repository.cpp b/firmware/hw_layer/pin_repository.cpp index 1465721d47..003e5712a1 100644 --- a/firmware/hw_layer/pin_repository.cpp +++ b/firmware/hw_layer/pin_repository.cpp @@ -9,7 +9,7 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#include "engine.h" +#include "pch.h" unsigned int getBrainPinTotalNum(void) { return BRAIN_PIN_TOTAL_PINS; diff --git a/firmware/hw_layer/ports/cypress/backup_ram.cpp b/firmware/hw_layer/ports/cypress/backup_ram.cpp index 1056955ad0..2166dd6f12 100644 --- a/firmware/hw_layer/ports/cypress/backup_ram.cpp +++ b/firmware/hw_layer/ports/cypress/backup_ram.cpp @@ -5,7 +5,7 @@ * @date May 22, 2020 */ -#include "global.h" +#include "pch.h" #include "backup_ram.h" #include "flash_int.h" diff --git a/firmware/hw_layer/ports/cypress/cypress_common.cpp b/firmware/hw_layer/ports/cypress/cypress_common.cpp index 466e294ef4..110784ef01 100644 --- a/firmware/hw_layer/ports/cypress/cypress_common.cpp +++ b/firmware/hw_layer/ports/cypress/cypress_common.cpp @@ -6,9 +6,7 @@ * @author andreika */ -#include "global.h" -#include "engine.h" -#include "pin_repository.h" +#include "pch.h" #if HAL_USE_ADC || defined(__DOXYGEN__) diff --git a/firmware/hw_layer/ports/cypress/cypress_pins.cpp b/firmware/hw_layer/ports/cypress/cypress_pins.cpp index b2e81058e1..c325b76ea2 100644 --- a/firmware/hw_layer/ports/cypress/cypress_pins.cpp +++ b/firmware/hw_layer/ports/cypress/cypress_pins.cpp @@ -7,9 +7,7 @@ * @author andreika */ -#include "global.h" -#include "engine.h" -#include "efi_gpio.h" +#include "pch.h" #if EFI_GPIO_HARDWARE diff --git a/firmware/hw_layer/ports/cypress/mpu_util.cpp b/firmware/hw_layer/ports/cypress/mpu_util.cpp index c7d9b98f2b..b56d4cfc1d 100644 --- a/firmware/hw_layer/ports/cypress/mpu_util.cpp +++ b/firmware/hw_layer/ports/cypress/mpu_util.cpp @@ -6,14 +6,12 @@ * @author andreika */ -#include "global.h" +#include "pch.h" #if EFI_PROD_CODE #include "mpu_util.h" #include "flash_int.h" -#include "engine.h" -#include "pin_repository.h" #include "os_util.h" extern "C" { diff --git a/firmware/hw_layer/ports/kinetis/kinetis_common.cpp b/firmware/hw_layer/ports/kinetis/kinetis_common.cpp index 9c1f82c824..9e15a077c1 100644 --- a/firmware/hw_layer/ports/kinetis/kinetis_common.cpp +++ b/firmware/hw_layer/ports/kinetis/kinetis_common.cpp @@ -6,9 +6,7 @@ * @author andreika */ -#include "global.h" -#include "engine.h" -#include "pin_repository.h" +#include "pch.h" #if HAL_USE_ADC || defined(__DOXYGEN__) diff --git a/firmware/hw_layer/ports/kinetis/kinetis_pins.cpp b/firmware/hw_layer/ports/kinetis/kinetis_pins.cpp index b1af826421..6b941db2ba 100644 --- a/firmware/hw_layer/ports/kinetis/kinetis_pins.cpp +++ b/firmware/hw_layer/ports/kinetis/kinetis_pins.cpp @@ -7,9 +7,7 @@ * @author andreika */ -#include "global.h" -#include "engine.h" -#include "efi_gpio.h" +#include "pch.h" #if EFI_GPIO_HARDWARE @@ -23,9 +21,6 @@ static ioportid_t ports[] = {GPIOA, GPIOE }; -#include "pin_repository.h" -#include "io_pins.h" - /** * @deprecated - use hwPortname() instead */ diff --git a/firmware/hw_layer/ports/kinetis/mpu_util.cpp b/firmware/hw_layer/ports/kinetis/mpu_util.cpp index 1e97c28432..73c4ce16be 100644 --- a/firmware/hw_layer/ports/kinetis/mpu_util.cpp +++ b/firmware/hw_layer/ports/kinetis/mpu_util.cpp @@ -6,14 +6,12 @@ * @author andreika */ -#include "global.h" +#include "pch.h" #if EFI_PROD_CODE #include "mpu_util.h" #include "flash_int.h" -#include "engine.h" -#include "pin_repository.h" #include "os_util.h" void baseMCUInit(void) { diff --git a/firmware/hw_layer/ports/stm32/serial_over_usb/usbconsole.cpp b/firmware/hw_layer/ports/stm32/serial_over_usb/usbconsole.cpp index b1a83249c2..f564f2ac8e 100644 --- a/firmware/hw_layer/ports/stm32/serial_over_usb/usbconsole.cpp +++ b/firmware/hw_layer/ports/stm32/serial_over_usb/usbconsole.cpp @@ -6,7 +6,7 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#include "global.h" +#include "pch.h" #include "os_access.h" #if EFI_USB_SERIAL diff --git a/firmware/hw_layer/ports/stm32/stm32_adc_v4.cpp b/firmware/hw_layer/ports/stm32/stm32_adc_v4.cpp index d5abf6477e..91f3d0e3b9 100644 --- a/firmware/hw_layer/ports/stm32/stm32_adc_v4.cpp +++ b/firmware/hw_layer/ports/stm32/stm32_adc_v4.cpp @@ -6,8 +6,7 @@ * @author Matthew Kennedy, (c) 2021 */ -#include "global.h" -#include "hal.h" +#include "pch.h" #include "mpu_util.h" void portInitAdc() { diff --git a/firmware/hw_layer/rtc_helper.cpp b/firmware/hw_layer/rtc_helper.cpp index 649a5fe49e..098a4f01ac 100644 --- a/firmware/hw_layer/rtc_helper.cpp +++ b/firmware/hw_layer/rtc_helper.cpp @@ -6,9 +6,10 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ +#include "pch.h" + #include #include -#include "global.h" #include "os_access.h" #include "os_util.h" #include "rtc_helper.h" diff --git a/firmware/hw_layer/sensors/accelerometer.cpp b/firmware/hw_layer/sensors/accelerometer.cpp index 79d172a1b0..256b5e0622 100644 --- a/firmware/hw_layer/sensors/accelerometer.cpp +++ b/firmware/hw_layer/sensors/accelerometer.cpp @@ -16,6 +16,8 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ +#include "pch.h" + #include "accelerometer.h" #include "hardware.h" diff --git a/firmware/hw_layer/sensors/accelerometer.h b/firmware/hw_layer/sensors/accelerometer.h index 6e38c176b1..14c299508e 100644 --- a/firmware/hw_layer/sensors/accelerometer.h +++ b/firmware/hw_layer/sensors/accelerometer.h @@ -7,8 +7,6 @@ #pragma once -#include "engine.h" - void configureAccelerometerPins(DECLARE_ENGINE_PARAMETER_SIGNATURE); void initAccelerometer(DECLARE_ENGINE_PARAMETER_SIGNATURE); diff --git a/firmware/hw_layer/sensors/cj125.cpp b/firmware/hw_layer/sensors/cj125.cpp index 4204927cbc..6950a2e329 100644 --- a/firmware/hw_layer/sensors/cj125.cpp +++ b/firmware/hw_layer/sensors/cj125.cpp @@ -20,8 +20,6 @@ #if EFI_CJ125 -#include "adc_inputs.h" - #if HAL_USE_SPI #include "mpu_util.h" #endif /* HAL_USE_SPI */ diff --git a/firmware/hw_layer/sensors/gps_uart.cpp b/firmware/hw_layer/sensors/gps_uart.cpp index ba94637be2..fe34f70a67 100644 --- a/firmware/hw_layer/sensors/gps_uart.cpp +++ b/firmware/hw_layer/sensors/gps_uart.cpp @@ -11,20 +11,19 @@ * Kot_dnz 2014 */ +#include "pch.h" + #include // todo: MISRA does not like time.h #include -#include "global.h" #if EFI_UART_GPS #include "console_io.h" #include "eficonsole.h" -#include "pin_repository.h" #include "nmea.h" #include "gps_uart.h" #include "rtc_helper.h" -#include "engine.h" static SerialConfig GPSserialConfig = { GPS_SERIAL_SPEED, 0, USART_CR2_STOP1_BITS | USART_CR2_LINEN, 0 }; static THD_WORKING_AREA(gpsThreadStack, UTILITY_THREAD_STACK_SIZE); diff --git a/firmware/hw_layer/sensors/hip9011.cpp b/firmware/hw_layer/sensors/hip9011.cpp index 57a4e6a86a..938d3df49c 100644 --- a/firmware/hw_layer/sensors/hip9011.cpp +++ b/firmware/hw_layer/sensors/hip9011.cpp @@ -32,22 +32,15 @@ * @Spilly */ -#include "global.h" -#include "engine.h" -#include "settings.h" +#include "pch.h" + #include "hardware.h" -#include "rpm_calculator.h" #include "trigger_central.h" #include "hip9011_logic.h" #include "hip9011.h" -#include "adc_inputs.h" -#include "perf_trace.h" #include "thread_priority.h" -#include "engine_controller.h" - #if EFI_PROD_CODE -#include "pin_repository.h" #include "mpu_util.h" #include "os_util.h" #endif diff --git a/firmware/hw_layer/sensors/hip9011_logic.cpp b/firmware/hw_layer/sensors/hip9011_logic.cpp index 31d403592a..486a1b46f4 100644 --- a/firmware/hw_layer/sensors/hip9011_logic.cpp +++ b/firmware/hw_layer/sensors/hip9011_logic.cpp @@ -5,10 +5,8 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#include "global.h" -#include "engine.h" -/* getNextFiringCylinderId */ -#include "engine_math.h" +#include "pch.h" + /* getCylinderKnockBank */ #include "knock_logic.h" #include "hip9011_logic.h" diff --git a/firmware/hw_layer/sensors/joystick.cpp b/firmware/hw_layer/sensors/joystick.cpp index c6ed3ff381..e160f40afd 100644 --- a/firmware/hw_layer/sensors/joystick.cpp +++ b/firmware/hw_layer/sensors/joystick.cpp @@ -13,11 +13,10 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#include "engine.h" +#include "pch.h" #if (HAL_USE_PAL && EFI_JOYSTICK) #include "joystick.h" -#include "pin_repository.h" #include "digital_input_exti.h" static int joyTotal = 0; diff --git a/firmware/hw_layer/sensors/max31855.cpp b/firmware/hw_layer/sensors/max31855.cpp index 419903884a..c9cf1c6aea 100644 --- a/firmware/hw_layer/sensors/max31855.cpp +++ b/firmware/hw_layer/sensors/max31855.cpp @@ -12,15 +12,13 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#include "global.h" +#include "pch.h" #include "max31855.h" #include "hardware.h" #if EFI_PROD_CODE #include "mpu_util.h" -#include "settings.h" -#include "pin_repository.h" #endif /* EFI_PROD_CODE */ #if EFI_MAX_31855 diff --git a/firmware/hw_layer/servo.cpp b/firmware/hw_layer/servo.cpp index 05a46eb1a8..65b93cf13b 100644 --- a/firmware/hw_layer/servo.cpp +++ b/firmware/hw_layer/servo.cpp @@ -12,11 +12,10 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#include "engine.h" +#include "pch.h" #if EFI_SERVO || EFI_SIMULATOR #include "servo.h" -#include "pin_repository.h" #include "thread_priority.h" // This thread calls scheduleForLater which eventually could trip the main trigger callback diff --git a/firmware/hw_layer/trigger_input_adc.cpp b/firmware/hw_layer/trigger_input_adc.cpp index e14c04515b..e9b58eab69 100644 --- a/firmware/hw_layer/trigger_input_adc.cpp +++ b/firmware/hw_layer/trigger_input_adc.cpp @@ -7,13 +7,12 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#include "global.h" +#include "pch.h" #if (EFI_SHAFT_POSITION_INPUT && HAL_TRIGGER_USE_ADC && HAL_USE_ADC) || defined(__DOXYGEN__) #include "trigger_input.h" #include "digital_input_exti.h" -#include "adc_inputs.h" //!!!!!!!!!!!!!!! extern "C" void toggleLed(int led, int mode); diff --git a/firmware/hw_layer/vehicle_speed.cpp b/firmware/hw_layer/vehicle_speed.cpp index ca4d0e7d8d..fc92a3002f 100644 --- a/firmware/hw_layer/vehicle_speed.cpp +++ b/firmware/hw_layer/vehicle_speed.cpp @@ -5,6 +5,8 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ +#include "pch.h" + #include "vehicle_speed.h" #include "pch.h" @@ -12,7 +14,6 @@ #include "digital_input_icu.h" #include "digital_input_exti.h" -#include "pin_repository.h" #include "can_vss.h" /** diff --git a/firmware/init/sensor/init_aux.cpp b/firmware/init/sensor/init_aux.cpp index 1b3dca6ddf..9ce8e73b16 100644 --- a/firmware/init/sensor/init_aux.cpp +++ b/firmware/init/sensor/init_aux.cpp @@ -1,8 +1,7 @@ +#include "pch.h" + #include "init.h" -#include "adc_inputs.h" #include "adc_subscription.h" -#include "engine.h" -#include "global.h" #include "functional_sensor.h" // These aux sensors just read voltage - so the converter function has nothing to do diff --git a/firmware/init/sensor/init_baro.cpp b/firmware/init/sensor/init_baro.cpp index ee8da45c6d..8bb461dcfc 100644 --- a/firmware/init/sensor/init_baro.cpp +++ b/firmware/init/sensor/init_baro.cpp @@ -1,8 +1,6 @@ -#include "engine.h" +#include "pch.h" #include "Lps25Sensor.h" -#include "rusefi_hw_enums.h" - static Lps25 device; static Lps25Sensor sensor(device); diff --git a/firmware/init/sensor/init_can_sensors.cpp b/firmware/init/sensor/init_can_sensors.cpp index 06d95005dc..71f34fec5c 100644 --- a/firmware/init/sensor/init_can_sensors.cpp +++ b/firmware/init/sensor/init_can_sensors.cpp @@ -5,8 +5,7 @@ * @author Matthew Kennedy, (c) 2020 */ -#include "pin_repository.h" -#include "engine_configuration.h" +#include "pch.h" #if EFI_CAN_SUPPORT #include "can_sensor.h" diff --git a/firmware/init/sensor/init_flex.cpp b/firmware/init/sensor/init_flex.cpp index 81ec147747..ac7d212abe 100644 --- a/firmware/init/sensor/init_flex.cpp +++ b/firmware/init/sensor/init_flex.cpp @@ -1,6 +1,6 @@ +#include "pch.h" + #include "init.h" -#include "pin_repository.h" -#include "engine.h" #include "frequency_sensor.h" #include "flex_sensor.h" diff --git a/firmware/init/sensor/init_fluid_pressure.cpp b/firmware/init/sensor/init_fluid_pressure.cpp index 39ba4730ef..9a679df56f 100644 --- a/firmware/init/sensor/init_fluid_pressure.cpp +++ b/firmware/init/sensor/init_fluid_pressure.cpp @@ -1,7 +1,6 @@ #include "pch.h" #include "init.h" -#include "adc_inputs.h" #include "adc_subscription.h" #include "functional_sensor.h" #include "proxy_sensor.h" diff --git a/firmware/init/sensor/init_fuel_level.cpp b/firmware/init/sensor/init_fuel_level.cpp index 6f4c35d5b6..0fcce4311b 100644 --- a/firmware/init/sensor/init_fuel_level.cpp +++ b/firmware/init/sensor/init_fuel_level.cpp @@ -1,7 +1,7 @@ +#include "pch.h" + #include "init.h" -#include "adc_inputs.h" #include "adc_subscription.h" -#include "engine_configuration.h" #include "functional_sensor.h" #include "table_func.h" diff --git a/firmware/init/sensor/init_maf.cpp b/firmware/init/sensor/init_maf.cpp index a90d330209..a918729ccb 100644 --- a/firmware/init/sensor/init_maf.cpp +++ b/firmware/init/sensor/init_maf.cpp @@ -1,7 +1,7 @@ +#include "pch.h" + #include "init.h" -#include "adc_inputs.h" #include "adc_subscription.h" -#include "engine_configuration.h" #include "functional_sensor.h" #include "table_func.h" diff --git a/firmware/init/sensor/init_map.cpp b/firmware/init/sensor/init_map.cpp index 691ed2fbdb..645fc7b377 100644 --- a/firmware/init/sensor/init_map.cpp +++ b/firmware/init/sensor/init_map.cpp @@ -1,7 +1,6 @@ -#include "map.h" -#include "adc_inputs.h" +#include "pch.h" + #include "function_pointer_sensor.h" -#include "engine.h" struct GetMapWrapper { DECLARE_ENGINE_PTR; diff --git a/firmware/init/sensor/init_thermistors.cpp b/firmware/init/sensor/init_thermistors.cpp index 907f53da98..5a8b68be3a 100644 --- a/firmware/init/sensor/init_thermistors.cpp +++ b/firmware/init/sensor/init_thermistors.cpp @@ -1,6 +1,5 @@ #include "pch.h" -#include "adc_inputs.h" #include "adc_subscription.h" #include "functional_sensor.h" #include "func_chain.h" diff --git a/firmware/init/sensor/init_tps.cpp b/firmware/init/sensor/init_tps.cpp index 79ae13410d..02681088b0 100644 --- a/firmware/init/sensor/init_tps.cpp +++ b/firmware/init/sensor/init_tps.cpp @@ -1,6 +1,5 @@ #include "pch.h" -#include "adc_inputs.h" #include "adc_subscription.h" #include "functional_sensor.h" #include "redundant_sensor.h" diff --git a/firmware/init/sensor/init_vbatt.cpp b/firmware/init/sensor/init_vbatt.cpp index 448dd16fb2..04bc7a3bca 100644 --- a/firmware/init/sensor/init_vbatt.cpp +++ b/firmware/init/sensor/init_vbatt.cpp @@ -1,7 +1,7 @@ +#include "pch.h" + #include "init.h" -#include "adc_inputs.h" #include "adc_subscription.h" -#include "engine.h" #include "functional_sensor.h" #include "linear_func.h" diff --git a/firmware/main.cpp b/firmware/main.cpp index 81642737fa..cdd472d305 100644 --- a/firmware/main.cpp +++ b/firmware/main.cpp @@ -7,7 +7,7 @@ * http://rusefi.com/ */ -#include "global.h" +#include "pch.h" #include "os_access.h" #include "rusefi.h" #include "mpu_util.h" diff --git a/firmware/pch/pch.h b/firmware/pch/pch.h index 7edaae2b0e..2147f18631 100644 --- a/firmware/pch/pch.h +++ b/firmware/pch/pch.h @@ -10,25 +10,27 @@ */ #include "efifeatures.h" +#include "rusefi_generated.h" #include "engine_ptr.h" +#include "error_handling.h" #include "global.h" #include "efi_gpio.h" +#include "tunerstudio_outputs.h" #include "engine.h" #include "engine_configuration.h" #include "engine_controller.h" -#include "tunerstudio_outputs.h" #include "engine_math.h" #include "pwm_generator_logic.h" #include "allsensors.h" #include "sensor.h" -#include "error_handling.h" #include "settings.h" #include "interpolation.h" #include "perf_trace.h" +#include "hardware.h" #if EFI_UNIT_TEST #include #include -#include "engine_test_helper.h" #include "mocks.h" +#include "engine_test_helper.h" #endif diff --git a/firmware/util/cli_registry.cpp b/firmware/util/cli_registry.cpp index 1180526e8e..bbedab7630 100644 --- a/firmware/util/cli_registry.cpp +++ b/firmware/util/cli_registry.cpp @@ -14,9 +14,8 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#include "global.h" +#include "pch.h" #include "cli_registry.h" -#include "efilib.h" #if ! EFI_UNIT_TEST #include "eficonsole.h" diff --git a/firmware/util/containers/fl_stack.h b/firmware/util/containers/fl_stack.h index 3950725677..c93ee0b8f8 100644 --- a/firmware/util/containers/fl_stack.h +++ b/firmware/util/containers/fl_stack.h @@ -8,8 +8,6 @@ #pragma once -#include "global.h" - template class FLStack { public: diff --git a/firmware/util/containers/listener_array.cpp b/firmware/util/containers/listener_array.cpp index d035438f3e..2888bafce6 100644 --- a/firmware/util/containers/listener_array.cpp +++ b/firmware/util/containers/listener_array.cpp @@ -5,6 +5,6 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#include "global.h" +#include "pch.h" #include "listener_array.h" diff --git a/firmware/util/containers/listener_array.h b/firmware/util/containers/listener_array.h index 5cad89f629..b52689fb98 100644 --- a/firmware/util/containers/listener_array.h +++ b/firmware/util/containers/listener_array.h @@ -9,7 +9,6 @@ #include #include "rusefi_types.h" -#include "error_handling.h" // todo: reorder parameters for consistency? typedef void (*IntIntVoidListener)(int value1, int value2, void *arg); diff --git a/firmware/util/containers/table_helper.cpp b/firmware/util/containers/table_helper.cpp index 6ca64a985d..c187492250 100644 --- a/firmware/util/containers/table_helper.cpp +++ b/firmware/util/containers/table_helper.cpp @@ -6,9 +6,7 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#include "table_helper.h" -#include "efilib.h" -#include "interpolation.h" +#include "pch.h" void setRpmBin(float array[], int size, float idleRpm, float topRpm) { array[0] = idleRpm - 150; diff --git a/firmware/util/containers/table_helper.h b/firmware/util/containers/table_helper.h index a62da63a0b..a8b9aac282 100644 --- a/firmware/util/containers/table_helper.h +++ b/firmware/util/containers/table_helper.h @@ -8,7 +8,6 @@ #pragma once #include -#include "error_handling.h" #include "interpolation.h" #include "efilib.h" #include "efi_ratio.h" diff --git a/firmware/util/datalogging.cpp b/firmware/util/datalogging.cpp index fa4f50d37a..bd33a2e76d 100644 --- a/firmware/util/datalogging.cpp +++ b/firmware/util/datalogging.cpp @@ -30,7 +30,7 @@ * */ -#include "globalaccess.h" +#include "pch.h" #if ! EFI_UNIT_TEST #include "os_access.h" diff --git a/firmware/util/histogram.cpp b/firmware/util/histogram.cpp index c4099fc34f..93637b8013 100644 --- a/firmware/util/histogram.cpp +++ b/firmware/util/histogram.cpp @@ -9,9 +9,10 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ +#include "pch.h" + #include #include "histogram.h" -#include "global.h" #if defined(HAS_OS_ACCESS) #error "Unexpected OS ACCESS HERE" diff --git a/firmware/util/loggingcentral.cpp b/firmware/util/loggingcentral.cpp index 58aeb6f0d9..318d92384d 100644 --- a/firmware/util/loggingcentral.cpp +++ b/firmware/util/loggingcentral.cpp @@ -21,9 +21,8 @@ * @author Matthew Kennedy */ -#include "global.h" +#include "pch.h" #include "os_access.h" -#include "efilib.h" #include "loggingcentral.h" #include "thread_controller.h" #include "thread_priority.h" diff --git a/firmware/util/math/interpolation.cpp b/firmware/util/math/interpolation.cpp index 97df71ca87..55d68be044 100644 --- a/firmware/util/math/interpolation.cpp +++ b/firmware/util/math/interpolation.cpp @@ -10,8 +10,7 @@ * @author Dmitry Sidin, (c) 2015 */ -#include "global.h" - +#include "pch.h" #include "interpolation.h" diff --git a/firmware/util/math/interpolation.h b/firmware/util/math/interpolation.h index e7d1539067..06f6226e29 100644 --- a/firmware/util/math/interpolation.h +++ b/firmware/util/math/interpolation.h @@ -9,9 +9,7 @@ #include #include "datalogging.h" -#include "efilib.h" #include "obd_error_codes.h" -#include "error_handling.h" #include diff --git a/firmware/util/math/pid.cpp b/firmware/util/math/pid.cpp index 1fb0f56a7a..d7a6d3d597 100644 --- a/firmware/util/math/pid.cpp +++ b/firmware/util/math/pid.cpp @@ -8,11 +8,10 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#include "global.h" +#include "pch.h" #include "os_access.h" #include "pid.h" #include "math.h" -#include "engine_configuration_generated_structures.h" Pid::Pid() { initPidClass(NULL); diff --git a/firmware/util/math/pid.h b/firmware/util/math/pid.h index f76cb9b31c..e023fe85eb 100644 --- a/firmware/util/math/pid.h +++ b/firmware/util/math/pid.h @@ -7,15 +7,8 @@ #pragma once -#include "engine_state_generated.h" #include "pid_state_generated.h" -#if EFI_PROD_CODE || EFI_SIMULATOR -#include "tunerstudio_outputs.h" -#else -#include "engine.h" -#endif - // See PidCic below #define PID_AVG_BUF_SIZE_SHIFT 5 #define PID_AVG_BUF_SIZE (1< diff --git a/unit_tests/global_execution_queue.cpp b/unit_tests/global_execution_queue.cpp index 11e6e3261c..7252d59e3e 100644 --- a/unit_tests/global_execution_queue.cpp +++ b/unit_tests/global_execution_queue.cpp @@ -5,6 +5,7 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ +#include "pch.h" #include "global_execution_queue.h" bool_t debugSignalExecutor = false; diff --git a/unit_tests/global_mocks.cpp b/unit_tests/global_mocks.cpp index 864b7a0164..78d9953122 100644 --- a/unit_tests/global_mocks.cpp +++ b/unit_tests/global_mocks.cpp @@ -1,12 +1,8 @@ -#include "global.h" - -#include "engine_configuration.h" +#include "pch.h" #include "trigger_central.h" #include "map_resize.h" -#include "engine_math.h" -#include "engine_test_helper.h" bool verboseMode = false; diff --git a/unit_tests/logicdata_csv_reader.cpp b/unit_tests/logicdata_csv_reader.cpp index 70e278e7c7..cdd848b9dc 100644 --- a/unit_tests/logicdata_csv_reader.cpp +++ b/unit_tests/logicdata_csv_reader.cpp @@ -5,7 +5,7 @@ * @author Andrey Belomutskiy, (c) 2012-2021 */ -#include "engine_test_helper.h" +#include "pch.h" #include "logicdata_csv_reader.h" static char* trim(char *str) { diff --git a/unit_tests/map_resize.cpp b/unit_tests/map_resize.cpp index 0fd66179f0..9534425830 100644 --- a/unit_tests/map_resize.cpp +++ b/unit_tests/map_resize.cpp @@ -5,9 +5,8 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#include "engine_configuration.h" +#include "pch.h" #include "fuel_math.h" -#include "interpolation.h" #if 1 diff --git a/unit_tests/test_basic_math/test_find_index.cpp b/unit_tests/test_basic_math/test_find_index.cpp index e7603f278f..7881b677b2 100644 --- a/unit_tests/test_basic_math/test_find_index.cpp +++ b/unit_tests/test_basic_math/test_find_index.cpp @@ -5,10 +5,8 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#include "global.h" -#include "engine_math.h" +#include "pch.h" #include "interpolation.h" -#include "unit_test_framework.h" static void testIndex(const int expected, const float array[], int size, float value) { ASSERT_EQ(expected, findIndex(array, size, value)); diff --git a/unit_tests/test_basic_math/test_interpolation_3d.cpp b/unit_tests/test_basic_math/test_interpolation_3d.cpp index 9e01cb9642..919e96c96e 100644 --- a/unit_tests/test_basic_math/test_interpolation_3d.cpp +++ b/unit_tests/test_basic_math/test_interpolation_3d.cpp @@ -5,11 +5,11 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ +#include "pch.h" + #include #include "interpolation.h" -#include "global.h" -#include "unit_test_framework.h" float rpmBins[5] = { 100, 200, 300, 400, 500 }; float mafBins[4] = { 1, 2, 3, 4 }; diff --git a/unit_tests/tests/ignition_injection/injection_mode_transition.cpp b/unit_tests/tests/ignition_injection/injection_mode_transition.cpp index e73c3698c2..a276db6bd7 100644 --- a/unit_tests/tests/ignition_injection/injection_mode_transition.cpp +++ b/unit_tests/tests/ignition_injection/injection_mode_transition.cpp @@ -5,7 +5,7 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#include "engine_test_helper.h" +#include "pch.h" static void doRevolution(EngineTestHelper& eth, int periodMs) { float halfToothTime = (periodMs / 6.0f) / 2; diff --git a/unit_tests/tests/ignition_injection/test_dwell_corner_case_issue_796.cpp b/unit_tests/tests/ignition_injection/test_dwell_corner_case_issue_796.cpp index f8d43d06a0..d91ba844ec 100644 --- a/unit_tests/tests/ignition_injection/test_dwell_corner_case_issue_796.cpp +++ b/unit_tests/tests/ignition_injection/test_dwell_corner_case_issue_796.cpp @@ -5,7 +5,7 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#include "engine_test_helper.h" +#include "pch.h" TEST(scheduler, dwellIssue796) { diff --git a/unit_tests/tests/ignition_injection/test_fuel_computer.cpp b/unit_tests/tests/ignition_injection/test_fuel_computer.cpp index dabaef5a87..b2597ca780 100644 --- a/unit_tests/tests/ignition_injection/test_fuel_computer.cpp +++ b/unit_tests/tests/ignition_injection/test_fuel_computer.cpp @@ -1,11 +1,8 @@ -#include "engine_test_helper.h" +#include "pch.h" // sneaky... #define protected public #include "fuel_computer.h" -#include "mocks.h" - -#include "gtest/gtest.h" using ::testing::FloatEq; diff --git a/unit_tests/tests/ignition_injection/test_fuel_math.cpp b/unit_tests/tests/ignition_injection/test_fuel_math.cpp index d583922a06..690baf9dc9 100644 --- a/unit_tests/tests/ignition_injection/test_fuel_math.cpp +++ b/unit_tests/tests/ignition_injection/test_fuel_math.cpp @@ -1,10 +1,7 @@ -#include "engine_test_helper.h" +#include "pch.h" #include "fuel_math.h" #include "alphan_airmass.h" #include "maf_airmass.h" -#include "mocks.h" - -#include "gtest/gtest.h" using ::testing::StrictMock; using ::testing::FloatNear; diff --git a/unit_tests/tests/ignition_injection/test_fuel_wall_wetting.cpp b/unit_tests/tests/ignition_injection/test_fuel_wall_wetting.cpp index b875ccc0ad..0bb2809e67 100644 --- a/unit_tests/tests/ignition_injection/test_fuel_wall_wetting.cpp +++ b/unit_tests/tests/ignition_injection/test_fuel_wall_wetting.cpp @@ -7,7 +7,7 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#include "engine_test_helper.h" +#include "pch.h" TEST(fuel, testWallWettingEnrichmentMath) { WITH_ENGINE_TEST_HELPER(FORD_ASPIRE_1996); diff --git a/unit_tests/tests/ignition_injection/test_ignition_scheduling.cpp b/unit_tests/tests/ignition_injection/test_ignition_scheduling.cpp index e896052ad3..ec204c330b 100644 --- a/unit_tests/tests/ignition_injection/test_ignition_scheduling.cpp +++ b/unit_tests/tests/ignition_injection/test_ignition_scheduling.cpp @@ -5,7 +5,7 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#include "engine_test_helper.h" +#include "pch.h" #include "spark_logic.h" using ::testing::_; diff --git a/unit_tests/tests/ignition_injection/test_injector_model.cpp b/unit_tests/tests/ignition_injection/test_injector_model.cpp index 3a65f96e53..2f91c45ff4 100644 --- a/unit_tests/tests/ignition_injection/test_injector_model.cpp +++ b/unit_tests/tests/ignition_injection/test_injector_model.cpp @@ -1,10 +1,7 @@ -#include "engine_test_helper.h" +#include "pch.h" #include "injector_model.h" -#include "mocks.h" #include "mock/mock_sensor.h" -#include "gtest/gtest.h" - using ::testing::_; using ::testing::StrictMock; diff --git a/unit_tests/tests/ignition_injection/test_multispark.cpp b/unit_tests/tests/ignition_injection/test_multispark.cpp index 71cbf6191b..e87c4b40d7 100644 --- a/unit_tests/tests/ignition_injection/test_multispark.cpp +++ b/unit_tests/tests/ignition_injection/test_multispark.cpp @@ -5,7 +5,7 @@ * @author Matthew Kennedy, (c) 2020 */ -#include "engine_test_helper.h" +#include "pch.h" #include "advance_map.h" TEST(Multispark, DefaultConfiguration) { diff --git a/unit_tests/tests/ignition_injection/test_one_cylinder_logic.cpp b/unit_tests/tests/ignition_injection/test_one_cylinder_logic.cpp index 399fa9449f..b82a0bd4be 100644 --- a/unit_tests/tests/ignition_injection/test_one_cylinder_logic.cpp +++ b/unit_tests/tests/ignition_injection/test_one_cylinder_logic.cpp @@ -3,7 +3,7 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#include "engine_test_helper.h" +#include "pch.h" #include "spark_logic.h" TEST(issues, issueOneCylinderSpecialCase968) { diff --git a/unit_tests/tests/ignition_injection/test_startOfCrankingPrimingPulse.cpp b/unit_tests/tests/ignition_injection/test_startOfCrankingPrimingPulse.cpp index cf8664160b..985800726f 100644 --- a/unit_tests/tests/ignition_injection/test_startOfCrankingPrimingPulse.cpp +++ b/unit_tests/tests/ignition_injection/test_startOfCrankingPrimingPulse.cpp @@ -5,7 +5,7 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#include "engine_test_helper.h" +#include "pch.h" TEST(engine, testPlainCrankingWithoutAdvancedFeatures) { WITH_ENGINE_TEST_HELPER(TEST_ENGINE); diff --git a/unit_tests/tests/sensor/basic_sensor.cpp b/unit_tests/tests/sensor/basic_sensor.cpp index 08575b2bed..859e795016 100644 --- a/unit_tests/tests/sensor/basic_sensor.cpp +++ b/unit_tests/tests/sensor/basic_sensor.cpp @@ -1,8 +1,7 @@ +#include "pch.h" + #include "mock/mock_sensor.h" #include "stored_value_sensor.h" -#include "unit_test_framework.h" - -#include class SensorBasic : public ::testing::Test { protected: diff --git a/unit_tests/tests/sensor/func_sensor.cpp b/unit_tests/tests/sensor/func_sensor.cpp index ed78e49300..973005e960 100644 --- a/unit_tests/tests/sensor/func_sensor.cpp +++ b/unit_tests/tests/sensor/func_sensor.cpp @@ -1,7 +1,6 @@ -#include "functional_sensor.h" -#include "global.h" +#include "pch.h" -#include +#include "functional_sensor.h" struct DoublerFunc final : public SensorConverter { SensorResult convert(float input) const { diff --git a/unit_tests/tests/sensor/lin_func.cpp b/unit_tests/tests/sensor/lin_func.cpp index 4dff471553..022b72d7c3 100644 --- a/unit_tests/tests/sensor/lin_func.cpp +++ b/unit_tests/tests/sensor/lin_func.cpp @@ -1,5 +1,6 @@ +#include "pch.h" + #include "linear_func.h" -#include "unit_test_framework.h" class LinearFuncTest : public ::testing::Test { protected: diff --git a/unit_tests/tests/sensor/resist_func.cpp b/unit_tests/tests/sensor/resist_func.cpp index c5f864ab8e..66ceb34290 100644 --- a/unit_tests/tests/sensor/resist_func.cpp +++ b/unit_tests/tests/sensor/resist_func.cpp @@ -2,7 +2,8 @@ * @author Matthew Kennedy, (c) 2019 */ -#include "unit_test_framework.h" +#include "pch.h" + #include "resistance_func.h" TEST(resistance, OutOfRange) diff --git a/unit_tests/tests/sensor/table_func.cpp b/unit_tests/tests/sensor/table_func.cpp index 802f96ec20..a0dff9f955 100644 --- a/unit_tests/tests/sensor/table_func.cpp +++ b/unit_tests/tests/sensor/table_func.cpp @@ -1,6 +1,6 @@ -#include "table_func.h" +#include "pch.h" -#include +#include "table_func.h" TEST(TableFuncTest, basic) { float in[] = { 0, 10 }; diff --git a/unit_tests/tests/sensor/test_cj125.cpp b/unit_tests/tests/sensor/test_cj125.cpp index 425d12d732..b2440769ef 100644 --- a/unit_tests/tests/sensor/test_cj125.cpp +++ b/unit_tests/tests/sensor/test_cj125.cpp @@ -5,8 +5,9 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ +#include "pch.h" + #include "cj125_logic.h" -#include "engine_test_helper.h" class TestSpi : public Cj125SpiStream { public: diff --git a/unit_tests/tests/sensor/therm_func.cpp b/unit_tests/tests/sensor/therm_func.cpp index 11668001bb..19119c0955 100644 --- a/unit_tests/tests/sensor/therm_func.cpp +++ b/unit_tests/tests/sensor/therm_func.cpp @@ -2,9 +2,9 @@ * @author Matthew Kennedy, (c) 2019 */ -#include "unit_test_framework.h" +#include "pch.h" + #include "thermistor_func.h" -#include "thermistors.h" TEST(thermistor, Thermistor1) { ThermistorFunc tf; diff --git a/unit_tests/tests/system/test_periodic_thread_controller.cpp b/unit_tests/tests/system/test_periodic_thread_controller.cpp index 9370618266..2a379fa391 100644 --- a/unit_tests/tests/system/test_periodic_thread_controller.cpp +++ b/unit_tests/tests/system/test_periodic_thread_controller.cpp @@ -5,7 +5,8 @@ * @author Andrey Belomutskiy, (c) 2012-2021 */ -#include +#include "pch.h" + #include "periodic_thread_controller.h" #include diff --git a/unit_tests/tests/test_boost.cpp b/unit_tests/tests/test_boost.cpp index 8d16829f56..4bac321b08 100644 --- a/unit_tests/tests/test_boost.cpp +++ b/unit_tests/tests/test_boost.cpp @@ -1,8 +1,6 @@ -#include "boost_control.h" -#include "engine_controller.h" -#include "engine_test_helper.h" +#include "pch.h" -#include "mocks.h" +#include "boost_control.h" using ::testing::_; using ::testing::StrictMock; diff --git a/unit_tests/tests/test_change_engine_type.cpp b/unit_tests/tests/test_change_engine_type.cpp index 452ed7d7fa..9aea88e5f1 100644 --- a/unit_tests/tests/test_change_engine_type.cpp +++ b/unit_tests/tests/test_change_engine_type.cpp @@ -5,8 +5,7 @@ * @author Andrey Belomutskiy, (c) 2012-2021 */ -#include "engine_test_helper.h" -#include "settings.h" +#include "pch.h" extern engine_configuration_s & activeConfiguration; diff --git a/unit_tests/tests/test_cpp_memory_layout.cpp b/unit_tests/tests/test_cpp_memory_layout.cpp index 18efdcbb9d..8d758c000e 100644 --- a/unit_tests/tests/test_cpp_memory_layout.cpp +++ b/unit_tests/tests/test_cpp_memory_layout.cpp @@ -5,7 +5,7 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#include "unit_test_framework.h" +#include "pch.h" // in C++ struct is pretty much a class just fields are public by default struct TestParent { diff --git a/unit_tests/tests/test_dc_motor.cpp b/unit_tests/tests/test_dc_motor.cpp index 3af162ad60..343469ccbb 100644 --- a/unit_tests/tests/test_dc_motor.cpp +++ b/unit_tests/tests/test_dc_motor.cpp @@ -1,6 +1,6 @@ -#include "dc_motor.h" +#include "pch.h" -#include "mocks.h" +#include "dc_motor.h" using ::testing::InSequence; using ::testing::NiceMock; diff --git a/unit_tests/tests/test_dynoview.cpp b/unit_tests/tests/test_dynoview.cpp index 736c42d389..124966e0e9 100644 --- a/unit_tests/tests/test_dynoview.cpp +++ b/unit_tests/tests/test_dynoview.cpp @@ -1,11 +1,8 @@ -#include "engine_test_helper.h" -#include "engine_controller.h" +#include "pch.h" + #include "dynoview.h" #include "vehicle_speed.h" -#include - - void printResults(DynoView *dut) { #ifdef DBG_TESTS std::cerr.precision(32); diff --git a/unit_tests/tests/test_engine_math.cpp b/unit_tests/tests/test_engine_math.cpp index 9b008e2b33..899f3f3caf 100644 --- a/unit_tests/tests/test_engine_math.cpp +++ b/unit_tests/tests/test_engine_math.cpp @@ -5,10 +5,9 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#include "engine_math.h" -#include "map.h" +#include "pch.h" + #include "speed_density.h" -#include "engine_test_helper.h" #include "maf.h" #include "advance_map.h" diff --git a/unit_tests/tests/test_gpiochip.cpp b/unit_tests/tests/test_gpiochip.cpp index ad708bb731..7f6eceb65c 100644 --- a/unit_tests/tests/test_gpiochip.cpp +++ b/unit_tests/tests/test_gpiochip.cpp @@ -4,8 +4,8 @@ * @date Mar 12, 2019 */ -#include "unit_test_framework.h" -#include "global.h" +#include "pch.h" + #include "gpio/gpio_ext.h" using ::testing::_; diff --git a/unit_tests/tests/test_hardware_reinit.cpp b/unit_tests/tests/test_hardware_reinit.cpp index f10ccdba10..c16575420b 100644 --- a/unit_tests/tests/test_hardware_reinit.cpp +++ b/unit_tests/tests/test_hardware_reinit.cpp @@ -1,6 +1,4 @@ - - -#include "engine_test_helper.h" +#include "pch.h" TEST(hardware, reinit) { WITH_ENGINE_TEST_HELPER(MIATA_NA6_MAP); diff --git a/unit_tests/tests/test_hip9011.cpp b/unit_tests/tests/test_hip9011.cpp index ac14c7f91c..08b8c97b43 100644 --- a/unit_tests/tests/test_hip9011.cpp +++ b/unit_tests/tests/test_hip9011.cpp @@ -4,9 +4,10 @@ * Created on: Mar 22, 2018 */ -#include "unit_test_framework.h" +#include "pch.h" #include "hip9011_logic.h" #include "test_parameters.h" + using ::testing::_; TEST(hip9011, lookup) { diff --git a/unit_tests/tests/test_launch.cpp b/unit_tests/tests/test_launch.cpp index e54ffee1e8..4f1711dfcc 100644 --- a/unit_tests/tests/test_launch.cpp +++ b/unit_tests/tests/test_launch.cpp @@ -1,10 +1,8 @@ -#include "engine_test_helper.h" -#include "engine_controller.h" +#include "pch.h" + #include "launch_control.h" #include "vehicle_speed.h" -#include - TEST(LaunchControl, TpsCondition) { WITH_ENGINE_TEST_HELPER(TEST_ENGINE); diff --git a/unit_tests/tests/test_limp.cpp b/unit_tests/tests/test_limp.cpp index c32285b74e..d0e3ae933f 100644 --- a/unit_tests/tests/test_limp.cpp +++ b/unit_tests/tests/test_limp.cpp @@ -1,6 +1,6 @@ +#include "pch.h" + #include "limp_manager.h" -#include "engine_test_helper.h" -#include TEST(limp, testFatalError) { LimpManager dut; diff --git a/unit_tests/tests/test_logic_expression.cpp b/unit_tests/tests/test_logic_expression.cpp index 3dd120fb29..bd1c0ca5e9 100644 --- a/unit_tests/tests/test_logic_expression.cpp +++ b/unit_tests/tests/test_logic_expression.cpp @@ -7,11 +7,10 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ +#include "pch.h" + #include "fsio_impl.h" #include "cli_registry.h" -#include "engine_test_helper.h" -#include "thermistors.h" -#include "allsensors.h" #define TEST_POOL_SIZE 256 diff --git a/unit_tests/tests/test_on_demand_parameters.cpp b/unit_tests/tests/test_on_demand_parameters.cpp index 77b57d39b8..3a29c4c81a 100644 --- a/unit_tests/tests/test_on_demand_parameters.cpp +++ b/unit_tests/tests/test_on_demand_parameters.cpp @@ -5,7 +5,7 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#include "unit_test_framework.h" +#include "pch.h" #include "test_parameters.h" TestParameters* TestParameters::put(string key, float value) { diff --git a/unit_tests/tests/test_pid.cpp b/unit_tests/tests/test_pid.cpp index 68c51d6560..0a954b13f3 100644 --- a/unit_tests/tests/test_pid.cpp +++ b/unit_tests/tests/test_pid.cpp @@ -7,7 +7,8 @@ // see also idle.timingPid test -#include "unit_test_framework.h" +#include "pch.h" + #include "pid.h" TEST(util, pid) { diff --git a/unit_tests/tests/test_pid_auto.cpp b/unit_tests/tests/test_pid_auto.cpp index 09ddaeb168..c6976b3771 100644 --- a/unit_tests/tests/test_pid_auto.cpp +++ b/unit_tests/tests/test_pid_auto.cpp @@ -5,10 +5,8 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#include "global.h" +#include "pch.h" #include "pid_auto_tune.h" -#include "unit_test_framework.h" -#include "cyclic_buffer.h" efitimems_t mockTimeMs = 0; diff --git a/unit_tests/tests/test_sensors.cpp b/unit_tests/tests/test_sensors.cpp index b50b65387c..25e13da5fe 100644 --- a/unit_tests/tests/test_sensors.cpp +++ b/unit_tests/tests/test_sensors.cpp @@ -5,10 +5,7 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#include "global.h" -#include "thermistors.h" -#include "allsensors.h" -#include "engine_test_helper.h" +#include "pch.h" TEST(sensors, mapDecoding) { WITH_ENGINE_TEST_HELPER(FORD_INLINE_6_1995); diff --git a/unit_tests/tests/test_start_stop.cpp b/unit_tests/tests/test_start_stop.cpp index 1cc9ba0ef3..19fe790a4e 100644 --- a/unit_tests/tests/test_start_stop.cpp +++ b/unit_tests/tests/test_start_stop.cpp @@ -5,8 +5,7 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#include "engine_test_helper.h" -#include "engine_controller.h" +#include "pch.h" TEST(start, startStop) { std::unordered_map sensorVals = {{ SensorType::AcceleratorPedal, 0 }}; diff --git a/unit_tests/tests/test_stepper.cpp b/unit_tests/tests/test_stepper.cpp index b02a1e467f..4392cfc101 100644 --- a/unit_tests/tests/test_stepper.cpp +++ b/unit_tests/tests/test_stepper.cpp @@ -1,6 +1,6 @@ +#include "pch.h" + #include "stepper.h" -#include "engine_test_helper.h" -#include "mocks.h" TEST(Stepper, IgnoreSmallChanges) { StepperMotorBase dut; diff --git a/unit_tests/tests/test_stft.cpp b/unit_tests/tests/test_stft.cpp index 88f7a88f8c..1f84934ca3 100644 --- a/unit_tests/tests/test_stft.cpp +++ b/unit_tests/tests/test_stft.cpp @@ -1,13 +1,8 @@ +#include "pch.h" -#include "engine_test_helper.h" #include "closed_loop_fuel_cell.h" #include "closed_loop_fuel.h" -#include "engine.h" - -#include "gtest/gtest.h" -#include "gmock/gmock.h" - using ::testing::_; using ::testing::Return; using ::testing::StrictMock; diff --git a/unit_tests/tests/test_tacho.cpp b/unit_tests/tests/test_tacho.cpp index bf4721707d..13ef54ea29 100644 --- a/unit_tests/tests/test_tacho.cpp +++ b/unit_tests/tests/test_tacho.cpp @@ -1,4 +1,4 @@ -#include "engine_test_helper.h" +#include "pch.h" extern float getTachFreq(void); extern float getTachDuty(void); diff --git a/unit_tests/tests/test_tunerstudio.cpp b/unit_tests/tests/test_tunerstudio.cpp index 8790e94206..efe4ff5f36 100644 --- a/unit_tests/tests/test_tunerstudio.cpp +++ b/unit_tests/tests/test_tunerstudio.cpp @@ -1,4 +1,4 @@ -#include "engine_test_helper.h" +#include "pch.h" #include "tunerstudio_io.h" static uint8_t st5TestBuffer[16000]; diff --git a/unit_tests/tests/test_vvt.cpp b/unit_tests/tests/test_vvt.cpp index f8bdf07422..e50933ac56 100644 --- a/unit_tests/tests/test_vvt.cpp +++ b/unit_tests/tests/test_vvt.cpp @@ -1,6 +1,6 @@ -#include "engine_test_helper.h" +#include "pch.h" + #include "vvt.h" -#include "mocks.h" using ::testing::StrictMock; using ::testing::Return; diff --git a/unit_tests/tests/trigger/test_2jz_vvt.cpp b/unit_tests/tests/trigger/test_2jz_vvt.cpp index aa0d18c1ae..3809bb71e3 100644 --- a/unit_tests/tests/trigger/test_2jz_vvt.cpp +++ b/unit_tests/tests/trigger/test_2jz_vvt.cpp @@ -5,7 +5,7 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#include "engine_test_helper.h" +#include "pch.h" TEST(sensors, test2jz) { diff --git a/unit_tests/tests/trigger/test_all_triggers.cpp b/unit_tests/tests/trigger/test_all_triggers.cpp index b75d08de20..ef0c907dff 100644 --- a/unit_tests/tests/trigger/test_all_triggers.cpp +++ b/unit_tests/tests/trigger/test_all_triggers.cpp @@ -1,9 +1,7 @@ /** * @file test_all_triggers.cpp */ -#include "engine.h" - -#include +#include "pch.h" // uncomment to test only newest trigger //#define TEST_FROM_TRIGGER_ID ((int)TT_UNUSED - 1) diff --git a/unit_tests/tests/trigger/test_cam_vvt_input.cpp b/unit_tests/tests/trigger/test_cam_vvt_input.cpp index 40dc9008f6..3c74cb075e 100644 --- a/unit_tests/tests/trigger/test_cam_vvt_input.cpp +++ b/unit_tests/tests/trigger/test_cam_vvt_input.cpp @@ -5,7 +5,8 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#include "engine_test_helper.h" +#include "pch.h" + extern WarningCodeState unitTestWarningCodeState; #include "engine_sniffer.h" diff --git a/unit_tests/tests/trigger/test_fasterEngineSpinningUp.cpp b/unit_tests/tests/trigger/test_fasterEngineSpinningUp.cpp index 42eee22733..14c90a940e 100644 --- a/unit_tests/tests/trigger/test_fasterEngineSpinningUp.cpp +++ b/unit_tests/tests/trigger/test_fasterEngineSpinningUp.cpp @@ -4,8 +4,7 @@ * Created on: Mar 6, 2018 */ -#include "engine_math.h" -#include "engine_test_helper.h" +#include "pch.h" TEST(cranking, testFasterEngineSpinningUp) { WITH_ENGINE_TEST_HELPER(TEST_ENGINE); diff --git a/unit_tests/tests/trigger/test_injection_scheduling.cpp b/unit_tests/tests/trigger/test_injection_scheduling.cpp index effdfb7fa3..9212171707 100644 --- a/unit_tests/tests/trigger/test_injection_scheduling.cpp +++ b/unit_tests/tests/trigger/test_injection_scheduling.cpp @@ -1,10 +1,7 @@ -#include "engine_test_helper.h" +#include "pch.h" #include "main_trigger_callback.h" #include "injector_model.h" -#include -#include "mocks.h" - using ::testing::_; using ::testing::StrictMock; using ::testing::InSequence; diff --git a/unit_tests/tests/trigger/test_issue_898.cpp b/unit_tests/tests/trigger/test_issue_898.cpp index 9c139961a8..698e414845 100644 --- a/unit_tests/tests/trigger/test_issue_898.cpp +++ b/unit_tests/tests/trigger/test_issue_898.cpp @@ -5,7 +5,7 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#include "engine_test_helper.h" +#include "pch.h" static void boardConfigurationForIssue898(engine_configuration_s *engineConfiguration) { setOperationMode(engineConfiguration, FOUR_STROKE_CRANK_SENSOR); diff --git a/unit_tests/tests/trigger/test_miata_na_tdc.cpp b/unit_tests/tests/trigger/test_miata_na_tdc.cpp index 19b5287e85..94f7137acb 100644 --- a/unit_tests/tests/trigger/test_miata_na_tdc.cpp +++ b/unit_tests/tests/trigger/test_miata_na_tdc.cpp @@ -1,5 +1,5 @@ -#include "engine_test_helper.h" -#include "globalaccess.h" +#include "pch.h" + #include "trigger_simulator.h" #include "trigger_emulator_algo.h" diff --git a/unit_tests/tests/trigger/test_nissan_vq_vvt.cpp b/unit_tests/tests/trigger/test_nissan_vq_vvt.cpp index 67ea6f628c..5286952def 100644 --- a/unit_tests/tests/trigger/test_nissan_vq_vvt.cpp +++ b/unit_tests/tests/trigger/test_nissan_vq_vvt.cpp @@ -5,7 +5,7 @@ * @author Andrey Belomutskiy, (c) 2012-2021 */ -#include "engine_test_helper.h" +#include "pch.h" #include "trigger_nissan.h" #include "nissan_vq.h" diff --git a/unit_tests/tests/trigger/test_override_gaps.cpp b/unit_tests/tests/trigger/test_override_gaps.cpp index d0a2c20903..52375d1d9b 100644 --- a/unit_tests/tests/trigger/test_override_gaps.cpp +++ b/unit_tests/tests/trigger/test_override_gaps.cpp @@ -5,8 +5,7 @@ * @author Andrey Belomutskiy, (c) 2012-2021 */ -#include "engine_test_helper.h" -#include "globalaccess.h" +#include "pch.h" TEST(subaru, overrideGap) { WITH_ENGINE_TEST_HELPER(MIATA_NA6_MAP); diff --git a/unit_tests/tests/trigger/test_quad_cam.cpp b/unit_tests/tests/trigger/test_quad_cam.cpp index 5b8668f237..478f1f200e 100644 --- a/unit_tests/tests/trigger/test_quad_cam.cpp +++ b/unit_tests/tests/trigger/test_quad_cam.cpp @@ -3,7 +3,7 @@ * */ -#include "engine_test_helper.h" +#include "pch.h" TEST(trigger, testQuadCam) { // setting some weird engine diff --git a/unit_tests/tests/trigger/test_real_cranking_miata_NA.cpp b/unit_tests/tests/trigger/test_real_cranking_miata_NA.cpp index 278b66a83b..5052c3fd24 100644 --- a/unit_tests/tests/trigger/test_real_cranking_miata_NA.cpp +++ b/unit_tests/tests/trigger/test_real_cranking_miata_NA.cpp @@ -5,7 +5,8 @@ * @author Andrey Belomutskiy, (c) 2012-2021 */ -#include "engine_test_helper.h" +#include "pch.h" + #include "logicdata_csv_reader.h" #include diff --git a/unit_tests/tests/trigger/test_real_cranking_miata_na6.cpp b/unit_tests/tests/trigger/test_real_cranking_miata_na6.cpp index 529ae3e2a7..4797d67243 100644 --- a/unit_tests/tests/trigger/test_real_cranking_miata_na6.cpp +++ b/unit_tests/tests/trigger/test_real_cranking_miata_na6.cpp @@ -5,7 +5,8 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#include "engine_test_helper.h" +#include "pch.h" + #include "logicdata_csv_reader.h" extern int timeNowUs; diff --git a/unit_tests/tests/trigger/test_real_cranking_nissan_vq40.cpp b/unit_tests/tests/trigger/test_real_cranking_nissan_vq40.cpp index 1e0d891c86..c43ea07bf1 100644 --- a/unit_tests/tests/trigger/test_real_cranking_nissan_vq40.cpp +++ b/unit_tests/tests/trigger/test_real_cranking_nissan_vq40.cpp @@ -5,7 +5,7 @@ * @author Andrey Belomutskiy, (c) 2012-2021 */ -#include "engine_test_helper.h" +#include "pch.h" #include "logicdata_csv_reader.h" TEST(realCrankingVQ40, normalCranking) { diff --git a/unit_tests/tests/trigger/test_real_nb2_cranking.cpp b/unit_tests/tests/trigger/test_real_nb2_cranking.cpp index 3201736cee..be179ce24e 100644 --- a/unit_tests/tests/trigger/test_real_nb2_cranking.cpp +++ b/unit_tests/tests/trigger/test_real_nb2_cranking.cpp @@ -5,7 +5,7 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#include "engine_test_helper.h" +#include "pch.h" #include "logicdata_csv_reader.h" TEST(realCrankingNB2, normalCranking) { diff --git a/unit_tests/tests/trigger/test_real_volkswagen.cpp b/unit_tests/tests/trigger/test_real_volkswagen.cpp index 73daa66f76..21aa7b2c78 100644 --- a/unit_tests/tests/trigger/test_real_volkswagen.cpp +++ b/unit_tests/tests/trigger/test_real_volkswagen.cpp @@ -5,8 +5,8 @@ * @author Andrey Belomutskiy, (c) 2012-2021 */ +#include "pch.h" -#include "engine_test_helper.h" #include "logicdata_csv_reader.h" TEST(crankingVW, vwRealCrankingFromFile) { diff --git a/unit_tests/tests/trigger/test_rpm_multiplier.cpp b/unit_tests/tests/trigger/test_rpm_multiplier.cpp index 378175eef4..be0db4beac 100644 --- a/unit_tests/tests/trigger/test_rpm_multiplier.cpp +++ b/unit_tests/tests/trigger/test_rpm_multiplier.cpp @@ -7,7 +7,7 @@ * @author Andrey Belomutskiy, (c) 2012-2021 */ -#include "engine_test_helper.h" +#include "pch.h" static void runRpmTest(operation_mode_e mode, int expected) { WITH_ENGINE_TEST_HELPER(TEST_ENGINE); diff --git a/unit_tests/tests/trigger/test_symmetrical_crank.cpp b/unit_tests/tests/trigger/test_symmetrical_crank.cpp index 6bf6f48653..7df91406b2 100644 --- a/unit_tests/tests/trigger/test_symmetrical_crank.cpp +++ b/unit_tests/tests/trigger/test_symmetrical_crank.cpp @@ -5,7 +5,7 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#include "engine_test_helper.h" +#include "pch.h" static void postFourEvents(EngineTestHelper *eth, float mult) { eth->fireFall(mult * 394); diff --git a/unit_tests/tests/trigger/test_trigger_multi_sync.cpp b/unit_tests/tests/trigger/test_trigger_multi_sync.cpp index 2183811809..baff7dfb50 100644 --- a/unit_tests/tests/trigger/test_trigger_multi_sync.cpp +++ b/unit_tests/tests/trigger/test_trigger_multi_sync.cpp @@ -5,7 +5,7 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#include "engine_test_helper.h" +#include "pch.h" #include "trigger_mazda.h" TEST(trigger, miataNA) { diff --git a/unit_tests/tests/trigger/test_trigger_noiseless.cpp b/unit_tests/tests/trigger/test_trigger_noiseless.cpp index b6edfabfc0..d24a99af00 100644 --- a/unit_tests/tests/trigger/test_trigger_noiseless.cpp +++ b/unit_tests/tests/trigger/test_trigger_noiseless.cpp @@ -4,16 +4,12 @@ * @date Apr 20, 2018 */ -#include "global.h" -#include "engine_test_helper.h" +#include "pch.h" + #include "trigger_decoder.h" -#include "engine_math.h" -#include "allsensors.h" -#include "rpm_calculator.h" #include "event_queue.h" #include "trigger_central.h" #include "main_trigger_callback.h" -#include "engine.h" #include "advance_map.h" #include "speed_density.h" #include "fuel_math.h" diff --git a/unit_tests/tests/util/test_timer.cpp b/unit_tests/tests/util/test_timer.cpp index b8601dc8f9..37e7660684 100644 --- a/unit_tests/tests/util/test_timer.cpp +++ b/unit_tests/tests/util/test_timer.cpp @@ -1,7 +1,6 @@ -#include "engine_test_helper.h" +#include "pch.h" #include "timer.h" - TEST(util, timer) { WITH_ENGINE_TEST_HELPER(TEST_ENGINE); Timer timer; diff --git a/unit_tests/unit_test_framework.cpp b/unit_tests/unit_test_framework.cpp index 5a1465d54b..5f508a1d96 100644 --- a/unit_tests/unit_test_framework.cpp +++ b/unit_tests/unit_test_framework.cpp @@ -5,9 +5,9 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ +#include "pch.h" + #include -#include "global.h" -#include "unit_test_framework.h" /** * ASSERT_xxx macro could only be used from inside 'void' methods - for cases where non-void methods are asserting, these diff --git a/unit_tests/unit_test_framework.h b/unit_tests/unit_test_framework.h index 95823788b3..4fd319e7c9 100644 --- a/unit_tests/unit_test_framework.h +++ b/unit_tests/unit_test_framework.h @@ -7,9 +7,6 @@ #pragma once -#include "engine.h" -#include "gtest/gtest.h" -#include "gmock/gmock.h" using ::testing::Return; // This lets us inspect private state from unit tests