From 1fe0b9d97b7b102c2dea90e6911546158b81bebe Mon Sep 17 00:00:00 2001 From: rusEfi Date: Sun, 5 Jun 2016 20:03:16 -0400 Subject: [PATCH] auto-sync --- firmware/config/engines/GY6_139QMB.cpp | 2 +- firmware/config/engines/dodge_neon.cpp | 2 +- firmware/config/engines/ford_festiva.cpp | 8 ++++---- firmware/config/engines/mazda_miata_1_6.cpp | 6 +++--- firmware/config/engines/mazda_miata_nb.cpp | 2 +- firmware/config/engines/test_engine.cpp | 20 +++++++++---------- .../controllers/algo/auto_generated_enums.cpp | 2 ++ firmware/controllers/algo/rusefi_enums.h | 1 + firmware/controllers/math/engine_math.cpp | 3 +++ firmware/integration/rusefi_config.txt | 2 +- firmware/tunerstudio/rusefi.ini | 4 ++-- 11 files changed, 29 insertions(+), 23 deletions(-) diff --git a/firmware/config/engines/GY6_139QMB.cpp b/firmware/config/engines/GY6_139QMB.cpp index dcd6c02189..1e3a46390a 100644 --- a/firmware/config/engines/GY6_139QMB.cpp +++ b/firmware/config/engines/GY6_139QMB.cpp @@ -86,7 +86,7 @@ void setGy6139qmbDefaultEngineConfiguration(DECLARE_ENGINE_PARAMETER_F) { engineConfiguration->analogInputDividerCoefficient = 1; engineConfiguration->algorithm = LM_MAP; engineConfiguration->globalTriggerAngleOffset = 45; - engineConfiguration->bc.sensorChartMode = SC_MAP; + boardConfiguration->sensorChartMode = SC_MAP; engineConfiguration->specs.displacement = 0.072; // 72cc engineConfiguration->specs.cylindersCount = 1; setOperationMode(engineConfiguration, FOUR_STROKE_CRANK_SENSOR); diff --git a/firmware/config/engines/dodge_neon.cpp b/firmware/config/engines/dodge_neon.cpp index 99aae32e47..89c03c5f49 100644 --- a/firmware/config/engines/dodge_neon.cpp +++ b/firmware/config/engines/dodge_neon.cpp @@ -428,7 +428,7 @@ void setDodgeNeonNGCEngineConfiguration(DECLARE_ENGINE_PARAMETER_F) { /** * set_fsio_setting 0 0.11 */ - engineConfiguration->bc.fsio_setting[0] = 0.2; + boardConfiguration->fsio_setting[0] = 0.2; #if EFI_FSIO || defined(__DOXYGEN__) boardConfiguration->fsio_setting[0] = 0.55; setFsioExt(0, GPIOE_5, "0 fsio_setting", 400 PASS_ENGINE_PARAMETER); diff --git a/firmware/config/engines/ford_festiva.cpp b/firmware/config/engines/ford_festiva.cpp index 237a68d081..e47c08dde6 100644 --- a/firmware/config/engines/ford_festiva.cpp +++ b/firmware/config/engines/ford_festiva.cpp @@ -233,7 +233,7 @@ void setFordEscortGt(DECLARE_ENGINE_PARAMETER_F) { * to test * set_fsio_setting 0 5000 */ - engineConfiguration->bc.fsio_setting[0] = 5000; + boardConfiguration->fsio_setting[0] = 5000; // set_fsio_expression 1 "rpm 0 fsio_setting >" setFsioExt(0, GPIOE_3, "rpm 0 fsio_setting >", 150 PASS_ENGINE_PARAMETER); @@ -248,9 +248,9 @@ void setFordEscortGt(DECLARE_ENGINE_PARAMETER_F) { * set_fsio_expression 1 "rpm 0 fsio_setting > coolant 1 fsio_setting > | vbatt 2 fsio_setting < |" * eval "rpm 0 fsio_setting > coolant 1 fsio_setting > | vbatt 2 fsio_setting < |" */ - engineConfiguration->bc.fsio_setting[1] = 6200; // RPM threshold - engineConfiguration->bc.fsio_setting[2] = 90; // CLT threshold - engineConfiguration->bc.fsio_setting[3] = 13.5; // voltage threshold + boardConfiguration->fsio_setting[1] = 6200; // RPM threshold + boardConfiguration->fsio_setting[2] = 90; // CLT threshold + boardConfiguration->fsio_setting[3] = 13.5; // voltage threshold setFsio(1, GPIOC_13, "rpm 1 fsio_setting > coolant 2 fsio_setting > | vbatt 3 fsio_setting < |" PASS_ENGINE_PARAMETER); diff --git a/firmware/config/engines/mazda_miata_1_6.cpp b/firmware/config/engines/mazda_miata_1_6.cpp index fda81ae1b4..813745c42c 100644 --- a/firmware/config/engines/mazda_miata_1_6.cpp +++ b/firmware/config/engines/mazda_miata_1_6.cpp @@ -53,9 +53,9 @@ void setMiataNA_1_6_Configuration(DECLARE_ENGINE_PARAMETER_F) { * set_fsio_expression 1 "rpm 0 fsio_setting > coolant 1 fsio_setting > | vbatt 2 fsio_setting < |" * eval "rpm 0 fsio_setting > coolant 1 fsio_setting > | vbatt 2 fsio_setting < |" */ - engineConfiguration->bc.fsio_setting[0] = 6000; // RPM threshold - engineConfiguration->bc.fsio_setting[1] = 90; // CLT threshold - engineConfiguration->bc.fsio_setting[2] = 13.0; // voltage threshold + boardConfiguration->fsio_setting[0] = 6000; // RPM threshold + boardConfiguration->fsio_setting[1] = 90; // CLT threshold + boardConfiguration->fsio_setting[2] = 13.0; // voltage threshold setFsio(0, GPIOC_13, "rpm 0 fsio_setting > coolant 1 fsio_setting > | vbatt 2 fsio_setting < |" PASS_ENGINE_PARAMETER); diff --git a/firmware/config/engines/mazda_miata_nb.cpp b/firmware/config/engines/mazda_miata_nb.cpp index 2daca94d3b..767ad68b0a 100644 --- a/firmware/config/engines/mazda_miata_nb.cpp +++ b/firmware/config/engines/mazda_miata_nb.cpp @@ -87,7 +87,7 @@ void setMazdaMiataNbEngineConfiguration(DECLARE_ENGINE_PARAMETER_F) { * to test * set_fsio_setting 0 5000 */ - engineConfiguration->bc.fsio_setting[0] = 5000; + boardConfiguration->fsio_setting[0] = 5000; // (self and (rpm > 4800)) OR (rpm > 5000) // set_fsio_expression 1 "self rpm 4800 > & rpm 5000 > OR" // setFsioExt(0, GPIOE_3, "self rpm 4800 > & rpm 5000 > OR", 150 PASS_ENGINE_PARAMETER); diff --git a/firmware/config/engines/test_engine.cpp b/firmware/config/engines/test_engine.cpp index 33992e2aa6..69bf839081 100644 --- a/firmware/config/engines/test_engine.cpp +++ b/firmware/config/engines/test_engine.cpp @@ -35,17 +35,17 @@ void setTestEngineConfiguration(DECLARE_ENGINE_PARAMETER_F) { board_configuration_s *bc = &engineConfiguration->bc; bc->malfunctionIndicatorPin = GPIO_UNASSIGNED; - bc->ignitionPins[0] = GPIOC_7; // #1 - bc->ignitionPins[1] = GPIO_UNASSIGNED; // #2 - bc->ignitionPins[2] = GPIO_UNASSIGNED; // #3 - bc->ignitionPins[3] = GPIO_UNASSIGNED; // #4 - bc->ignitionPins[4] = GPIO_UNASSIGNED; // #5 - bc->ignitionPins[5] = GPIO_UNASSIGNED; // #6 + boardConfiguration->ignitionPins[0] = GPIOC_7; // #1 + boardConfiguration->ignitionPins[1] = GPIO_UNASSIGNED; // #2 + boardConfiguration->ignitionPins[2] = GPIO_UNASSIGNED; // #3 + boardConfiguration->ignitionPins[3] = GPIO_UNASSIGNED; // #4 + boardConfiguration->ignitionPins[4] = GPIO_UNASSIGNED; // #5 + boardConfiguration->ignitionPins[5] = GPIO_UNASSIGNED; // #6 - bc->logicAnalyzerPins[0] = GPIO_UNASSIGNED; - bc->logicAnalyzerPins[1] = GPIO_UNASSIGNED; - bc->logicAnalyzerPins[2] = GPIO_UNASSIGNED; - bc->logicAnalyzerPins[3] = GPIO_UNASSIGNED; + boardConfiguration->logicAnalyzerPins[0] = GPIO_UNASSIGNED; + boardConfiguration->logicAnalyzerPins[1] = GPIO_UNASSIGNED; + boardConfiguration->logicAnalyzerPins[2] = GPIO_UNASSIGNED; + boardConfiguration->logicAnalyzerPins[3] = GPIO_UNASSIGNED; engineConfiguration->hasCltSensor = false; engineConfiguration->hasIatSensor = false; diff --git a/firmware/controllers/algo/auto_generated_enums.cpp b/firmware/controllers/algo/auto_generated_enums.cpp index ae53edfec4..742697a536 100644 --- a/firmware/controllers/algo/auto_generated_enums.cpp +++ b/firmware/controllers/algo/auto_generated_enums.cpp @@ -356,6 +356,8 @@ case FO_1_2_3: return "FO_1_2_3"; case FO_1_8_7_2_6_5_4_3: return "FO_1_8_7_2_6_5_4_3"; +case FO_1_5_4_2_6_3_7_8: + return "FO_1_5_4_2_6_3_7_8"; case Force_4b_firing_order: return "Force_4b_firing_order"; } diff --git a/firmware/controllers/algo/rusefi_enums.h b/firmware/controllers/algo/rusefi_enums.h index 552937fe62..2a3f5aa2ec 100644 --- a/firmware/controllers/algo/rusefi_enums.h +++ b/firmware/controllers/algo/rusefi_enums.h @@ -325,6 +325,7 @@ typedef enum { // 8 cylinder FO_1_8_4_3_6_5_7_2 = 5, FO_1_8_7_2_6_5_4_3 = 11, + FO_1_5_4_2_6_3_7_8 = 12, // 5 cylinder FO_1_2_4_5_3 = 6, diff --git a/firmware/controllers/math/engine_math.cpp b/firmware/controllers/math/engine_math.cpp index a5b228d32d..18da8bd72f 100644 --- a/firmware/controllers/math/engine_math.cpp +++ b/firmware/controllers/math/engine_math.cpp @@ -320,6 +320,7 @@ static int order_1_THEN_2_THEN_3_THEN_4_THEN_5_THEN_6[] = { 1, 2, 3, 4, 5, 6 }; static int order_1_8_4_3_6_5_7_2[] = { 1, 8, 4, 3, 6, 5, 7, 2 }; static int order_1_8_7_2_6_5_4_3[] = { 1, 8, 7, 2, 6, 5, 4, 3 }; +static int order_1_5_4_2_6_3_7_8[] = { 1, 5, 4, 2, 6, 3, 7, 8 }; static int order_1_2[] = {1, 2}; @@ -364,6 +365,8 @@ int getCylinderId(firing_order_e firingOrder, int index) { return order_1_8_4_3_6_5_7_2[index]; case FO_1_8_7_2_6_5_4_3: return order_1_8_7_2_6_5_4_3[index]; + case FO_1_5_4_2_6_3_7_8: + return order_1_5_4_2_6_3_7_8[index]; default: warning(OBD_PCM_Processor_Fault, "getCylinderId not supported for %d", firingOrder); diff --git a/firmware/integration/rusefi_config.txt b/firmware/integration/rusefi_config.txt index 3926944fa5..f94bc2508c 100644 --- a/firmware/integration/rusefi_config.txt +++ b/firmware/integration/rusefi_config.txt @@ -200,7 +200,7 @@ float displacement;Engine displacement, in liters\nsee also cylindersCount;"L", custom cylinders_count_t 4 bits, U32, @OFFSET@, [0:3], "INVALID", 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, "INVALID", "INVALID", "INVALID" cylinders_count_t cylindersCount; -custom firing_order_e 4 bits, U32, @OFFSET@, [0:3], "One Cylinder", "1-3-4-2", "1-2-4-3", "1-3-2-4", "1-5-3-6-2-4", "1-8-4-3-6-5-7-2", "1-5-3-6-2-4", "1-4-2-5-3-6", "1-2", "1_2_3_4_5_6", "1-2-3", "1-8-7-2-6-5-4-3", "fo12", "fo13", "fo14", "INVALID" +custom firing_order_e 4 bits, U32, @OFFSET@, [0:3], "One Cylinder", "1-3-4-2", "1-2-4-3", "1-3-2-4", "1-5-3-6-2-4", "1-8-4-3-6-5-7-2", "1-5-3-6-2-4", "1-4-2-5-3-6", "1-2", "1_2_3_4_5_6", "1-2-3", "1-8-7-2-6-5-4-3", "1-5-4-2-6-3-7-8", "fo13", "fo14", "INVALID" firing_order_e firingOrder; end_struct diff --git a/firmware/tunerstudio/rusefi.ini b/firmware/tunerstudio/rusefi.ini index cbf0ed10ab..47de17b440 100644 --- a/firmware/tunerstudio/rusefi.ini +++ b/firmware/tunerstudio/rusefi.ini @@ -41,7 +41,7 @@ enable2ndByteCanID = false ; see PAGE_0_SIZE in C source code ; CONFIG_DEFINITION_START -; this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Fri May 27 20:30:17 EDT 2016 +; this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Sun Jun 05 19:37:58 EDT 2016 pageSize = 17080 page = 1 @@ -94,7 +94,7 @@ page = 1 sparkDwell = array, F32, 368, [8], "ms", 1, 0.0, 0.0, 30.0, 2 displacement = scalar, F32, 400, "L", 1, 0, 0, 1000.0, 2 cylindersCount = bits, U32, 404, [0:3], "INVALID", 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, "INVALID", "INVALID", "INVALID" - firingOrder = bits, U32, 408, [0:3], "One Cylinder", "1-3-4-2", "1-2-4-3", "1-3-2-4", "1-5-3-6-2-4", "1-8-4-3-6-5-7-2", "1-5-3-6-2-4", "1-4-2-5-3-6", "1-2", "1_2_3_4_5_6", "1-2-3", "1-8-7-2-6-5-4-3", "fo12", "fo13", "fo14", "INVALID" + firingOrder = bits, U32, 408, [0:3], "One Cylinder", "1-3-4-2", "1-2-4-3", "1-3-2-4", "1-5-3-6-2-4", "1-8-4-3-6-5-7-2", "1-5-3-6-2-4", "1-4-2-5-3-6", "1-2", "1_2_3_4_5_6", "1-2-3", "1-8-7-2-6-5-4-3", "1-5-4-2-6-3-7-8", "fo13", "fo14", "INVALID" ;skipping cylinderBore offset 412 sensorSnifferRpmThreshold = scalar, S32, 416, "RPM", 1, 0, 0,30000, 0 rpmHardLimit = scalar, S32, 420, "rpm", 1, 0, 0, 20000.0, 2