diff --git a/firmware/controllers/actuators/electronic_throttle.cpp b/firmware/controllers/actuators/electronic_throttle.cpp index eb1ab12251..c04d639225 100644 --- a/firmware/controllers/actuators/electronic_throttle.cpp +++ b/firmware/controllers/actuators/electronic_throttle.cpp @@ -332,9 +332,16 @@ void setEtbOffset(int value) { } void setDefaultEtbParameters(DECLARE_ENGINE_PARAMETER_SIGNATURE) { - setLinearCurveAny(config->pedalToTpsTpsBins, PEDAL_TO_TPS_SIZE, /*from*/0, /*to*/100, 1); + setLinearCurveAny(config->pedalToTpsPedalBins, PEDAL_TO_TPS_SIZE, /*from*/0, /*to*/100, 1); setLinearCurveAny(config->pedalToTpsRpmBins, PEDAL_TO_TPS_SIZE, /*from*/0, /*to*/8000 / 50, 1); + for (int pedalIndex = 0;pedalIndexpedalToTpsTable[pedalIndex][rpmIndex] = config->pedalToTpsPedalBins[pedalIndex]; + } + } + + engineConfiguration->throttlePedalUpVoltage = 0; // that's voltage, not ADC like with TPS engineConfiguration->throttlePedalWOTVoltage = 6; // that's voltage, not ADC like with TPS diff --git a/firmware/controllers/algo/engine_configuration_generated_structures.h b/firmware/controllers/algo/engine_configuration_generated_structures.h index 3f0a942086..085e359122 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 Mon Jun 10 23:09:10 EDT 2019 +// this section was generated automatically by ConfigDefinition.jar based on integration\rusefi_config.txt Mon Jun 10 23:50:00 EDT 2019 // begin #ifndef CONTROLLERS_ALGO_ENGINE_CONFIGURATION_GENERATED_STRUCTURES_H #define CONTROLLERS_ALGO_ENGINE_CONFIGURATION_GENERATED_STRUCTURES_H @@ -2556,7 +2556,7 @@ struct persistent_config_s { /** * offset 6464 */ - int8_t pedalToTpsTpsBins[PEDAL_TO_TPS_SIZE]; + int8_t pedalToTpsPedalBins[PEDAL_TO_TPS_SIZE]; /** * offset 6472 */ @@ -2800,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 Mon Jun 10 23:09:10 EDT 2019 +// this section was generated automatically by ConfigDefinition.jar based on integration\rusefi_config.txt Mon Jun 10 23:50:00 EDT 2019 diff --git a/firmware/controllers/algo/rusefi_generated.h b/firmware/controllers/algo/rusefi_generated.h index 9149b237f0..799fc24ea3 100644 --- a/firmware/controllers/algo/rusefi_generated.h +++ b/firmware/controllers/algo/rusefi_generated.h @@ -1476,12 +1476,12 @@ #define pauseEtbControl_offset 744 #define pauseEtbControl_offset_hex 2e8 #define PEDAL_TO_TPS_SIZE 8 +#define pedalToTpsPedalBins_offset 6464 +#define pedalToTpsPedalBins_offset_hex 1940 #define pedalToTpsRpmBins_offset 6472 #define pedalToTpsRpmBins_offset_hex 1948 #define pedalToTpsTable_offset 6400 #define pedalToTpsTable_offset_hex 1900 -#define pedalToTpsTpsBins_offset 6464 -#define pedalToTpsTpsBins_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 da1c1d27b6..9e3a1649a4 100644 --- a/firmware/integration/rusefi_config.txt +++ b/firmware/integration/rusefi_config.txt @@ -1061,7 +1061,7 @@ end_struct engine_configuration_s engineConfiguration; pedal_to_tps_t pedalToTpsTable; -int8_t[PEDAL_TO_TPS_SIZE] pedalToTpsTpsBins;;"%", 1, 0, 0.0, 120.0, 0 +int8_t[PEDAL_TO_TPS_SIZE] pedalToTpsPedalBins;;"%", 1, 0, 0.0, 120.0, 0 ! it's not serious to use one byte for RPM but let me try that just to try it uint8_t[PEDAL_TO_TPS_SIZE] pedalToTpsRpmBins;;"RPM", 50, 0, 0.0, 12000.0, 0 diff --git a/firmware/tunerstudio/rusefi.ini b/firmware/tunerstudio/rusefi.ini index 50aa134472..b939ea9f71 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 Mon Jun 10 23:09:10 EDT 2019 +; this section was generated automatically by ConfigDefinition.jar based on integration\rusefi_config.txt Mon Jun 10 23:54:45 EDT 2019 pageSize = 20000 page = 1 @@ -878,7 +878,7 @@ page = 1 ;no TS info - skipping unusedSpiPadding8 offset 4033 ;no TS info - skipping mainUnusedEnd offset 4036 pedalToTpsTable = array, U08, 6400, [8x8],"deg", 1, 0, -720, 720, 2 - pedalToTpsTpsBins = array, S08, 6464, [8], "%", 1, 0, 0.0, 120.0, 0 + pedalToTpsPedalBins = array, S08, 6464, [8], "%", 1, 0, 0.0, 120.0, 0 pedalToTpsRpmBins = array, U08, 6472, [8], "RPM", 50, 0, 0.0, 12000.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 @@ -1656,7 +1656,7 @@ fileVersion = { 20171101 } table = pedalToTpsTbl, pedalToTpsMap, "ETB Pedal to TPS", 1 ; constant, variable xBins = pedalToTpsRpmBins, RPMValue - yBins = pedalToTpsTpsBins, TPSValue + yBins = pedalToTpsPedalBins, pedalPosition zBins = pedalToTpsTable ; gridHeight = 2.0 gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees. diff --git a/firmware/tunerstudio/rusefi.input b/firmware/tunerstudio/rusefi.input index db45e1227f..7fc6e0ffce 100644 --- a/firmware/tunerstudio/rusefi.input +++ b/firmware/tunerstudio/rusefi.input @@ -719,7 +719,7 @@ fileVersion = { 20171101 } table = pedalToTpsTbl, pedalToTpsMap, "ETB Pedal to TPS", 1 ; constant, variable xBins = pedalToTpsRpmBins, RPMValue - yBins = pedalToTpsTpsBins, TPSValue + yBins = pedalToTpsPedalBins, pedalPosition zBins = pedalToTpsTable ; gridHeight = 2.0 gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees. diff --git a/firmware/tunerstudio/rusefi_frankenso.ini b/firmware/tunerstudio/rusefi_frankenso.ini index c68575e573..a96ad630b9 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 Mon Jun 10 23:09:15 EDT 2019 +; this section was generated automatically by ConfigDefinition.jar based on integration\rusefi_config.txt Mon Jun 10 23:54:49 EDT 2019 pageSize = 20000 page = 1 @@ -878,7 +878,7 @@ page = 1 ;no TS info - skipping unusedSpiPadding8 offset 4033 ;no TS info - skipping mainUnusedEnd offset 4036 pedalToTpsTable = array, U08, 6400, [8x8],"deg", 1, 0, -720, 720, 2 - pedalToTpsTpsBins = array, S08, 6464, [8], "%", 1, 0, 0.0, 120.0, 0 + pedalToTpsPedalBins = array, S08, 6464, [8], "%", 1, 0, 0.0, 120.0, 0 pedalToTpsRpmBins = array, U08, 6472, [8], "RPM", 50, 0, 0.0, 12000.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 @@ -1656,7 +1656,7 @@ fileVersion = { 20171101 } table = pedalToTpsTbl, pedalToTpsMap, "ETB Pedal to TPS", 1 ; constant, variable xBins = pedalToTpsRpmBins, RPMValue - yBins = pedalToTpsTpsBins, TPSValue + yBins = pedalToTpsPedalBins, pedalPosition zBins = pedalToTpsTable ; gridHeight = 2.0 gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees. diff --git a/firmware/tunerstudio/rusefi_microrusefi.ini b/firmware/tunerstudio/rusefi_microrusefi.ini index f0c1ae9867..c88d70d8a0 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 Mon Jun 10 23:09:13 EDT 2019 +; this section was generated automatically by ConfigDefinition.jar based on integration\rusefi_config.txt Mon Jun 10 23:54:47 EDT 2019 pageSize = 20000 page = 1 @@ -878,7 +878,7 @@ page = 1 ;no TS info - skipping unusedSpiPadding8 offset 4033 ;no TS info - skipping mainUnusedEnd offset 4036 pedalToTpsTable = array, U08, 6400, [8x8],"deg", 1, 0, -720, 720, 2 - pedalToTpsTpsBins = array, S08, 6464, [8], "%", 1, 0, 0.0, 120.0, 0 + pedalToTpsPedalBins = array, S08, 6464, [8], "%", 1, 0, 0.0, 120.0, 0 pedalToTpsRpmBins = array, U08, 6472, [8], "RPM", 50, 0, 0.0, 12000.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 @@ -1656,7 +1656,7 @@ fileVersion = { 20171101 } table = pedalToTpsTbl, pedalToTpsMap, "ETB Pedal to TPS", 1 ; constant, variable xBins = pedalToTpsRpmBins, RPMValue - yBins = pedalToTpsTpsBins, TPSValue + yBins = pedalToTpsPedalBins, pedalPosition zBins = pedalToTpsTable ; gridHeight = 2.0 gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees. diff --git a/firmware/tunerstudio/rusefi_prometheus.ini b/firmware/tunerstudio/rusefi_prometheus.ini index 94da322ddd..9e72a50563 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 Mon Jun 10 23:09:17 EDT 2019 +; this section was generated automatically by ConfigDefinition.jar based on integration\rusefi_config.txt Mon Jun 10 23:54:52 EDT 2019 pageSize = 20000 page = 1 @@ -878,7 +878,7 @@ page = 1 ;no TS info - skipping unusedSpiPadding8 offset 4033 ;no TS info - skipping mainUnusedEnd offset 4036 pedalToTpsTable = array, U08, 6400, [8x8],"deg", 1, 0, -720, 720, 2 - pedalToTpsTpsBins = array, S08, 6464, [8], "%", 1, 0, 0.0, 120.0, 0 + pedalToTpsPedalBins = array, S08, 6464, [8], "%", 1, 0, 0.0, 120.0, 0 pedalToTpsRpmBins = array, U08, 6472, [8], "RPM", 50, 0, 0.0, 12000.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 @@ -1656,7 +1656,7 @@ fileVersion = { 20171101 } table = pedalToTpsTbl, pedalToTpsMap, "ETB Pedal to TPS", 1 ; constant, variable xBins = pedalToTpsRpmBins, RPMValue - yBins = pedalToTpsTpsBins, TPSValue + yBins = pedalToTpsPedalBins, pedalPosition zBins = pedalToTpsTable ; gridHeight = 2.0 gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees. diff --git a/java_console/models/src/com/rusefi/config/Fields.java b/java_console/models/src/com/rusefi/config/Fields.java index 65ef441fb5..d22dc12c56 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 Mon Jun 10 23:08:07 EDT 2019 +// this file was generated automatically by ConfigDefinition.jar based on integration\rusefi_config.txt Mon Jun 10 23:50:00 EDT 2019 public class Fields { public static final int accelerometerSpiDevice_offset = 2736; public static final int acCutoffHighRpm_offset = 1498; @@ -960,12 +960,12 @@ public class Fields { 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 pedalToTpsPedalBins_offset = 6464; + public static final int pedalToTpsPedalBins_offset_hex = 1940; public static final int pedalToTpsRpmBins_offset = 6472; public static final int pedalToTpsRpmBins_offset_hex = 1948; public static final int pedalToTpsTable_offset = 6400; public static final int pedalToTpsTable_offset_hex = 1900; - public static final int pedalToTpsTpsBins_offset = 6464; - public static final int pedalToTpsTpsBins_offset_hex = 1940; public static final int pidExtraForLowRpm_offset = 3180; public static final int postCrankingDurationSec_offset = 2464; public static final int postCrankingFactor_offset = 2460;