diff --git a/firmware/config/engines/mazda_miata_vvt.cpp b/firmware/config/engines/mazda_miata_vvt.cpp index c4ed4294fa..6ed6c2fb19 100644 --- a/firmware/config/engines/mazda_miata_vvt.cpp +++ b/firmware/config/engines/mazda_miata_vvt.cpp @@ -11,7 +11,7 @@ #include "mazda_miata_vvt.h" #include "custom_engine.h" #include "fsio_impl.h" - +#include "ego.h" EXTERN_ENGINE; @@ -204,6 +204,15 @@ void setMazdaMiata2003EngineConfiguration(DECLARE_ENGINE_PARAMETER_F) { boardConfiguration->malfunctionIndicatorPin = GPIOD_9; // boardConfiguration->malfunctionIndicatorPinMode = OM_INVERTED; + + /** + * PA4 Wideband O2 Sensor + */ + // todo: re-wire the board to use default input channel! + engineConfiguration->afr.hwChannel = EFI_ADC_4; + + setEgoSensor(ES_Innovate_MTX_L PASS_ENGINE_PARAMETER); + } diff --git a/firmware/controllers/algo/engine.cpp b/firmware/controllers/algo/engine.cpp index bf0397a2be..4099bd7505 100644 --- a/firmware/controllers/algo/engine.cpp +++ b/firmware/controllers/algo/engine.cpp @@ -143,6 +143,7 @@ EngineState::EngineState() { runningFuel = baseFuel = currentVE = 0; timeOfPreviousWarning = -10; baseTableFuel = iat = iatFuelCorrection = 0; + fuelPidCorrection = 0; clt = cltFuelCorrection = postCrankingFuelCorrection = 0; warmupTargetAfr = airMass = 0; baroCorrection = timingAdvance = fuelTankGauge = 0; diff --git a/firmware/controllers/algo/engine_configuration.cpp b/firmware/controllers/algo/engine_configuration.cpp index 9f20d2b1c8..3b0b8e667c 100644 --- a/firmware/controllers/algo/engine_configuration.cpp +++ b/firmware/controllers/algo/engine_configuration.cpp @@ -563,6 +563,9 @@ void setDefaultConfiguration(DECLARE_ENGINE_PARAMETER_F) { engineConfiguration->fuelClosedLoopCltThreshold = 70; engineConfiguration->fuelClosedLoopRpmThreshold = 900; engineConfiguration->fuelClosedLoopTpsThreshold = 80; + engineConfiguration->fuelClosedLoopAfrLowThreshold = 10.3; + engineConfiguration->fuelClosedLoopAfrHighThreshold = 19.8; + engineConfiguration->fuelClosedLoopPid.pFactor = -0.1; engineConfiguration->cranking.baseFuel = 5; diff --git a/firmware/controllers/algo/engine_configuration_generated_structures.h b/firmware/controllers/algo/engine_configuration_generated_structures.h index 3e68b9a82e..80451645e2 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 Sun Jan 22 17:18:49 EST 2017 +// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Sun Jan 22 23:36:11 EST 2017 // begin #ifndef ENGINE_CONFIGURATION_GENERATED_H_ #define ENGINE_CONFIGURATION_GENERATED_H_ @@ -1803,7 +1803,7 @@ typedef struct { /** * offset 2738 */ - int16_t fuelClosedLoopAfrLowThreshold; + int16_t unusedShort; /** * offset 2740 */ @@ -1811,15 +1811,15 @@ typedef struct { /** * offset 2756 */ - int16_t fuelClosedLoopAfrHighThreshold; - /** - * offset 2758 - */ - int16_t unusedShort; + float fuelClosedLoopAfrLowThreshold; /** * offset 2760 */ - int unused[72]; + float fuelClosedLoopAfrHighThreshold; + /** + * offset 2764 + */ + int unused[71]; /** total size 3048*/ } engine_configuration_s; @@ -2034,4 +2034,4 @@ typedef struct { #endif // end -// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Sun Jan 22 17:18:49 EST 2017 +// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Sun Jan 22 23:36:11 EST 2017 diff --git a/firmware/controllers/algo/rusefi_generated.h b/firmware/controllers/algo/rusefi_generated.h index d1f417cd25..825de30b69 100644 --- a/firmware/controllers/algo/rusefi_generated.h +++ b/firmware/controllers/algo/rusefi_generated.h @@ -920,15 +920,15 @@ #define fuelClosedLoopCltThreshold_offset 2732 #define fuelClosedLoopTpsThreshold_offset 2734 #define fuelClosedLoopRpmThreshold_offset 2736 -#define fuelClosedLoopAfrLowThreshold_offset 2738 +#define unusedShort_offset 2738 #define fuelClosedLoopPid_offset 2740 #define fuelClosedLoopPid_pFactor_offset 2740 #define fuelClosedLoopPid_iFactor_offset 2744 #define fuelClosedLoopPid_dFactor_offset 2748 #define fuelClosedLoopPid_offset_offset 2752 -#define fuelClosedLoopAfrHighThreshold_offset 2756 -#define unusedShort_offset 2758 -#define unused_offset 2760 +#define fuelClosedLoopAfrLowThreshold_offset 2756 +#define fuelClosedLoopAfrHighThreshold_offset 2760 +#define unused_offset 2764 #define le_formulas1_offset 3048 #define le_formulas2_offset 3248 #define le_formulas3_offset 3448 diff --git a/firmware/controllers/trigger/main_trigger_callback.cpp b/firmware/controllers/trigger/main_trigger_callback.cpp index 25586d716f..6ba5ff08e9 100644 --- a/firmware/controllers/trigger/main_trigger_callback.cpp +++ b/firmware/controllers/trigger/main_trigger_callback.cpp @@ -372,17 +372,17 @@ static void scheduleOutput2(OutputSignalPair *pair, efitimeus_t nowUs, float del } static void fuelClosedLoopCorrection(DECLARE_ENGINE_PARAMETER_F) { - if (ENGINE(rpmCalculator.rpmValue) < CONFIG(fuelClosedLoopRpmThreshold)) { - return; - } - if (ENGINE(engineState.clt) < CONFIG(fuelClosedLoopCltThreshold)) { - return; - } - if (getTPS(PASS_ENGINE_PARAMETER_F) > CONFIG(fuelClosedLoopTpsThreshold)) { +#if ! EFI_UNIT_TEST + if (ENGINE(rpmCalculator.rpmValue) < CONFIG(fuelClosedLoopRpmThreshold) || + ENGINE(engineState.clt) < CONFIG(fuelClosedLoopCltThreshold) || + getTPS(PASS_ENGINE_PARAMETER_F) > CONFIG(fuelClosedLoopTpsThreshold) || + ENGINE(engineState.currentAfr) < 10 || + ENGINE(engineState.currentAfr) > 20) { + engine->engineState.fuelPidCorrection = 0; + fuelPid.reset(); return; } -#if ! EFI_UNIT_TEST engine->engineState.fuelPidCorrection = fuelPid.getValue(ENGINE(engineState.targetAFR), ENGINE(engineState.currentAfr), 1); if (engineConfiguration->debugMode == DBG_FUEL_PID_CORRECTION) { tsOutputChannels.debugFloatField1 = engine->engineState.fuelPidCorrection; diff --git a/firmware/integration/rusefi_config.txt b/firmware/integration/rusefi_config.txt index c23b01f69a..81eb07655e 100644 --- a/firmware/integration/rusefi_config.txt +++ b/firmware/integration/rusefi_config.txt @@ -765,11 +765,11 @@ float[MAP_ACCEL_TAPER] mapAccelTaperMult;;"mult", 1, 0, 0.0, 300, int16_t fuelClosedLoopCltThreshold;;"C", 1, 0, 0, 100, 0 int16_t fuelClosedLoopTpsThreshold;;"%", 1, 0, 0, 100, 0 int16_t fuelClosedLoopRpmThreshold;;"rpm", 1, 0, 0, 5000, 0 - int16_t fuelClosedLoopAfrLowThreshold;;"ratio", 1, 0, 0, 100, 1 - pid_s fuelClosedLoopPid; - int16_t fuelClosedLoopAfrHighThreshold;;"ratio", 1, 0, 0, 100, 1 int16_t unusedShort - int[72] unused; + pid_s fuelClosedLoopPid; + float fuelClosedLoopAfrLowThreshold;;"ratio", 1, 0, 0, 100, 1 + float fuelClosedLoopAfrHighThreshold;;"ratio", 1, 0, 0, 100, 1 + int[71] unused; end_struct diff --git a/firmware/tunerstudio/rusefi.ini b/firmware/tunerstudio/rusefi.ini index f4b1df5d42..4ba441958d 100644 --- a/firmware/tunerstudio/rusefi.ini +++ b/firmware/tunerstudio/rusefi.ini @@ -42,7 +42,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 Sun Jan 22 16:15:28 EST 2017 +; this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Sun Jan 22 23:36:11 EST 2017 pageSize = 16376 page = 1 @@ -512,9 +512,9 @@ page = 1 mapErrorDetectionTooLow = scalar, F32, 1888, "kPa", 1, 0, -100.0, 100.0, 2 mapErrorDetectionTooHigh = scalar, F32, 1892, "kPa", 1, 0, -100.0, 800.0, 2 step1RpmWindow = scalar, S32, 1896, "rpm", 1, 0, 0, 3000.0, 2 - idleRpmPid_pFactor = scalar, F32, 1900, "value", 1, 0, 0, 1000, 5 - idleRpmPid_iFactor = scalar, F32, 1904, "value", 1, 0, 0, 1000, 5 - idleRpmPid_dFactor = scalar, F32, 1908, "value", 1, 0, 0, 1000, 5 + idleRpmPid_pFactor = scalar, F32, 1900, "value", 1, 0, -1000, 1000, 5 + idleRpmPid_iFactor = scalar, F32, 1904, "value", 1, 0, -1000, 1000, 5 + idleRpmPid_dFactor = scalar, F32, 1908, "value", 1, 0, -1000, 1000, 5 idleRpmPid_offset = scalar, F32, 1912, "value", 1, 0, 0, 1000, 3 ;skipping idleDT offset 1916 ;skipping idleControl offset 1920 @@ -526,18 +526,18 @@ page = 1 consoleSerialRxPin = bits, U32, 1944, [0:6], "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6", "PE7", "PE8", "PE9", "PE10", "PE11", "PE12", "PE13", "PE14", "PE15", "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" knockNoise = array, F32, 1948, [8], "v", 1, 0, 0.0, 10, 2 knockNoiseRpmBins = array, F32, 1980, [8], "RPM", 1, 0, 0.0, 18000, 2 - etb_pFactor = scalar, F32, 2012, "value", 1, 0, 0, 1000, 5 - etb_iFactor = scalar, F32, 2016, "value", 1, 0, 0, 1000, 5 - etb_dFactor = scalar, F32, 2020, "value", 1, 0, 0, 1000, 5 + etb_pFactor = scalar, F32, 2012, "value", 1, 0, -1000, 1000, 5 + etb_iFactor = scalar, F32, 2016, "value", 1, 0, -1000, 1000, 5 + etb_dFactor = scalar, F32, 2020, "value", 1, 0, -1000, 1000, 5 etb_offset = scalar, F32, 2024, "value", 1, 0, 0, 1000, 3 cltIdleRpmBins = array, F32, 2028, [16], "C", 1, 0, -100.0, 250.0, 2 cltIdleRpm = array, F32, 2092, [16], "RPM", 1, 0, 0.0, 400.0, 0 targetVBatt = scalar, F32, 2156, "Volts", 1, 0, 0,30, 1 alternatorOffAboveTps = scalar, F32, 2160, "%", 1, 0, 0, 200, 2 alternatorDT = scalar, S32, 2164, "ms", 1, 0, 0, 3000, 0 - alternatorControl_pFactor = scalar, F32, 2168, "value", 1, 0, 0, 1000, 5 - alternatorControl_iFactor = scalar, F32, 2172, "value", 1, 0, 0, 1000, 5 - alternatorControl_dFactor = scalar, F32, 2176, "value", 1, 0, 0, 1000, 5 + alternatorControl_pFactor = scalar, F32, 2168, "value", 1, 0, -1000, 1000, 5 + alternatorControl_iFactor = scalar, F32, 2172, "value", 1, 0, -1000, 1000, 5 + alternatorControl_dFactor = scalar, F32, 2176, "value", 1, 0, -1000, 1000, 5 alternatorControl_offset = scalar, F32, 2180, "value", 1, 0, 0, 1000, 3 tpsAccelLength = scalar, S32, 2184, "cycles", 1, 0, 1, 200, 0 tpsAccelEnrichmentThreshold = scalar, F32, 2188, "roc", 1, 0, 0, 200, 3 @@ -555,9 +555,9 @@ page = 1 tpsDecelEnleanmentMultiplier = scalar, F32, 2236, "coeff", 1, 0, 0, 200, 3 slowAdcAlpha = scalar, F32, 2240, "coeff", 1, 0, 0, 200, 3 debugMode = bits, U32, 2244, [0:3], "Alternator_PID", "TPS accel enrich", "Warmup PID", "IDLE", "EL accl enrich", "Trigger Counters", "FSIO_ADC", "AUX_PID_1", "VVT", "Post-crank enrich", "Timing", "Closed-loop fuel corr", "mode12", "mode13", "mode14", "mode15" - warmupAfrPid_pFactor = scalar, F32, 2248, "value", 1, 0, 0, 1000, 5 - warmupAfrPid_iFactor = scalar, F32, 2252, "value", 1, 0, 0, 1000, 5 - warmupAfrPid_dFactor = scalar, F32, 2256, "value", 1, 0, 0, 1000, 5 + warmupAfrPid_pFactor = scalar, F32, 2248, "value", 1, 0, -1000, 1000, 5 + warmupAfrPid_iFactor = scalar, F32, 2252, "value", 1, 0, -1000, 1000, 5 + warmupAfrPid_dFactor = scalar, F32, 2256, "value", 1, 0, -1000, 1000, 5 warmupAfrPid_offset = scalar, F32, 2260, "value", 1, 0, 0, 1000, 3 warmupTargetAfrBins = array, F32, 2264, [4], "C", 1, 0, -100.0, 250.0, 2 warmupTargetAfr = array, F32, 2280, [4], "AFR", 1, 0, 0.0, 20.0, 2 @@ -597,21 +597,21 @@ page = 1 storageMode = bits, U32, 2476, [0:1], "Auto", "Always", "Never" cj125SpiDevice = bits,U32, 2480, [0:1], "Off", "SPI1", "SPI2", "SPI3" cj125CsPinMode = bits, U32, 2484, [0:1], "default", "default inverted", "open collector", "open collector inverted" - auxPid1_pFactor = scalar, F32, 2488, "value", 1, 0, 0, 1000, 5 - auxPid1_iFactor = scalar, F32, 2492, "value", 1, 0, 0, 1000, 5 - auxPid1_dFactor = scalar, F32, 2496, "value", 1, 0, 0, 1000, 5 + auxPid1_pFactor = scalar, F32, 2488, "value", 1, 0, -1000, 1000, 5 + auxPid1_iFactor = scalar, F32, 2492, "value", 1, 0, -1000, 1000, 5 + auxPid1_dFactor = scalar, F32, 2496, "value", 1, 0, -1000, 1000, 5 auxPid1_offset = scalar, F32, 2500, "value", 1, 0, 0, 1000, 3 - auxPid2_pFactor = scalar, F32, 2504, "value", 1, 0, 0, 1000, 5 - auxPid2_iFactor = scalar, F32, 2508, "value", 1, 0, 0, 1000, 5 - auxPid2_dFactor = scalar, F32, 2512, "value", 1, 0, 0, 1000, 5 + auxPid2_pFactor = scalar, F32, 2504, "value", 1, 0, -1000, 1000, 5 + auxPid2_iFactor = scalar, F32, 2508, "value", 1, 0, -1000, 1000, 5 + auxPid2_dFactor = scalar, F32, 2512, "value", 1, 0, -1000, 1000, 5 auxPid2_offset = scalar, F32, 2516, "value", 1, 0, 0, 1000, 3 - auxPid3_pFactor = scalar, F32, 2520, "value", 1, 0, 0, 1000, 5 - auxPid3_iFactor = scalar, F32, 2524, "value", 1, 0, 0, 1000, 5 - auxPid3_dFactor = scalar, F32, 2528, "value", 1, 0, 0, 1000, 5 + auxPid3_pFactor = scalar, F32, 2520, "value", 1, 0, -1000, 1000, 5 + auxPid3_iFactor = scalar, F32, 2524, "value", 1, 0, -1000, 1000, 5 + auxPid3_dFactor = scalar, F32, 2528, "value", 1, 0, -1000, 1000, 5 auxPid3_offset = scalar, F32, 2532, "value", 1, 0, 0, 1000, 3 - auxPid4_pFactor = scalar, F32, 2536, "value", 1, 0, 0, 1000, 5 - auxPid4_iFactor = scalar, F32, 2540, "value", 1, 0, 0, 1000, 5 - auxPid4_dFactor = scalar, F32, 2544, "value", 1, 0, 0, 1000, 5 + auxPid4_pFactor = scalar, F32, 2536, "value", 1, 0, -1000, 1000, 5 + auxPid4_iFactor = scalar, F32, 2540, "value", 1, 0, -1000, 1000, 5 + auxPid4_dFactor = scalar, F32, 2544, "value", 1, 0, -1000, 1000, 5 auxPid4_offset = scalar, F32, 2548, "value", 1, 0, 0, 1000, 3 vvtMode = bits, U32, 2552, [0:2], "First half", "Second half", "2GZ", "Miata NB2", "mode4", "mode5", "mode6", "mode7" biQuad_a0 = scalar, F32, 2556, "v", 1, 0, -1000, 1000, 9 @@ -645,14 +645,16 @@ page = 1 auxTempSensor2_bias_resistor = scalar, F32, 2724, "Ohm", 1, 0, 0, 200000, 1 auxTempSensor2_adcChannel = bits, U32, 2728, [0:4] "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PB0", "PB1", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "Disabled", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" fuelClosedLoopCltThreshold = scalar, S16, 2732, "C", 1, 0, 0, 100, 0 - fuelClosedLoopTpsThreshold = scalar, S16, 2734, "%", 1, 0, 0, 10, 0 + fuelClosedLoopTpsThreshold = scalar, S16, 2734, "%", 1, 0, 0, 100, 0 fuelClosedLoopRpmThreshold = scalar, S16, 2736, "rpm", 1, 0, 0, 5000, 0 ;skipping unusedShort offset 2738 - fuelClosedLoopPid_pFactor = scalar, F32, 2740, "value", 1, 0, 0, 1000, 5 - fuelClosedLoopPid_iFactor = scalar, F32, 2744, "value", 1, 0, 0, 1000, 5 - fuelClosedLoopPid_dFactor = scalar, F32, 2748, "value", 1, 0, 0, 1000, 5 + fuelClosedLoopPid_pFactor = scalar, F32, 2740, "value", 1, 0, -1000, 1000, 5 + fuelClosedLoopPid_iFactor = scalar, F32, 2744, "value", 1, 0, -1000, 1000, 5 + fuelClosedLoopPid_dFactor = scalar, F32, 2748, "value", 1, 0, -1000, 1000, 5 fuelClosedLoopPid_offset = scalar, F32, 2752, "value", 1, 0, 0, 1000, 3 -;skipping unused offset 2756 + fuelClosedLoopAfrLowThreshold = scalar, F32, 2756, "ratio", 1, 0, 0, 100, 1 + fuelClosedLoopAfrHighThreshold = scalar, F32, 2760, "ratio", 1, 0, 0, 100, 1 +;skipping unused offset 2764 le_formulas1 = array, U08, 3048, [200],"char", 1, 0, 0.0, 3.0, 2 le_formulas2 = array, U08, 3248, [200],"char", 1, 0, 0.0, 3.0, 2 le_formulas3 = array, U08, 3448, [200],"char", 1, 0, 0.0, 3.0, 2 @@ -1190,7 +1192,7 @@ fileVersion = { 20161225 } pulseWidthGauge = pulseWidth, "fuel final squirt, per injection", "mSec", 0, 25.5, 1.0, 1.2, 20, 25, 3, 1 baseFuelGauge = baseFuel, "fuel: base duration, before corr", "mSec", 0, 25.5, 1.0, 1.2, 20, 25, 3, 1 - fuelPidCorrectionGauge = fuelPidCorrection, "fuel: closed loop correction", "mSec", 0, 25.5, 1.0, 1.2, 20, 25, 3, 1 + fuelPidCorrectionGauge = fuelPidCorrection, "fuel: closed loop correction", "mSec", -11, 11, 1.0, 1.2, 20, 25, 3, 1 crankingFuelGauge = crankingFuel, "fuel: crank Width", "mSec", 0, 25.5, 1.0, 1.2, 20, 25, 3, 1 iatCorrectionGauge = iatCorrection, "fuel: IAT correction", "mult", 0, 3, 0, 0, 3, 3, 2, 2 @@ -1860,6 +1862,8 @@ cmd_test_idle_valve = "w\x00\x17\x00\x01" field = "CLT - low threshod", fuelClosedLoopCltThreshold, {fuelClosedLoopCorrectionEnabled == 1} field = "RPM - low threshod", fuelClosedLoopRpmThreshold, {fuelClosedLoopCorrectionEnabled == 1} field = "TPS - high threshod", fuelClosedLoopTpsThreshold, {fuelClosedLoopCorrectionEnabled == 1} + field = "EGO - low threshod", fuelClosedLoopAfrLowThreshold, {fuelClosedLoopCorrectionEnabled == 1} + field = "EGO - high threshod", fuelClosedLoopAfrHighThreshold, {fuelClosedLoopCorrectionEnabled == 1} field = "P factor", fuelClosedLoopPid_pFactor, {fuelClosedLoopCorrectionEnabled == 1} field = "I factor", fuelClosedLoopPid_iFactor, {fuelClosedLoopCorrectionEnabled == 1} field = "D factor", fuelClosedLoopPid_dFactor, {fuelClosedLoopCorrectionEnabled == 1} diff --git a/firmware/tunerstudio/rusefi.input b/firmware/tunerstudio/rusefi.input index 82dd81ea08..099fd49c0e 100644 --- a/firmware/tunerstudio/rusefi.input +++ b/firmware/tunerstudio/rusefi.input @@ -1127,7 +1127,7 @@ fileVersion = { 20161225 } pulseWidthGauge = pulseWidth, "fuel final squirt, per injection", "mSec", 0, 25.5, 1.0, 1.2, 20, 25, 3, 1 baseFuelGauge = baseFuel, "fuel: base duration, before corr", "mSec", 0, 25.5, 1.0, 1.2, 20, 25, 3, 1 - fuelPidCorrectionGauge = fuelPidCorrection, "fuel: closed loop correction", "mSec", 0, 25.5, 1.0, 1.2, 20, 25, 3, 1 + fuelPidCorrectionGauge = fuelPidCorrection, "fuel: closed loop correction", "mSec", -11, 11, 1.0, 1.2, 20, 25, 3, 1 crankingFuelGauge = crankingFuel, "fuel: crank Width", "mSec", 0, 25.5, 1.0, 1.2, 20, 25, 3, 1 iatCorrectionGauge = iatCorrection, "fuel: IAT correction", "mult", 0, 3, 0, 0, 3, 3, 2, 2 @@ -1797,6 +1797,8 @@ cmd_test_idle_valve = "w\x00\x17\x00\x01" field = "CLT - low threshod", fuelClosedLoopCltThreshold, {fuelClosedLoopCorrectionEnabled == 1} field = "RPM - low threshod", fuelClosedLoopRpmThreshold, {fuelClosedLoopCorrectionEnabled == 1} field = "TPS - high threshod", fuelClosedLoopTpsThreshold, {fuelClosedLoopCorrectionEnabled == 1} + field = "EGO - low threshod", fuelClosedLoopAfrLowThreshold, {fuelClosedLoopCorrectionEnabled == 1} + field = "EGO - high threshod", fuelClosedLoopAfrHighThreshold, {fuelClosedLoopCorrectionEnabled == 1} field = "P factor", fuelClosedLoopPid_pFactor, {fuelClosedLoopCorrectionEnabled == 1} field = "I factor", fuelClosedLoopPid_iFactor, {fuelClosedLoopCorrectionEnabled == 1} field = "D factor", fuelClosedLoopPid_dFactor, {fuelClosedLoopCorrectionEnabled == 1} diff --git a/java_console/models/src/com/rusefi/config/Fields.java b/java_console/models/src/com/rusefi/config/Fields.java index de6dd5d09b..20a2fa4a72 100644 --- a/java_console/models/src/com/rusefi/config/Fields.java +++ b/java_console/models/src/com/rusefi/config/Fields.java @@ -1,6 +1,6 @@ package com.rusefi.config; -// this file was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Sun Jan 22 17:18:49 EST 2017 +// this file was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Sun Jan 22 23:36:11 EST 2017 public class Fields { public static final int LE_COMMAND_LENGTH = 200; public static final int FSIO_ADC_COUNT = 4; @@ -924,15 +924,15 @@ public class Fields { public static final int fuelClosedLoopCltThreshold_offset = 2732; public static final int fuelClosedLoopTpsThreshold_offset = 2734; public static final int fuelClosedLoopRpmThreshold_offset = 2736; - public static final int fuelClosedLoopAfrLowThreshold_offset = 2738; + public static final int unusedShort_offset = 2738; public static final int fuelClosedLoopPid_offset = 2740; public static final int fuelClosedLoopPid_pFactor_offset = 2740; public static final int fuelClosedLoopPid_iFactor_offset = 2744; public static final int fuelClosedLoopPid_dFactor_offset = 2748; public static final int fuelClosedLoopPid_offset_offset = 2752; - public static final int fuelClosedLoopAfrHighThreshold_offset = 2756; - public static final int unusedShort_offset = 2758; - public static final int unused_offset = 2760; + public static final int fuelClosedLoopAfrLowThreshold_offset = 2756; + public static final int fuelClosedLoopAfrHighThreshold_offset = 2760; + public static final int unused_offset = 2764; public static final int le_formulas1_offset = 3048; public static final int le_formulas2_offset = 3248; public static final int le_formulas3_offset = 3448; @@ -1595,13 +1595,13 @@ public class Fields { public static final Field FUELCLOSEDLOOPCLTTHRESHOLD = Field.create("FUELCLOSEDLOOPCLTTHRESHOLD", 2732, FieldType.INT); public static final Field FUELCLOSEDLOOPTPSTHRESHOLD = Field.create("FUELCLOSEDLOOPTPSTHRESHOLD", 2734, FieldType.INT); public static final Field FUELCLOSEDLOOPRPMTHRESHOLD = Field.create("FUELCLOSEDLOOPRPMTHRESHOLD", 2736, FieldType.INT); - public static final Field FUELCLOSEDLOOPAFRLOWTHRESHOLD = Field.create("FUELCLOSEDLOOPAFRLOWTHRESHOLD", 2738, FieldType.INT); + public static final Field UNUSEDSHORT = Field.create("UNUSEDSHORT", 2738, FieldType.INT); public static final Field FUELCLOSEDLOOPPID_PFACTOR = Field.create("FUELCLOSEDLOOPPID_PFACTOR", 2740, FieldType.FLOAT); public static final Field FUELCLOSEDLOOPPID_IFACTOR = Field.create("FUELCLOSEDLOOPPID_IFACTOR", 2744, FieldType.FLOAT); public static final Field FUELCLOSEDLOOPPID_DFACTOR = Field.create("FUELCLOSEDLOOPPID_DFACTOR", 2748, FieldType.FLOAT); public static final Field FUELCLOSEDLOOPPID_OFFSET = Field.create("FUELCLOSEDLOOPPID_OFFSET", 2752, FieldType.FLOAT); - public static final Field FUELCLOSEDLOOPAFRHIGHTHRESHOLD = Field.create("FUELCLOSEDLOOPAFRHIGHTHRESHOLD", 2756, FieldType.INT); - public static final Field UNUSEDSHORT = Field.create("UNUSEDSHORT", 2758, FieldType.INT); + public static final Field FUELCLOSEDLOOPAFRLOWTHRESHOLD = Field.create("FUELCLOSEDLOOPAFRLOWTHRESHOLD", 2756, FieldType.FLOAT); + public static final Field FUELCLOSEDLOOPAFRHIGHTHRESHOLD = Field.create("FUELCLOSEDLOOPAFRHIGHTHRESHOLD", 2760, FieldType.FLOAT); public static final Field LE_FORMULAS1 = Field.create("LE_FORMULAS1", 3048, FieldType.INT); public static final Field LE_FORMULAS2 = Field.create("LE_FORMULAS2", 3248, FieldType.INT); public static final Field LE_FORMULAS3 = Field.create("LE_FORMULAS3", 3448, FieldType.INT);