From 4ead86c521a47b140c882c50846df75630e9838a Mon Sep 17 00:00:00 2001 From: rusefi Date: Thu, 8 Jul 2021 16:35:58 -0400 Subject: [PATCH] VAG canned tunes --- .../config/boards/hellen/hellen121vag/board.mk | 2 +- .../boards/hellen/hellen121vag/prepend.txt | 1 + .../hellen/hellen64_miataNA6_94/prepend.txt | 1 + firmware/config/engines/vw.cpp | 18 ++++++++++++++++++ firmware/config/engines/vw.h | 5 +++++ .../controllers/algo/engine_configuration.cpp | 9 +++++++++ firmware/tunerstudio/rusefi.input | 13 +++++++++++-- 7 files changed, 46 insertions(+), 3 deletions(-) diff --git a/firmware/config/boards/hellen/hellen121vag/board.mk b/firmware/config/boards/hellen/hellen121vag/board.mk index 10daa50498..3db5188014 100644 --- a/firmware/config/boards/hellen/hellen121vag/board.mk +++ b/firmware/config/boards/hellen/hellen121vag/board.mk @@ -6,7 +6,7 @@ BOARDINC = $(BOARDS_DIR)/hellen/hellen121vag # Set this if you want a default engine type other than normal hellen121vag ifeq ($(DEFAULT_ENGINE_TYPE),) - DEFAULT_ENGINE_TYPE = -DDEFAULT_ENGINE_TYPE=HELLEN_NB2 + DEFAULT_ENGINE_TYPE = -DDEFAULT_ENGINE_TYPE=HELLEN_121_VAG endif ifeq ($(LED_CRITICAL_ERROR_BRAIN_PIN),) diff --git a/firmware/config/boards/hellen/hellen121vag/prepend.txt b/firmware/config/boards/hellen/hellen121vag/prepend.txt index 66045a7623..25f7858db7 100644 --- a/firmware/config/boards/hellen/hellen121vag/prepend.txt +++ b/firmware/config/boards/hellen/hellen121vag/prepend.txt @@ -22,3 +22,4 @@ #define show_Frankenso_presets false #define show_microRusEFI_presets false #define show_Proteus_presets false +#define show show_Hellen121vag_presets true diff --git a/firmware/config/boards/hellen/hellen64_miataNA6_94/prepend.txt b/firmware/config/boards/hellen/hellen64_miataNA6_94/prepend.txt index 205fcc05ba..25d90e0995 100644 --- a/firmware/config/boards/hellen/hellen64_miataNA6_94/prepend.txt +++ b/firmware/config/boards/hellen/hellen64_miataNA6_94/prepend.txt @@ -25,3 +25,4 @@ #define show_microRusEFI_presets false #define show_Proteus_presets false #define show_Hellen_presets true +#define show_HellenNA6_presets true diff --git a/firmware/config/engines/vw.cpp b/firmware/config/engines/vw.cpp index 4a23530a6e..77cd4e3a8a 100644 --- a/firmware/config/engines/vw.cpp +++ b/firmware/config/engines/vw.cpp @@ -66,3 +66,21 @@ void setVwAba(DECLARE_CONFIG_PARAMETER_SIGNATURE) { engineConfiguration->tpsMin = 740; engineConfiguration->tpsMax = 135; } + +void setHellen121Vag_5_cyl(DECLARE_CONFIG_PARAMETER_SIGNATURE) { + engineConfiguration->specs.cylindersCount = 5; + engineConfiguration->specs.displacement = 2.5; + engineConfiguration->specs.firingOrder = FO_1_2_4_5_3; +} + +void setHellen121Vag_6_cyl(DECLARE_CONFIG_PARAMETER_SIGNATURE) { + engineConfiguration->specs.cylindersCount = 6; + engineConfiguration->specs.displacement = 2.7; +// todo? typo? missing? engineConfiguration->specs.firingOrder = FO_1_4_3_6_2_5; +} + +void setHellen121Vag_8_cyl(DECLARE_CONFIG_PARAMETER_SIGNATURE) { + engineConfiguration->specs.cylindersCount = 8; + engineConfiguration->specs.displacement = 4.2; + engineConfiguration->specs.firingOrder = FO_1_5_4_8_6_3_7_2; +} diff --git a/firmware/config/engines/vw.h b/firmware/config/engines/vw.h index b79996de1e..0d65791513 100644 --- a/firmware/config/engines/vw.h +++ b/firmware/config/engines/vw.h @@ -10,3 +10,8 @@ #include "engine_configuration.h" void setVwAba(DECLARE_CONFIG_PARAMETER_SIGNATURE); + + +void setHellen121Vag_5_cyl(DECLARE_CONFIG_PARAMETER_SIGNATURE); +void setHellen121Vag_6_cyl(DECLARE_CONFIG_PARAMETER_SIGNATURE); +void setHellen121Vag_8_cyl(DECLARE_CONFIG_PARAMETER_SIGNATURE); diff --git a/firmware/controllers/algo/engine_configuration.cpp b/firmware/controllers/algo/engine_configuration.cpp index 68aa48a4a9..42fb7ea8fd 100644 --- a/firmware/controllers/algo/engine_configuration.cpp +++ b/firmware/controllers/algo/engine_configuration.cpp @@ -947,6 +947,15 @@ void resetConfigurationExt(configuration_callback_t boardCallback, engine_type_e case HELLEN_121_NISSAN: setHellen121nissan(PASS_CONFIG_PARAMETER_SIGNATURE); break; + case HELLEN_121_VAG_5_CYL: + setHellen121Vag_5_cyl(PASS_CONFIG_PARAMETER_SIGNATURE); + break; + case HELLEN_121_VAG_6_CYL: + setHellen121Vag_6а_cyl(PASS_CONFIG_PARAMETER_SIGNATURE); + break; + case HELLEN_121_VAG_8_CYL: + setHellen121Vag_8_cyl(PASS_CONFIG_PARAMETER_SIGNATURE); + break; case HELLEN_121_VAG: case HELLEN_55_BMW: case HELLEN_88_BMW: diff --git a/firmware/tunerstudio/rusefi.input b/firmware/tunerstudio/rusefi.input index d1f8178fef..75512847b3 100644 --- a/firmware/tunerstudio/rusefi.input +++ b/firmware/tunerstudio/rusefi.input @@ -1749,6 +1749,11 @@ cmd_set_engine_type_ET_MRE_M111 = "@@TS_IO_TEST_COMMAND_char@@\x00\x30@@ET_ cmd_set_engine_type_hellen_NA6 = "@@TS_IO_TEST_COMMAND_char@@\x00\x30@@ET_HELLEN_NA6_16_hex@@" cmd_set_engine_type_hellen_NA94 = "@@TS_IO_TEST_COMMAND_char@@\x00\x30@@ET_HELLEN_NA94_16_hex@@" +cmd_set_engine_type_hellen_121_vag_4 = "@@TS_IO_TEST_COMMAND_char@@\x00\x30@@ET_HELLEN_121_VAG_16_hex@@" +cmd_set_engine_type_hellen_121_vag_5 = "@@TS_IO_TEST_COMMAND_char@@\x00\x30@@ET_HELLEN_121_VAG_5_CYL_16_hex@@" +cmd_set_engine_type_hellen_121_vag_6 = "@@TS_IO_TEST_COMMAND_char@@\x00\x30@@ET_HELLEN_121_VAG_6_CYL_16_hex@@" +cmd_set_engine_type_hellen_121_vag_8 = "@@TS_IO_TEST_COMMAND_char@@\x00\x30@@ET_HELLEN_121_VAG_8_CYL_16_hex@@" + ; MIATA_NA6_MAP = 41 cmd_set_engine_type_Frankenso_Miata_NA6_MAP = "@@TS_IO_TEST_COMMAND_char@@\x00\x30@@ET_FRANKENSO_MIATA_NA6_16_hex@@" @@ -3501,9 +3506,13 @@ cmd_set_engine_type_default = "@@TS_IO_TEST_COMMAND_char@@\x00\x31\x00\x00" commandButton = "Proteus Miata TCU", cmd_set_engine_type_Proteus_Miata_TCU@@if_show_Proteus_presets commandButton = "Proteus Miata NB2", cmd_set_engine_type_ET_PROTEUS_MIATA_NB2@@if_show_Proteus_presets - commandButton = "Hellen NA6", cmd_set_engine_type_hellen_NA6@@if_show_Hellen_presets - commandButton = "Hellen NA8 94-95", cmd_set_engine_type_hellen_NA94@@if_show_Hellen_presets + commandButton = "Hellen NA6", cmd_set_engine_type_hellen_NA6@@if_show_HellenNA6_presets + commandButton = "Hellen NA8 94-95", cmd_set_engine_type_hellen_NA94@@if_show_HellenNA6_presets + commandButton = "Hellen 121 VAG i4", cmd_set_engine_type_hellen_121_vag_4@@if_show_Hellen121vag_presets + commandButton = "Hellen 121 VAG v6", cmd_set_engine_type_hellen_121_vag_5@@if_show_Hellen121vag_presets + commandButton = "Hellen 121 VAG i5", cmd_set_engine_type_hellen_121_vag_6@@if_show_Hellen121vag_presets + commandButton = "Hellen 121 VAG v8", cmd_set_engine_type_hellen_121_vag_8@@if_show_Hellen121vag_presets commandButton = "ETB test bench", cmd_set_engine_type_etb_test@@if_show_test_presets commandButton = "TLE8888 test bench", cmd_set_engine_type_8888_test@@if_show_test_presets