From 1e75fc98b5b867311cd4c913ec6a3782976d40a6 Mon Sep 17 00:00:00 2001 From: rusefi Date: Mon, 10 Jun 2019 12:52:26 -0400 Subject: [PATCH] ETB: TPS should be f(RPM, pedal) #835 --- ...ngine_configuration_generated_structures.h | 20 +++++++++++++++---- firmware/controllers/algo/rusefi_generated.h | 5 +++++ firmware/integration/rusefi_config.txt | 11 +++++++++- firmware/tunerstudio/rusefi.ini | 5 ++++- firmware/tunerstudio/rusefi_frankenso.ini | 5 ++++- firmware/tunerstudio/rusefi_microrusefi.ini | 5 ++++- firmware/tunerstudio/rusefi_prometheus.ini | 5 ++++- .../models/src/com/rusefi/config/Fields.java | 8 +++++++- 8 files changed, 54 insertions(+), 10 deletions(-) diff --git a/firmware/controllers/algo/engine_configuration_generated_structures.h b/firmware/controllers/algo/engine_configuration_generated_structures.h index 4dba63bd6f..48aa8cba10 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 integration\rusefi_config.txt Fri Jun 07 17:34:20 EDT 2019 +// this section was generated automatically by ConfigDefinition.jar based on integration\rusefi_config.txt Mon Jun 10 12:49:03 EDT 2019 // begin #ifndef CONTROLLERS_ALGO_ENGINE_CONFIGURATION_GENERATED_STRUCTURES_H #define CONTROLLERS_ALGO_ENGINE_CONFIGURATION_GENERATED_STRUCTURES_H @@ -2537,8 +2537,8 @@ struct engine_configuration_s { /** * offset 4036 */ - int mainUnusedEnd[611]; - /** total size 6480*/ + int mainUnusedEnd[591]; + /** total size 6400*/ }; typedef struct engine_configuration_s engine_configuration_s; @@ -2549,6 +2549,18 @@ struct persistent_config_s { * offset 0 */ engine_configuration_s engineConfiguration; + /** + * offset 6400 + */ + pedal_to_tps_t pedalToTps; + /** + * offset 6464 + */ + uint8_t pedalToTpsBins[PEDAL_TO_TPS_SIZE]; + /** + * offset 6472 + */ + uint8_t pedalToTps[PEDAL_TO_TPS_SIZE]; /** * CLT-based cranking position multiplier for simple manual idle controller * offset 6480 @@ -2788,4 +2800,4 @@ typedef struct persistent_config_s persistent_config_s; #endif // end -// this section was generated automatically by ConfigDefinition.jar based on integration\rusefi_config.txt Fri Jun 07 17:34:20 EDT 2019 +// this section was generated automatically by ConfigDefinition.jar based on integration\rusefi_config.txt Mon Jun 10 12:49:03 EDT 2019 diff --git a/firmware/controllers/algo/rusefi_generated.h b/firmware/controllers/algo/rusefi_generated.h index 68439f885b..823575e4c5 100644 --- a/firmware/controllers/algo/rusefi_generated.h +++ b/firmware/controllers/algo/rusefi_generated.h @@ -1475,6 +1475,11 @@ #define overrideCrankingIgnition_offset_hex 204 #define pauseEtbControl_offset 744 #define pauseEtbControl_offset_hex 2e8 +#define PEDAL_TO_TPS_SIZE 8 +#define pedalToTps_offset 6400 +#define pedalToTps_offset_hex 1900 +#define pedalToTpsBins_offset 6464 +#define pedalToTpsBins_offset_hex 1940 #define pidExtraForLowRpm_offset 3180 #define pidExtraForLowRpm_offset_hex c6c #define pin_mode_e_enum "default", "INVALID", "INVALID", "INVALID", "opendrain", "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", "PULLUP", "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", "PULLDOWN" diff --git a/firmware/integration/rusefi_config.txt b/firmware/integration/rusefi_config.txt index edbc426089..b112892f9b 100644 --- a/firmware/integration/rusefi_config.txt +++ b/firmware/integration/rusefi_config.txt @@ -110,6 +110,8 @@ struct_no_prefix engine_configuration_s #define FUEL_RPM_COUNT 16 #define FUEL_LOAD_COUNT 16 +#define PEDAL_TO_TPS_SIZE 8 + #define FSIO_TABLE_8 8 #define FSIO_CURVE_8 8 @@ -141,6 +143,7 @@ custom ignition_table_t 1024 array, F32, @OFFSET@, [16x16],"deg", 1, custom ignition_tps_table_t 512 array, S16, @OFFSET@, [16x16],"deg", 0.01, 0, -20, 90, 2 custom angle_table_t 1024 array, F32, @OFFSET@, [16x16],"deg", 1, 0, -720, 720, 2 +custom pedal_to_tps_t 64 array, U08, @OFFSET@, [@@PEDAL_TO_TPS_SIZE@@x@@PEDAL_TO_TPS_SIZE@@],"deg", 1, 0, -720, 720, 2 struct pid_s ! explicitly document which use-cases need 10e-7 parameters @@ -1050,13 +1053,19 @@ tChargeMode_e tChargeMode; spi_device_e mc33972spiDevice; uint8_t[3] unusedSpiPadding8; - int[611] mainUnusedEnd; + + + int[591] mainUnusedEnd; end_struct engine_configuration_s engineConfiguration; +pedal_to_tps_t pedalToTps; +uint8_t[PEDAL_TO_TPS_SIZE] pedalToTpsBins;;"%", 1, 0, 0.0, 120.0, 0 +uint8_t[PEDAL_TO_TPS_SIZE] pedalToTps;;"%", 1, 0, 0.0, 120.0, 0 + float[CLT_CRANKING_CURVE_SIZE] cltCrankingCorrBins;CLT-based cranking position multiplier for simple manual idle controller;"C", 1, 0, -100.0, 250.0, 2 float[CLT_CRANKING_CURVE_SIZE] cltCrankingCorr ;CLT-based cranking position multiplier for simple manual idle controller;"%", 1, 0, 0.0, 500.0, 2 diff --git a/firmware/tunerstudio/rusefi.ini b/firmware/tunerstudio/rusefi.ini index 45a38a20ae..295622fc0c 100644 --- a/firmware/tunerstudio/rusefi.ini +++ b/firmware/tunerstudio/rusefi.ini @@ -72,7 +72,7 @@ enable2ndByteCanID = false ; see PAGE_0_SIZE in C source code ; CONFIG_DEFINITION_START -; this section was generated automatically by ConfigDefinition.jar based on integration\rusefi_config.txt Fri Jun 07 17:37:31 EDT 2019 +; this section was generated automatically by ConfigDefinition.jar based on integration\rusefi_config.txt Mon Jun 10 12:49:03 EDT 2019 pageSize = 20000 page = 1 @@ -877,6 +877,9 @@ page = 1 mc33972spiDevice = bits,U32, 4032, [0:2], "Off", "SPI1", "SPI2", "SPI3", "SPI4" ;no TS info - skipping unusedSpiPadding8 offset 4033 ;no TS info - skipping mainUnusedEnd offset 4036 + pedalToTps = array, U08, 6400, [8x8],"deg", 1, 0, -720, 720, 2 + pedalToTpsBins = array, U08, 6464, [8], "%", 1, 0, 0.0, 120.0, 0 + pedalToTps = array, U08, 6472, [8], "%", 1, 0, 0.0, 120.0, 0 cltCrankingCorrBins = array, F32, 6480, [8], "C", 1, 0, -100.0, 250.0, 2 cltCrankingCorr = array, F32, 6512, [8], "%", 1, 0, 0.0, 500.0, 2 idleAdvanceBins = array, F32, 6544, [8], "RPM", 1, 0, 0.0, 18000, 2 diff --git a/firmware/tunerstudio/rusefi_frankenso.ini b/firmware/tunerstudio/rusefi_frankenso.ini index ae2d8d901b..b77c24376f 100644 --- a/firmware/tunerstudio/rusefi_frankenso.ini +++ b/firmware/tunerstudio/rusefi_frankenso.ini @@ -72,7 +72,7 @@ enable2ndByteCanID = false ; see PAGE_0_SIZE in C source code ; CONFIG_DEFINITION_START -; this section was generated automatically by ConfigDefinition.jar based on integration\rusefi_config.txt Fri Jun 07 17:37:33 EDT 2019 +; this section was generated automatically by ConfigDefinition.jar based on integration\rusefi_config.txt Mon Jun 10 12:49:13 EDT 2019 pageSize = 20000 page = 1 @@ -877,6 +877,9 @@ page = 1 mc33972spiDevice = bits,U32, 4032, [0:2], "Off", "SPI1", "SPI2", "SPI3", "SPI4" ;no TS info - skipping unusedSpiPadding8 offset 4033 ;no TS info - skipping mainUnusedEnd offset 4036 + pedalToTps = array, U08, 6400, [8x8],"deg", 1, 0, -720, 720, 2 + pedalToTpsBins = array, U08, 6464, [8], "%", 1, 0, 0.0, 120.0, 0 + pedalToTps = array, U08, 6472, [8], "%", 1, 0, 0.0, 120.0, 0 cltCrankingCorrBins = array, F32, 6480, [8], "C", 1, 0, -100.0, 250.0, 2 cltCrankingCorr = array, F32, 6512, [8], "%", 1, 0, 0.0, 500.0, 2 idleAdvanceBins = array, F32, 6544, [8], "RPM", 1, 0, 0.0, 18000, 2 diff --git a/firmware/tunerstudio/rusefi_microrusefi.ini b/firmware/tunerstudio/rusefi_microrusefi.ini index 1517adfc06..6645d19b8b 100644 --- a/firmware/tunerstudio/rusefi_microrusefi.ini +++ b/firmware/tunerstudio/rusefi_microrusefi.ini @@ -72,7 +72,7 @@ enable2ndByteCanID = false ; see PAGE_0_SIZE in C source code ; CONFIG_DEFINITION_START -; this section was generated automatically by ConfigDefinition.jar based on integration\rusefi_config.txt Fri Jun 07 17:37:32 EDT 2019 +; this section was generated automatically by ConfigDefinition.jar based on integration\rusefi_config.txt Mon Jun 10 12:49:08 EDT 2019 pageSize = 20000 page = 1 @@ -877,6 +877,9 @@ page = 1 mc33972spiDevice = bits,U32, 4032, [0:2], "Off", "SPI1", "SPI2", "SPI3", "SPI4" ;no TS info - skipping unusedSpiPadding8 offset 4033 ;no TS info - skipping mainUnusedEnd offset 4036 + pedalToTps = array, U08, 6400, [8x8],"deg", 1, 0, -720, 720, 2 + pedalToTpsBins = array, U08, 6464, [8], "%", 1, 0, 0.0, 120.0, 0 + pedalToTps = array, U08, 6472, [8], "%", 1, 0, 0.0, 120.0, 0 cltCrankingCorrBins = array, F32, 6480, [8], "C", 1, 0, -100.0, 250.0, 2 cltCrankingCorr = array, F32, 6512, [8], "%", 1, 0, 0.0, 500.0, 2 idleAdvanceBins = array, F32, 6544, [8], "RPM", 1, 0, 0.0, 18000, 2 diff --git a/firmware/tunerstudio/rusefi_prometheus.ini b/firmware/tunerstudio/rusefi_prometheus.ini index 164a43b098..631440ac65 100644 --- a/firmware/tunerstudio/rusefi_prometheus.ini +++ b/firmware/tunerstudio/rusefi_prometheus.ini @@ -72,7 +72,7 @@ enable2ndByteCanID = false ; see PAGE_0_SIZE in C source code ; CONFIG_DEFINITION_START -; this section was generated automatically by ConfigDefinition.jar based on integration\rusefi_config.txt Fri Jun 07 17:37:33 EDT 2019 +; this section was generated automatically by ConfigDefinition.jar based on integration\rusefi_config.txt Mon Jun 10 12:49:16 EDT 2019 pageSize = 20000 page = 1 @@ -877,6 +877,9 @@ page = 1 mc33972spiDevice = bits,U32, 4032, [0:2], "Off", "SPI1", "SPI2", "SPI3", "SPI4" ;no TS info - skipping unusedSpiPadding8 offset 4033 ;no TS info - skipping mainUnusedEnd offset 4036 + pedalToTps = array, U08, 6400, [8x8],"deg", 1, 0, -720, 720, 2 + pedalToTpsBins = array, U08, 6464, [8], "%", 1, 0, 0.0, 120.0, 0 + pedalToTps = array, U08, 6472, [8], "%", 1, 0, 0.0, 120.0, 0 cltCrankingCorrBins = array, F32, 6480, [8], "C", 1, 0, -100.0, 250.0, 2 cltCrankingCorr = array, F32, 6512, [8], "%", 1, 0, 0.0, 500.0, 2 idleAdvanceBins = array, F32, 6544, [8], "RPM", 1, 0, 0.0, 18000, 2 diff --git a/java_console/models/src/com/rusefi/config/Fields.java b/java_console/models/src/com/rusefi/config/Fields.java index d344bc2f49..66db4885b1 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 integration\rusefi_config.txt Fri Jun 07 17:34:20 EDT 2019 +// this file was generated automatically by ConfigDefinition.jar based on integration\rusefi_config.txt Mon Jun 10 12:49:03 EDT 2019 public class Fields { public static final int accelerometerSpiDevice_offset = 2736; public static final int acCutoffHighRpm_offset = 1498; @@ -959,6 +959,11 @@ public class Fields { public static final int overrideCrankingIgnition_offset = 516; public static final int overrideCrankingIgnition_offset_hex = 204; public static final int pauseEtbControl_offset = 744; + public static final int PEDAL_TO_TPS_SIZE = 8; + public static final int pedalToTps_offset = 6400; + public static final int pedalToTps_offset_hex = 1900; + public static final int pedalToTpsBins_offset = 6464; + public static final int pedalToTpsBins_offset_hex = 1940; public static final int pidExtraForLowRpm_offset = 3180; public static final int postCrankingDurationSec_offset = 2464; public static final int postCrankingFactor_offset = 2460; @@ -1991,6 +1996,7 @@ public class Fields { public static final Field MC33816SPIDEVICE = Field.create("MC33816SPIDEVICE", 4025, FieldType.INT8); public static final Field TLE6240SPIDEVICE = Field.create("TLE6240SPIDEVICE", 4028, FieldType.INT8); public static final Field MC33972SPIDEVICE = Field.create("MC33972SPIDEVICE", 4032, FieldType.INT8); + public static final Field PEDALTOTPS = Field.create("PEDALTOTPS", 6400, FieldType.INT); public static final Field FSIOFORMULAS1 = Field.create("FSIOFORMULAS1", 6672, FieldType.INT); public static final Field FSIOFORMULAS2 = Field.create("FSIOFORMULAS2", 6872, FieldType.INT); public static final Field FSIOFORMULAS3 = Field.create("FSIOFORMULAS3", 7072, FieldType.INT);