diff --git a/firmware/controllers/algo/accel_enrichment.cpp b/firmware/controllers/algo/accel_enrichment.cpp index 1e56c116fe..bc3a395d65 100644 --- a/firmware/controllers/algo/accel_enrichment.cpp +++ b/firmware/controllers/algo/accel_enrichment.cpp @@ -147,11 +147,19 @@ static void setDecelMult(float value) { } static void setTpsAccelLen(int len) { + if (len < 1) { + scheduleMsg(logger, "Length shoold be positive"); + return; + } engine->tpsAccelEnrichment.cb.setSize(len); accelInfo(); } static void setMapAccelLen(int len) { + if (len < 1) { + scheduleMsg(logger, "Length shoold be positive"); + return; + } engine->mapAccelEnrichment.cb.setSize(len); accelInfo(); } diff --git a/firmware/integration/rusefi_config.txt b/firmware/integration/rusefi_config.txt index 9a82095277..b644e3f6aa 100644 --- a/firmware/integration/rusefi_config.txt +++ b/firmware/integration/rusefi_config.txt @@ -485,11 +485,11 @@ custom pin_input_mode_e 4 scalar, F32, @OFFSET@, "ms", 1, 0, 0, 200, 1 float alternatorControlDFactor; int[137] unused3; - int tpsAccelLength;;"len", 1, 0, 0, 200, 3 + int tpsAccelLength;;"len", 1, 0, 1, 200, 3 float tpsAccelEnrichmentThreshold;;"roc", 1, 0, 0, 200, 3 float tpsAccelEnrichmentMultiplier;;"coeff", 1, 0, 0, 200, 3 - int mapAccelLength;;"len", 1, 0, 0, 200, 3 + int mapAccelLength;;"len", 1, 0, 1, 200, 3 float decelEnrichmentThreshold;;"roc", 1, 0, 0, 200, 3 float decelEnrichmentMultiplier;;"coeff", 1, 0, 0, 200, 3 diff --git a/firmware/rusefi.cpp b/firmware/rusefi.cpp index 7410905b97..91830de3e3 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 20150412; + return 20150413; } diff --git a/firmware/tunerstudio/rusefi.ini b/firmware/tunerstudio/rusefi.ini index b9223fb7ff..77de51f7d7 100644 --- a/firmware/tunerstudio/rusefi.ini +++ b/firmware/tunerstudio/rusefi.ini @@ -451,10 +451,10 @@ page = 1 ;skipping alternatorControlIFactor offset 1628 ;skipping alternatorControlDFactor offset 1632 ;skipping unused3 offset 1636 - tpsAccelLength = scalar, S32, 2184, "len", 1, 0, 0, 200, 3 + tpsAccelLength = scalar, S32, 2184, "len", 1, 0, 1, 200, 3 tpsAccelEnrichmentThreshold = scalar, F32, 2188, "roc", 1, 0, 0, 200, 3 tpsAccelEnrichmentMultiplier = scalar, F32, 2192, "coeff", 1, 0, 0, 200, 3 - mapAccelLength = scalar, S32, 2196, "len", 1, 0, 0, 200, 3 + mapAccelLength = scalar, S32, 2196, "len", 1, 0, 1, 200, 3 decelEnrichmentThreshold = scalar, F32, 2200, "roc", 1, 0, 0, 200, 3 decelEnrichmentMultiplier = scalar, F32, 2204, "coeff", 1, 0, 0, 200, 3 mapAccelEnrichmentThreshold = scalar, F32, 2208, "roc", 1, 0, 0, 200, 3