From 3530c68a18b4f7db5663f34fbc2f2bddfd67e578 Mon Sep 17 00:00:00 2001 From: rusEfi Date: Thu, 14 Nov 2019 23:58:04 -0500 Subject: [PATCH] M73 --- firmware/config/engines/bmw_m73.cpp | 12 ++++++++++++ firmware/controllers/algo/auto_generated_enums.cpp | 4 ++-- firmware/controllers/algo/engine_configuration.cpp | 5 ++++- firmware/controllers/algo/rusefi_enums.h | 2 +- 4 files changed, 19 insertions(+), 4 deletions(-) diff --git a/firmware/config/engines/bmw_m73.cpp b/firmware/config/engines/bmw_m73.cpp index 9634015c91..1e05c7e515 100644 --- a/firmware/config/engines/bmw_m73.cpp +++ b/firmware/config/engines/bmw_m73.cpp @@ -46,6 +46,9 @@ * ECU pin 40: OUT YEL/BRN BRN starter enable * * + * set engine_type 40 + * + * * @date Nov 1, 2019 * @author Andrey Belomutskiy, (c) 2012-2019 */ @@ -62,6 +65,15 @@ void setEngineBMW_M73(DECLARE_CONFIG_PARAMETER_SIGNATURE) { engineConfiguration->specs.displacement = 5.4; engineConfiguration->specs.firingOrder = FO_1_7_5_11_3_9_6_12_2_8_4_10; + boardConfiguration->triggerInputPins[0] = GPIOA_5; + boardConfiguration->triggerInputPins[1] = GPIO_UNASSIGNED; + engineConfiguration->camInputs[0] = GPIOC_6; + engineConfiguration->vvtMode = VVT_FIRST_HALF; + + setOperationMode(engineConfiguration, FOUR_STROKE_CRANK_SENSOR); + engineConfiguration->trigger.type = TT_60_2_VW; + + // 13641435991 injector engineConfiguration->injector.flow = 180; // cc/min, who knows if this number is real - no good source of info } diff --git a/firmware/controllers/algo/auto_generated_enums.cpp b/firmware/controllers/algo/auto_generated_enums.cpp index 5f0482fdcf..f920b61ffc 100644 --- a/firmware/controllers/algo/auto_generated_enums.cpp +++ b/firmware/controllers/algo/auto_generated_enums.cpp @@ -707,8 +707,8 @@ case FRANKENSO_QA_ENGINE: return "FRANKENSO_QA_ENGINE"; case Force_4_bytes_size_engine_type: return "Force_4_bytes_size_engine_type"; -case GEO_STORM: - return "GEO_STORM"; +case BMW_M73: + return "BMW_M73"; case MRE_BOARD_TEST: return "MRE_BOARD_TEST"; case GY6_139QMB: diff --git a/firmware/controllers/algo/engine_configuration.cpp b/firmware/controllers/algo/engine_configuration.cpp index 5b68e8029b..234cf72847 100644 --- a/firmware/controllers/algo/engine_configuration.cpp +++ b/firmware/controllers/algo/engine_configuration.cpp @@ -38,6 +38,7 @@ #include "custom_engine.h" #include "engine_template.h" #include "bmw_e34.h" +#include "bmw_m73.h" #include "dodge_neon.h" #include "dodge_ram.h" @@ -1053,10 +1054,12 @@ void resetConfigurationExt(Logging * logger, configuration_callback_t boardCallb */ switch (engineType) { case DEFAULT_FRANKENSO: - case GEO_STORM: case FRANKENSO_QA_ENGINE: setFrankensoConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE); break; + case BMW_M73: + setEngineBMW_M73(PASS_CONFIG_PARAMETER_SIGNATURE); + break; case MRE_MIATA_NA6: setMiataNA6_VAF_MRE(PASS_CONFIG_PARAMETER_SIGNATURE); break; diff --git a/firmware/controllers/algo/rusefi_enums.h b/firmware/controllers/algo/rusefi_enums.h index 9250c39f4b..4f4187761f 100644 --- a/firmware/controllers/algo/rusefi_enums.h +++ b/firmware/controllers/algo/rusefi_enums.h @@ -131,7 +131,7 @@ typedef enum { LADA_KALINA = 39, - GEO_STORM = 40, + BMW_M73 = 40, // Frankenso board MIATA_NA6_MAP = 41,