ETB: TPS should be f(RPM, pedal) #835

This commit is contained in:
rusefi 2019-06-10 23:38:44 -04:00
parent 9410e3d075
commit 837492c9f0
10 changed files with 85 additions and 27 deletions

View File

@ -332,6 +332,9 @@ void setEtbOffset(int value) {
}
void setDefaultEtbParameters(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
setLinearCurveAny<int8_t>(config->pedalToTpsTpsBins, PEDAL_TO_TPS_SIZE, /*from*/0, /*to*/100, 1);
setLinearCurveAny<uint8_t>(config->pedalToTpsRpmBins, PEDAL_TO_TPS_SIZE, /*from*/0, /*to*/8000 / 50, 1);
engineConfiguration->throttlePedalUpVoltage = 0; // that's voltage, not ADC like with TPS
engineConfiguration->throttlePedalWOTVoltage = 6; // that's voltage, not ADC like with TPS

View File

@ -1,4 +1,4 @@
// this section was generated automatically by ConfigDefinition.jar based on integration\rusefi_config.txt Mon Jun 10 13:04:10 EDT 2019
// this section was generated automatically by ConfigDefinition.jar based on integration\rusefi_config.txt Mon Jun 10 23:09:10 EDT 2019
// begin
#ifndef CONTROLLERS_ALGO_ENGINE_CONFIGURATION_GENERATED_STRUCTURES_H
#define CONTROLLERS_ALGO_ENGINE_CONFIGURATION_GENERATED_STRUCTURES_H
@ -2556,11 +2556,11 @@ struct persistent_config_s {
/**
* offset 6464
*/
uint8_t pedalToTpsBins[PEDAL_TO_TPS_SIZE];
int8_t pedalToTpsTpsBins[PEDAL_TO_TPS_SIZE];
/**
* offset 6472
*/
uint8_t pedalToTps[PEDAL_TO_TPS_SIZE];
uint8_t pedalToTpsRpmBins[PEDAL_TO_TPS_SIZE];
/**
* CLT-based cranking position multiplier for simple manual idle controller
* offset 6480
@ -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 13:04:10 EDT 2019
// this section was generated automatically by ConfigDefinition.jar based on integration\rusefi_config.txt Mon Jun 10 23:09:10 EDT 2019

View File

@ -1476,12 +1476,12 @@
#define pauseEtbControl_offset 744
#define pauseEtbControl_offset_hex 2e8
#define PEDAL_TO_TPS_SIZE 8
#define pedalToTps_offset 6472
#define pedalToTps_offset_hex 1948
#define pedalToTpsBins_offset 6464
#define pedalToTpsBins_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"

View File

@ -1061,8 +1061,9 @@ end_struct
engine_configuration_s engineConfiguration;
pedal_to_tps_t pedalToTpsTable;
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
int8_t[PEDAL_TO_TPS_SIZE] pedalToTpsTpsBins;;"%", 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
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

View File

@ -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 13:04:10 EDT 2019
; this section was generated automatically by ConfigDefinition.jar based on integration\rusefi_config.txt Mon Jun 10 23:09:10 EDT 2019
pageSize = 20000
page = 1
@ -878,8 +878,8 @@ 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
pedalToTpsBins = array, U08, 6464, [8], "%", 1, 0, 0.0, 120.0, 0
pedalToTps = array, U08, 6472, [8], "%", 1, 0, 0.0, 120.0, 0
pedalToTpsTpsBins = 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
idleAdvanceBins = array, F32, 6544, [8], "RPM", 1, 0, 0.0, 18000, 2
@ -1653,6 +1653,16 @@ fileVersion = { 20171101 }
gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees.
upDownLabel = "(Later)", "(Sooner)"
table = pedalToTpsTbl, pedalToTpsMap, "ETB Pedal to TPS", 1
; constant, variable
xBins = pedalToTpsRpmBins, RPMValue
yBins = pedalToTpsTpsBins, TPSValue
zBins = pedalToTpsTable
; gridHeight = 2.0
gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees.
upDownLabel = "(Later)", "(Sooner)"
table = afrTableTbl, afrTableMap, "Target AFR Table", 1
; constant, variable
xBins = afrRpmBins, RPMValue
@ -2166,6 +2176,7 @@ menuDialog = main
subMenu = etbDialog, "Electronic throttle body (beta version)"
subMenu = etbTpsBiasCurve, "Electronic throttle body bias curve"
subMenu = pedalToTpsTbl, "Electronic Pedal Map"
[ControllerCommands]

View File

@ -716,6 +716,16 @@ fileVersion = { 20171101 }
gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees.
upDownLabel = "(Later)", "(Sooner)"
table = pedalToTpsTbl, pedalToTpsMap, "ETB Pedal to TPS", 1
; constant, variable
xBins = pedalToTpsRpmBins, RPMValue
yBins = pedalToTpsTpsBins, TPSValue
zBins = pedalToTpsTable
; gridHeight = 2.0
gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees.
upDownLabel = "(Later)", "(Sooner)"
table = afrTableTbl, afrTableMap, "Target AFR Table", 1
; constant, variable
xBins = afrRpmBins, RPMValue
@ -1229,6 +1239,7 @@ menuDialog = main
subMenu = etbDialog, "Electronic throttle body (beta version)" @@if_ts_show_etb
subMenu = etbTpsBiasCurve, "Electronic throttle body bias curve" @@if_ts_show_etb
subMenu = pedalToTpsTbl, "Electronic Pedal Map" @@if_ts_show_etb
[ControllerCommands]

View File

@ -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 13:04:21 EDT 2019
; this section was generated automatically by ConfigDefinition.jar based on integration\rusefi_config.txt Mon Jun 10 23:09:15 EDT 2019
pageSize = 20000
page = 1
@ -878,8 +878,8 @@ 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
pedalToTpsBins = array, U08, 6464, [8], "%", 1, 0, 0.0, 120.0, 0
pedalToTps = array, U08, 6472, [8], "%", 1, 0, 0.0, 120.0, 0
pedalToTpsTpsBins = 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
idleAdvanceBins = array, F32, 6544, [8], "RPM", 1, 0, 0.0, 18000, 2
@ -1653,6 +1653,16 @@ fileVersion = { 20171101 }
gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees.
upDownLabel = "(Later)", "(Sooner)"
table = pedalToTpsTbl, pedalToTpsMap, "ETB Pedal to TPS", 1
; constant, variable
xBins = pedalToTpsRpmBins, RPMValue
yBins = pedalToTpsTpsBins, TPSValue
zBins = pedalToTpsTable
; gridHeight = 2.0
gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees.
upDownLabel = "(Later)", "(Sooner)"
table = afrTableTbl, afrTableMap, "Target AFR Table", 1
; constant, variable
xBins = afrRpmBins, RPMValue
@ -2166,6 +2176,7 @@ menuDialog = main
subMenu = etbDialog, "Electronic throttle body (beta version)"
subMenu = etbTpsBiasCurve, "Electronic throttle body bias curve"
subMenu = pedalToTpsTbl, "Electronic Pedal Map"
[ControllerCommands]

View File

@ -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 13:04:16 EDT 2019
; this section was generated automatically by ConfigDefinition.jar based on integration\rusefi_config.txt Mon Jun 10 23:09:13 EDT 2019
pageSize = 20000
page = 1
@ -878,8 +878,8 @@ 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
pedalToTpsBins = array, U08, 6464, [8], "%", 1, 0, 0.0, 120.0, 0
pedalToTps = array, U08, 6472, [8], "%", 1, 0, 0.0, 120.0, 0
pedalToTpsTpsBins = 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
idleAdvanceBins = array, F32, 6544, [8], "RPM", 1, 0, 0.0, 18000, 2
@ -1653,6 +1653,16 @@ fileVersion = { 20171101 }
gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees.
upDownLabel = "(Later)", "(Sooner)"
table = pedalToTpsTbl, pedalToTpsMap, "ETB Pedal to TPS", 1
; constant, variable
xBins = pedalToTpsRpmBins, RPMValue
yBins = pedalToTpsTpsBins, TPSValue
zBins = pedalToTpsTable
; gridHeight = 2.0
gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees.
upDownLabel = "(Later)", "(Sooner)"
table = afrTableTbl, afrTableMap, "Target AFR Table", 1
; constant, variable
xBins = afrRpmBins, RPMValue
@ -2159,6 +2169,7 @@ menuDialog = main
subMenu = etbDialog, "Electronic throttle body (beta version)"
subMenu = etbTpsBiasCurve, "Electronic throttle body bias curve"
subMenu = pedalToTpsTbl, "Electronic Pedal Map"
[ControllerCommands]

View File

@ -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 13:04:25 EDT 2019
; this section was generated automatically by ConfigDefinition.jar based on integration\rusefi_config.txt Mon Jun 10 23:09:17 EDT 2019
pageSize = 20000
page = 1
@ -878,8 +878,8 @@ 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
pedalToTpsBins = array, U08, 6464, [8], "%", 1, 0, 0.0, 120.0, 0
pedalToTps = array, U08, 6472, [8], "%", 1, 0, 0.0, 120.0, 0
pedalToTpsTpsBins = 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
idleAdvanceBins = array, F32, 6544, [8], "RPM", 1, 0, 0.0, 18000, 2
@ -1653,6 +1653,16 @@ fileVersion = { 20171101 }
gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees.
upDownLabel = "(Later)", "(Sooner)"
table = pedalToTpsTbl, pedalToTpsMap, "ETB Pedal to TPS", 1
; constant, variable
xBins = pedalToTpsRpmBins, RPMValue
yBins = pedalToTpsTpsBins, TPSValue
zBins = pedalToTpsTable
; gridHeight = 2.0
gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees.
upDownLabel = "(Later)", "(Sooner)"
table = afrTableTbl, afrTableMap, "Target AFR Table", 1
; constant, variable
xBins = afrRpmBins, RPMValue

View File

@ -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 13:04:10 EDT 2019
// this file was generated automatically by ConfigDefinition.jar based on integration\rusefi_config.txt Mon Jun 10 23:08:07 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 pedalToTps_offset = 6472;
public static final int pedalToTps_offset_hex = 1948;
public static final int pedalToTpsBins_offset = 6464;
public static final int pedalToTpsBins_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;