From c05ecf8b02985627a2d750bc9709c0a4cf3bbe00 Mon Sep 17 00:00:00 2001 From: rusEfi Date: Sat, 28 Feb 2015 12:06:01 -0600 Subject: [PATCH] auto-sync --- .../config/engines/citroenBerlingoTU3JP.cpp | 4 +- firmware/config/engines/dodge_neon.cpp | 4 +- firmware/config/engines/ford_aspire.cpp | 4 +- firmware/config/engines/mazda_miata.cpp | 8 +- firmware/console/tunerstudio/tunerstudio.cpp | 15 ---- .../tunerstudio/tunerstudio_configuration.h | 4 +- firmware/controllers/algo/advance_map.cpp | 4 +- .../controllers/algo/engine_configuration.cpp | 17 ++-- .../controllers/algo/engine_configuration.h | 26 ++----- ...ngine_configuration_generated_structures.h | 67 +++++++++++++++- firmware/controllers/algo/fuel_math.cpp | 4 +- firmware/controllers/flash_main.h | 2 +- firmware/controllers/math/engine_math.cpp | 8 +- firmware/controllers/math/speed_density.cpp | 12 +-- firmware/controllers/settings.cpp | 20 ++--- firmware/rusefi_config.ini | 30 ++++---- firmware/tunerstudio/rusefi.ini | 77 ++++++------------- 17 files changed, 156 insertions(+), 150 deletions(-) diff --git a/firmware/config/engines/citroenBerlingoTU3JP.cpp b/firmware/config/engines/citroenBerlingoTU3JP.cpp index 5f65808b09..4801238905 100644 --- a/firmware/config/engines/citroenBerlingoTU3JP.cpp +++ b/firmware/config/engines/citroenBerlingoTU3JP.cpp @@ -201,7 +201,7 @@ void setCitroenBerlingoTU3JPConfiguration(DECLARE_ENGINE_PARAMETER_F) { */ // engineConfiguration->mafAdcChannel = GPIO_UNASSIGNED; - copyFuelTable(tps_fuel_table, config->fuelTable); - copyTimingTable(tps_advance_table, config->ignitionTable); + copyFuelTable(tps_fuel_table, engineConfiguration->fuelTable); + copyTimingTable(tps_advance_table, engineConfiguration->ignitionTable); } diff --git a/firmware/config/engines/dodge_neon.cpp b/firmware/config/engines/dodge_neon.cpp index 367fb7ab21..f58b43591f 100644 --- a/firmware/config/engines/dodge_neon.cpp +++ b/firmware/config/engines/dodge_neon.cpp @@ -217,9 +217,9 @@ void setDodgeNeonNGCEngineConfiguration(DECLARE_ENGINE_PARAMETER_F) { * set_whole_fuel_map 12 */ //setWholeFuelMap(12 PASS_ENGINE_PARAMETER); - copyFuelTable(alphaNfuel, config->fuelTable); + copyFuelTable(alphaNfuel, engineConfiguration->fuelTable); //setWholeTimingTable(12 PASS_ENGINE_PARAMETER); - copyTimingTable(fromDyno, config->ignitionTable); + copyTimingTable(fromDyno, engineConfiguration->ignitionTable); // set_cranking_charge_angle 70 engineConfiguration->crankingChargeAngle = 70; diff --git a/firmware/config/engines/ford_aspire.cpp b/firmware/config/engines/ford_aspire.cpp index a3e88ad268..56a1263870 100644 --- a/firmware/config/engines/ford_aspire.cpp +++ b/firmware/config/engines/ford_aspire.cpp @@ -73,8 +73,8 @@ static void setDefaultAspireMaps(DECLARE_ENGINE_PARAMETER_F) { setTimingLoadBin(1.2, 4.4 PASS_ENGINE_PARAMETER); setTimingRpmBin(800, 7000 PASS_ENGINE_PARAMETER); - copyFuelTable(default_aspire_fuel_table, config->fuelTable); - copyTimingTable(default_aspire_timing_table, config->ignitionTable); + copyFuelTable(default_aspire_fuel_table, engineConfiguration->fuelTable); + copyTimingTable(default_aspire_timing_table, engineConfiguration->ignitionTable); } void setFordAspireEngineConfiguration(DECLARE_ENGINE_PARAMETER_F) { diff --git a/firmware/config/engines/mazda_miata.cpp b/firmware/config/engines/mazda_miata.cpp index de263aeadc..b3f7ce350b 100644 --- a/firmware/config/engines/mazda_miata.cpp +++ b/firmware/config/engines/mazda_miata.cpp @@ -372,9 +372,9 @@ static void setMiata1994_common(DECLARE_ENGINE_PARAMETER_F) { engineConfiguration->crankingChargeAngle = 70; - copyFuelTable(miata_maf_fuel_table, config->fuelTable); + copyFuelTable(miata_maf_fuel_table, engineConfiguration->fuelTable); - copyTimingTable(miata_maf_advance_table, config->ignitionTable); + copyTimingTable(miata_maf_advance_table, engineConfiguration->ignitionTable); // boardConfiguration->triggerSimulatorPins[0] = GPIOD_2; // 2G - YEL/BLU // boardConfiguration->triggerSimulatorPins[1] = GPIOB_3; // 2E - WHT - four times @@ -501,8 +501,8 @@ void setMiata1996(DECLARE_ENGINE_PARAMETER_F) { commonMiataNa(PASS_ENGINE_PARAMETER_F); engineConfiguration->specs.displacement = 1.839; - copyFuelTable(miata_maf_fuel_table, config->fuelTable); - copyTimingTable(miata_maf_advance_table, config->ignitionTable); + copyFuelTable(miata_maf_fuel_table, engineConfiguration->fuelTable); + copyTimingTable(miata_maf_advance_table, engineConfiguration->ignitionTable); // upside down boardConfiguration->triggerInputPins[0] = GPIOA_5; diff --git a/firmware/console/tunerstudio/tunerstudio.cpp b/firmware/console/tunerstudio/tunerstudio.cpp index 5bb2cbd48b..05080d8564 100644 --- a/firmware/console/tunerstudio/tunerstudio.cpp +++ b/firmware/console/tunerstudio/tunerstudio.cpp @@ -167,16 +167,6 @@ char *getWorkingPageAddr(int pageIndex) { return (char*) &configWorkingCopy.engineConfiguration; case 1: return (char*) &configWorkingCopy.ve2Table; - case 2: - return (char*) &configWorkingCopy.fuelTable; - case 3: - return (char*) &configWorkingCopy.ignitionTable; - case 4: - return (char*) &configWorkingCopy.veTable; - case 5: - return (char*) &configWorkingCopy.afrTable; - case 6: - return (char*) &configWorkingCopy.injectionPhase; // case 2: // fuelTable // case 3: // ignitionTable // case 4: // veTable @@ -191,11 +181,6 @@ int getTunerStudioPageSize(int pageIndex) { case 0: return PAGE_0_SIZE; case 1: - case 2: - case 3: - case 4: - case 5: - case 6: return PAGE_1_SIZE; // case 2: // case 3: diff --git a/firmware/console/tunerstudio/tunerstudio_configuration.h b/firmware/console/tunerstudio/tunerstudio_configuration.h index 7bd16c44af..fd3e9b5235 100644 --- a/firmware/console/tunerstudio/tunerstudio_configuration.h +++ b/firmware/console/tunerstudio/tunerstudio_configuration.h @@ -18,9 +18,9 @@ */ #define TS_FILE_VERSION 20150216 -#define PAGE_COUNT 7 +#define PAGE_COUNT 2 -#define PAGE_0_SIZE 8248 +#define PAGE_0_SIZE 14008 #define PAGE_1_SIZE 1152 #define TS_OUTPUT_SIZE 196 diff --git a/firmware/controllers/algo/advance_map.cpp b/firmware/controllers/algo/advance_map.cpp index ad2863529c..4d0bfa631f 100644 --- a/firmware/controllers/algo/advance_map.cpp +++ b/firmware/controllers/algo/advance_map.cpp @@ -58,6 +58,6 @@ float getAdvance(int rpm, float engineLoad DECLARE_ENGINE_PARAMETER_S) { } void prepareTimingMap(DECLARE_ENGINE_PARAMETER_F) { - advanceMap.init(config->ignitionTable, config->ignitionLoadBins, - config->ignitionRpmBins); + advanceMap.init(engineConfiguration->ignitionTable, engineConfiguration->ignitionLoadBins, + engineConfiguration->ignitionRpmBins); } diff --git a/firmware/controllers/algo/engine_configuration.cpp b/firmware/controllers/algo/engine_configuration.cpp index 1e905cab7d..f449ea7eb6 100644 --- a/firmware/controllers/algo/engine_configuration.cpp +++ b/firmware/controllers/algo/engine_configuration.cpp @@ -113,18 +113,18 @@ void setMap(fuel_table_t table, float value) { } static void setWholeVEMap(float value DECLARE_ENGINE_PARAMETER_S) { - setMap(config->veTable, value); + setMap(engineConfiguration->veTable, value); } void setWholeFuelMap(float value DECLARE_ENGINE_PARAMETER_S) { - setMap(config->fuelTable, value); + setMap(engineConfiguration->fuelTable, value); } void setWholeTimingTable(float value DECLARE_ENGINE_PARAMETER_S) { // todo: table helper? for (int l = 0; l < IGN_LOAD_COUNT; l++) { for (int r = 0; r < IGN_RPM_COUNT; r++) { - config->ignitionTable[l][r] = value; + engineConfiguration->ignitionTable[l][r] = value; } } } @@ -136,7 +136,8 @@ void setWholeTimingTable(float value DECLARE_ENGINE_PARAMETER_S) { */ void setDefaultConfiguration(DECLARE_ENGINE_PARAMETER_F) { board_configuration_s *boardConfiguration = &engineConfiguration->bc; - memset(config, 0, sizeof(persistent_config_s)); + memset(engineConfiguration, 0, sizeof(engine_configuration_s)); + memset(boardConfiguration, 0, sizeof(board_configuration_s)); setDetaultVETable(PASS_ENGINE_PARAMETER_F); @@ -192,11 +193,11 @@ void setDefaultConfiguration(DECLARE_ENGINE_PARAMETER_F) { // set_whole_timing_map 3 setWholeFuelMap(3 PASS_ENGINE_PARAMETER); setWholeVEMap(0.8 PASS_ENGINE_PARAMETER); - setMap(config->afrTable, 14.7); + setMap(engineConfiguration->afrTable, 14.7); - setMap(config->injectionPhase, -180); - setRpmTableBin(config->injPhaseRpmBins, FUEL_RPM_COUNT); - setTableBin2(config->injPhaseLoadBins, FUEL_LOAD_COUNT, 10, 300, 1); + setMap(engineConfiguration->injectionPhase, -180); + setRpmTableBin(engineConfiguration->injPhaseRpmBins, FUEL_RPM_COUNT); + setTableBin2(engineConfiguration->injPhaseLoadBins, FUEL_LOAD_COUNT, 10, 300, 1); setThermistorConfiguration(&engineConfiguration->clt, 0, 9500, 23.8889, 2100, 48.8889, 1000); engineConfiguration->clt.bias_resistor = 1500; diff --git a/firmware/controllers/algo/engine_configuration.h b/firmware/controllers/algo/engine_configuration.h index 55c0c6a6cb..5645e1febe 100644 --- a/firmware/controllers/algo/engine_configuration.h +++ b/firmware/controllers/algo/engine_configuration.h @@ -42,29 +42,15 @@ typedef struct { engine_configuration_s engineConfiguration; ve_table_t ve2Table; + /** + * offset 15032 + */ float ve2LoadBins[FUEL_LOAD_COUNT]; + /** + * offset 15096 + */ float ve2RpmBins[FUEL_RPM_COUNT]; - fuel_table_t fuelTable; - float fuelLoadBins[FUEL_LOAD_COUNT]; - float fuelRpmBins[FUEL_RPM_COUNT]; - - ignition_table_t ignitionTable; - float ignitionLoadBins[IGN_LOAD_COUNT]; - float ignitionRpmBins[IGN_RPM_COUNT]; - - ve_table_t veTable; - float veLoadBins[FUEL_LOAD_COUNT]; - float veRpmBins[FUEL_RPM_COUNT]; - - afr_table_t afrTable; - float afrLoadBins[FUEL_LOAD_COUNT]; - float afrRpmBins[FUEL_RPM_COUNT]; - - fuel_table_t injectionPhase; - float injPhaseLoadBins[FUEL_LOAD_COUNT]; - float injPhaseRpmBins[FUEL_RPM_COUNT]; - } persistent_config_s; typedef struct { diff --git a/firmware/controllers/algo/engine_configuration_generated_structures.h b/firmware/controllers/algo/engine_configuration_generated_structures.h index 1d7688b2d4..368375906a 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 by config_definition.jar on Fri Feb 27 21:57:35 EST 2015 +// this section was generated by config_definition.jar on Fri Feb 27 21:32:08 EST 2015 // begin #include "rusefi_types.h" typedef struct { @@ -1107,8 +1107,69 @@ typedef struct { * offset 7224 */ float mafDecodingBins[MAF_DECODING_COUNT]; - /** total size 8248*/ + /** + * offset 8248 + */ + fuel_table_t fuelTable; + /** + * offset 9272 + */ + float fuelLoadBins[FUEL_LOAD_COUNT]; + /** + * RPM is float and not integer in order to use unified methods for interpolation + * offset 9336 + */ + float fuelRpmBins[FUEL_RPM_COUNT]; + /** + * offset 9400 + */ + ignition_table_t ignitionTable; + /** + * offset 10424 + */ + float ignitionLoadBins[IGN_LOAD_COUNT]; + /** + * offset 10488 + */ + float ignitionRpmBins[IGN_RPM_COUNT]; + /** + * offset 10552 + */ + ve_table_t veTable; + /** + * offset 11576 + */ + float veLoadBins[FUEL_LOAD_COUNT]; + /** + * offset 11640 + */ + float veRpmBins[FUEL_RPM_COUNT]; + /** + * offset 11704 + */ + afr_table_t afrTable; + /** + * offset 12728 + */ + float afrLoadBins[FUEL_LOAD_COUNT]; + /** + * offset 12792 + */ + float afrRpmBins[FUEL_RPM_COUNT]; + /** + * offset 12856 + */ + fuel_table_t injectionPhase; + /** + * offset 13880 + */ + float injPhaseLoadBins[FUEL_LOAD_COUNT]; + /** + * offset 13944 + */ + float injPhaseRpmBins[FUEL_RPM_COUNT]; + /** total size 14008*/ } engine_configuration_s; // end -// this section was generated by config_definition.jar on Fri Feb 27 21:57:35 EST 2015 +// this section was generated by config_definition.jar on Fri Feb 27 21:32:08 EST 2015 diff --git a/firmware/controllers/algo/fuel_math.cpp b/firmware/controllers/algo/fuel_math.cpp index 37cc4eebd0..62fbeeb587 100644 --- a/firmware/controllers/algo/fuel_math.cpp +++ b/firmware/controllers/algo/fuel_math.cpp @@ -155,8 +155,8 @@ float getInjectorLag(float vBatt DECLARE_ENGINE_PARAMETER_S) { * is to prepare the fuel map data structure for 3d interpolation */ void prepareFuelMap(DECLARE_ENGINE_PARAMETER_F) { - fuelMap.init(config->fuelTable, config->fuelLoadBins, config->fuelRpmBins); - fuelPhaseMap.init(config->injectionPhase, config->injPhaseLoadBins, config->injPhaseRpmBins); + fuelMap.init(engineConfiguration->fuelTable, engineConfiguration->fuelLoadBins, engineConfiguration->fuelRpmBins); + fuelPhaseMap.init(engineConfiguration->injectionPhase, engineConfiguration->injPhaseLoadBins, engineConfiguration->injPhaseRpmBins); } /** diff --git a/firmware/controllers/flash_main.h b/firmware/controllers/flash_main.h index 1448705054..711ac0dc12 100644 --- a/firmware/controllers/flash_main.h +++ b/firmware/controllers/flash_main.h @@ -12,7 +12,7 @@ #include "engine_configuration.h" #include "engine.h" -#define FLASH_DATA_VERSION 7174 +#define FLASH_DATA_VERSION 6667 void readFromFlash(void); void initFlash(Logging *sharedLogger, Engine *engine); diff --git a/firmware/controllers/math/engine_math.cpp b/firmware/controllers/math/engine_math.cpp index 99f6b2e796..456d1bb5cb 100644 --- a/firmware/controllers/math/engine_math.cpp +++ b/firmware/controllers/math/engine_math.cpp @@ -367,19 +367,19 @@ void prepareOutputSignals(DECLARE_ENGINE_PARAMETER_F) { #endif void setFuelRpmBin(float from, float to DECLARE_ENGINE_PARAMETER_S) { - setTableBin(config->fuelRpmBins, FUEL_RPM_COUNT, from, to); + setTableBin(engineConfiguration->fuelRpmBins, FUEL_RPM_COUNT, from, to); } void setFuelLoadBin(float from, float to DECLARE_ENGINE_PARAMETER_S) { - setTableBin(config->fuelLoadBins, FUEL_LOAD_COUNT, from, to); + setTableBin(engineConfiguration->fuelLoadBins, FUEL_LOAD_COUNT, from, to); } void setTimingRpmBin(float from, float to DECLARE_ENGINE_PARAMETER_S) { - setTableBin(config->ignitionRpmBins, IGN_RPM_COUNT, from, to); + setTableBin(engineConfiguration->ignitionRpmBins, IGN_RPM_COUNT, from, to); } void setTimingLoadBin(float from, float to DECLARE_ENGINE_PARAMETER_S) { - setTableBin(config->ignitionLoadBins, IGN_LOAD_COUNT, from, to); + setTableBin(engineConfiguration->ignitionLoadBins, IGN_LOAD_COUNT, from, to); } int isInjectionEnabled(engine_configuration_s *engineConfiguration) { diff --git a/firmware/controllers/math/speed_density.cpp b/firmware/controllers/math/speed_density.cpp index d06213eef2..353815fa8d 100644 --- a/firmware/controllers/math/speed_density.cpp +++ b/firmware/controllers/math/speed_density.cpp @@ -93,23 +93,23 @@ float getSpeedDensityFuel(int rpm DECLARE_ENGINE_PARAMETER_S) { } void setDetaultVETable(DECLARE_ENGINE_PARAMETER_F) { - setRpmTableBin(config->veRpmBins, FUEL_RPM_COUNT); - setTableBin2(config->veLoadBins, FUEL_LOAD_COUNT, 10, 300, 1); + setRpmTableBin(engineConfiguration->veRpmBins, FUEL_RPM_COUNT); + setTableBin2(engineConfiguration->veLoadBins, FUEL_LOAD_COUNT, 10, 300, 1); veMap.setAll(0.8); setRpmTableBin(config->ve2RpmBins, FUEL_RPM_COUNT); setTableBin2(config->ve2LoadBins, FUEL_LOAD_COUNT, 10, 300, 1); ve2Map.setAll(0.81); - setRpmTableBin(config->afrRpmBins, FUEL_RPM_COUNT); - setTableBin2(config->afrLoadBins, FUEL_LOAD_COUNT, 10, 300, 1); + setRpmTableBin(engineConfiguration->afrRpmBins, FUEL_RPM_COUNT); + setTableBin2(engineConfiguration->afrLoadBins, FUEL_LOAD_COUNT, 10, 300, 1); afrMap.setAll(14.7); } void initSpeedDensity(DECLARE_ENGINE_PARAMETER_F) { efiAssertVoid(config!=NULL, "config is NULL"); engine_configuration_s *e = &config->engineConfiguration; - veMap.init(config->veTable, config->veLoadBins, config->veRpmBins); + veMap.init(e->veTable, e->veLoadBins, e->veRpmBins); ve2Map.init(config->ve2Table, config->ve2LoadBins, config->ve2RpmBins); - afrMap.init(config->afrTable, config->afrLoadBins, config->afrRpmBins); + afrMap.init(e->afrTable, e->afrLoadBins, e->afrRpmBins); } diff --git a/firmware/controllers/settings.cpp b/firmware/controllers/settings.cpp index 9057e3ab45..14f95560ff 100644 --- a/firmware/controllers/settings.cpp +++ b/firmware/controllers/settings.cpp @@ -195,9 +195,9 @@ void printConfiguration(engine_configuration_s *engineConfiguration) { // print("\r\n"); } - printFloatArray("RPM bin: ", config->fuelRpmBins, FUEL_RPM_COUNT); + printFloatArray("RPM bin: ", engineConfiguration->fuelRpmBins, FUEL_RPM_COUNT); - printFloatArray("Y bin: ", config->fuelLoadBins, FUEL_LOAD_COUNT); + printFloatArray("Y bin: ", engineConfiguration->fuelLoadBins, FUEL_LOAD_COUNT); printFloatArray("CLT: ", engineConfiguration->cltFuelCorr, CLT_CURVE_SIZE); printFloatArray("CLT bins: ", engineConfiguration->cltFuelCorrBins, CLT_CURVE_SIZE); @@ -532,14 +532,14 @@ static void setWholeTimingMap(float value) { scheduleMsg(&logger, "Setting whole timing map to %f", value); for (int l = 0; l < IGN_LOAD_COUNT; l++) { for (int r = 0; r < IGN_RPM_COUNT; r++) { - config->ignitionTable[l][r] = value; + engineConfiguration->ignitionTable[l][r] = value; } } } static void setWholePhaseMapCmd(float value) { scheduleMsg(&logger, "Setting whole injection phase map to %f", value); - setMap(config->injectionPhase, value); + setMap(engineConfiguration->injectionPhase, value); } static void setWholeTimingMapCmd(float value) { @@ -726,12 +726,12 @@ static void setTimingMap(const char * rpmStr, const char *loadStr, const char *v float engineLoad = atoff(loadStr); float value = atoff(valueStr); - int rpmIndex = findIndex(config->ignitionRpmBins, IGN_RPM_COUNT, rpm); + int rpmIndex = findIndex(engineConfiguration->ignitionRpmBins, IGN_RPM_COUNT, rpm); rpmIndex = rpmIndex < 0 ? 0 : rpmIndex; - int loadIndex = findIndex(config->ignitionLoadBins, IGN_LOAD_COUNT, engineLoad); + int loadIndex = findIndex(engineConfiguration->ignitionLoadBins, IGN_LOAD_COUNT, engineLoad); loadIndex = loadIndex < 0 ? 0 : loadIndex; - config->ignitionTable[loadIndex][rpmIndex] = value; + engineConfiguration->ignitionTable[loadIndex][rpmIndex] = value; scheduleMsg(&logger, "Setting timing map entry %d:%d to %f", rpmIndex, loadIndex, value); } @@ -740,12 +740,12 @@ static void setFuelMap(const char * rpmStr, const char *loadStr, const char *val float engineLoad = atoff(loadStr); float value = atoff(valueStr); - int rpmIndex = findIndex(config->fuelRpmBins, FUEL_RPM_COUNT, rpm); + int rpmIndex = findIndex(engineConfiguration->fuelRpmBins, FUEL_RPM_COUNT, rpm); rpmIndex = rpmIndex < 0 ? 0 : rpmIndex; - int loadIndex = findIndex(config->fuelLoadBins, FUEL_LOAD_COUNT, engineLoad); + int loadIndex = findIndex(engineConfiguration->fuelLoadBins, FUEL_LOAD_COUNT, engineLoad); loadIndex = loadIndex < 0 ? 0 : loadIndex; - config->fuelTable[loadIndex][rpmIndex] = value; + engineConfiguration->fuelTable[loadIndex][rpmIndex] = value; scheduleMsg(&logger, "Setting fuel map entry %d:%d to %f", rpmIndex, loadIndex, value); } diff --git a/firmware/rusefi_config.ini b/firmware/rusefi_config.ini index 9c3301017c..315a5c0404 100644 --- a/firmware/rusefi_config.ini +++ b/firmware/rusefi_config.ini @@ -485,25 +485,25 @@ float[MAF_DECODING_COUNT] mafDecoding;kg/hour value.\nBy the way 2.081989116 kg/ float[MAF_DECODING_COUNT] mafDecodingBins;; "V", 1, 0, -5.0, 150.0, 2 -! fuel_table_t fuelTable; -! float[FUEL_LOAD_COUNT] fuelLoadBins;;"V", 1, 0, 0.0, 300.0, 2 -! float[FUEL_RPM_COUNT] fuelRpmBins;RPM is float and not integer in order to use unified methods for interpolation;"RPM", 1, 0, 0.0, 25500.0, 2 +fuel_table_t fuelTable; +float[FUEL_LOAD_COUNT] fuelLoadBins;;"V", 1, 0, 0.0, 300.0, 2 +float[FUEL_RPM_COUNT] fuelRpmBins;RPM is float and not integer in order to use unified methods for interpolation;"RPM", 1, 0, 0.0, 25500.0, 2 -! ignition_table_t ignitionTable; -! float[IGN_LOAD_COUNT] ignitionLoadBins;;"Load", 1, 0.0, 0, 300.0, 2 -! float[IGN_RPM_COUNT] ignitionRpmBins;;"RPM", 1, 0.0, 0, 18000.0, 2 +ignition_table_t ignitionTable; +float[IGN_LOAD_COUNT] ignitionLoadBins;;"Load", 1, 0.0, 0, 300.0, 2 +float[IGN_RPM_COUNT] ignitionRpmBins;;"RPM", 1, 0.0, 0, 18000.0, 2 -! ve_table_t veTable; -! float[FUEL_LOAD_COUNT] veLoadBins;;"%", 1, 0.0, 0, 300.0, 2 -! float[FUEL_RPM_COUNT] veRpmBins;;"RPM", 1, 0.0, 0, 18000.0, 2 +ve_table_t veTable; +float[FUEL_LOAD_COUNT] veLoadBins;;"%", 1, 0.0, 0, 300.0, 2 +float[FUEL_RPM_COUNT] veRpmBins;;"RPM", 1, 0.0, 0, 18000.0, 2 -! afr_table_t afrTable; -! float[FUEL_LOAD_COUNT] afrLoadBins;;"%", 1, 0.0, 0, 300.0, 2 -! float[FUEL_RPM_COUNT] afrRpmBins;;"RPM", 1, 0.0, 0, 18000.0, 2 +afr_table_t afrTable; +float[FUEL_LOAD_COUNT] afrLoadBins;;"%", 1, 0.0, 0, 300.0, 2 +float[FUEL_RPM_COUNT] afrRpmBins;;"RPM", 1, 0.0, 0, 18000.0, 2 -! fuel_table_t injectionPhase; -! float[FUEL_LOAD_COUNT] injPhaseLoadBins;;"Load", 1, 0.0, 0, 300.0, 2 -! float[FUEL_RPM_COUNT] injPhaseRpmBins;;"RPM", 1, 0.0, 0, 18000.0, 2 +fuel_table_t injectionPhase; +float[FUEL_LOAD_COUNT] injPhaseLoadBins;;"Load", 1, 0.0, 0, 300.0, 2 +float[FUEL_RPM_COUNT] injPhaseRpmBins;;"RPM", 1, 0.0, 0, 18000.0, 2 ! ve_table_t ve2Table; ! float[FUEL_LOAD_COUNT] ve2LoadBins;;"%", 1, 0.0, 0, 300.0, 2 diff --git a/firmware/tunerstudio/rusefi.ini b/firmware/tunerstudio/rusefi.ini index 63c3c4fa1e..09ae60b3c7 100644 --- a/firmware/tunerstudio/rusefi.ini +++ b/firmware/tunerstudio/rusefi.ini @@ -12,14 +12,14 @@ enable2ndByteCanID = false messageEnvelopeFormat = msEnvelope_1.0 endianness = little - nPages = 7 + nPages = 1 - pageIdentifier = "\x00\x00", "\x01\x00", "\x02\x00", "\x03\x00", "\x04\x00", "\x05\x00", "\x06\x00" - pageReadCommand = "R\x00\x00%2o%2c", "R\x01\x00%2o%2c", "R\x02\x00%2o%2c", "R\x03\x00%2o%2c", "R\x04\x00%2o%2c", "R\x05\x00%2o%2c", "R\x06\x00%2o%2c" - burnCommand = "B\x00\x00", "B\x01\x00", "B\x02\x00", "B\x03\x00", "B\x04\x00", "B\x05\x00", "B\x06\x00" - pageActivate = "P\x00\x00", "P\x01\x00", "P\x02\x00", "P\x03\x00", "P\x04\x00", "P\x05\x00", "P\x06\x00" - pageValueWrite = "W\x00\x00%2o%v", "W\x01\x00%2o%v", "W\x02\x00%2o%v", "W\x03\x00%2o%v", "W\x04\x00%2o%v", "W\x05\x00%2o%v", "W\x06\x00%2o%v" - pageChunkWrite = "C\x00\x00%2o%2c%v", "C\x01\x00%2o%2c%v", "C\x02\x00%2o%2c%v", "C\x03\x00%2o%2c%v", "C\x04\x00%2o%2c%v", "C\x05\x00%2o%2c%v", "C\x06\x00%2o%2c%v" + pageIdentifier = "\x00\x00" + pageReadCommand = "R\x00\x00%2o%2c" + burnCommand = "B\x00\x00" + pageActivate = "P\x00\x00" + pageValueWrite = "W\x00\x00%2o%v" + pageChunkWrite = "C\x00\x00%2o%2c%v" ;communication settings ;e.g. put writeblocks off and add an interwrite delay @@ -35,13 +35,11 @@ enable2ndByteCanID = false ; name = array, type, offset, shape, units, scale, translate, lo, hi, digits ; name = scalar, type, offset, units, scale, translate, lo, hi, digits -pageSize = 8248, 1152, 1152, 1152, 1152, 1152, 1152 - - ; see PAGE_0_SIZE in C source code ; CONFIG_DEFINITION_START -; this section was generated by ConfigDefinition.jar on Sat Feb 28 11:11:49 EST 2015 +; this section was generated by ConfigDefinition.jar on Fri Feb 27 21:32:10 EST 2015 +pageSize = 14008 page = 1 engineType = bits, S32, 0, [0:2], "AUDI_AAN", "DODGE_NEON_1995", "FORD_ASPIRE_1996", "FORD_FIESTA", "NISSAN_PRIMERA", "HONDA_ACCORD", "FORD_INLINE_6_1995", "GY6_139QMB" ;skipping headerMagicValue offset 4 @@ -470,38 +468,23 @@ page = 1 timingAdditive = array, U08, 6000, [200],"char", 1, 0, 0.0, 3.0, 2 mafDecoding = array, F32, 6200, [256], "kg/hour", 1, 0, -500.0, 4000.0, 2 mafDecodingBins = array, F32, 7224, [256], "V", 1, 0, -5.0, 150.0, 2 -; total TS size = 8248 + fuelTable = array, F32, 8248, [16x16],"ms", 1, 0, 0.0, 300.0, 2 + fuelLoadBins = array, F32, 9272, [16], "V", 1, 0, 0.0, 300.0, 2 + fuelRpmBins = array, F32, 9336, [16], "RPM", 1, 0, 0.0, 25500.0, 2 + ignitionTable = array, F32, 9400, [16x16],"deg", 1, 0, -360, 360, 2 + ignitionLoadBins = array, F32, 10424, [16], "Load", 1, 0.0, 0, 300.0, 2 + ignitionRpmBins = array, F32, 10488, [16], "RPM", 1, 0.0, 0, 18000.0, 2 + veTable = array, F32, 10552, [16x16],"%", 100, 0, 0, 100.0, 2 + veLoadBins = array, F32, 11576, [16], "%", 1, 0.0, 0, 300.0, 2 + veRpmBins = array, F32, 11640, [16], "RPM", 1, 0.0, 0, 18000.0, 2 + afrTable = array, F32, 11704, [16x16],"deg", 1, 0, 0, 25.0, 2 + afrLoadBins = array, F32, 12728, [16], "%", 1, 0.0, 0, 300.0, 2 + afrRpmBins = array, F32, 12792, [16], "RPM", 1, 0.0, 0, 18000.0, 2 + injectionPhase = array, F32, 12856, [16x16],"ms", 1, 0, 0.0, 300.0, 2 + injPhaseLoadBins = array, F32, 13880, [16], "Load", 1, 0.0, 0, 300.0, 2 + injPhaseRpmBins = array, F32, 13944, [16], "RPM", 1, 0.0, 0, 18000.0, 2 +; total TS size = 14008 ; CONFIG_DEFINITION_END - -page = 2 - ve2Table = array, F32, 0, [16x16],"%", 100, 0, 0, 100.0, 2 - ve2LoadBins = array, F32, 1024, [16], "%", 1, 0.0, 0, 300.0, 2 - ve2RpmBins = array, F32, 1088, [16], "RPM", 1, 0.0, 0, 18000.0, 2 - -page = 3 - fuelTable = array, F32, 0, [16x16],"ms", 1, 0, 0.0, 300.0, 2 - fuelLoadBins = array, F32, 1024, [16], "V", 1, 0, 0.0, 300.0, 2 - fuelRpmBins = array, F32, 1088, [16], "RPM", 1, 0, 0.0, 25500.0, 2 - -page = 4 - ignitionTable = array, F32, 0, [16x16],"deg", 1, 0, -360, 360, 2 - ignitionLoadBins = array, F32, 1024, [16], "Load", 1, 0.0, 0, 300.0, 2 - ignitionRpmBins = array, F32, 1088, [16], "RPM", 1, 0.0, 0, 18000.0, 2 - -page = 5 - veTable = array, F32, 0, [16x16],"%", 100, 0, 0, 100.0, 2 - veLoadBins = array, F32, 1024, [16], "%", 1, 0.0, 0, 300.0, 2 - veRpmBins = array, F32, 1088, [16], "RPM", 1, 0.0, 0, 18000.0, 2 - -page = 6 - afrTable = array, F32, 0, [16x16],"deg", 1, 0, 0, 25.0, 2 - afrLoadBins = array, F32, 1024, [16], "%", 1, 0.0, 0, 300.0, 2 - afrRpmBins = array, F32, 1088, [16], "RPM", 1, 0.0, 0, 18000.0, 2 - -page = 7 - injectionPhase = array, F32, 0, [16x16],"ms", 1, 0, 0.0, 300.0, 2 - injPhaseLoadBins = array, F32, 1024, [16], "Load", 1, 0.0, 0, 300.0, 2 - injPhaseRpmBins = array, F32, 1088, [16], "RPM", 1, 0.0, 0, 18000.0, 2 [Tuning] @@ -712,14 +695,6 @@ fileVersion = { 20150216 } gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees. upDownLabel = "(RICHER)", "(LEANER)" - table = ve2TableTbl, ve2TableMap, "VE2 Table", 1 - ; constant, variable - xBins = ve2RpmBins, rpm - yBins = ve2LoadBins, engineLoad - zBins = ve2Table -; gridHeight = 2.0 - gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees. - upDownLabel = "(RICHER)", "(LEANER)" table = injPhaseTableTbl, injPhaseTableMap, "Injection Phase Table", 1 ; constant, variable @@ -881,7 +856,6 @@ fileVersion = { 20150216 } subMenu = iatFuelCorrCurve, "Intake air temp fuel correction" subMenu = cltFuelCorrCurve, "Coolant temp fuel correction" subMenu = veTableTbl, "VE Table", {algorithm == 3} - subMenu = ve2TableTbl, "VE2 Table" subMenu = afrTableTbl, "Targe AFR Table", {algorithm == 3} subMenu = injPhaseTableTbl, "Injection Phase" subMenu = std_separator @@ -896,7 +870,6 @@ fileVersion = { 20150216 } subMenu = ignitionTableMap, "Ignition Map" subMenu = fuelTableMap, "Fuel Table" subMenu = veTableMap, "VE Table" - subMenu = ve2TableMap, "VE2 Table" subMenu = afrTableMap, "Targe AFR Table" subMenu = injPhaseTableMap, "Injection Phase"