Make ETB low limit configurable fix #4119
This commit is contained in:
parent
b700a48bdd
commit
0ed0702536
|
@ -330,6 +330,12 @@ expected<percent_t> EtbController::getSetpointEtb() {
|
||||||
targetPosition = interpolateClamped(etbRpmLimit, targetPosition, fullyLimitedRpm, 0, rpm);
|
targetPosition = interpolateClamped(etbRpmLimit, targetPosition, fullyLimitedRpm, 0, rpm);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
float minPosition = engineConfiguration->etbMinimumPosition;
|
||||||
|
if (minPosition < 0.01) {
|
||||||
|
// compatibility with legacy tunes, todo: remove in Nov of 2022
|
||||||
|
minPosition = 1;
|
||||||
|
}
|
||||||
|
|
||||||
// Keep the throttle just barely off the lower stop, and less than the user-configured maximum
|
// Keep the throttle just barely off the lower stop, and less than the user-configured maximum
|
||||||
float maxPosition = engineConfiguration->etbMaximumPosition;
|
float maxPosition = engineConfiguration->etbMaximumPosition;
|
||||||
|
|
||||||
|
@ -341,7 +347,7 @@ expected<percent_t> EtbController::getSetpointEtb() {
|
||||||
maxPosition = minF(maxPosition, 100);
|
maxPosition = minF(maxPosition, 100);
|
||||||
}
|
}
|
||||||
|
|
||||||
targetPosition = clampF(1, targetPosition, maxPosition);
|
targetPosition = clampF(minPosition, targetPosition, maxPosition);
|
||||||
|
|
||||||
#if EFI_TUNER_STUDIO
|
#if EFI_TUNER_STUDIO
|
||||||
if (m_function == ETB_Throttle1) {
|
if (m_function == ETB_Throttle1) {
|
||||||
|
|
|
@ -66,6 +66,8 @@ void setDefaultBaseEngine() {
|
||||||
engineConfiguration->tachPulseDuractionMs = 0.5;
|
engineConfiguration->tachPulseDuractionMs = 0.5;
|
||||||
engineConfiguration->tachPulsePerRev = 1;
|
engineConfiguration->tachPulsePerRev = 1;
|
||||||
|
|
||||||
|
engineConfiguration->etbMinimumPosition = 1;
|
||||||
|
engineConfiguration->etbMaximumPosition = 100;
|
||||||
|
|
||||||
engineConfiguration->tcuInputSpeedSensorTeeth = 1;
|
engineConfiguration->tcuInputSpeedSensorTeeth = 1;
|
||||||
engineConfiguration->issFilterReciprocal = 2;
|
engineConfiguration->issFilterReciprocal = 2;
|
||||||
|
|
|
@ -108,12 +108,6 @@ struct_no_prefix engine_configuration_s
|
||||||
! see 'blockingFactor' in rusefi.ini
|
! see 'blockingFactor' in rusefi.ini
|
||||||
#define BLOCKING_FACTOR 256
|
#define BLOCKING_FACTOR 256
|
||||||
|
|
||||||
! Back in the day we wanted enums to be 32 bit integers.
|
|
||||||
! as of 2020 preference is with ' __attribute__ ((__packed__))' allowing one-byte enums
|
|
||||||
! todo: Technical debt: ENUM_32_BITS #3874
|
|
||||||
#define ENUM_16_BITS 60000
|
|
||||||
#define ENUM_32_BITS 2000000000
|
|
||||||
|
|
||||||
#define AUX_ANALOG_INPUT_COUNT 8
|
#define AUX_ANALOG_INPUT_COUNT 8
|
||||||
|
|
||||||
#define LUA_PWM_COUNT 8
|
#define LUA_PWM_COUNT 8
|
||||||
|
|
Loading…
Reference in New Issue