From 7a2fd2671d26de0d249db43f7edca7413c718b38 Mon Sep 17 00:00:00 2001 From: rusEfi Date: Mon, 27 Apr 2015 09:10:22 -0400 Subject: [PATCH] auto-sync --- firmware/config/engines/test_engine.cpp | 1 + firmware/controllers/algo/engine_configuration.cpp | 13 ++++++++++--- firmware/controllers/algo/engine_configuration.h | 1 + firmware/rusefi.cpp | 2 +- hardware/frankenso/known_issues.txt | 2 ++ 5 files changed, 15 insertions(+), 4 deletions(-) diff --git a/firmware/config/engines/test_engine.cpp b/firmware/config/engines/test_engine.cpp index 6e54d7ac3b..bbeca78178 100644 --- a/firmware/config/engines/test_engine.cpp +++ b/firmware/config/engines/test_engine.cpp @@ -24,6 +24,7 @@ void setTestEngineConfiguration(DECLARE_ENGINE_PARAMETER_F) { triggerConfig->customSkippedToothCount = 0; engineConfiguration->useOnlyFrontForTrigger = true; + setWholeIatCorrTimingTable(0 PASS_ENGINE_PARAMETER); engineConfiguration->ignitionMode = IM_ONE_COIL; setConstantDwell(3 PASS_ENGINE_PARAMETER); // 50% duty cycle @ 5000 rpm diff --git a/firmware/controllers/algo/engine_configuration.cpp b/firmware/controllers/algo/engine_configuration.cpp index ebfa7a5b3d..cc4bc43417 100644 --- a/firmware/controllers/algo/engine_configuration.cpp +++ b/firmware/controllers/algo/engine_configuration.cpp @@ -129,15 +129,22 @@ void setFuelTablesLoadBin(float minValue, float maxValue DECLARE_ENGINE_PARAMETE setTableBin2(config->afrLoadBins, FUEL_LOAD_COUNT, minValue, maxValue, 1); } -void setWholeTimingTable(float value DECLARE_ENGINE_PARAMETER_S) { - // todo: table helper? +void setTimingMap(ignition_table_t map, float value) { for (int l = 0; l < IGN_LOAD_COUNT; l++) { for (int r = 0; r < IGN_RPM_COUNT; r++) { - config->ignitionTable[l][r] = value; + map[l][r] = value; } } } +void setWholeIatCorrTimingTable(float value DECLARE_ENGINE_PARAMETER_S) { + setTimingMap(config->ignitionIatCorrTable, value); +} + +void setWholeTimingTable(float value DECLARE_ENGINE_PARAMETER_S) { + setTimingMap(config->ignitionTable, value); +} + static void initTemperatureCurve(int size, float *bins, float *values) { for (int i = 0; i < size; i++) { bins[i] = -40 + i * 10; diff --git a/firmware/controllers/algo/engine_configuration.h b/firmware/controllers/algo/engine_configuration.h index 2987429875..4197fccd8f 100644 --- a/firmware/controllers/algo/engine_configuration.h +++ b/firmware/controllers/algo/engine_configuration.h @@ -50,6 +50,7 @@ void setDefaultConfiguration(DECLARE_ENGINE_PARAMETER_F); void setMap(fuel_table_t table, float value); void setWholeFuelMap(float value DECLARE_ENGINE_PARAMETER_S); void setFuelTablesLoadBin(float minValue, float maxValue DECLARE_ENGINE_PARAMETER_S); +void setWholeIatCorrTimingTable(float value DECLARE_ENGINE_PARAMETER_S); void setWholeTimingTable(float value DECLARE_ENGINE_PARAMETER_S); void setConstantDwell(float dwellMs DECLARE_ENGINE_PARAMETER_S); void printFloatArray(const char *prefix, float array[], int size); diff --git a/firmware/rusefi.cpp b/firmware/rusefi.cpp index e40be5259d..b994ed2770 100644 --- a/firmware/rusefi.cpp +++ b/firmware/rusefi.cpp @@ -290,5 +290,5 @@ int getRusEfiVersion(void) { return 123; // this is here to make the compiler happy about the unused array if (UNUSED_CCM_SIZE[0] * 0 != 0) return 3211; // this is here to make the compiler happy about the unused array - return 20150426; + return 20150427; } diff --git a/hardware/frankenso/known_issues.txt b/hardware/frankenso/known_issues.txt index 78262d643e..32fcd58cd5 100644 --- a/hardware/frankenso/known_issues.txt +++ b/hardware/frankenso/known_issues.txt @@ -85,6 +85,8 @@ ) idle valve SMD diode? ) on schematics, rename INJ_xx to LOW_xx? "inj" is a bit confusing, it implies that PE6 is injector #1 while it is usually not the case ) set analog input values to match https://docs.google.com/spreadsheets/d/1LTvS7I-128Hft9uXHG1JrBxetVjGJDSBkySgVDQ6MGk/edit#gid=0 + ) silkscreen for analog inputs - PA1/PC1/etc? + For honda add-on / rewiring board -- Add 2A high side solinoid drive for VTec sol -- Add 3rd VR chip for 3rd signal