ETB bias curve in TS
This commit is contained in:
parent
36047e7f3d
commit
d632d72ed3
|
@ -342,7 +342,8 @@ void prepareVoidConfiguration(engine_configuration_s *engineConfiguration) {
|
||||||
setDefaultAlternatorParameters();
|
setDefaultAlternatorParameters();
|
||||||
#endif
|
#endif
|
||||||
#if EFI_ELECTRONIC_THROTTLE_BODY || defined(__DOXYGEN__)
|
#if EFI_ELECTRONIC_THROTTLE_BODY || defined(__DOXYGEN__)
|
||||||
setDefaultEtbParameters();
|
setDefaultEtbParameters(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||||
|
setDefaultEtbBiasCurve(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||||
#endif
|
#endif
|
||||||
#if EFI_IDLE_CONTROL || defined(__DOXYGEN__)
|
#if EFI_IDLE_CONTROL || defined(__DOXYGEN__)
|
||||||
setDefaultIdleParameters();
|
setDefaultIdleParameters();
|
||||||
|
|
|
@ -321,6 +321,26 @@ static void setAutoOffset(int offset) {
|
||||||
autoTune.reset();
|
autoTune.reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void setDefaultEtbBiasCurve(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
|
engineConfiguration->etbBiasBins[0] = 0;
|
||||||
|
engineConfiguration->etbBiasBins[1] = 5;
|
||||||
|
engineConfiguration->etbBiasBins[2] = 7;
|
||||||
|
engineConfiguration->etbBiasBins[3] = 8;
|
||||||
|
engineConfiguration->etbBiasBins[4] = 11;
|
||||||
|
engineConfiguration->etbBiasBins[5] = 98;
|
||||||
|
engineConfiguration->etbBiasBins[6] = 99;
|
||||||
|
engineConfiguration->etbBiasBins[7] = 100;
|
||||||
|
|
||||||
|
engineConfiguration->etbBiasValues[0] = -100 / 255.0f * 100;
|
||||||
|
engineConfiguration->etbBiasValues[1] = -95 / 255.0f * 100;
|
||||||
|
engineConfiguration->etbBiasValues[2] = -80 / 255.0f * 100;
|
||||||
|
engineConfiguration->etbBiasValues[3] = 0 / 255.0f * 100;
|
||||||
|
engineConfiguration->etbBiasValues[4] = 115 / 255.0f * 100;
|
||||||
|
engineConfiguration->etbBiasValues[5] = 142 / 255.0f * 100;
|
||||||
|
engineConfiguration->etbBiasValues[6] = 142 / 255.0f * 100;
|
||||||
|
engineConfiguration->etbBiasValues[7] = 142 / 255.0f * 100;
|
||||||
|
}
|
||||||
|
|
||||||
void initElectronicThrottle(void) {
|
void initElectronicThrottle(void) {
|
||||||
addConsoleAction("ethinfo", showEthInfo);
|
addConsoleAction("ethinfo", showEthInfo);
|
||||||
if (!hasPedalPositionSensor()) {
|
if (!hasPedalPositionSensor()) {
|
||||||
|
|
|
@ -10,7 +10,8 @@
|
||||||
|
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
void initElectronicThrottle(void);
|
void initElectronicThrottle(void);
|
||||||
void setDefaultEtbParameters(void);
|
void setDefaultEtbBiasCurve(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
|
void setDefaultEtbParameters(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
void setEtbPFactor(float value);
|
void setEtbPFactor(float value);
|
||||||
void setEtbIFactor(float value);
|
void setEtbIFactor(float value);
|
||||||
void setEtbDFactor(float value);
|
void setEtbDFactor(float value);
|
||||||
|
|
|
@ -736,5 +736,5 @@ int getRusEfiVersion(void) {
|
||||||
if (initBootloader() != 0)
|
if (initBootloader() != 0)
|
||||||
return 123;
|
return 123;
|
||||||
#endif /* EFI_BOOTLOADER_INCLUDE_CODE */
|
#endif /* EFI_BOOTLOADER_INCLUDE_CODE */
|
||||||
return 20181208;
|
return 20181209;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
rem st-link_cli -c SWD ur -ME
|
rem st-link_cli -c SWD ur -ME
|
||||||
rem 0x100000 would erase both code and configuration
|
rem 0x100000 would erase both code and configuration
|
||||||
rem use 0x080000 if you want to erase only configuratio
|
rem use 0x080000 if you want to erase only configuratio
|
||||||
echo I am flash_erase_new_board.bat
|
echo I am flash_erase.bat
|
||||||
|
|
||||||
rem weird, it used to be much nicer with openocd 0.8.0, file location was not broken?
|
rem weird, it used to be much nicer with openocd 0.8.0, file location was not broken?
|
||||||
rem maybe https://sourceforge.net/p/openocd/tickets/105/ ?
|
rem maybe https://sourceforge.net/p/openocd/tickets/105/ ?
|
||||||
|
@ -16,7 +16,7 @@ if not exist openocd/openocd.exe exit -1
|
||||||
|
|
||||||
rem newer discovery boards
|
rem newer discovery boards
|
||||||
echo Invoking openocd...
|
echo Invoking openocd...
|
||||||
openocd\openocd.exe -f openocd/stm32f429disc1.cfg -c init -c targets -c "halt" -c "flash erase_address 0x08000000 0x0100000" -c shutdown
|
openocd\openocd.exe -f openocd/stm32f4discovery.cfg -c init -c targets -c "halt" -c "flash erase_address 0x08000000 0x0100000" -c shutdown
|
||||||
echo Just invoked openocd!
|
echo Just invoked openocd!
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -928,7 +928,7 @@ tChargeMode_e tChargeMode;
|
||||||
|
|
||||||
|
|
||||||
uint8_t[ETB_BIAS_CURVE_LENGTH] etbBiasBins;target TPS value, 0 to 100%;"target TPS position", 1, 0.0, 0, 100.0, 0
|
uint8_t[ETB_BIAS_CURVE_LENGTH] etbBiasBins;target TPS value, 0 to 100%;"target TPS position", 1, 0.0, 0, 100.0, 0
|
||||||
float[ETB_BIAS_CURVE_LENGTH] etbBiasValues;PWM bias, 0 to 100%;"ETB duty cycle bias", 1, 0.0, 0, 100.0, 2
|
float[ETB_BIAS_CURVE_LENGTH] etbBiasValues;PWM bias, 0 to 100%;"ETB duty cycle bias", 1, 0.0, -100, 100.0, 2
|
||||||
|
|
||||||
int[581] unusedEnd;
|
int[581] unusedEnd;
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// This file was generated by Version2Header
|
// This file was generated by Version2Header
|
||||||
// Wed Nov 21 21:00:21 EST 2018
|
// Sun Dec 09 13:33:16 EST 2018
|
||||||
#ifndef VCS_VERSION
|
#ifndef VCS_VERSION
|
||||||
#define VCS_VERSION "15987"
|
#define VCS_VERSION "16057"
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -63,7 +63,7 @@ enable2ndByteCanID = false
|
||||||
|
|
||||||
; see PAGE_0_SIZE in C source code
|
; see PAGE_0_SIZE in C source code
|
||||||
; CONFIG_DEFINITION_START
|
; CONFIG_DEFINITION_START
|
||||||
; this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Sun Dec 09 10:18:27 EST 2018
|
; this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Sun Dec 09 13:49:35 EST 2018
|
||||||
|
|
||||||
pageSize = 20000
|
pageSize = 20000
|
||||||
page = 1
|
page = 1
|
||||||
|
@ -795,8 +795,8 @@ page = 1
|
||||||
tChargeAirIncrLimit = scalar, F32, 4104, "tChange Increment Limit, deg/sec", 1, 0, 0.0, 100.0, 1
|
tChargeAirIncrLimit = scalar, F32, 4104, "tChange Increment Limit, deg/sec", 1, 0, 0.0, 100.0, 1
|
||||||
tChargeAirDecrLimit = scalar, F32, 4108, "tChange Decrement Limit, deg/sec", 1, 0, 0.0, 100.0, 1
|
tChargeAirDecrLimit = scalar, F32, 4108, "tChange Decrement Limit, deg/sec", 1, 0, 0.0, 100.0, 1
|
||||||
tChargeMode = bits, U32, 4112, [0:0], "RPM+TPS (Default)", "Air Mass Interpolation"
|
tChargeMode = bits, U32, 4112, [0:0], "RPM+TPS (Default)", "Air Mass Interpolation"
|
||||||
etbBiasBins = array, U8, 4116, [8], "target TPS position", 1, 0.0, 0, 100.0, 0
|
etbBiasBins = array, U08, 4116, [8], "target TPS position", 1, 0.0, 0, 100.0, 0
|
||||||
etbBiasValues = array, F32, 4124, [8], "ETB duty cycle bias", 1, 0.0, 0, 100.0, 2
|
etbBiasValues = array, F32, 4124, [8], "ETB duty cycle bias", 1, 0.0, -100, 100.0, 2
|
||||||
;no TS info - skipping unusedEnd offset 4156
|
;no TS info - skipping unusedEnd offset 4156
|
||||||
cltCrankingCorrBins = array, F32, 6480, [8], "C", 1, 0, -100.0, 250.0, 2
|
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
|
cltCrankingCorr = array, F32, 6512, [8], "%", 1, 0, 0.0, 500.0, 2
|
||||||
|
@ -1281,6 +1281,14 @@ fileVersion = { 20171101 }
|
||||||
yBins = crankingFuelCoef
|
yBins = crankingFuelCoef
|
||||||
gauge = CLTGauge
|
gauge = CLTGauge
|
||||||
|
|
||||||
|
curve = etbTpsBiasCurve, "Electronic TB Bias Curve"
|
||||||
|
columnLabel = "TPS", "duty bias"
|
||||||
|
xAxis = 0, 100, 10
|
||||||
|
yAxis = 0, 100, 10
|
||||||
|
xBins = etbBiasBins, TPSValue
|
||||||
|
yBins = etbBiasValues
|
||||||
|
gauge = TPSGauge
|
||||||
|
|
||||||
curve = crankingTpsCurve, "Cranking TPS Multiplier"
|
curve = crankingTpsCurve, "Cranking TPS Multiplier"
|
||||||
columnLabel = "TPS", "Multiplier"
|
columnLabel = "TPS", "Multiplier"
|
||||||
xAxis = 0, 100, 10
|
xAxis = 0, 100, 10
|
||||||
|
@ -1849,7 +1857,8 @@ menuDialog = main
|
||||||
subMenu = std_separator
|
subMenu = std_separator
|
||||||
subMenu = fanSetting, "Fan Settings"
|
subMenu = fanSetting, "Fan Settings"
|
||||||
subMenu = malfunction, "MIL Settings"
|
subMenu = malfunction, "MIL Settings"
|
||||||
subMenu = etbDialog, "Electronic Thtottle Body (alpha version)"
|
subMenu = etbDialog, "Electronic Thtottle Body (beta version)"
|
||||||
|
subMenu = etbTpsBiasCurve, "Electronic Thtottle Body Bias Curve"
|
||||||
subMenu = std_separator
|
subMenu = std_separator
|
||||||
subMenu = std_realtime, "&Realtime Display", 0
|
subMenu = std_realtime, "&Realtime Display", 0
|
||||||
|
|
||||||
|
@ -3004,7 +3013,7 @@ cmd_stop_engine = "w\x00\x99\x00\x00"
|
||||||
topicHelp = "veTableDialogHelp"
|
topicHelp = "veTableDialogHelp"
|
||||||
panel = veTableMap, South
|
panel = veTableMap, South
|
||||||
|
|
||||||
dialog = etbDialog, "Electronic Thtottle Body (alpha)"
|
dialog = etbDialog, "Electronic Thtottle Body (beta)"
|
||||||
field = "verbose", isVerboseETB
|
field = "verbose", isVerboseETB
|
||||||
field = "Throttle Pedal Up", throttlePedalUpVoltage
|
field = "Throttle Pedal Up", throttlePedalUpVoltage
|
||||||
field = "Throttle Pedal Wide Open", throttlePedalWOTVoltage
|
field = "Throttle Pedal Wide Open", throttlePedalWOTVoltage
|
||||||
|
|
|
@ -430,6 +430,14 @@ fileVersion = { 20171101 }
|
||||||
yBins = crankingFuelCoef
|
yBins = crankingFuelCoef
|
||||||
gauge = CLTGauge
|
gauge = CLTGauge
|
||||||
|
|
||||||
|
curve = etbTpsBiasCurve, "Electronic TB Bias Curve"
|
||||||
|
columnLabel = "TPS", "duty bias"
|
||||||
|
xAxis = 0, 100, 10
|
||||||
|
yAxis = 0, 100, 10
|
||||||
|
xBins = etbBiasBins, TPSValue
|
||||||
|
yBins = etbBiasValues
|
||||||
|
gauge = TPSGauge
|
||||||
|
|
||||||
curve = crankingTpsCurve, "Cranking TPS Multiplier"
|
curve = crankingTpsCurve, "Cranking TPS Multiplier"
|
||||||
columnLabel = "TPS", "Multiplier"
|
columnLabel = "TPS", "Multiplier"
|
||||||
xAxis = 0, 100, 10
|
xAxis = 0, 100, 10
|
||||||
|
@ -998,7 +1006,8 @@ menuDialog = main
|
||||||
subMenu = std_separator
|
subMenu = std_separator
|
||||||
subMenu = fanSetting, "Fan Settings"
|
subMenu = fanSetting, "Fan Settings"
|
||||||
subMenu = malfunction, "MIL Settings"
|
subMenu = malfunction, "MIL Settings"
|
||||||
subMenu = etbDialog, "Electronic Thtottle Body (alpha version)"
|
subMenu = etbDialog, "Electronic Thtottle Body (beta version)"
|
||||||
|
subMenu = etbTpsBiasCurve, "Electronic Thtottle Body Bias Curve"
|
||||||
subMenu = std_separator
|
subMenu = std_separator
|
||||||
subMenu = std_realtime, "&Realtime Display", 0
|
subMenu = std_realtime, "&Realtime Display", 0
|
||||||
|
|
||||||
|
@ -2153,7 +2162,7 @@ cmd_stop_engine = "w\x00\x99\x00\x00"
|
||||||
topicHelp = "veTableDialogHelp"
|
topicHelp = "veTableDialogHelp"
|
||||||
panel = veTableMap, South
|
panel = veTableMap, South
|
||||||
|
|
||||||
dialog = etbDialog, "Electronic Thtottle Body (alpha)"
|
dialog = etbDialog, "Electronic Thtottle Body (beta)"
|
||||||
field = "verbose", isVerboseETB
|
field = "verbose", isVerboseETB
|
||||||
field = "Throttle Pedal Up", throttlePedalUpVoltage
|
field = "Throttle Pedal Up", throttlePedalUpVoltage
|
||||||
field = "Throttle Pedal Wide Open", throttlePedalWOTVoltage
|
field = "Throttle Pedal Wide Open", throttlePedalWOTVoltage
|
||||||
|
|
Binary file not shown.
|
@ -36,7 +36,7 @@ public class TypesHelper {
|
||||||
if (UINT_16_T.equals(type))
|
if (UINT_16_T.equals(type))
|
||||||
return "U16";
|
return "U16";
|
||||||
if (UINT8_T.equals(type))
|
if (UINT8_T.equals(type))
|
||||||
return "U8";
|
return "U08";
|
||||||
System.out.println("No TS type convesion for " + type);
|
System.out.println("No TS type convesion for " + type);
|
||||||
return type;
|
return type;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue