From 3e8b46b6ca0f55c5c9d1fad23e04d5b41c9f44d4 Mon Sep 17 00:00:00 2001 From: rusefi Date: Wed, 23 Oct 2019 21:41:30 -0400 Subject: [PATCH] preparation for industrial-PID --- .../engine_configuration_generated_structures.h | 14 +++++++++++--- firmware/controllers/generated/rusefi_generated.h | 8 ++++++-- firmware/integration/rusefi_config.txt | 4 +++- firmware/tunerstudio/rusefi.ini | 6 ++++-- firmware/tunerstudio/rusefi_frankenso.ini | 6 ++++-- firmware/tunerstudio/rusefi_microrusefi.ini | 6 ++++-- firmware/tunerstudio/rusefi_prometheus.ini | 6 ++++-- .../src/com/rusefi/config/generated/Fields.java | 10 ++++++++-- 8 files changed, 44 insertions(+), 16 deletions(-) diff --git a/firmware/controllers/generated/engine_configuration_generated_structures.h b/firmware/controllers/generated/engine_configuration_generated_structures.h index 270931c087..449572f325 100644 --- a/firmware/controllers/generated/engine_configuration_generated_structures.h +++ b/firmware/controllers/generated/engine_configuration_generated_structures.h @@ -1,4 +1,4 @@ -// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration\rusefi_config.txt Sun Sep 29 11:56:14 EDT 2019 +// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration\rusefi_config.txt Wed Oct 23 21:40:23 EDT 2019 // by class com.rusefi.output.CHeaderConsumer // begin #ifndef CONTROLLERS_GENERATED_ENGINE_CONFIGURATION_GENERATED_STRUCTURES_H @@ -1839,7 +1839,15 @@ struct engine_configuration_s { /** * offset 1760 */ - uint8_t unusedFormerWarmupAfrPid[16]; + float alternator_derivativeFilterLoss; + /** + * offset 1764 + */ + float alternator_antiwindupFreq; + /** + * offset 1768 + */ + uint8_t unusedFormerWarmupAfrPid[8]; /** * kPa value which is too low to be true * offset 1776 @@ -2867,4 +2875,4 @@ typedef struct persistent_config_s persistent_config_s; #endif // end -// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration\rusefi_config.txt Sun Sep 29 11:56:14 EDT 2019 +// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration\rusefi_config.txt Wed Oct 23 21:40:23 EDT 2019 diff --git a/firmware/controllers/generated/rusefi_generated.h b/firmware/controllers/generated/rusefi_generated.h index b2cf10129e..9629fcde54 100644 --- a/firmware/controllers/generated/rusefi_generated.h +++ b/firmware/controllers/generated/rusefi_generated.h @@ -57,6 +57,10 @@ #define alFIn_offset_hex fb8 #define alignEngineSnifferAtTDC_offset 744 #define alignEngineSnifferAtTDC_offset_hex 2e8 +#define alternator_antiwindupFreq_offset 1764 +#define alternator_antiwindupFreq_offset_hex 6e4 +#define alternator_derivativeFilterLoss_offset 1760 +#define alternator_derivativeFilterLoss_offset_hex 6e0 #define alternatorControl_dFactor_offset 1724 #define alternatorControl_dFactor_offset_hex 6bc #define alternatorControl_iFactor_offset 1720 @@ -1915,8 +1919,8 @@ #define unusedErrorPin_offset_hex 7f8 #define unusedFlexFuelSensor_offset 3100 #define unusedFlexFuelSensor_offset_hex c1c -#define unusedFormerWarmupAfrPid_offset 1760 -#define unusedFormerWarmupAfrPid_offset_hex 6e0 +#define unusedFormerWarmupAfrPid_offset 1768 +#define unusedFormerWarmupAfrPid_offset_hex 6e8 #define unusedMa2_offset 711 #define unusedMa2_offset_hex 2c7 #define unusedOldWarmupAfr_offset 744 diff --git a/firmware/integration/rusefi_config.txt b/firmware/integration/rusefi_config.txt index 4f7ebba948..0ecd677dcd 100644 --- a/firmware/integration/rusefi_config.txt +++ b/firmware/integration/rusefi_config.txt @@ -832,7 +832,9 @@ custom pin_mode_e 1 bits, U08, @OFFSET@, [0:6], @@pin_mode_e_enum@@ pid_s alternatorControl; pid_s etb; float fuelRailPressure;; "kPa", 1, 0.0, 0, 1000.0, 2 - uint8_t[16] unusedFormerWarmupAfrPid; + float alternator_derivativeFilterLoss;; "x", 1, 0.0, -1000000, 1000000, 4 + float alternator_antiwindupFreq;; "x", 1, 0.0, -1000000, 1000000, 4 + uint8_t[8] unusedFormerWarmupAfrPid; ! todo: mapErrorDetectionIdleTooLow? 30kPa is usually lowest on idle float mapErrorDetectionTooLow;kPa value which is too low to be true;"kPa", 1, 0, -100.0, 100.0, 2 diff --git a/firmware/tunerstudio/rusefi.ini b/firmware/tunerstudio/rusefi.ini index 82517c5877..3f98838853 100644 --- a/firmware/tunerstudio/rusefi.ini +++ b/firmware/tunerstudio/rusefi.ini @@ -82,7 +82,7 @@ enable2ndByteCanID = false ; see PAGE_0_SIZE in C source code ; CONFIG_DEFINITION_START -; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration\rusefi_config.txt Tue Oct 15 14:46:19 EDT 2019 +; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration\rusefi_config.txt Wed Oct 23 21:40:23 EDT 2019 pageSize = 20000 page = 1 @@ -622,7 +622,9 @@ page = 1 etb_minValue = scalar, S16, 1752, "", 1, 0, -30000, 30000.0, 0 etb_maxValue = scalar, S16, 1754, "", 1, 0, -30000, 30000.0, 0 fuelRailPressure = scalar, F32, 1756, "kPa", 1, 0.0, 0, 1000.0, 2 -;no TS info - skipping unusedFormerWarmupAfrPid offset 1760 + alternator_derivativeFilterLoss = scalar, F32, 1760, "x", 1, 0.0, -1000000, 1000000, 4 + alternator_antiwindupFreq = scalar, F32, 1764, "x", 1, 0.0, -1000000, 1000000, 4 +;no TS info - skipping unusedFormerWarmupAfrPid offset 1768 mapErrorDetectionTooLow = scalar, F32, 1776, "kPa", 1, 0, -100.0, 100.0, 2 mapErrorDetectionTooHigh = scalar, F32, 1780, "kPa", 1, 0, -100.0, 800.0, 2 step1RpmWindow = scalar, S32, 1784, "rpm", 1, 0, 0, 3000.0, 2 diff --git a/firmware/tunerstudio/rusefi_frankenso.ini b/firmware/tunerstudio/rusefi_frankenso.ini index 8bb00e9f5c..6988b11edd 100644 --- a/firmware/tunerstudio/rusefi_frankenso.ini +++ b/firmware/tunerstudio/rusefi_frankenso.ini @@ -82,7 +82,7 @@ enable2ndByteCanID = false ; see PAGE_0_SIZE in C source code ; CONFIG_DEFINITION_START -; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration\rusefi_config.txt Tue Oct 15 14:46:23 EDT 2019 +; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration\rusefi_config.txt Wed Oct 23 21:40:29 EDT 2019 pageSize = 20000 page = 1 @@ -622,7 +622,9 @@ page = 1 etb_minValue = scalar, S16, 1752, "", 1, 0, -30000, 30000.0, 0 etb_maxValue = scalar, S16, 1754, "", 1, 0, -30000, 30000.0, 0 fuelRailPressure = scalar, F32, 1756, "kPa", 1, 0.0, 0, 1000.0, 2 -;no TS info - skipping unusedFormerWarmupAfrPid offset 1760 + alternator_derivativeFilterLoss = scalar, F32, 1760, "x", 1, 0.0, -1000000, 1000000, 4 + alternator_antiwindupFreq = scalar, F32, 1764, "x", 1, 0.0, -1000000, 1000000, 4 +;no TS info - skipping unusedFormerWarmupAfrPid offset 1768 mapErrorDetectionTooLow = scalar, F32, 1776, "kPa", 1, 0, -100.0, 100.0, 2 mapErrorDetectionTooHigh = scalar, F32, 1780, "kPa", 1, 0, -100.0, 800.0, 2 step1RpmWindow = scalar, S32, 1784, "rpm", 1, 0, 0, 3000.0, 2 diff --git a/firmware/tunerstudio/rusefi_microrusefi.ini b/firmware/tunerstudio/rusefi_microrusefi.ini index a3c4ace10a..492ef4232c 100644 --- a/firmware/tunerstudio/rusefi_microrusefi.ini +++ b/firmware/tunerstudio/rusefi_microrusefi.ini @@ -82,7 +82,7 @@ enable2ndByteCanID = false ; see PAGE_0_SIZE in C source code ; CONFIG_DEFINITION_START -; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration\rusefi_config.txt Tue Oct 15 14:46:21 EDT 2019 +; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration\rusefi_config.txt Wed Oct 23 21:40:26 EDT 2019 pageSize = 20000 page = 1 @@ -622,7 +622,9 @@ page = 1 etb_minValue = scalar, S16, 1752, "", 1, 0, -30000, 30000.0, 0 etb_maxValue = scalar, S16, 1754, "", 1, 0, -30000, 30000.0, 0 fuelRailPressure = scalar, F32, 1756, "kPa", 1, 0.0, 0, 1000.0, 2 -;no TS info - skipping unusedFormerWarmupAfrPid offset 1760 + alternator_derivativeFilterLoss = scalar, F32, 1760, "x", 1, 0.0, -1000000, 1000000, 4 + alternator_antiwindupFreq = scalar, F32, 1764, "x", 1, 0.0, -1000000, 1000000, 4 +;no TS info - skipping unusedFormerWarmupAfrPid offset 1768 mapErrorDetectionTooLow = scalar, F32, 1776, "kPa", 1, 0, -100.0, 100.0, 2 mapErrorDetectionTooHigh = scalar, F32, 1780, "kPa", 1, 0, -100.0, 800.0, 2 step1RpmWindow = scalar, S32, 1784, "rpm", 1, 0, 0, 3000.0, 2 diff --git a/firmware/tunerstudio/rusefi_prometheus.ini b/firmware/tunerstudio/rusefi_prometheus.ini index 7fde9df747..9ef27d3656 100644 --- a/firmware/tunerstudio/rusefi_prometheus.ini +++ b/firmware/tunerstudio/rusefi_prometheus.ini @@ -82,7 +82,7 @@ enable2ndByteCanID = false ; see PAGE_0_SIZE in C source code ; CONFIG_DEFINITION_START -; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration\rusefi_config.txt Tue Oct 15 14:46:26 EDT 2019 +; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration\rusefi_config.txt Wed Oct 23 21:40:32 EDT 2019 pageSize = 20000 page = 1 @@ -622,7 +622,9 @@ page = 1 etb_minValue = scalar, S16, 1752, "", 1, 0, -30000, 30000.0, 0 etb_maxValue = scalar, S16, 1754, "", 1, 0, -30000, 30000.0, 0 fuelRailPressure = scalar, F32, 1756, "kPa", 1, 0.0, 0, 1000.0, 2 -;no TS info - skipping unusedFormerWarmupAfrPid offset 1760 + alternator_derivativeFilterLoss = scalar, F32, 1760, "x", 1, 0.0, -1000000, 1000000, 4 + alternator_antiwindupFreq = scalar, F32, 1764, "x", 1, 0.0, -1000000, 1000000, 4 +;no TS info - skipping unusedFormerWarmupAfrPid offset 1768 mapErrorDetectionTooLow = scalar, F32, 1776, "kPa", 1, 0, -100.0, 100.0, 2 mapErrorDetectionTooHigh = scalar, F32, 1780, "kPa", 1, 0, -100.0, 800.0, 2 step1RpmWindow = scalar, S32, 1784, "rpm", 1, 0, 0, 3000.0, 2 diff --git a/java_console/models/src/com/rusefi/config/generated/Fields.java b/java_console/models/src/com/rusefi/config/generated/Fields.java index b85b453ebf..fda63e5428 100644 --- a/java_console/models/src/com/rusefi/config/generated/Fields.java +++ b/java_console/models/src/com/rusefi/config/generated/Fields.java @@ -1,6 +1,6 @@ package com.rusefi.config.generated; -// this file was generated automatically by rusEfi tool ConfigDefinition.jar based on integration\rusefi_config.txt Sun Sep 29 11:56:14 EDT 2019 +// this file was generated automatically by rusEfi tool ConfigDefinition.jar based on integration\rusefi_config.txt Wed Oct 23 21:40:23 EDT 2019 // by class com.rusefi.output.FileJavaFieldsConsumer import com.rusefi.config.*; @@ -40,6 +40,8 @@ public class Fields { public static final int afterCrankingIACtaperDuration_offset = 2036; public static final int alFIn_offset = 4024; public static final int alignEngineSnifferAtTDC_offset = 744; + public static final int alternator_antiwindupFreq_offset = 1764; + public static final int alternator_derivativeFilterLoss_offset = 1760; public static final int alternatorControl_dFactor_offset = 1724; public static final int alternatorControl_iFactor_offset = 1720; public static final int alternatorControl_maxValue_offset = 1734; @@ -1244,7 +1246,7 @@ public class Fields { public static final int unusedBit31_offset = 1464; public static final int unusedErrorPin_offset = 2040; public static final int unusedFlexFuelSensor_offset = 3100; - public static final int unusedFormerWarmupAfrPid_offset = 1760; + public static final int unusedFormerWarmupAfrPid_offset = 1768; public static final int unusedMa2_offset = 711; public static final int unusedOldWarmupAfr_offset = 744; public static final int unusedSpiPadding2_offset = 806; @@ -1844,6 +1846,8 @@ public class Fields { public static final Field ETB_MINVALUE = Field.create("ETB_MINVALUE", 1752, FieldType.INT16); public static final Field ETB_MAXVALUE = Field.create("ETB_MAXVALUE", 1754, FieldType.INT16); public static final Field FUELRAILPRESSURE = Field.create("FUELRAILPRESSURE", 1756, FieldType.FLOAT); + public static final Field ALTERNATOR_DERIVATIVEFILTERLOSS = Field.create("ALTERNATOR_DERIVATIVEFILTERLOSS", 1760, FieldType.FLOAT); + public static final Field ALTERNATOR_ANTIWINDUPFREQ = Field.create("ALTERNATOR_ANTIWINDUPFREQ", 1764, FieldType.FLOAT); public static final Field MAPERRORDETECTIONTOOLOW = Field.create("MAPERRORDETECTIONTOOLOW", 1776, FieldType.FLOAT); public static final Field MAPERRORDETECTIONTOOHIGH = Field.create("MAPERRORDETECTIONTOOHIGH", 1780, FieldType.FLOAT); public static final Field STEP1RPMWINDOW = Field.create("STEP1RPMWINDOW", 1784, FieldType.INT); @@ -2636,6 +2640,8 @@ public class Fields { ETB_MINVALUE, ETB_MAXVALUE, FUELRAILPRESSURE, + ALTERNATOR_DERIVATIVEFILTERLOSS, + ALTERNATOR_ANTIWINDUPFREQ, MAPERRORDETECTIONTOOLOW, MAPERRORDETECTIONTOOHIGH, STEP1RPMWINDOW,