Use pch in lots of files (#3066)

* most engine.h

* most engine_configuration

* more

* more

* more

* more

* more

* moooooore

* ok I'm done for now

* oops
This commit is contained in:
Matthew Kennedy 2021-07-25 22:05:17 -07:00 committed by GitHub
parent 9ea307a534
commit d3ec2b21d1
135 changed files with 225 additions and 575 deletions

View File

@ -1,6 +1,6 @@
#include "global.h" #include "pch.h"
#include "hardware.h" #include "hardware.h"
#include "efi_gpio.h"
/* /*
* We need only a small portion of code from rusEFI codebase in the bootloader. * We need only a small portion of code from rusEFI codebase in the bootloader.

View File

@ -24,10 +24,9 @@
* *
*/ */
#include "global.h" #include "pch.h"
#include "status_loop.h" #include "status_loop.h"
#include "hip9011_logic.h" #include "hip9011_logic.h"
#include "engine_controller.h"
#include "adc_inputs.h" #include "adc_inputs.h"
#if EFI_LOGIC_ANALYZER #if EFI_LOGIC_ANALYZER
@ -35,10 +34,7 @@
#endif /* EFI_LOGIC_ANALYZER */ #endif /* EFI_LOGIC_ANALYZER */
#include "trigger_central.h" #include "trigger_central.h"
#include "allsensors.h"
#include "sensor_reader.h" #include "sensor_reader.h"
#include "io_pins.h"
#include "efi_gpio.h"
#include "mmc_card.h" #include "mmc_card.h"
#include "console_io.h" #include "console_io.h"
#include "malfunction_central.h" #include "malfunction_central.h"
@ -48,15 +44,11 @@
#include "tunerstudio.h" #include "tunerstudio.h"
#include "fuel_math.h" #include "fuel_math.h"
#include "main_trigger_callback.h" #include "main_trigger_callback.h"
#include "engine_math.h"
#include "spark_logic.h" #include "spark_logic.h"
#include "idle_thread.h" #include "idle_thread.h"
#include "engine_configuration.h"
#include "os_util.h" #include "os_util.h"
#include "svnversion.h" #include "svnversion.h"
#include "engine.h"
#include "lcd_controller.h" #include "lcd_controller.h"
#include "settings.h"
#include "can_hw.h" #include "can_hw.h"
#include "periodic_thread_controller.h" #include "periodic_thread_controller.h"
#include "cdm_ion_sense.h" #include "cdm_ion_sense.h"

View File

@ -1,10 +1,7 @@
#include "ac_control.h" #include "pch.h"
#include "engine.h"
#include "ac_control.h"
#include "deadband.h" #include "deadband.h"
#include "efi_gpio.h"
#include "sensor.h"
#include "tunerstudio_outputs.h"
// Deadbands to prevent rapid switching on/off of AC // Deadbands to prevent rapid switching on/off of AC
static Deadband<200> maxRpmDeadband; static Deadband<200> maxRpmDeadband;

View File

@ -7,24 +7,14 @@
* @author Andrey Belomutskiy, (c) 2012-2020 * @author Andrey Belomutskiy, (c) 2012-2020
*/ */
#include "global.h" #include "pch.h"
#if EFI_TUNER_STUDIO
#include "tunerstudio_outputs.h"
#endif /* EFI_TUNER_STUDIO */
#if EFI_ALTERNATOR_CONTROL #if EFI_ALTERNATOR_CONTROL
#include "engine.h"
#include "rpm_calculator.h"
#include "alternator_controller.h" #include "alternator_controller.h"
#include "pid.h" #include "pid.h"
#include "local_version_holder.h" #include "local_version_holder.h"
#include "periodic_task.h" #include "periodic_task.h"
#include "pwm_generator_logic.h"
#include "pin_repository.h"
#if defined(HAS_OS_ACCESS) #if defined(HAS_OS_ACCESS)
#error "Unexpected OS ACCESS HERE" #error "Unexpected OS ACCESS HERE"
#endif /* HAS_OS_ACCESS */ #endif /* HAS_OS_ACCESS */

View File

@ -4,18 +4,11 @@
* Created on: 13. des. 2019 * Created on: 13. des. 2019
* Author: Ola Ruud * Author: Ola Ruud
*/ */
#include "global.h" #include "pch.h"
#if EFI_BOOST_CONTROL #if EFI_BOOST_CONTROL
#if EFI_TUNER_STUDIO
#include "tunerstudio_outputs.h"
#endif /* EFI_TUNER_STUDIO */
#include "engine.h"
#include "boost_control.h" #include "boost_control.h"
#include "sensor.h"
#include "pin_repository.h"
#include "pwm_generator_logic.h"
#include "pid_auto_tune.h" #include "pid_auto_tune.h"
#include "electronic_throttle.h" #include "electronic_throttle.h"

View File

@ -5,18 +5,13 @@
* @author Matthew Kennedy (c) 2020 * @author Matthew Kennedy (c) 2020
*/ */
#include "engine.h" #include "pch.h"
#include "io_pins.h"
#include "engine_configuration.h"
#include "engine_controller.h"
#include "periodic_task.h" #include "periodic_task.h"
#include "dc_motors.h" #include "dc_motors.h"
#include "dc_motor.h" #include "dc_motor.h"
#include "efi_gpio.h"
#include "pwm_generator_logic.h"
class DcHardware { class DcHardware {
private: private:
OutputPin m_pinEnable; OutputPin m_pinEnable;

View File

@ -72,14 +72,11 @@
* If not, see <http://www.gnu.org/licenses/>. * If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "global.h" #include "pch.h"
#if EFI_ELECTRONIC_THROTTLE_BODY #if EFI_ELECTRONIC_THROTTLE_BODY
#include "electronic_throttle_impl.h" #include "electronic_throttle_impl.h"
#include "engine.h"
#include "tps.h"
#include "sensor.h"
#include "dc_motor.h" #include "dc_motor.h"
#include "dc_motors.h" #include "dc_motors.h"
#include "pid_auto_tune.h" #include "pid_auto_tune.h"

View File

@ -1,9 +1,8 @@
#include "pch.h"
#include "fan_control.h" #include "fan_control.h"
#include "engine.h"
#include "bench_test.h" #include "bench_test.h"
#include "efi_gpio.h"
#include "sensor.h"
static void fanControl(bool acActive, OutputPin& pin, int8_t fanOnTemp, int8_t fanOffTemp, bool enableWithAc, bool disableWhenStopped DECLARE_ENGINE_PARAMETER_SUFFIX) { static void fanControl(bool acActive, OutputPin& pin, int8_t fanOnTemp, int8_t fanOffTemp, bool enableWithAc, bool disableWhenStopped DECLARE_ENGINE_PARAMETER_SUFFIX) {
auto [cltValid, clt] = Sensor::get(SensorType::Clt); auto [cltValid, clt] = Sensor::get(SensorType::Clt);

View File

@ -1,10 +1,7 @@
#include "global.h" #include "pch.h"
#include "engine.h"
#include "pin_repository.h"
#include "gppwm_channel.h" #include "gppwm_channel.h"
#include "pwm_generator_logic.h"
static GppwmChannel channels[GPPWM_CHANNELS]; static GppwmChannel channels[GPPWM_CHANNELS];
static OutputPin pins[GPPWM_CHANNELS]; static OutputPin pins[GPPWM_CHANNELS];

View File

@ -1,12 +1,10 @@
#include "pch.h"
#include "gppwm_channel.h" #include "gppwm_channel.h"
#include "engine.h"
#include "pwm_generator_logic.h"
#include "table_helper.h" #include "table_helper.h"
#include "expected.h" #include "expected.h"
#include "sensor.h"
#include "engine_math.h"
expected<float> readGppwmChannel(gppwm_channel_e channel DECLARE_ENGINE_PARAMETER_SUFFIX) { expected<float> readGppwmChannel(gppwm_channel_e channel DECLARE_ENGINE_PARAMETER_SUFFIX) {
switch (channel) { switch (channel) {

View File

@ -7,20 +7,16 @@
* This is just the hardware interface - deciding where to put the valve happens in idle_thread.cpp * This is just the hardware interface - deciding where to put the valve happens in idle_thread.cpp
*/ */
#include "global.h" #include "pch.h"
#if EFI_IDLE_CONTROL #if EFI_IDLE_CONTROL
#include "engine_configuration.h"
#include "idle_hardware.h" #include "idle_hardware.h"
#include "engine.h"
#include "electronic_throttle.h" #include "electronic_throttle.h"
#include "pwm_generator_logic.h"
#include "dc_motors.h" #include "dc_motors.h"
#if ! EFI_UNIT_TEST #if ! EFI_UNIT_TEST
#include "stepper.h" #include "stepper.h"
#include "pin_repository.h"
static StepDirectionStepper iacStepperHw; static StepDirectionStepper iacStepperHw;
static DualHBridgeStepper iacHbridgeHw; static DualHBridgeStepper iacHbridgeHw;
StepperMotor iacMotor; StepperMotor iacMotor;

View File

@ -27,20 +27,14 @@
* *
*/ */
#include "global.h" #include "pch.h"
#if EFI_IDLE_CONTROL #if EFI_IDLE_CONTROL
#include "engine_configuration.h"
#include "rpm_calculator.h"
#include "idle_thread.h" #include "idle_thread.h"
#include "idle_hardware.h" #include "idle_hardware.h"
#include "engine_math.h"
#include "engine.h"
#include "periodic_task.h" #include "periodic_task.h"
#include "allsensors.h"
#include "vehicle_speed.h" #include "vehicle_speed.h"
#include "sensor.h"
#include "dc_motors.h" #include "dc_motors.h"
#if EFI_TUNER_STUDIO #if EFI_TUNER_STUDIO

View File

@ -6,14 +6,11 @@
* @author Andrey Belomutskiy, (c) 2012-2020 * @author Andrey Belomutskiy, (c) 2012-2020
*/ */
#include "global.h" #include "pch.h"
#if EFI_PWM_TESTER #if EFI_PWM_TESTER
#include "pwm_tester.h" #include "pwm_tester.h"
#include "state_requence.h"
#include "pwm_generator_logic.h"
#include "engine.h"
static SimplePwm pwmTest[5]; static SimplePwm pwmTest[5];

View File

@ -5,14 +5,12 @@
* @author Andrey Belomutskiy, (c) 2012-2020 * @author Andrey Belomutskiy, (c) 2012-2020
*/ */
#include "pch.h"
#include "local_version_holder.h" #include "local_version_holder.h"
#include "allsensors.h"
#include "vvt.h" #include "vvt.h"
#include "tunerstudio_outputs.h"
#include "fsio_impl.h" #include "fsio_impl.h"
#include "engine_math.h"
#include "pin_repository.h"
#define NO_PIN_PERIOD 500 #define NO_PIN_PERIOD 500

View File

@ -21,16 +21,9 @@
* @author Matthew Kennedy * @author Matthew Kennedy
*/ */
#include "global.h" #include "pch.h"
#include "engine.h"
#include "trigger_central.h" #include "trigger_central.h"
#include "accel_enrichment.h" #include "accel_enrichment.h"
#include "allsensors.h"
#include "engine_math.h"
#include "perf_trace.h"
#if EFI_TUNER_STUDIO
#include "tunerstudio_outputs.h"
#endif /* EFI_TUNER_STUDIO */
static tps_tps_Map3D_t tpsTpsMap; static tps_tps_Map3D_t tpsTpsMap;

View File

@ -18,15 +18,10 @@
* If not, see <http://www.gnu.org/licenses/>. * If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "global.h" #include "pch.h"
#include "engine_configuration.h"
#include "engine.h"
#include "advance_map.h" #include "advance_map.h"
#include "interpolation.h"
#include "engine_math.h"
#include "sensor.h"
#include "idle_thread.h" #include "idle_thread.h"
#include "allsensors.h"
#include "launch_control.h" #include "launch_control.h"
#if EFI_ENGINE_CONTROL #if EFI_ENGINE_CONTROL

View File

@ -1,5 +1,6 @@
#include "pch.h"
#include "airmass.h" #include "airmass.h"
#include "sensor.h"
#include "idle_thread.h" #include "idle_thread.h"
AirmassVeModelBase::AirmassVeModelBase(const ValueProvider3D& veTable) : m_veTable(&veTable) {} AirmassVeModelBase::AirmassVeModelBase(const ValueProvider3D& veTable) : m_veTable(&veTable) {}

View File

@ -1,5 +1,6 @@
#include "pch.h"
#include "alphan_airmass.h" #include "alphan_airmass.h"
#include "sensor.h"
AirmassResult AlphaNAirmass::getAirmass(int rpm) { AirmassResult AlphaNAirmass::getAirmass(int rpm) {
auto tps = Sensor::get(SensorType::Tps1); auto tps = Sensor::get(SensorType::Tps1);

View File

@ -1,5 +1,4 @@
#include "global.h" #include "pch.h"
#include "engine.h"
#include "maf_airmass.h" #include "maf_airmass.h"
#include "maf.h" #include "maf.h"

View File

@ -1,7 +1,5 @@
#include "global.h" #include "pch.h"
#include "engine.h"
#include "speed_density_airmass.h" #include "speed_density_airmass.h"
#include "perf_trace.h"
AirmassResult SpeedDensityAirmass::getAirmass(int rpm) { AirmassResult SpeedDensityAirmass::getAirmass(int rpm) {
ScopePerf perf(PE::GetSpeedDensityFuel); ScopePerf perf(PE::GetSpeedDensityFuel);

View File

@ -1,5 +1,6 @@
#include "pch.h"
#include "defaults.h" #include "defaults.h"
#include "engine_configuration.h"
static void setDefaultAlternatorParameters(DECLARE_CONFIG_PARAMETER_SIGNATURE) { static void setDefaultAlternatorParameters(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
engineConfiguration->alternatorOffAboveTps = 120; engineConfiguration->alternatorOffAboveTps = 120;

View File

@ -1,5 +1,6 @@
#include "pch.h"
#include "defaults.h" #include "defaults.h"
#include "engine_configuration.h"
#include "table_helper.h" #include "table_helper.h"
void setDefaultCranking(DECLARE_CONFIG_PARAMETER_SIGNATURE) { void setDefaultCranking(DECLARE_CONFIG_PARAMETER_SIGNATURE) {

View File

@ -1,5 +1,6 @@
#include "pch.h"
#include "defaults.h" #include "defaults.h"
#include "engine_configuration.h"
#include "table_helper.h" #include "table_helper.h"
#include "mazda_miata_vvt.h" #include "mazda_miata_vvt.h"

View File

@ -1,6 +1,6 @@
#include "pch.h"
#include "defaults.h" #include "defaults.h"
#include "engine_configuration.h"
#include "engine_math.h"
#include "table_helper.h" #include "table_helper.h"
static void setDefaultMultisparkParameters(DECLARE_CONFIG_PARAMETER_SIGNATURE) { static void setDefaultMultisparkParameters(DECLARE_CONFIG_PARAMETER_SIGNATURE) {

View File

@ -5,18 +5,12 @@
* @author Alexandru Miculescu, (c) 2012-2020 * @author Alexandru Miculescu, (c) 2012-2020
*/ */
#include "engine.h" #include "pch.h"
#include "pin_repository.h"
#if EFI_DYNO_VIEW #if EFI_DYNO_VIEW
#include "dynoview.h" #include "dynoview.h"
#include "vehicle_speed.h" #include "vehicle_speed.h"
#if EFI_TUNER_STUDIO
#include "tunerstudio_outputs.h"
extern TunerStudioOutputChannels tsOutputChannels;
#endif /* EFI_TUNER_STUDIO */
DynoView dynoInstance; DynoView dynoInstance;
void DynoView::update(vssSrc src) { void DynoView::update(vssSrc src) {

View File

@ -7,21 +7,16 @@
// todo: move this code to more proper locations // todo: move this code to more proper locations
#include "engine.h" #include "pch.h"
#include "thermistors.h" #include "thermistors.h"
#include "speed_density.h" #include "speed_density.h"
#include "allsensors.h"
#include "fuel_math.h" #include "fuel_math.h"
#include "engine_math.h"
#include "advance_map.h" #include "advance_map.h"
#include "aux_valves.h" #include "aux_valves.h"
#include "perf_trace.h"
#include "closed_loop_fuel.h" #include "closed_loop_fuel.h"
#include "sensor.h"
#include "launch_control.h" #include "launch_control.h"
#include "injector_model.h" #include "injector_model.h"
#if EFI_PROD_CODE #if EFI_PROD_CODE
#include "svnversion.h" #include "svnversion.h"
#endif #endif

View File

@ -20,16 +20,12 @@
* *
*/ */
#include "global.h" #include "pch.h"
#include "os_access.h" #include "os_access.h"
#include "engine_configuration.h"
#include "fsio_impl.h" #include "fsio_impl.h"
#include "allsensors.h"
#include "interpolation.h"
#include "engine_math.h"
#include "speed_density.h" #include "speed_density.h"
#include "advance_map.h" #include "advance_map.h"
#include "sensor.h"
#include "flash_main.h" #include "flash_main.h"
#include "hip9011_logic.h" #include "hip9011_logic.h"

View File

@ -20,9 +20,9 @@
* If not, see <http://www.gnu.org/licenses/>. * If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "pch.h"
#include "event_registry.h" #include "event_registry.h"
#include "global.h"
#include "engine_math.h"
InjectionEvent::InjectionEvent() { InjectionEvent::InjectionEvent() {
memset(outputs, 0, sizeof(outputs)); memset(outputs, 0, sizeof(outputs));

View File

@ -1,6 +1,6 @@
#include "pch.h"
#include "injector_model.h" #include "injector_model.h"
#include "tunerstudio_outputs.h"
#include "map.h"
void InjectorModelBase::prepare() { void InjectorModelBase::prepare() {
m_massFlowRate = getInjectorMassFlowRate(); m_massFlowRate = getInjectorMassFlowRate();

View File

@ -21,7 +21,8 @@
* *
*/ */
#include "global.h" #include "pch.h"
#include "airmass.h" #include "airmass.h"
#include "alphan_airmass.h" #include "alphan_airmass.h"
#include "maf_airmass.h" #include "maf_airmass.h"
@ -29,14 +30,7 @@
#include "fuel_math.h" #include "fuel_math.h"
#include "fuel_computer.h" #include "fuel_computer.h"
#include "injector_model.h" #include "injector_model.h"
#include "interpolation.h"
#include "engine_configuration.h"
#include "allsensors.h"
#include "engine_math.h"
#include "rpm_calculator.h"
#include "speed_density.h" #include "speed_density.h"
#include "perf_trace.h"
#include "sensor.h"
#include "speed_density_base.h" #include "speed_density_base.h"
#include "lua_hooks.h" #include "lua_hooks.h"

View File

@ -5,21 +5,13 @@
* Author: Ola Ruud * Author: Ola Ruud
*/ */
#include "engine.h" #include "pch.h"
#if EFI_LAUNCH_CONTROL #if EFI_LAUNCH_CONTROL
#include "boost_control.h" #include "boost_control.h"
#include "vehicle_speed.h" #include "vehicle_speed.h"
#include "launch_control.h" #include "launch_control.h"
#include "io_pins.h"
#include "engine_configuration.h"
#include "engine_controller.h"
#include "periodic_task.h" #include "periodic_task.h"
#include "pin_repository.h"
#include "allsensors.h"
#include "sensor.h"
#include "engine_math.h"
#include "efi_gpio.h"
#include "advance_map.h" #include "advance_map.h"
#include "engine_state.h" #include "engine_state.h"
#include "advance_map.h" #include "advance_map.h"
@ -28,11 +20,6 @@ static bool isInit = false;
LaunchControlBase launchInstance; LaunchControlBase launchInstance;
#if EFI_TUNER_STUDIO
#include "tunerstudio_outputs.h"
extern TunerStudioOutputChannels tsOutputChannels;
#endif /* EFI_TUNER_STUDIO */
static int retardThresholdRpm; static int retardThresholdRpm;
/** /**

View File

@ -21,7 +21,7 @@
*/ */
// todo: rename this file // todo: rename this file
#include "global.h" #include "pch.h"
#if EFI_ENGINE_CONTROL #if EFI_ENGINE_CONTROL
#if !EFI_UNIT_TEST #if !EFI_UNIT_TEST
@ -29,19 +29,12 @@
#include "os_access.h" #include "os_access.h"
#include "flash_main.h" #include "flash_main.h"
#include "bench_test.h" #include "bench_test.h"
#include "io_pins.h"
#include "main_trigger_callback.h" #include "main_trigger_callback.h"
#include "engine_configuration.h"
#include "pin_repository.h"
#include "efi_gpio.h"
#include "settings.h"
#include "idle_thread.h" #include "idle_thread.h"
#include "periodic_thread_controller.h" #include "periodic_thread_controller.h"
#include "tps.h"
#include "electronic_throttle.h" #include "electronic_throttle.h"
#include "cj125.h" #include "cj125.h"
#include "malfunction_central.h" #include "malfunction_central.h"
#include "tunerstudio_outputs.h"
#include "trigger_emulator_algo.h" #include "trigger_emulator_algo.h"
#include "microsecond_timer.h" #include "microsecond_timer.h"

View File

@ -5,8 +5,10 @@
* @date Aug 31, 2020 * @date Aug 31, 2020
* @author David Holdeman, (c) 2020 * @author David Holdeman, (c) 2020
*/ */
#include "pch.h"
#include "buttonshift.h" #include "buttonshift.h"
#include "engine.h"
ButtonShiftController buttonShiftController; ButtonShiftController buttonShiftController;

View File

@ -7,15 +7,12 @@
* @author Matthew Kennedy, (c) 2020 * @author Matthew Kennedy, (c) 2020
*/ */
#include "globalaccess.h" #include "pch.h"
#if EFI_CAN_SUPPORT
#include "engine.h" #if EFI_CAN_SUPPORT
#include "can_dash.h" #include "can_dash.h"
#include "can_msg_tx.h" #include "can_msg_tx.h"
#include "sensor.h"
#include "allsensors.h"
#include "vehicle_speed.h" #include "vehicle_speed.h"
#include "rtc_helper.h" #include "rtc_helper.h"
#include "fuel_math.h" #include "fuel_math.h"

View File

@ -8,8 +8,7 @@
* @author Matthew Kennedy, (c) 2020 * @author Matthew Kennedy, (c) 2020
*/ */
#include "global.h" #include "pch.h"
#include "engine.h"
typedef float fsio_table_8x8_f32t_linear[FSIO_TABLE_8 * FSIO_TABLE_8]; typedef float fsio_table_8x8_f32t_linear[FSIO_TABLE_8 * FSIO_TABLE_8];
@ -53,7 +52,6 @@ bool acceptCanRx(int sid DECLARE_ENGINE_PARAMETER_SUFFIX) {
#include "can.h" #include "can.h"
#include "obd2.h" #include "obd2.h"
#include "engine.h"
#include "can_sensor.h" #include "can_sensor.h"
#include "can_vss.h" #include "can_vss.h"
#include "rusefi_wideband.h" #include "rusefi_wideband.h"

View File

@ -7,10 +7,9 @@
* @author Matthew Kennedy, (c) 2020 * @author Matthew Kennedy, (c) 2020
*/ */
#include "globalaccess.h" #include "pch.h"
#if EFI_CAN_SUPPORT
#include "engine.h" #if EFI_CAN_SUPPORT
#include "can.h" #include "can.h"
#include "can_hw.h" #include "can_hw.h"
#include "can_dash.h" #include "can_dash.h"

View File

@ -6,16 +6,12 @@
* @author Matthew Kennedy, (c) 2020 * @author Matthew Kennedy, (c) 2020
*/ */
#include "globalaccess.h" #include "pch.h"
#if EFI_CAN_SUPPORT #if EFI_CAN_SUPPORT
#include "engine.h"
#include "scaled_channel.h" #include "scaled_channel.h"
#include "can_msg_tx.h" #include "can_msg_tx.h"
#include "sensor.h"
#include "can.h" #include "can.h"
#include "allsensors.h"
#include "fuel_math.h" #include "fuel_math.h"
#include "spark_logic.h" #include "spark_logic.h"
#include "vehicle_speed.h" #include "vehicle_speed.h"

View File

@ -7,11 +7,10 @@
* @author Alex Miculescu, (c) 2020 * @author Alex Miculescu, (c) 2020
*/ */
#include "globalaccess.h" #include "pch.h"
#if EFI_CAN_SUPPORT #if EFI_CAN_SUPPORT
#include "can.h" #include "can.h"
#include "engine_configuration.h"
#include "engine.h"
#include "vehicle_speed.h" #include "vehicle_speed.h"
#include "dynoview.h" #include "dynoview.h"

View File

@ -21,19 +21,14 @@
* If not, see <http://www.gnu.org/licenses/>. * If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "global.h" #include "pch.h"
#if EFI_CAN_SUPPORT #if EFI_CAN_SUPPORT
#include "os_access.h" #include "os_access.h"
#include "engine.h"
#include "obd2.h" #include "obd2.h"
#include "can.h" #include "can.h"
#include "can_msg_tx.h" #include "can_msg_tx.h"
#include "vehicle_speed.h" #include "vehicle_speed.h"
#include "map.h"
#include "maf.h"
#include "sensor.h"
#include "engine_math.h"
#include "fuel_math.h" #include "fuel_math.h"
#include "thermistors.h" #include "thermistors.h"

View File

@ -1,12 +1,10 @@
#include "global.h" #include "pch.h"
#if EFI_WIDEBAND_FIRMWARE_UPDATE && EFI_CAN_SUPPORT #if EFI_WIDEBAND_FIRMWARE_UPDATE && EFI_CAN_SUPPORT
#include "ch.h" #include "ch.h"
#include "can_msg_tx.h" #include "can_msg_tx.h"
#include "rusefi_wideband.h" #include "rusefi_wideband.h"
#include "sensor.h"
#include "engine.h"
// This file contains an array called build_wideband_noboot_bin // This file contains an array called build_wideband_noboot_bin
// This array contains the firmware image for the wideband contoller // This array contains the firmware image for the wideband contoller

View File

@ -5,9 +5,8 @@
* @author Andrey Belomutskiy, (c) 2012-2020 * @author Andrey Belomutskiy, (c) 2012-2020
*/ */
#include "engine.h" #include "pch.h"
#include "os_access.h" #include "os_access.h"
#include "perf_trace.h"
static critical_msg_t warningBuffer; static critical_msg_t warningBuffer;
static critical_msg_t criticalErrorMessageBuffer; static critical_msg_t criticalErrorMessageBuffer;

View File

@ -11,10 +11,9 @@
* @author Andrey Belomutskiy, (c) 2012-2020 * @author Andrey Belomutskiy, (c) 2012-2020
*/ */
#include "global.h" #include "pch.h"
#include "fsio_impl.h" #include "fsio_impl.h"
#include "allsensors.h"
#include "sensor.h"
#if EFI_PROD_CODE #if EFI_PROD_CODE
@ -25,10 +24,6 @@
#if EFI_FSIO #if EFI_FSIO
#include "os_access.h" #include "os_access.h"
#include "settings.h"
#include "rpm_calculator.h"
#include "efi_gpio.h"
#include "pwm_generator_logic.h"
/** /**
* in case of zero frequency pin is operating as simple on/off. '1' for ON and '0' for OFF * in case of zero frequency pin is operating as simple on/off. '1' for ON and '0' for OFF
@ -177,9 +172,6 @@ FsioResult getEngineValue(le_action_e action DECLARE_ENGINE_PARAMETER_SUFFIX) {
#if EFI_PROD_CODE #if EFI_PROD_CODE
#include "pin_repository.h"
#include "pwm_generator_logic.h"
static void setFsioAnalogInputPin(const char *indexStr, const char *pinName) { static void setFsioAnalogInputPin(const char *indexStr, const char *pinName) {
// todo: reduce code duplication between all "set pin methods" // todo: reduce code duplication between all "set pin methods"
int index = atoi(indexStr) - 1; int index = atoi(indexStr) - 1;

View File

@ -21,22 +21,18 @@
* If not, see <http://www.gnu.org/licenses/>. * If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "global.h" #include "pch.h"
#include "os_access.h" #include "os_access.h"
#include "trigger_central.h" #include "trigger_central.h"
#include "engine_controller.h"
#include "fsio_core.h" #include "fsio_core.h"
#include "fsio_impl.h" #include "fsio_impl.h"
#include "idle_thread.h" #include "idle_thread.h"
#include "advance_map.h" #include "advance_map.h"
#include "rpm_calculator.h"
#include "main_trigger_callback.h" #include "main_trigger_callback.h"
#include "io_pins.h"
#include "flash_main.h" #include "flash_main.h"
#include "bench_test.h" #include "bench_test.h"
#include "os_util.h" #include "os_util.h"
#include "engine_math.h"
#include "allsensors.h"
#include "electronic_throttle.h" #include "electronic_throttle.h"
#include "map_averaging.h" #include "map_averaging.h"
#include "high_pressure_fuel_pump.h" #include "high_pressure_fuel_pump.h"
@ -46,12 +42,10 @@
#include "local_version_holder.h" #include "local_version_holder.h"
#include "alternator_controller.h" #include "alternator_controller.h"
#include "fuel_math.h" #include "fuel_math.h"
#include "settings.h"
#include "spark_logic.h" #include "spark_logic.h"
#include "aux_valves.h" #include "aux_valves.h"
#include "accelerometer.h" #include "accelerometer.h"
#include "vvt.h" #include "vvt.h"
#include "perf_trace.h"
#include "boost_control.h" #include "boost_control.h"
#include "launch_control.h" #include "launch_control.h"
#include "tachometer.h" #include "tachometer.h"
@ -89,12 +83,10 @@
#endif /* EFI_UNIT_TEST */ #endif /* EFI_UNIT_TEST */
#include "adc_inputs.h" #include "adc_inputs.h"
#include "pwm_generator_logic.h"
#if EFI_PROD_CODE #if EFI_PROD_CODE
#include "pwm_tester.h" #include "pwm_tester.h"
#include "lcd_controller.h" #include "lcd_controller.h"
#include "pin_repository.h"
#endif /* EFI_PROD_CODE */ #endif /* EFI_PROD_CODE */
#if EFI_CJ125 #if EFI_CJ125

View File

@ -5,10 +5,8 @@
* @author Andrey Belomutskiy, (c) 2012-2020 * @author Andrey Belomutskiy, (c) 2012-2020
*/ */
#include "engine_controller.h" #include "pch.h"
#include "perf_trace.h"
#include "os_access.h" #include "os_access.h"
#include "settings.h"
extern ButtonDebounce startStopButtonDebounce; extern ButtonDebounce startStopButtonDebounce;

View File

@ -13,11 +13,9 @@
* @author Andrey Belomutskiy, (c) 2012-2020 * @author Andrey Belomutskiy, (c) 2012-2020
*/ */
#include "pin_repository.h" #include "pch.h"
#include "engine_math.h"
#include "aux_valves.h" #include "aux_valves.h"
#include "allsensors.h"
#include "sensor.h"
#include "trigger_central.h" #include "trigger_central.h"
#include "spark_logic.h" #include "spark_logic.h"

View File

@ -4,9 +4,7 @@
* Handles injection scheduling * Handles injection scheduling
*/ */
#include "global.h" #include "pch.h"
#include "engine.h"
#include "engine_math.h"
#include "event_registry.h" #include "event_registry.h"
#if EFI_ENGINE_CONTROL #if EFI_ENGINE_CONTROL

View File

@ -5,7 +5,7 @@
* @author Andrey Gusakov * @author Andrey Gusakov
*/ */
#include "engine.h" #include "pch.h"
#include "knock_logic.h" #include "knock_logic.h"
#include "os_access.h" #include "os_access.h"

View File

@ -21,7 +21,8 @@
* If not, see <http://www.gnu.org/licenses/>. * If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "global.h" #include "pch.h"
#include "os_access.h" #include "os_access.h"
#if EFI_PRINTF_FUEL_DETAILS #if EFI_PRINTF_FUEL_DETAILS
@ -31,27 +32,16 @@
#if EFI_ENGINE_CONTROL && EFI_SHAFT_POSITION_INPUT #if EFI_ENGINE_CONTROL && EFI_SHAFT_POSITION_INPUT
#include "main_trigger_callback.h" #include "main_trigger_callback.h"
#include "efi_gpio.h"
#include "engine_math.h"
#include "trigger_central.h" #include "trigger_central.h"
#include "spark_logic.h" #include "spark_logic.h"
#include "rpm_calculator.h"
#include "engine_configuration.h"
#include "interpolation.h"
#include "advance_map.h" #include "advance_map.h"
#include "allsensors.h"
#include "cyclic_buffer.h" #include "cyclic_buffer.h"
#include "fuel_math.h" #include "fuel_math.h"
#include "cdm_ion_sense.h" #include "cdm_ion_sense.h"
#include "engine_controller.h"
#include "efi_gpio.h"
#include "tooth_logger.h" #include "tooth_logger.h"
#include "os_util.h" #include "os_util.h"
#include "local_version_holder.h" #include "local_version_holder.h"
#include "event_queue.h" #include "event_queue.h"
#include "engine.h"
#include "perf_trace.h"
#include "sensor.h"
#include "injector_model.h" #include "injector_model.h"
#if EFI_LAUNCH_CONTROL #if EFI_LAUNCH_CONTROL
#include "launch_control.h" #include "launch_control.h"

View File

@ -21,22 +21,15 @@
* If not, see <http://www.gnu.org/licenses/>. * If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "global.h" #include "pch.h"
#include "os_access.h"
#include "map.h" #include "os_access.h"
#if EFI_MAP_AVERAGING #if EFI_MAP_AVERAGING
#include "map_averaging.h" #include "map_averaging.h"
#include "trigger_central.h" #include "trigger_central.h"
#include "adc_inputs.h" #include "adc_inputs.h"
#include "allsensors.h"
#include "engine_configuration.h"
#include "interpolation.h"
#include "engine.h"
#include "engine_math.h"
#include "perf_trace.h"
#if EFI_SENSOR_CHART #if EFI_SENSOR_CHART
#include "sensor_chart.h" #include "sensor_chart.h"

View File

@ -13,15 +13,10 @@
* @author Andrey Belomutskiy, (c) 2012-2020 * @author Andrey Belomutskiy, (c) 2012-2020
*/ */
#include "globalaccess.h" #include "pch.h"
#include "os_access.h" #include "os_access.h"
#include "engine.h"
#include "rpm_calculator.h"
#include "trigger_central.h" #include "trigger_central.h"
#include "engine_configuration.h"
#include "engine_math.h"
#include "perf_trace.h"
#include "tooth_logger.h" #include "tooth_logger.h"
#if EFI_PROD_CODE #if EFI_PROD_CODE

View File

@ -5,25 +5,20 @@
* @author Andrey Belomutskiy, (c) 2012-2020 * @author Andrey Belomutskiy, (c) 2012-2020
*/ */
#include "pch.h"
#include "software_knock.h" #include "software_knock.h"
#include "spark_logic.h" #include "spark_logic.h"
#include "os_access.h" #include "os_access.h"
#include "engine_math.h"
#include "utlist.h" #include "utlist.h"
#include "event_queue.h" #include "event_queue.h"
#include "perf_trace.h"
#include "tooth_logger.h" #include "tooth_logger.h"
#include "hip9011.h" #include "hip9011.h"
#include "engine_ptr.h"
#if EFI_ENGINE_CONTROL #if EFI_ENGINE_CONTROL
#if EFI_TUNER_STUDIO
#include "tunerstudio_outputs.h"
#endif /* EFI_TUNER_STUDIO */
#if EFI_UNIT_TEST #if EFI_UNIT_TEST
extern bool verboseMode; extern bool verboseMode;
#endif /* EFI_UNIT_TEST */ #endif /* EFI_UNIT_TEST */

View File

@ -7,14 +7,14 @@
* @author Andrey Belomutskiy, (c) 2012-2020 * @author Andrey Belomutskiy, (c) 2012-2020
*/ */
#include "global.h" #include "pch.h"
#if EFI_INTERNAL_FLASH #if EFI_INTERNAL_FLASH
#include "os_access.h" #include "os_access.h"
#include "flash_main.h" #include "flash_main.h"
#include "eficonsole.h" #include "eficonsole.h"
#include "flash_int.h" #include "flash_int.h"
#include "engine_math.h"
#if EFI_TUNER_STUDIO #if EFI_TUNER_STUDIO
#include "tunerstudio.h" #include "tunerstudio.h"
@ -22,8 +22,6 @@
#include "runtime_state.h" #include "runtime_state.h"
#include "engine_controller.h"
static bool needToWriteConfiguration = false; static bool needToWriteConfiguration = false;
extern persistent_config_container_s persistentState; extern persistent_config_container_s persistentState;

View File

@ -16,19 +16,14 @@
* @author Andrey Belomutskiy, (c) 2012-2020 * @author Andrey Belomutskiy, (c) 2012-2020
*/ */
#include "global.h" #include "pch.h"
#if EFI_HD44780_LCD #if EFI_HD44780_LCD
#include "os_access.h" #include "os_access.h"
#include "lcd_controller.h" #include "lcd_controller.h"
#include "HD44780.h" #include "HD44780.h"
#include "rpm_calculator.h"
#include "allsensors.h"
#include "engine.h"
#include "rtc_helper.h" #include "rtc_helper.h"
#include "io_pins.h"
#include "efi_gpio.h"
#include "svnversion.h" #include "svnversion.h"
#include "joystick.h" #include "joystick.h"
#include "utlist.h" #include "utlist.h"
@ -36,12 +31,9 @@
#include "memstreams.h" #include "memstreams.h"
#include "settings.h" #include "settings.h"
#include "bench_test.h" #include "bench_test.h"
#include "engine_controller.h"
#include "mmc_card.h" #include "mmc_card.h"
#include "idle_thread.h" #include "idle_thread.h"
#include "fuel_math.h" #include "fuel_math.h"
#include "sensor.h"
static MenuItem ROOT(NULL, NULL); static MenuItem ROOT(NULL, NULL);

View File

@ -5,9 +5,10 @@
* @author Andrey Belomutskiy, (c) 2012-2020 * @author Andrey Belomutskiy, (c) 2012-2020
*/ */
#include "pch.h"
#include "stddef.h" #include "stddef.h"
#include "lcd_menu_tree.h" #include "lcd_menu_tree.h"
#include "error_handling.h"
MenuTree::MenuTree(MenuItem *root) { MenuTree::MenuTree(MenuItem *root) {
this->root = root; this->root = root;

View File

@ -25,13 +25,11 @@
* If not, see <http://www.gnu.org/licenses/>. * If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "global.h" #include "pch.h"
#if EFI_MALFUNCTION_INDICATOR #if EFI_MALFUNCTION_INDICATOR
#include "io_pins.h"
#include "malfunction_central.h" #include "malfunction_central.h"
#include "malfunction_indicator.h" #include "malfunction_indicator.h"
#include "efi_gpio.h"
#include "os_access.h" #include "os_access.h"
#include "periodic_thread_controller.h" #include "periodic_thread_controller.h"

View File

@ -8,9 +8,9 @@
* @author Andrey Belomutskiy, (c) 2012-2020 * @author Andrey Belomutskiy, (c) 2012-2020
*/ */
#include "pin_repository.h" #include "pch.h"
#include "tachometer.h" #include "tachometer.h"
#include "pwm_generator_logic.h"
static SimplePwm tachControl("tach"); static SimplePwm tachControl("tach");
static float tachFreq; static float tachFreq;

View File

@ -1,5 +1,6 @@
#include "pch.h"
#include "gear_controller.h" #include "gear_controller.h"
#include "tunerstudio_outputs.h"
void GearControllerBase::init(DECLARE_ENGINE_PARAMETER_SIGNATURE) { void GearControllerBase::init(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
INJECT_ENGINE_REFERENCE(&transmissionController); INJECT_ENGINE_REFERENCE(&transmissionController);

View File

@ -1,6 +1,6 @@
#include "pch.h"
#include "limp_manager.h" #include "limp_manager.h"
#include "engine.h"
#include "efilib.h"
void LimpManager::updateState(int rpm, efitick_t nowNt) { void LimpManager::updateState(int rpm, efitick_t nowNt) {
Clearable allowFuel = CONFIG(isInjectionEnabled); Clearable allowFuel = CONFIG(isInjectionEnabled);

View File

@ -1,7 +1,7 @@
#include "pch.h"
#include "rusefi_lua.h" #include "rusefi_lua.h"
#include "thread_controller.h" #include "thread_controller.h"
#include "perf_trace.h"
#include "thread_priority.h" #include "thread_priority.h"
#if EFI_LUA #if EFI_LUA
@ -13,8 +13,6 @@
#if EFI_PROD_CODE || EFI_SIMULATOR #if EFI_PROD_CODE || EFI_SIMULATOR
#include "ch.h" #include "ch.h"
#include "engine.h"
#include "tunerstudio_outputs.h"
#define LUA_HEAP_SIZE 20000 #define LUA_HEAP_SIZE 20000

View File

@ -1,16 +1,13 @@
#include "pch.h"
#include "lua.hpp" #include "lua.hpp"
#include "lua_hooks.h" #include "lua_hooks.h"
#include "engine.h"
#include "loggingcentral.h" #include "loggingcentral.h"
#include "sensor.h"
#include "adc_inputs.h" #include "adc_inputs.h"
#include "efilib.h"
#include "tunerstudio_outputs.h"
#include "fuel_math.h" #include "fuel_math.h"
#include "airmass.h" #include "airmass.h"
#include "lua_airmass.h" #include "lua_airmass.h"
#include "pwm_generator_logic.h"
#include "can_msg_tx.h" #include "can_msg_tx.h"
// Some functions lean on existing FSIO implementation // Some functions lean on existing FSIO implementation

View File

@ -1,10 +1,7 @@
#include "pch.h"
#include "closed_loop_fuel.h" #include "closed_loop_fuel.h"
#include "closed_loop_fuel_cell.h" #include "closed_loop_fuel_cell.h"
#include "engine.h"
#include "sensor.h"
#include "engine_math.h"
#include "deadband.h" #include "deadband.h"
struct FuelingBank { struct FuelingBank {

View File

@ -1,7 +1,6 @@
#include "pch.h"
#include "closed_loop_fuel_cell.h" #include "closed_loop_fuel_cell.h"
#include "engine.h"
#include "engine_configuration_generated_structures.h"
#include "sensor.h"
constexpr float integrator_dt = FAST_CALLBACK_PERIOD_MS * 0.001f; constexpr float integrator_dt = FAST_CALLBACK_PERIOD_MS * 0.001f;

View File

@ -19,14 +19,9 @@
* If not, see <http://www.gnu.org/licenses/>. * If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "global.h" #include "pch.h"
#include "engine_math.h"
#include "engine_configuration.h"
#include "interpolation.h"
#include "allsensors.h"
#include "sensor.h"
#include "event_registry.h" #include "event_registry.h"
#include "efi_gpio.h"
#include "fuel_math.h" #include "fuel_math.h"
#include "advance_map.h" #include "advance_map.h"

View File

@ -7,15 +7,9 @@
* @author Andrey Belomutskiy, (c) 2012-2020 * @author Andrey Belomutskiy, (c) 2012-2020
*/ */
#include "global.h" #include "pch.h"
#include "speed_density.h" #include "speed_density.h"
#include "fuel_math.h" #include "fuel_math.h"
#include "interpolation.h"
#include "engine.h"
#include "engine_math.h"
#include "perf_trace.h"
#include "sensor.h"
#include "map.h"
#if defined(HAS_OS_ACCESS) #if defined(HAS_OS_ACCESS)
#error "Unexpected OS ACCESS HERE" #error "Unexpected OS ACCESS HERE"

View File

@ -21,12 +21,11 @@
* If not, see <http://www.gnu.org/licenses/>. * If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "global.h" #include "pch.h"
#if !EFI_UNIT_TEST #if !EFI_UNIT_TEST
#include "sensor_chart.h" #include "sensor_chart.h"
#include "engine_configuration.h"
#include "trigger_central.h" #include "trigger_central.h"
#include "engine_controller.h"
persistent_config_container_s persistentState CCM_OPTIONAL; persistent_config_container_s persistentState CCM_OPTIONAL;

View File

@ -1,13 +1,7 @@
#include "global.h" #include "pch.h"
#if EFI_CAN_SUPPORT #if EFI_CAN_SUPPORT
#include "AemXSeriesLambda.h" #include "AemXSeriesLambda.h"
#include "efilib.h"
#if EFI_TUNER_STUDIO
#include "tunerstudio_outputs.h"
#include "engine.h"
#endif
AemXSeriesWideband::AemXSeriesWideband(uint8_t sensorIndex, SensorType type) AemXSeriesWideband::AemXSeriesWideband(uint8_t sensorIndex, SensorType type)
: CanSensorBase( : CanSensorBase(

View File

@ -7,9 +7,7 @@
* @author Andrey Belomutskiy, (c) 2012-2020 * @author Andrey Belomutskiy, (c) 2012-2020
*/ */
#include "engine.h" #include "pch.h"
#include "pin_repository.h"
#include "allsensors.h"
ButtonDebounce acDebounce("ac_switch"); ButtonDebounce acDebounce("ac_switch");

View File

@ -11,9 +11,9 @@
* 3) CJ125 internal wideband controller is known to work with both 4.2 and 4.9 * 3) CJ125 internal wideband controller is known to work with both 4.2 and 4.9
* *
*/ */
#include "pch.h"
#include "ego.h" #include "ego.h"
#include "interpolation.h"
#include "engine.h"
#include "adc_inputs.h" #include "adc_inputs.h"
#include "cyclic_buffer.h" #include "cyclic_buffer.h"

View File

@ -1,4 +1,5 @@
#include "engine.h" #include "pch.h"
#include "digital_input_exti.h" #include "digital_input_exti.h"
#include "flex_sensor.h" #include "flex_sensor.h"

View File

@ -1,6 +1,4 @@
#include "global.h" #include "pch.h"
#include "engine.h"
#include "maf.h"
static void fillTheRest(persistent_config_s *e, int i) { static void fillTheRest(persistent_config_s *e, int i) {
/** /**

View File

@ -5,19 +5,13 @@
* *
* @author Andrey Belomutskiy, (c) 2012-2020 * @author Andrey Belomutskiy, (c) 2012-2020
*/ */
#include "global.h" #include "pch.h"
#include "engine_configuration.h"
#include "engine_math.h"
#include "adc_inputs.h" #include "adc_inputs.h"
#include "interpolation.h"
#include "map.h"
#include "engine_controller.h"
#include "sensor.h"
#if EFI_PROD_CODE #if EFI_PROD_CODE
#include "digital_input_icu.h" #include "digital_input_icu.h"
#include "digital_input_exti.h" #include "digital_input_exti.h"
#include "pin_repository.h"
#endif #endif
#if EFI_ANALOG_SENSORS #if EFI_ANALOG_SENSORS

View File

@ -1,6 +1,5 @@
#include "global.h" #include "pch.h"
#include "sensor.h"
#include "efilib.h"
#include "loggingcentral.h" #include "loggingcentral.h"
static const char* const s_sensorNames[] = { static const char* const s_sensorNames[] = {

View File

@ -1,7 +1,6 @@
#include "global.h" #include "pch.h"
#include "engine.h"
#include "biquad.h" #include "biquad.h"
#include "perf_trace.h"
#include "thread_controller.h" #include "thread_controller.h"
#include "knock_logic.h" #include "knock_logic.h"
#include "software_knock.h" #include "software_knock.h"

View File

@ -10,10 +10,9 @@
* http://en.wikipedia.org/wiki/Steinhart%E2%80%93Hart_equation * http://en.wikipedia.org/wiki/Steinhart%E2%80%93Hart_equation
*/ */
#include "global.h" #include "pch.h"
#include "thermistors.h" #include "thermistors.h"
#include "engine_configuration.h"
#include "engine_math.h"
void setDodgeSensor(ThermistorConf *thermistorConf, float pullup) { void setDodgeSensor(ThermistorConf *thermistorConf, float pullup) {
thermistorConf->config = {-40, 30, 120, 336660, 7550, 390, pullup}; thermistorConf->config = {-40, 30, 120, 336660, 7550, 390, pullup};

View File

@ -1,12 +1,7 @@
/** /**
* @author Andrey Belomutskiy, (c) 2012-2020 * @author Andrey Belomutskiy, (c) 2012-2020
*/ */
#include "engine.h" #include "pch.h"
#include "tps.h"
#include "sensor.h"
#if EFI_PROD_CODE
#include "settings.h"
#endif /* EFI_PROD_CODE */
void grabTPSIsClosed() { void grabTPSIsClosed() {
#if EFI_PROD_CODE #if EFI_PROD_CODE

View File

@ -7,15 +7,13 @@
* @author Konstantin Smola, (c) 2020 * @author Konstantin Smola, (c) 2020
*/ */
#include "globalaccess.h" #include "pch.h"
#if EFI_AUX_SERIAL #if EFI_AUX_SERIAL
#include "engine.h"
#include "serial.h" #include "serial.h"
#include "serial_hw.h" #include "serial_hw.h"
#include "serial_sensor.h" #include "serial_sensor.h"
#include "allsensors.h"
#include "vehicle_speed.h" #include "vehicle_speed.h"
#include "thread_priority.h" #include "thread_priority.h"

View File

@ -6,11 +6,11 @@
* @author Konstantin Smola, (c) 2020 * @author Konstantin Smola, (c) 2020
*/ */
#include "global.h" #include "pch.h"
#if EFI_AUX_SERIAL #if EFI_AUX_SERIAL
#include "serial.h" #include "serial.h"
#include "serial_sensor.h" #include "serial_sensor.h"
#include "engine.h"
#define NUM_INNOVATE_O2_SENSORS 1 #define NUM_INNOVATE_O2_SENSORS 1
#define AFR_MULTIPLIER 147 #define AFR_MULTIPLIER 147

View File

@ -6,36 +6,26 @@
* @author Andrey Belomutskiy, (c) 2012-2020 * @author Andrey Belomutskiy, (c) 2012-2020
*/ */
#include "global.h" #include "pch.h"
#include "engine_configuration.h"
#include "engine_math.h"
#if !EFI_UNIT_TEST #if !EFI_UNIT_TEST
#include "os_access.h" #include "os_access.h"
#include "settings.h"
#include "eficonsole.h" #include "eficonsole.h"
#include "adc_inputs.h" #include "adc_inputs.h"
#include "engine_controller.h"
#include "thermistors.h" #include "thermistors.h"
#include "adc_inputs.h" #include "adc_inputs.h"
#include "interpolation.h"
#include "map.h"
#include "trigger_decoder.h" #include "trigger_decoder.h"
#include "console_io.h" #include "console_io.h"
#include "engine.h"
#include "efi_gpio.h"
#include "idle_thread.h" #include "idle_thread.h"
#include "allsensors.h" #include "allsensors.h"
#include "alternator_controller.h" #include "alternator_controller.h"
#include "trigger_emulator_algo.h" #include "trigger_emulator_algo.h"
#include "sensor.h"
#if EFI_PROD_CODE #if EFI_PROD_CODE
#include "vehicle_speed.h" #include "vehicle_speed.h"
#include "rtc_helper.h" #include "rtc_helper.h"
#include "can_hw.h" #include "can_hw.h"
#include "rusefi.h" #include "rusefi.h"
#include "pin_repository.h"
#include "hardware.h" #include "hardware.h"
#endif /* EFI_PROD_CODE */ #endif /* EFI_PROD_CODE */

View File

@ -1,7 +1,6 @@
#include "pch.h"
#include "simple_tcu.h" #include "simple_tcu.h"
#include "efi_gpio.h"
#include "tunerstudio_outputs.h"
#include "engine_configuration.h"
void SimpleTransmissionController::init() { void SimpleTransmissionController::init() {
for (size_t i = 0; i < efi::size(CONFIG(tcu_solenoid)); i++) { for (size_t i = 0; i < efi::size(CONFIG(tcu_solenoid)); i++) {

View File

@ -1,5 +1,6 @@
#include "pch.h"
#include "start_stop.h" #include "start_stop.h"
#include "engine.h"
ButtonDebounce startStopButtonDebounce("start_button"); ButtonDebounce startStopButtonDebounce("start_button");

View File

@ -6,9 +6,9 @@
* @author Matthew Kennedy * @author Matthew Kennedy
*/ */
#include "pch.h"
#include "dc_motor.h" #include "dc_motor.h"
#include "efi_gpio.h"
#include "pwm_generator_logic.h"
TwoPinDcMotor::TwoPinDcMotor(OutputPin& disablePin) TwoPinDcMotor::TwoPinDcMotor(OutputPin& disablePin)
: m_disable(&disablePin) : m_disable(&disablePin)

View File

@ -6,18 +6,10 @@
* @author Andrey Belomutskiy, (c) 2012-2020 * @author Andrey Belomutskiy, (c) 2012-2020
*/ */
#include "global.h" #include "pch.h"
#include "engine.h"
#include "efi_gpio.h"
#include "os_access.h" #include "os_access.h"
#include "drivers/gpio/gpio_ext.h" #include "drivers/gpio/gpio_ext.h"
#include "perf_trace.h"
#include "engine_controller.h"
#if EFI_GPIO_HARDWARE
#include "pin_repository.h"
#include "io_pins.h"
#endif /* EFI_GPIO_HARDWARE */
#if EFI_ELECTRONIC_THROTTLE_BODY #if EFI_ELECTRONIC_THROTTLE_BODY
#include "electronic_throttle.h" #include "electronic_throttle.h"

View File

@ -8,14 +8,11 @@
* @author Andrey Belomutskiy, (c) 2012-2020 * @author Andrey Belomutskiy, (c) 2012-2020
*/ */
#include "global.h" #include "pch.h"
#include "os_access.h" #include "os_access.h"
#include "pwm_generator_logic.h"
#include "perf_trace.h"
#if EFI_PROD_CODE #if EFI_PROD_CODE
#include "mpu_util.h" #include "mpu_util.h"
#include "engine.h"
#endif // EFI_PROD_CODE #endif // EFI_PROD_CODE
// 1% duty cycle // 1% duty cycle

View File

@ -22,16 +22,11 @@
* If not, see <http://www.gnu.org/licenses/>. * If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "global.h" #include "pch.h"
#include "os_access.h" #include "os_access.h"
#include "scheduler.h" #include "scheduler.h"
#include "main_trigger_callback.h" #include "main_trigger_callback.h"
#if EFI_SIMULATOR
// this is about debugging
#include "efi_gpio.h"
#endif /* EFI_SIMULATOR */
#if EFI_PRINTF_FUEL_DETAILS #if EFI_PRINTF_FUEL_DETAILS
bool printSchedulerDebug = true; bool printSchedulerDebug = true;
#endif // EFI_PRINTF_FUEL_DETAILS #endif // EFI_PRINTF_FUEL_DETAILS

View File

@ -20,19 +20,17 @@
* @author Andrey Belomutskiy, (c) 2012-2020 * @author Andrey Belomutskiy, (c) 2012-2020
*/ */
#include "global.h" #include "pch.h"
#include "os_access.h" #include "os_access.h"
#include "single_timer_executor.h" #include "single_timer_executor.h"
#include "efitime.h" #include "efitime.h"
#include "perf_trace.h"
#if EFI_SIGNAL_EXECUTOR_ONE_TIMER #if EFI_SIGNAL_EXECUTOR_ONE_TIMER
#include "microsecond_timer.h" #include "microsecond_timer.h"
#include "tunerstudio_outputs.h"
#include "os_util.h" #include "os_util.h"
#include "engine.h"
uint32_t hwSetTimerDuration; uint32_t hwSetTimerDuration;
void globalTimerCallback() { void globalTimerCallback() {

View File

@ -6,8 +6,9 @@
* @author David Holdeman, (c) 2020 * @author David Holdeman, (c) 2020
*/ */
#include "pch.h"
#include "tcu.h" #include "tcu.h"
#include "tunerstudio_outputs.h"
void TransmissionControllerBase::update(gear_e gear) { void TransmissionControllerBase::update(gear_e gear) {
setCurrentGear(gear); setCurrentGear(gear);

View File

@ -18,8 +18,9 @@
* If not, see <http://www.gnu.org/licenses/>. * If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "pch.h"
#include "trigger_mazda.h" #include "trigger_mazda.h"
#include "error_handling.h"
#define NB_CRANK_MAGIC 70 #define NB_CRANK_MAGIC 70

View File

@ -19,9 +19,9 @@
*/ */
#include "global.h" #include "pch.h"
#include "os_access.h" #include "os_access.h"
#include "engine.h"
#include "trigger_chrysler.h" #include "trigger_chrysler.h"
#include "trigger_gm.h" #include "trigger_gm.h"
#include "trigger_nissan.h" #include "trigger_nissan.h"
@ -41,9 +41,6 @@
#include "sensor_chart.h" #include "sensor_chart.h"
#endif /* EFI_SENSOR_CHART */ #endif /* EFI_SENSOR_CHART */
#include "engine_configuration.h"
extern persistent_config_container_s persistentState;
void event_trigger_position_s::setAngle(angle_t angle DECLARE_ENGINE_PARAMETER_SUFFIX) { void event_trigger_position_s::setAngle(angle_t angle DECLARE_ENGINE_PARAMETER_SUFFIX) {
findTriggerPosition(&ENGINE(triggerCentral.triggerShape), findTriggerPosition(&ENGINE(triggerCentral.triggerShape),
&ENGINE(triggerCentral.triggerFormDetails), &ENGINE(triggerCentral.triggerFormDetails),

View File

@ -5,8 +5,9 @@
* @author Andrey Belomutskiy, (c) 2012-2020 * @author Andrey Belomutskiy, (c) 2012-2020
*/ */
#include "pch.h"
#include "trigger_universal.h" #include "trigger_universal.h"
#include "error_handling.h"
/** /**
* @see getCycleDuration * @see getCycleDuration

View File

@ -5,9 +5,9 @@
* @author Andrey Belomutskiy, (c) 2012-2020 * @author Andrey Belomutskiy, (c) 2012-2020
*/ */
#include "pch.h"
#include "trigger_vw.h" #include "trigger_vw.h"
#include "trigger_universal.h" #include "trigger_universal.h"
#include "error_handling.h"
void setSkodaFavorit(TriggerWaveform *s) { void setSkodaFavorit(TriggerWaveform *s) {
s->initialize(FOUR_STROKE_CRANK_SENSOR); s->initialize(FOUR_STROKE_CRANK_SENSOR);

View File

@ -6,36 +6,25 @@
* @author Andrey Belomutskiy, (c) 2012-2020 * @author Andrey Belomutskiy, (c) 2012-2020
*/ */
#include "global.h" #include "pch.h"
#include "os_access.h" #include "os_access.h"
#include "trigger_central.h" #include "trigger_central.h"
#include "trigger_decoder.h" #include "trigger_decoder.h"
#include "main_trigger_callback.h" #include "main_trigger_callback.h"
#include "engine_configuration.h"
#include "listener_array.h" #include "listener_array.h"
#include "pwm_generator_logic.h"
#include "tooth_logger.h" #include "tooth_logger.h"
#include "hip9011.h" #include "hip9011.h"
#include "logic_analyzer.h" #include "logic_analyzer.h"
#include "settings.h"
#include "engine_math.h"
#include "local_version_holder.h" #include "local_version_holder.h"
#include "trigger_simulator.h" #include "trigger_simulator.h"
#include "trigger_emulator_algo.h" #include "trigger_emulator_algo.h"
#include "rpm_calculator.h"
#include "tooth_logger.h" #include "tooth_logger.h"
#include "perf_trace.h"
#include "map_averaging.h" #include "map_averaging.h"
#include "main_trigger_callback.h" #include "main_trigger_callback.h"
#if EFI_PROD_CODE
#include "pin_repository.h"
#endif /* EFI_PROD_CODE */
#if EFI_TUNER_STUDIO #if EFI_TUNER_STUDIO
#include "tunerstudio.h" #include "tunerstudio.h"
#endif /* EFI_TUNER_STUDIO */ #endif /* EFI_TUNER_STUDIO */

View File

@ -24,18 +24,15 @@
* If not, see <http://www.gnu.org/licenses/>. * If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "global.h" #include "pch.h"
#include "os_access.h" #include "os_access.h"
#include "obd_error_codes.h" #include "obd_error_codes.h"
#include "trigger_decoder.h" #include "trigger_decoder.h"
#include "cyclic_buffer.h" #include "cyclic_buffer.h"
#include "efi_gpio.h"
#include "engine.h"
#include "engine_math.h"
#include "trigger_central.h" #include "trigger_central.h"
#include "trigger_simulator.h" #include "trigger_simulator.h"
#include "perf_trace.h"
#if EFI_SENSOR_CHART #if EFI_SENSOR_CHART
#include "sensor_chart.h" #include "sensor_chart.h"

View File

@ -13,10 +13,8 @@
* @date Mar 3, 2014 * @date Mar 3, 2014
* @author Andrey Belomutskiy, (c) 2012-2020 * @author Andrey Belomutskiy, (c) 2012-2020
*/ */
#include "state_sequence.h"
#include "global.h" #include "pch.h"
#include "efi_gpio.h"
#include "pin_repository.h"
int getPreviousIndex(const int currentIndex, const int size) { int getPreviousIndex(const int currentIndex, const int size) {
return (currentIndex + size - 1) % size; return (currentIndex + size - 1) % size;
@ -32,13 +30,9 @@ bool needEvent(const int currentIndex, const int size, const MultiChannelStateSe
#if EFI_EMULATE_POSITION_SENSORS #if EFI_EMULATE_POSITION_SENSORS
#include "engine.h"
#include "trigger_emulator_algo.h" #include "trigger_emulator_algo.h"
#include "engine_configuration.h"
#include "trigger_central.h" #include "trigger_central.h"
#include "trigger_simulator.h" #include "trigger_simulator.h"
#include "settings.h"
#include "pwm_generator_logic.h"
TriggerEmulatorHelper::TriggerEmulatorHelper() { TriggerEmulatorHelper::TriggerEmulatorHelper() {
} }

View File

@ -5,8 +5,8 @@
* @author Andrey Belomutskiy, (c) 2012-2020 * @author Andrey Belomutskiy, (c) 2012-2020
*/ */
#include "global.h" #include "pch.h"
#include "engine.h"
#include "trigger_simulator.h" #include "trigger_simulator.h"
#include "trigger_emulator_algo.h" #include "trigger_emulator_algo.h"

View File

@ -7,9 +7,8 @@
*/ */
#include "efifeatures.h" #include "pch.h"
#include "perf_trace.h"
#include "efitime.h"
#include "os_util.h" #include "os_util.h"
#ifndef ENABLE_PERF_TRACE #ifndef ENABLE_PERF_TRACE

View File

@ -5,13 +5,10 @@
* @author Andrey Belomutskiy, (c) 2012-2021 * @author Andrey Belomutskiy, (c) 2012-2021
*/ */
#include "global.h" #include "pch.h"
#if HAL_USE_PAL && EFI_PROD_CODE #if HAL_USE_PAL && EFI_PROD_CODE
#include "digital_input_exti.h" #include "digital_input_exti.h"
#include "efi_gpio.h"
#include "error_handling.h"
#include "pin_repository.h"
/** /**
* EXTI is a funny thing: you can only use same pin on one port. For example, you can use * EXTI is a funny thing: you can only use same pin on one port. For example, you can use

View File

@ -7,13 +7,12 @@
* @author Matthew Kennedy, (c) 2012-2020 * @author Matthew Kennedy, (c) 2012-2020
*/ */
#include "efifeatures.h" #include "pch.h"
#include "global.h"
#include "can_msg_tx.h" #include "can_msg_tx.h"
#if EFI_CAN_SUPPORT #if EFI_CAN_SUPPORT
#include "can.h" #include "can.h"
#include "engine_configuration.h"
extern int canWriteOk; extern int canWriteOk;
extern int canWriteNotOk; extern int canWriteNotOk;

View File

@ -6,11 +6,9 @@
* @author Matthew Kennedy, (c) 2020 * @author Matthew Kennedy, (c) 2020
*/ */
#include "i2c_bb.h" #include "pch.h"
#include "io_pins.h" #include "i2c_bb.h"
#include "efi_gpio.h"
#include "pin_repository.h"
void BitbangI2c::sda_high() { void BitbangI2c::sda_high() {
#if EFI_PROD_CODE #if EFI_PROD_CODE

View File

@ -7,11 +7,7 @@
* @author Andrey Belomutskiy, (c) 2012-2020 * @author Andrey Belomutskiy, (c) 2012-2020
*/ */
#include "global.h" #include "pch.h"
#include "io_pins.h"
#include "efi_gpio.h"
#include "engine.h"
#include "pin_repository.h"
#if EFI_PROD_CODE #if EFI_PROD_CODE
#include "os_access.h" #include "os_access.h"

View File

@ -14,19 +14,15 @@
* @author Andrey Belomutskiy, (c) 2012-2020 * @author Andrey Belomutskiy, (c) 2012-2020
*/ */
#include "global.h" #include "pch.h"
#if EFI_MC33816 #if EFI_MC33816
#include "mc33816.h" #include "mc33816.h"
#include "mc33816_memory_map.h" #include "mc33816_memory_map.h"
#include "engine.h"
#include "efi_gpio.h"
#include "pin_repository.h"
#include "hardware.h" #include "hardware.h"
#include "mc33816_data.h" #include "mc33816_data.h"
#include "mpu_util.h" #include "mpu_util.h"
#include "allsensors.h"
static bool isInitializaed = false; static bool isInitializaed = false;

Some files were not shown because too many files have changed in this diff Show More