From 6c1071c9c9e22477b02757c0af4468aba08d92ed Mon Sep 17 00:00:00 2001 From: rusEfi Date: Fri, 1 Jul 2016 10:02:58 -0400 Subject: [PATCH] auto-sync --- .../controllers/algo/engine_configuration.cpp | 7 ++++++ ...ngine_configuration_generated_structures.h | 22 ++++++++++++++++--- firmware/integration/rusefi_config.txt | 6 ++++- unit_tests/test_engine_math.cpp | 3 +++ 4 files changed, 34 insertions(+), 4 deletions(-) diff --git a/firmware/controllers/algo/engine_configuration.cpp b/firmware/controllers/algo/engine_configuration.cpp index 2e9b0b5e9d..ac9503ae24 100644 --- a/firmware/controllers/algo/engine_configuration.cpp +++ b/firmware/controllers/algo/engine_configuration.cpp @@ -420,6 +420,13 @@ void setDefaultConfiguration(DECLARE_ENGINE_PARAMETER_F) { engineConfiguration->cutFuelOnHardLimit = true; engineConfiguration->cutSparkOnHardLimit = true; + + engineConfiguration->tChargeMinRpmMinTps = 0.25; + engineConfiguration->tChargeMinRpmMaxTps = 0.25; + engineConfiguration->tChargeMaxRpmMinTps = 0.25; + engineConfiguration->tChargeMaxRpmMaxTps = 0.9; + + engineConfiguration->noAccelAfterHardLimitPeriodSecs = 3; setTableBin2(engineConfiguration->crankingTpsCoef, CRANKING_CURVE_SIZE, 1, 1, 1); diff --git a/firmware/controllers/algo/engine_configuration_generated_structures.h b/firmware/controllers/algo/engine_configuration_generated_structures.h index 9fd1facbaa..4895262302 100644 --- a/firmware/controllers/algo/engine_configuration_generated_structures.h +++ b/firmware/controllers/algo/engine_configuration_generated_structures.h @@ -1,4 +1,4 @@ -// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Thu Jun 30 21:51:57 EDT 2016 +// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Fri Jul 01 09:36:16 EDT 2016 // begin #ifndef ENGINE_CONFIGURATION_GENERATED_H_ #define ENGINE_CONFIGURATION_GENERATED_H_ @@ -1643,7 +1643,23 @@ typedef struct { /** * offset 2432 */ - int unused[154]; + float tChargeMinRpmMinTps; + /** + * offset 2436 + */ + float tChargeMinRpmMaxTps; + /** + * offset 2440 + */ + float tChargeMaxRpmMinTps; + /** + * offset 2444 + */ + float tChargeMaxRpmMaxTps; + /** + * offset 2448 + */ + int unused[150]; /** total size 3048*/ } engine_configuration_s; @@ -1832,4 +1848,4 @@ typedef struct { #endif // end -// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Thu Jun 30 21:51:57 EDT 2016 +// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Fri Jul 01 09:36:16 EDT 2016 diff --git a/firmware/integration/rusefi_config.txt b/firmware/integration/rusefi_config.txt index e319391843..f8b48ae976 100644 --- a/firmware/integration/rusefi_config.txt +++ b/firmware/integration/rusefi_config.txt @@ -700,7 +700,11 @@ float[MAP_ACCEL_TAPER] mapAccelTaperMult;;"mult", 1, 0, 0.0, 300, int auxPid1DT;Aux Pid #1 dTime;"ms", 1, 0, 0, 3000, 0 pid_s auxPid1; float crankingIdleAdjustment;Extra idle while cranking;"percent", 1, 0, -100.0, 100, - int[154] unused; + float tChargeMinRpmMinTps; + float tChargeMinRpmMaxTps; + float tChargeMaxRpmMinTps; + float tChargeMaxRpmMaxTps; + int[150] unused; end_struct diff --git a/unit_tests/test_engine_math.cpp b/unit_tests/test_engine_math.cpp index 41809c7438..e88bebfd94 100644 --- a/unit_tests/test_engine_math.cpp +++ b/unit_tests/test_engine_math.cpp @@ -20,6 +20,9 @@ void testIgnitionPlanning(void) { EngineTestHelper eth(FORD_ESCORT_GT); EXPAND_EngineTestHelper; + eth.engine.periodicFastCallback(PASS_ENGINE_PARAMETER_F); + assertEquals(13.5, eth.engine.engineState.targetAFR); + assertEquals(IM_BATCH, engineConfiguration->injectionMode); }