From 6c89b1a2e29aeca76e71b5abed73ea0865e4d0f2 Mon Sep 17 00:00:00 2001 From: rusEfi Date: Wed, 5 Nov 2014 14:03:26 -0600 Subject: [PATCH] auto-sync --- firmware/config/engines/bmw_e34.cpp | 20 +++++++++++++++++++ firmware/config/engines/bmw_e34.h | 15 ++++++++++++++ firmware/config/engines/engines.mk | 1 + .../controllers/algo/auto_generated_enums.cpp | 2 ++ .../controllers/algo/engine_configuration.cpp | 5 ++++- firmware/controllers/algo/rusefi_enums.h | 4 +++- firmware/iar/ch.ewp | 6 ++++++ firmware/tunerstudio/rusefi.ini | 10 ++++++++-- 8 files changed, 59 insertions(+), 4 deletions(-) create mode 100644 firmware/config/engines/bmw_e34.cpp create mode 100644 firmware/config/engines/bmw_e34.h diff --git a/firmware/config/engines/bmw_e34.cpp b/firmware/config/engines/bmw_e34.cpp new file mode 100644 index 0000000000..062d671e7f --- /dev/null +++ b/firmware/config/engines/bmw_e34.cpp @@ -0,0 +1,20 @@ +/** + * @file bmw_e34.cpp + * + * set_engine_type 25 + * + * @date Nov 5, 2014 + * @author Andrey Belomutskiy, (c) 2012-2014 + */ + +#include "global.h" +#include "bmw_e34.h" + +void setBmwE43(engine_configuration_s *engineConfiguration) { + engineConfiguration->rpmHardLimit = 6000; + setOperationMode(engineConfiguration, FOUR_STROKE_CRANK_SENSOR); + + engineConfiguration->triggerConfig.triggerType = TT_TOOTHED_WHEEL_60_2; + engineConfiguration->cylindersCount = 6; + +} diff --git a/firmware/config/engines/bmw_e34.h b/firmware/config/engines/bmw_e34.h new file mode 100644 index 0000000000..31cc9ec786 --- /dev/null +++ b/firmware/config/engines/bmw_e34.h @@ -0,0 +1,15 @@ +/** + * @file bmw_e34.h + * + * @date Nov 5, 2014 + * @author Andrey Belomutskiy, (c) 2012-2014 + */ + +#ifndef BMW_E34_H_ +#define BMW_E34_H_ + +#include "engine_configuration.h" + +void setBmwE43(engine_configuration_s *engineConfiguration); + +#endif /* BMW_E34_H_ */ diff --git a/firmware/config/engines/engines.mk b/firmware/config/engines/engines.mk index 74caba1075..b18c4e1af0 100644 --- a/firmware/config/engines/engines.mk +++ b/firmware/config/engines/engines.mk @@ -4,6 +4,7 @@ ENGINES_SRC = ENGINES_SRC_CPP = $(PROJECT_DIR)/config/engines/ford_aspire.cpp \ $(PROJECT_DIR)/config/engines/MiniCooperR50.cpp \ $(PROJECT_DIR)/config/engines/audi_aan.cpp \ + $(PROJECT_DIR)/config/engines/bmw_e34.cpp \ $(PROJECT_DIR)/config/engines/mazda_miata.cpp \ $(PROJECT_DIR)/config/engines/citroenBerlingoTU3JP.cpp \ $(PROJECT_DIR)/config/engines/dodge_neon.cpp \ diff --git a/firmware/controllers/algo/auto_generated_enums.cpp b/firmware/controllers/algo/auto_generated_enums.cpp index 10f57c3d1e..31fd62e18f 100644 --- a/firmware/controllers/algo/auto_generated_enums.cpp +++ b/firmware/controllers/algo/auto_generated_enums.cpp @@ -245,6 +245,8 @@ case GY6_139QMB: return "GY6_139QMB"; case MAZDA_MIATA_NB: return "MAZDA_MIATA_NB"; +case BMW_E34: + return "BMWe34"; } return NULL; } diff --git a/firmware/controllers/algo/engine_configuration.cpp b/firmware/controllers/algo/engine_configuration.cpp index 492709f964..00ac2037ce 100644 --- a/firmware/controllers/algo/engine_configuration.cpp +++ b/firmware/controllers/algo/engine_configuration.cpp @@ -33,6 +33,7 @@ #endif #include "audi_aan.h" +#include "bmw_e34.h" #include "dodge_neon.h" #include "ford_aspire.h" #include "ford_fiesta.h" @@ -537,7 +538,9 @@ void resetConfigurationExt(Logging * logger, engine_type_e engineType, Engine *e case SUBARU_2003_WRX: setSubaru2003Wrx(engineConfiguration, boardConfiguration); break; - + case BMW_E34: + setBmwE43(engineConfiguration); + break; default: firmwareError("Unexpected engine type: %d", engineType); diff --git a/firmware/controllers/algo/rusefi_enums.h b/firmware/controllers/algo/rusefi_enums.h index 9fdaec3c73..63480eb591 100644 --- a/firmware/controllers/algo/rusefi_enums.h +++ b/firmware/controllers/algo/rusefi_enums.h @@ -92,7 +92,9 @@ typedef enum { DODGE_NEON_2003 = 23, MIATA_1994_SPAGS = 24, - ET_UNUSED = 25, + BMW_E34 = 25, + + ET_UNUSED = 26, Force_4b_engine_type = ENUM_SIZE_HACK, } engine_type_e; diff --git a/firmware/iar/ch.ewp b/firmware/iar/ch.ewp index a3ab47ac98..b2d0062476 100644 --- a/firmware/iar/ch.ewp +++ b/firmware/iar/ch.ewp @@ -1920,6 +1920,12 @@ $PROJ_DIR$\..\config\engines\audi_aan.h + + $PROJ_DIR$\..\config\engines\bmw_e34.cpp + + + $PROJ_DIR$\..\config\engines\bmw_e34.h + $PROJ_DIR$\..\config\engines\citroenBerlingoTU3JP.cpp diff --git a/firmware/tunerstudio/rusefi.ini b/firmware/tunerstudio/rusefi.ini index 3176e88263..e8b2e5fd90 100644 --- a/firmware/tunerstudio/rusefi.ini +++ b/firmware/tunerstudio/rusefi.ini @@ -224,7 +224,8 @@ enable2ndByteCanID = false HD44780_db7 = bits, U32, 5656, [0:6], "GPIOA_0", "GPIOA_1", "GPIOA_2", "GPIOA_3", "GPIOA_4", "GPIOA_5", "GPIOA_6", "GPIOA_7", "GPIOA_8", "GPIOA_9", "GPIOA_10", "GPIOA_11", "GPIOA_12", "GPIOA_13", "GPIOA_14", "GPIOA_15", "GPIOB_0", "GPIOB_1", "GPIOB_2", "GPIOB_3", "GPIOB_4", "GPIOB_5", "GPIOB_6", "GPIOB_7", "GPIOB_8", "GPIOB_9", "GPIOB_10", "GPIOB_11", "GPIOB_12", "GPIOB_13", "GPIOB_14", "GPIOB_15", "GPIOC_0", "GPIOC_1", "GPIOC_2", "GPIOC_3", "GPIOC_4", "GPIOC_5", "GPIOC_6", "GPIOC_7", "GPIOC_8", "GPIOC_9", "GPIOC_10", "GPIOC_11", "GPIOC_12", "GPIOC_13", "GPIOC_14", "GPIOC_15", "GPIOD_0", "GPIOD_1", "GPIOD_2", "GPIOD_3", "GPIOD_4", "GPIOD_5", "GPIOD_6", "GPIOD_7", "GPIOD_8", "GPIOD_9", "GPIOD_10", "GPIOD_11", "GPIOD_12", "GPIOD_13", "GPIOD_14", "GPIOD_15", "GPIOE_0", "GPIOE_1", "GPIOE_2", "GPIOE_3", "GPIOE_4", "GPIOE_5", "GPIOE_6", "GPIOE_7", "GPIOE_8", "GPIOE_9", "GPIOE_10", "GPIOE_11", "GPIOE_12", "GPIOE_13", "GPIOE_14", "GPIOE_15", "NONE", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" gps_rx_pin = bits, U32, 5660, [0:6], "GPIOA_0", "GPIOA_1", "GPIOA_2", "GPIOA_3", "GPIOA_4", "GPIOA_5", "GPIOA_6", "GPIOA_7", "GPIOA_8", "GPIOA_9", "GPIOA_10", "GPIOA_11", "GPIOA_12", "GPIOA_13", "GPIOA_14", "GPIOA_15", "GPIOB_0", "GPIOB_1", "GPIOB_2", "GPIOB_3", "GPIOB_4", "GPIOB_5", "GPIOB_6", "GPIOB_7", "GPIOB_8", "GPIOB_9", "GPIOB_10", "GPIOB_11", "GPIOB_12", "GPIOB_13", "GPIOB_14", "GPIOB_15", "GPIOC_0", "GPIOC_1", "GPIOC_2", "GPIOC_3", "GPIOC_4", "GPIOC_5", "GPIOC_6", "GPIOC_7", "GPIOC_8", "GPIOC_9", "GPIOC_10", "GPIOC_11", "GPIOC_12", "GPIOC_13", "GPIOC_14", "GPIOC_15", "GPIOD_0", "GPIOD_1", "GPIOD_2", "GPIOD_3", "GPIOD_4", "GPIOD_5", "GPIOD_6", "GPIOD_7", "GPIOD_8", "GPIOD_9", "GPIOD_10", "GPIOD_11", "GPIOD_12", "GPIOD_13", "GPIOD_14", "GPIOD_15", "GPIOE_0", "GPIOE_1", "GPIOE_2", "GPIOE_3", "GPIOE_4", "GPIOE_5", "GPIOE_6", "GPIOE_7", "GPIOE_8", "GPIOE_9", "GPIOE_10", "GPIOE_11", "GPIOE_12", "GPIOE_13", "GPIOE_14", "GPIOE_15", "NONE", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" gps_tx_pin = bits, U32, 5664, [0:6], "GPIOA_0", "GPIOA_1", "GPIOA_2", "GPIOA_3", "GPIOA_4", "GPIOA_5", "GPIOA_6", "GPIOA_7", "GPIOA_8", "GPIOA_9", "GPIOA_10", "GPIOA_11", "GPIOA_12", "GPIOA_13", "GPIOA_14", "GPIOA_15", "GPIOB_0", "GPIOB_1", "GPIOB_2", "GPIOB_3", "GPIOB_4", "GPIOB_5", "GPIOB_6", "GPIOB_7", "GPIOB_8", "GPIOB_9", "GPIOB_10", "GPIOB_11", "GPIOB_12", "GPIOB_13", "GPIOB_14", "GPIOB_15", "GPIOC_0", "GPIOC_1", "GPIOC_2", "GPIOC_3", "GPIOC_4", "GPIOC_5", "GPIOC_6", "GPIOC_7", "GPIOC_8", "GPIOC_9", "GPIOC_10", "GPIOC_11", "GPIOC_12", "GPIOC_13", "GPIOC_14", "GPIOC_15", "GPIOD_0", "GPIOD_1", "GPIOD_2", "GPIOD_3", "GPIOD_4", "GPIOD_5", "GPIOD_6", "GPIOD_7", "GPIOD_8", "GPIOD_9", "GPIOD_10", "GPIOD_11", "GPIOD_12", "GPIOD_13", "GPIOD_14", "GPIOD_15", "GPIOE_0", "GPIOE_1", "GPIOE_2", "GPIOE_3", "GPIOE_4", "GPIOE_5", "GPIOE_6", "GPIOE_7", "GPIOE_8", "GPIOE_9", "GPIOE_10", "GPIOE_11", "GPIOE_12", "GPIOE_13", "GPIOE_14", "GPIOE_15", "NONE", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" - idleSolenoidFreq = scalar, U32, 5668, "Hz", 1, 0, 0, 3000, 0 ; size 4 + idleSolenoidFrequency = scalar, U32, 5668, "Hz", 1, 0, 0, 3000, 0 ; size 4 + triggerSimulatorFrequency= scalar, U32, 5672, "Rpm", 1, 0, 0,30000, 0 ; size 4 @@ -608,6 +609,8 @@ fileVersion = { 20141103 } subMenu = afrTableTbl, "Targe AFR Table", {fuelAlgorithm == 3} subMenu = std_separator subMenu = ignitionTableTbl, "Ignition Table" + subMenu = std_separator + subMenu = otherSettings menu = "3D Map Tuning" ; subMenu = std_realtime, "Realtime Display" @@ -824,7 +827,7 @@ fileVersion = { 20141103 } field = "" field = "Idle Valve Pin Mode", idleValvePinMode field = "Idle Valve Pin", idleValvePin - field = "Idle Frequency", idleSolenoidFreq + field = "Idle Frequency", idleSolenoidFrequency field = "" field = "Fan Pin Mode", fanPinMode field = "Fan Pin", fanPin @@ -834,6 +837,9 @@ fileVersion = { 20141103 } field = "MIL Pin Mode", malfunctionIndicatorPinMode field = "MIL Pin", malfunctionIndicatorPin + dialog = otherSettings, "Other Settings" + field = "Trigger Simulator", triggerSimulatorFrequency + dialog = boardOutputRight, "", border panel = ignitionOutputs, North panel = otherOutputs, South