From 68ab283bd4db5f78ad8d36198d2c2c683dac22e8 Mon Sep 17 00:00:00 2001 From: rusefi Date: Mon, 11 Mar 2019 09:42:11 -0400 Subject: [PATCH] hip9011 knock detection chip driver #35 --- .../algo/engine_configuration_generated_structures.h | 6 ++++-- firmware/integration/rusefi_config.txt | 4 ++-- firmware/tunerstudio/rusefi.ini | 8 +++++--- firmware/tunerstudio/rusefi.input | 2 ++ 4 files changed, 13 insertions(+), 7 deletions(-) diff --git a/firmware/controllers/algo/engine_configuration_generated_structures.h b/firmware/controllers/algo/engine_configuration_generated_structures.h index a78a33991e..3e21664fe0 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 Mar 10 11:52:06 EDT 2019 +// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Mon Mar 11 09:37:59 EDT 2019 // begin #ifndef ENGINE_CONFIGURATION_GENERATED_H_ #define ENGINE_CONFIGURATION_GENERATED_H_ @@ -1585,10 +1585,12 @@ typedef struct { */ uint8_t unusuedvref[3]; /** + * "angle", 1, 0, -1000, 1000, 2 * offset 1508 */ float knockDetectionWindowStart; /** + * "angle", 1, 0, -1000, 1000, 2 * offset 1512 */ float knockDetectionWindowEnd; @@ -2576,4 +2578,4 @@ typedef struct { #endif // end -// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Sun Mar 10 11:52:06 EDT 2019 +// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Mon Mar 11 09:37:59 EDT 2019 diff --git a/firmware/integration/rusefi_config.txt b/firmware/integration/rusefi_config.txt index 15c60c3902..7f4b278bac 100644 --- a/firmware/integration/rusefi_config.txt +++ b/firmware/integration/rusefi_config.txt @@ -744,8 +744,8 @@ uint8_t[3] unusuedsw; adc_channel_e vRefAdcChannel; uint8_t[3] unusuedvref; - float knockDetectionWindowStart; - float knockDetectionWindowEnd; + float knockDetectionWindowStart;;"angle", 1, 0, -1000, 1000, 2 + float knockDetectionWindowEnd;;"angle", 1, 0, -1000, 1000, 2 float idleStepperReactionTime;;"ms", 1, 0, 1, 300, 0 diff --git a/firmware/tunerstudio/rusefi.ini b/firmware/tunerstudio/rusefi.ini index 2e5a43641a..2dc39b3cc6 100644 --- a/firmware/tunerstudio/rusefi.ini +++ b/firmware/tunerstudio/rusefi.ini @@ -63,7 +63,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 Mar 10 11:53:40 EDT 2019 +; this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Mon Mar 11 09:41:23 EDT 2019 pageSize = 20000 page = 1 @@ -531,8 +531,8 @@ page = 1 warningPeriod = scalar, S16, 1502, "seconds", 1, 0, 0, 60, 0 vRefAdcChannel = bits, U08, 1504, [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" ;no TS info - skipping unusuedvref offset 1505 -;no TS info - skipping knockDetectionWindowStart offset 1508 -;no TS info - skipping knockDetectionWindowEnd offset 1512 + knockDetectionWindowStart = scalar, F32, 1508, "angle", 1, 0, -1000, 1000, 2 + knockDetectionWindowEnd = scalar, F32, 1512, "angle", 1, 0, -1000, 1000, 2 idleStepperReactionTime = scalar, F32, 1516, "ms", 1, 0, 1, 300, 0 knockVThreshold = scalar, F32, 1520, "V", 1, 0, 1, 5, 2 fsioInputModes1 = scalar, U08, 1524, "todo", 1, 0, 0, 20, 1 @@ -2707,6 +2707,8 @@ cmd_set_engine_type_etb_test = "w\x00\x30\x00\x3A" field = "ChipSelect mode", hip9011CsPinMode, {isHip9011Enabled == 1} field = "hip Output/stm input", hipOutputChannel, {isHip9011Enabled == 1} field = "prescaler & SDO", hip9011PrescalerAndSDO, {isHip9011Enabled == 1} + field = "knockDetectionWindowStart", knockDetectionWindowStart, {isHip9011Enabled == 1} + field = "knockDetectionWindowEnd", knockDetectionWindowEnd, {isHip9011Enabled == 1} field = "cylinder bore (mm)", cylinderBore, {isHip9011Enabled == 1} field = "Band Freq override", knockBandCustom, {isHip9011Enabled == 1} field = "SPI device", hip9011SpiDevice, {isHip9011Enabled == 1} diff --git a/firmware/tunerstudio/rusefi.input b/firmware/tunerstudio/rusefi.input index 9f7c9b52ec..87d07432d3 100644 --- a/firmware/tunerstudio/rusefi.input +++ b/firmware/tunerstudio/rusefi.input @@ -1820,6 +1820,8 @@ cmd_set_engine_type_etb_test = "w\x00\x30\x00\x3A" field = "ChipSelect mode", hip9011CsPinMode, {isHip9011Enabled == 1} field = "hip Output/stm input", hipOutputChannel, {isHip9011Enabled == 1} field = "prescaler & SDO", hip9011PrescalerAndSDO, {isHip9011Enabled == 1} + field = "knockDetectionWindowStart", knockDetectionWindowStart, {isHip9011Enabled == 1} + field = "knockDetectionWindowEnd", knockDetectionWindowEnd, {isHip9011Enabled == 1} field = "cylinder bore (mm)", cylinderBore, {isHip9011Enabled == 1} field = "Band Freq override", knockBandCustom, {isHip9011Enabled == 1} field = "SPI device", hip9011SpiDevice, {isHip9011Enabled == 1}