diff --git a/firmware/controllers/algo/engine_configuration_generated_structures.h b/firmware/controllers/algo/engine_configuration_generated_structures.h index 4938b0f1f0..8557d021ee 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 Fri Jan 01 16:03:19 EST 2016 +// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Fri Jan 01 17:06:33 EST 2016 // begin #include "rusefi_types.h" typedef struct { @@ -1268,6 +1268,7 @@ typedef struct { */ int spi2MisoMode; /** + * Cranking fuel correction coefficient based on TPS * offset 1760 */ float crankingTpsCoef[CRANKING_CURVE_SIZE]; @@ -1354,13 +1355,14 @@ typedef struct { */ brain_pin_e consoleSerialRxPin; /** + * Knock sensor output knock detection threshold depending on current RPM * offset 1952 */ - float knockNoiseBins[ENGINE_NOISE_CURVE_SIZE]; + float knockNoise[ENGINE_NOISE_CURVE_SIZE]; /** * offset 1984 */ - float knockNoise[ENGINE_NOISE_CURVE_SIZE]; + float knockNoiseRpmBins[ENGINE_NOISE_CURVE_SIZE]; /** * offset 2016 */ @@ -1605,4 +1607,4 @@ typedef struct { } persistent_config_s; // end -// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Fri Jan 01 16:03:19 EST 2016 +// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Fri Jan 01 17:06:33 EST 2016 diff --git a/firmware/controllers/algo/rusefi_generated.h b/firmware/controllers/algo/rusefi_generated.h index f4d690b3d2..b71d88e554 100644 --- a/firmware/controllers/algo/rusefi_generated.h +++ b/firmware/controllers/algo/rusefi_generated.h @@ -690,8 +690,8 @@ #define consoleSerialTxPin_offset 1944 #define consoleSerialTxPin_offset_hex 798 #define consoleSerialRxPin_offset 1948 -#define knockNoiseBins_offset 1952 -#define knockNoise_offset 1984 +#define knockNoise_offset 1952 +#define knockNoiseRpmBins_offset 1984 #define etb_offset 2016 #define etb_pFactor_offset 2016 #define etb_iFactor_offset 2020 diff --git a/firmware/controllers/sensors/hip9011_lookup.cpp b/firmware/controllers/sensors/hip9011_lookup.cpp index 995f45ef38..58ecbc3f30 100644 --- a/firmware/controllers/sensors/hip9011_lookup.cpp +++ b/firmware/controllers/sensors/hip9011_lookup.cpp @@ -84,6 +84,8 @@ int getHip9011BandIndex(float frequency) { EXTERN_ENGINE; void initEngineNoiseTable(DECLARE_ENGINE_PARAMETER_F) { - setRpmTableBin(engineConfiguration->knockNoiseBins, ENGINE_NOISE_CURVE_SIZE); + setRpmTableBin(engineConfiguration->knockNoiseRpmBins, ENGINE_NOISE_CURVE_SIZE); + + // engineConfiguration->knockNoiseBins[0] } diff --git a/firmware/integration/rusefi_config.txt b/firmware/integration/rusefi_config.txt index cf4409cb9b..f422340ff8 100644 --- a/firmware/integration/rusefi_config.txt +++ b/firmware/integration/rusefi_config.txt @@ -576,7 +576,7 @@ baro_corr_table_t baroCorrTable; int spi2MosiMode; int spi2MisoMode; - float[CRANKING_CURVE_SIZE] crankingTpsCoef;;"%", 1, 0, 0.0, 700.0, 2 + float[CRANKING_CURVE_SIZE] crankingTpsCoef;Cranking fuel correction coefficient based on TPS;"%", 1, 0, 0.0, 700.0, 2 float[CRANKING_CURVE_SIZE] crankingTpsBins;;"%", 1, 0, 0.0, 100.0, 2 float tachPulseDuractionMs;;"ms", 1, 0, 0.0, 100.0, 2 @@ -598,8 +598,8 @@ baro_corr_table_t baroCorrTable; brain_pin_e binarySerialRxPin; brain_pin_e consoleSerialTxPin; brain_pin_e consoleSerialRxPin; - float[ENGINE_NOISE_CURVE_SIZE] knockNoiseBins; - float[ENGINE_NOISE_CURVE_SIZE] knockNoise; + float[ENGINE_NOISE_CURVE_SIZE] knockNoise;Knock sensor output knock detection threshold depending on current RPM;;"v", 1, 0, 0.0, 10, 2 + float[ENGINE_NOISE_CURVE_SIZE] knockNoiseRpmBins;;"RPM", 1, 0, 0.0, 18000, 2 pid_s etb; float[CLT_CURVE_SIZE] cltIdleRpmBins;CLT-based target RPM for automatic idle controller;"C", 1, 0, -100.0, 250.0, 2 diff --git a/firmware/tunerstudio/rusefi.ini b/firmware/tunerstudio/rusefi.ini index 4346d5f7dc..0c5b741781 100644 --- a/firmware/tunerstudio/rusefi.ini +++ b/firmware/tunerstudio/rusefi.ini @@ -41,7 +41,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 Fri Jan 01 16:03:19 EST 2016 +; this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Fri Jan 01 17:06:33 EST 2016 pageSize = 16088 page = 1 @@ -489,8 +489,8 @@ page = 1 binarySerialRxPin = bits, U32, 1940, [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" consoleSerialTxPin = 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" consoleSerialRxPin = bits, U32, 1948, [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" -;skipping knockNoiseBins offset 1952 -;skipping knockNoise offset 1984 + knockNoise = array, F32, 1952, [8], ;"v", 1, 0, 0.0, 10, 2 + knockNoiseRpmBins = array, F32, 1984, [8], "RPM", 1, 0, 0.0, 18000, 2 etb_pFactor = scalar, F32, 2016, "value", 1, 0, 0, 1000, 2 etb_iFactor = scalar, F32, 2020, "value", 1, 0, 0, 1000, 2 etb_dFactor = scalar, F32, 2024, "value", 1, 0, 0, 1000, 2 @@ -705,6 +705,14 @@ fileVersion = { 20151201 } ; engineLoad = { algorithm == 0 ? MAF : TPS } [CurveEditor] + curve = knockThresholdCurve, "Engine knock threshold RPM based" + columnLabel = "RPM", "Threshold" + xAxis = 0, 8000, 10 + yAxis = 0, 8, 10 + xBins = knockNoiseRpmBins, rpm + yBins = knockNoise + gauge = rpm + curve = dwellCorrection, "Dwell time RPM based" columnLabel = "RPM", "Dwell" xAxis = 0, 8000, 10 @@ -1313,6 +1321,7 @@ fileVersion = { 20151201 } field = "prescaler & SDO", hip9011PrescalerAndSDO field = "Band Freq override", knockBandCustom field = "!Always on SPI2" + panel = knockThresholdCurve dialog = spiFunction, "SPI settings" field = "SPI1 MOSI", spi1mosiPin