diff --git a/firmware/controllers/algo/algo.cpp b/firmware/controllers/algo/algo.cpp deleted file mode 100644 index b7ebe74079..0000000000 --- a/firmware/controllers/algo/algo.cpp +++ /dev/null @@ -1,36 +0,0 @@ -/* - * @file algo.cpp - * - * @date Mar 2, 2014 - * @author Andrey Belomutskiy, (c) 2012-2018 - * - * - * This file is part of rusEfi - see http://rusefi.com - * - * rusEfi is free software; you can redistribute it and/or modify it under the terms of - * the GNU General Public License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * rusEfi is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along with this program. - * If not, see . - */ - -#include "globalaccess.h" -#include "algo.h" -#include "advance_map.h" -#include "fuel_math.h" -#include "settings.h" -#include "speed_density.h" -#include "fsio_impl.h" - -EXTERN_ENGINE; - -void initDataStructures(DECLARE_ENGINE_PARAMETER_SIGNATURE) { - initFuelMap(PASS_ENGINE_PARAMETER_SIGNATURE); - initTimingMap(PASS_ENGINE_PARAMETER_SIGNATURE); - initSpeedDensity(PASS_ENGINE_PARAMETER_SIGNATURE); -} diff --git a/firmware/controllers/algo/algo.h b/firmware/controllers/algo/algo.h deleted file mode 100644 index 515cf61d91..0000000000 --- a/firmware/controllers/algo/algo.h +++ /dev/null @@ -1,12 +0,0 @@ -/* - * @file algo.h - * - * @date Mar 2, 2014 - * @author Andrey Belomutskiy, (c) 2012-2019 - */ - -#pragma once - -#include "global.h" - -void initDataStructures(DECLARE_ENGINE_PARAMETER_SIGNATURE); diff --git a/firmware/controllers/algo/algo.mk b/firmware/controllers/algo/algo.mk index e150fdcf32..d55e64de0a 100644 --- a/firmware/controllers/algo/algo.mk +++ b/firmware/controllers/algo/algo.mk @@ -10,4 +10,3 @@ CONTROLLERS_ALGO_SRC_CPP = $(PROJECT_DIR)/controllers/algo/advance_map.cpp \ $(PROJECT_DIR)/controllers/algo/engine2.cpp \ $(PROJECT_DIR)/controllers/gauges/lcd_menu_tree.cpp \ $(PROJECT_DIR)/controllers/algo/event_registry.cpp \ - $(PROJECT_DIR)/controllers/algo/algo.cpp \ diff --git a/firmware/controllers/engine_controller.cpp b/firmware/controllers/engine_controller.cpp index 31f77436a9..5676c4b2f0 100644 --- a/firmware/controllers/engine_controller.cpp +++ b/firmware/controllers/engine_controller.cpp @@ -28,6 +28,7 @@ #include "fsio_core.h" #include "fsio_impl.h" #include "idle_thread.h" +#include "advance_map.h" #include "rpm_calculator.h" #include "main_trigger_callback.h" #include "io_pins.h" @@ -41,7 +42,7 @@ #include "malfunction_central.h" #include "malfunction_indicator.h" #include "engine.h" -#include "algo.h" +#include "speed_density.h" #include "local_version_holder.h" #include "alternator_controller.h" #include "fuel_math.h" @@ -96,6 +97,12 @@ EXTERN_ENGINE; +void initDataStructures(DECLARE_ENGINE_PARAMETER_SIGNATURE) { + initFuelMap(PASS_ENGINE_PARAMETER_SIGNATURE); + initTimingMap(PASS_ENGINE_PARAMETER_SIGNATURE); + initSpeedDensity(PASS_ENGINE_PARAMETER_SIGNATURE); +} + static void mostCommonInitEngineController(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_SUFFIX) { #if !EFI_UNIT_TEST initSensors(); diff --git a/firmware/controllers/engine_controller.h b/firmware/controllers/engine_controller.h index 3f9c0eef6b..307f06cab2 100644 --- a/firmware/controllers/engine_controller.h +++ b/firmware/controllers/engine_controller.h @@ -15,6 +15,8 @@ void initPeriodicEvents(DECLARE_ENGINE_PARAMETER_SIGNATURE); void initEngineContoller(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_SUFFIX); void commonInitEngineController(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_SUFFIX); +void initDataStructures(DECLARE_ENGINE_PARAMETER_SIGNATURE); + #if EFI_ENABLE_MOCK_ADC void setMockVoltage(int hwChannel, float voltage DECLARE_ENGINE_PARAMETER_SUFFIX); #endif diff --git a/firmware/controllers/math/speed_density.h b/firmware/controllers/math/speed_density.h index 06f19b98ab..05806ef020 100644 --- a/firmware/controllers/math/speed_density.h +++ b/firmware/controllers/math/speed_density.h @@ -2,10 +2,10 @@ * @file speed_density.h * * @date May 29, 2014 - * @author Andrey Belomutskiy, (c) 2012-2017 + * @author Andrey Belomutskiy, (c) 2012-2019 */ -#ifndef SPEED_DENSITY_H_ -#define SPEED_DENSITY_H_ + +#pragma once #define gramm_second_to_cc_minute(gs) ((gs) / 0.0119997981) #define cc_minute_to_gramm_second(ccm) ((ccm) * 0.0119997981) @@ -17,5 +17,3 @@ float sdMath(float airMass, float AFR DECLARE_ENGINE_PARAMETER_SUFFIX); void setDefaultVETable(DECLARE_ENGINE_PARAMETER_SIGNATURE); void initSpeedDensity(DECLARE_ENGINE_PARAMETER_SIGNATURE); floatms_t getSpeedDensityFuel(float map DECLARE_ENGINE_PARAMETER_SUFFIX); - -#endif /* SPEED_DENSITY_H_ */ diff --git a/firmware/hw_layer/hardware.cpp b/firmware/hw_layer/hardware.cpp index 3aa41ee0df..ef80e22b3f 100644 --- a/firmware/hw_layer/hardware.cpp +++ b/firmware/hw_layer/hardware.cpp @@ -42,7 +42,6 @@ #include "neo6m.h" #include "lcd_HD44780.h" #include "settings.h" -#include "algo.h" #include "joystick.h" #include "cdm_ion_sense.h" #include "trigger_central.h" diff --git a/firmware/rusefi.cpp b/firmware/rusefi.cpp index 15b493319f..6686835aa4 100644 --- a/firmware/rusefi.cpp +++ b/firmware/rusefi.cpp @@ -119,7 +119,6 @@ #include "status_loop.h" #include "pin_repository.h" #include "flash_main.h" -#include "algo.h" #include "custom_engine.h" #include "engine_math.h" #include "mpu_util.h" diff --git a/simulator/simulator/rusEfiFunctionalTest.cpp b/simulator/simulator/rusEfiFunctionalTest.cpp index 468f0b4109..5692302b3d 100644 --- a/simulator/simulator/rusEfiFunctionalTest.cpp +++ b/simulator/simulator/rusEfiFunctionalTest.cpp @@ -15,7 +15,6 @@ #include "pwm_generator_logic.h" #include "trigger_central.h" #include "datalogging.h" -#include "algo.h" #include "rpm_calculator.h" #include "engine_sniffer.h" #include "status_loop.h" diff --git a/unit_tests/engine_test_helper.cpp b/unit_tests/engine_test_helper.cpp index e07f91c24f..24cc2e4ee4 100644 --- a/unit_tests/engine_test_helper.cpp +++ b/unit_tests/engine_test_helper.cpp @@ -14,7 +14,6 @@ #include "allsensors.h" #include "engine_controller.h" #include "advance_map.h" -#include "algo.h" extern int timeNowUs; extern EnginePins enginePins; diff --git a/unit_tests/tests/test_trigger_decoder.cpp b/unit_tests/tests/test_trigger_decoder.cpp index 4ab94ecb57..4cc6c205f6 100644 --- a/unit_tests/tests/test_trigger_decoder.cpp +++ b/unit_tests/tests/test_trigger_decoder.cpp @@ -5,25 +5,17 @@ * @author Andrey Belomutskiy, (c) 2012-2018 */ -#include "global.h" #include "engine_test_helper.h" #include "trigger_decoder.h" #include "engine_math.h" #include "allsensors.h" - +#include "engine_controller.h" #include "ford_aspire.h" #include "dodge_neon.h" #include "ford_1995_inline_6.h" -#include "rpm_calculator.h" #include "event_queue.h" -#include "algo.h" #include "trigger_mazda.h" #include "trigger_chrysler.h" -#include "tps.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/test_trigger_noiseless.cpp b/unit_tests/tests/test_trigger_noiseless.cpp index 8b5df27e3c..cd009ef492 100644 --- a/unit_tests/tests/test_trigger_noiseless.cpp +++ b/unit_tests/tests/test_trigger_noiseless.cpp @@ -11,7 +11,6 @@ #include "allsensors.h" #include "rpm_calculator.h" #include "event_queue.h" -#include "algo.h" #include "trigger_central.h" #include "main_trigger_callback.h" #include "engine.h"