88 if (mult != 0 && (mult < 0.01 || mult > 100)) {
117 static const floatms_t smallEpsilon = 0.001f;
129 int len = minI(
cb.getSize(),
cb.getCount());
133 int ci =
cb.currentIndex - 1;
134 float maxValue =
cb.get(ci) -
cb.get(ci - 1);
135 int resultIndex = ci;
140 for (
int i = 1; i<len - 1;i++) {
141 float v =
cb.get(ci - i) -
cb.get(ci - i - 1);
144 resultIndex = ci - i;
154 return (
cb.get(index) - (
cb.get(index - 1)));
176 cb.add(currentValue);
222 efiPrintf(
"setTpsAccelLen: Length should be positive [%d]", length);
230 constexpr
float slowCallbackPeriodSecond = SLOW_CALLBACK_PERIOD_MS / 1000.0f;
void setTpsDecelThr(float value)
void setTpsDecelMult(float value)
void setTpsAccelThr(float value)
void setTpsAccelLen(int length)
void initAccelEnrichment()
static tps_tps_Map3D_t tpsTpsMap
void updateAccelParameters()
Acceleration enrichment calculator.
TunerStudioOutputChannels outputChannels
TpsAccelEnrichment tpsAccelEnrichment
float getValue(float xColumn, float yRow) const final
void initTable(TValueInit(&table)[TRowNum][TColNum], const TXColumnInit(&columnBins)[TColNum], const TRowInit(&rowBins)[TRowNum])
static float getOrZero(SensorType type)
int onUpdateInvocationCounter
void resetFractionValues()
cyclic_buffer< float > cb
void onNewValue(float currentValue)
void setLength(int length)
floatms_t getTpsEnrichment()
void addConsoleAction(const char *token, Void callback)
Register console action without parameters.
persistent_config_s * config
engine_configuration_s * engineConfiguration
float tpsDecelEnleanmentThreshold
float tpsAccelFractionDivisor
float tpsAccelEnrichmentThreshold
scaled_channel< uint8_t, 20, 1 > tpsAccelLookback
int16_t tpsAccelFractionPeriod
float tpsDecelEnleanmentMultiplier
float tpsTpsAccelTable[TPS_TPS_ACCEL_TABLE][TPS_TPS_ACCEL_TABLE]
scaled_channel< uint8_t, 1, 50 > tpsTspCorrValuesBins[TPS_TPS_ACCEL_CLT_CORR_TABLE]
float tpsTpsAccelFromRpmBins[TPS_TPS_ACCEL_TABLE]
scaled_channel< uint8_t, 50, 1 > tpsTspCorrValues[TPS_TPS_ACCEL_CLT_CORR_TABLE]
float tpsTpsAccelToRpmBins[TPS_TPS_ACCEL_TABLE]
floatms_t maxInjectedPerPeriod
bool isAboveAccelThreshold
bool isBelowDecelThreshold
floatms_t maxExtraPerPeriod
bool isTimeToResetAccumulator
floatms_t accumulatedValue
bool isFractionalEnrichment
floatms_t maxExtraPerCycle