Whatever we call it, no matter how we do it - we need live data / remote view into rusEFI actual state #3353
dead code
This commit is contained in:
parent
0dcb899348
commit
1f1c538fc0
|
@ -564,47 +564,6 @@ void EtbController::update() {
|
|||
&& m_function == ETB_Throttle1;
|
||||
|
||||
ClosedLoopController::update();
|
||||
|
||||
DISPLAY_STATE(Engine)
|
||||
DISPLAY(DISPLAY_IF(1))
|
||||
DISPLAY_TEXT(Electronic_Throttle);
|
||||
DISPLAY_SENSOR(TPS)
|
||||
DISPLAY_TEXT(eol);
|
||||
|
||||
DISPLAY_TEXT(Pedal);
|
||||
DISPLAY_SENSOR(PPS);
|
||||
DISPLAY(DISPLAY_CONFIG(throttlePedalPositionAdcChannel));
|
||||
DISPLAY_TEXT(eol);
|
||||
|
||||
DISPLAY_TEXT(Feed_forward);
|
||||
DISPLAY(DISPLAY_FIELD(etbFeedForward));
|
||||
DISPLAY_TEXT(eol);
|
||||
|
||||
DISPLAY_STATE(ETB_pid)
|
||||
DISPLAY_TEXT(input);
|
||||
DISPLAY(DISPLAY_FIELD(input));
|
||||
DISPLAY_TEXT(Output);
|
||||
DISPLAY(DISPLAY_FIELD(output));
|
||||
DISPLAY_TEXT(iTerm);
|
||||
DISPLAY(DISPLAY_FIELD(iTerm));
|
||||
DISPLAY_TEXT(eol);
|
||||
DISPLAY(DISPLAY_FIELD(errorAmplificationCoef));
|
||||
DISPLAY(DISPLAY_FIELD(previousError));
|
||||
DISPLAY_TEXT(eol);
|
||||
|
||||
DISPLAY_TEXT(Settings);
|
||||
DISPLAY(DISPLAY_CONFIG(ETB_PFACTOR));
|
||||
DISPLAY(DISPLAY_CONFIG(ETB_IFACTOR));
|
||||
DISPLAY(DISPLAY_CONFIG(ETB_DFACTOR));
|
||||
DISPLAY_TEXT(eol);
|
||||
DISPLAY(DISPLAY_CONFIG(ETB_OFFSET));
|
||||
DISPLAY(DISPLAY_CONFIG(ETB_PERIODMS));
|
||||
DISPLAY_TEXT(eol);
|
||||
DISPLAY(DISPLAY_CONFIG(ETB_MINVALUE));
|
||||
DISPLAY(DISPLAY_CONFIG(ETB_MAXVALUE));
|
||||
/* DISPLAY_ELSE */
|
||||
DISPLAY_TEXT(No_Pedal_Sensor);
|
||||
/* DISPLAY_ENDIF */
|
||||
}
|
||||
|
||||
void EtbController::autoCalibrateTps() {
|
||||
|
|
|
@ -598,46 +598,9 @@ void startIdleThread(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
|||
initIdleHardware(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||
#endif /* EFI_UNIT_TEST */
|
||||
|
||||
DISPLAY_STATE(Engine)
|
||||
DISPLAY_TEXT(Idle_State);
|
||||
engine->engineState.idle.DISPLAY_FIELD(idleState) = INIT;
|
||||
DISPLAY_TEXT(EOL);
|
||||
DISPLAY_TEXT(Base_Position);
|
||||
engine->engineState.idle.DISPLAY_FIELD(baseIdlePosition) = -100.0f;
|
||||
DISPLAY_TEXT(Position_with_Adjustments);
|
||||
engine->engineState.idle.DISPLAY_FIELD(currentIdlePosition) = -100.0f;
|
||||
DISPLAY_TEXT(EOL);
|
||||
DISPLAY_TEXT(EOL);
|
||||
DISPLAY_SENSOR(TPS);
|
||||
DISPLAY_TEXT(EOL);
|
||||
DISPLAY_TEXT(Throttle_Up_State);
|
||||
DISPLAY(DISPLAY_FIELD(throttlePedalUpState));
|
||||
DISPLAY(DISPLAY_CONFIG(throttlePedalUpPin));
|
||||
|
||||
DISPLAY_TEXT(eol);
|
||||
DISPLAY(DISPLAY_IF(isAutomaticIdle))
|
||||
|
||||
DISPLAY_STATE(idle_pid)
|
||||
DISPLAY_TEXT(Output);
|
||||
DISPLAY(DISPLAY_FIELD(output));
|
||||
DISPLAY_TEXT(iTerm);
|
||||
DISPLAY(DISPLAY_FIELD(iTerm));
|
||||
DISPLAY_TEXT(eol);
|
||||
|
||||
DISPLAY_TEXT(Settings);
|
||||
DISPLAY(DISPLAY_CONFIG(IDLERPMPID_PFACTOR));
|
||||
DISPLAY(DISPLAY_CONFIG(IDLERPMPID_IFACTOR));
|
||||
DISPLAY(DISPLAY_CONFIG(IDLERPMPID_DFACTOR));
|
||||
DISPLAY(DISPLAY_CONFIG(IDLERPMPID_OFFSET));
|
||||
|
||||
|
||||
DISPLAY_TEXT(eol);
|
||||
DISPLAY_TEXT(ETB_Idle);
|
||||
DISPLAY_STATE(Engine)
|
||||
DISPLAY(DISPLAY_FIELD(etbIdleAddition));
|
||||
/* DISPLAY_ELSE */
|
||||
DISPLAY_TEXT(Manual_idle_control);
|
||||
/* DISPLAY_ENDIF */
|
||||
engine->engineState.idle.idleState = INIT;
|
||||
engine->engineState.idle.baseIdlePosition = -100.0f;
|
||||
engine->engineState.idle.currentIdlePosition = -100.0f;
|
||||
|
||||
#if ! EFI_UNIT_TEST
|
||||
|
||||
|
|
|
@ -80,8 +80,7 @@ floatms_t WallFuel::adjust(floatms_t desiredFuel DECLARE_ENGINE_PARAMETER_SUFFIX
|
|||
|
||||
// if tau is really small, we get div/0.
|
||||
// you probably meant to disable wwae.
|
||||
DISPLAY_STATE(wall_fuel)
|
||||
float tau = CONFIG(DISPLAY_CONFIG(wwaeTau));
|
||||
float tau = CONFIG(wwaeTau);
|
||||
if (tau < 0.01f) {
|
||||
return desiredFuel;
|
||||
}
|
||||
|
@ -93,7 +92,7 @@ floatms_t WallFuel::adjust(floatms_t desiredFuel DECLARE_ENGINE_PARAMETER_SUFFIX
|
|||
}
|
||||
|
||||
float alpha = expf_taylor(-120 / (rpm * tau));
|
||||
float beta = CONFIG(DISPLAY_CONFIG(wwaeBeta));
|
||||
float beta = CONFIG(wwaeBeta);
|
||||
|
||||
#if EFI_TUNER_STUDIO
|
||||
if (engineConfiguration->debugMode == DBG_KNOCK) {
|
||||
|
@ -136,11 +135,8 @@ floatms_t WallFuel::adjust(floatms_t desiredFuel DECLARE_ENGINE_PARAMETER_SUFFIX
|
|||
}
|
||||
#endif // EFI_TUNER_STUDIO
|
||||
|
||||
DISPLAY_TEXT(Current_Wall_Fuel_Film);
|
||||
DISPLAY_FIELD(wallFuel) = fuelFilmMassNext;
|
||||
DISPLAY_TEXT(Fuel correction);
|
||||
DISPLAY_FIELD(wallFuelCorrection) = M_cmd - desiredFuel;
|
||||
DISPLAY_TEXT(ms);
|
||||
wallFuel = fuelFilmMassNext;
|
||||
wallFuelCorrection = M_cmd - desiredFuel;
|
||||
return M_cmd;
|
||||
}
|
||||
|
||||
|
|
|
@ -42,14 +42,7 @@ static mapEstimate_Map3D_t mapEstimationTable;
|
|||
|
||||
#if EFI_ENGINE_CONTROL
|
||||
|
||||
DISPLAY_STATE(Engine)
|
||||
|
||||
DISPLAY(DISPLAY_FIELD(sparkDwell))
|
||||
DISPLAY(DISPLAY_FIELD(dwellAngle))
|
||||
DISPLAY(DISPLAY_FIELD(cltTimingCorrection))
|
||||
DISPLAY_TEXT(eol);
|
||||
|
||||
DISPLAY(DISPLAY_IF(isCrankingState)) float getCrankingFuel3(
|
||||
float getCrankingFuel3(
|
||||
float baseFuel,
|
||||
uint32_t revolutionCounterSinceStart DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
||||
// these magic constants are in Celsius
|
||||
|
@ -63,44 +56,35 @@ DISPLAY(DISPLAY_IF(isCrankingState)) float getCrankingFuel3(
|
|||
/**
|
||||
* Cranking fuel changes over time
|
||||
*/
|
||||
DISPLAY_TEXT(Duration_coef);
|
||||
engine->engineState.DISPLAY_PREFIX(cranking).DISPLAY_FIELD(durationCoefficient) = interpolate2d(revolutionCounterSinceStart, config->crankingCycleBins,
|
||||
engine->engineState.cranking.durationCoefficient = interpolate2d(revolutionCounterSinceStart, config->crankingCycleBins,
|
||||
config->crankingCycleCoef);
|
||||
DISPLAY_TEXT(eol);
|
||||
|
||||
/**
|
||||
* Cranking fuel is different depending on engine coolant temperature
|
||||
* If the sensor is failed, use 20 deg C
|
||||
*/
|
||||
auto clt = Sensor::get(SensorType::Clt);
|
||||
DISPLAY_TEXT(Coolant_coef);
|
||||
engine->engineState.DISPLAY_PREFIX(cranking).DISPLAY_FIELD(coolantTemperatureCoefficient) =
|
||||
engine->engineState.cranking.coolantTemperatureCoefficient =
|
||||
interpolate2d(clt.value_or(20), config->crankingFuelBins, config->crankingFuelCoef);
|
||||
DISPLAY_SENSOR(CLT);
|
||||
DISPLAY_TEXT(eol);
|
||||
|
||||
auto tps = Sensor::get(SensorType::DriverThrottleIntent);
|
||||
|
||||
DISPLAY_TEXT(TPS_coef);
|
||||
engine->engineState.DISPLAY_PREFIX(cranking).DISPLAY_FIELD(tpsCoefficient) = tps.Valid ? 1 : interpolate2d(tps.Value, engineConfiguration->crankingTpsBins,
|
||||
engine->engineState.cranking.tpsCoefficient = tps.Valid ? 1 : interpolate2d(tps.Value, engineConfiguration->crankingTpsBins,
|
||||
engineConfiguration->crankingTpsCoef);
|
||||
|
||||
|
||||
/*
|
||||
engine->engineState.DISPLAY_PREFIX(cranking).DISPLAY_FIELD(tpsCoefficient) =
|
||||
engine->engineState.cranking.tpsCoefficient =
|
||||
tps.Valid
|
||||
? interpolate2d(tps.Value, engineConfiguration->crankingTpsBins, engineConfiguration->crankingTpsCoef)
|
||||
: 1; // in case of failed TPS, don't correct.*/
|
||||
DISPLAY_SENSOR(TPS);
|
||||
DISPLAY_TEXT(eol);
|
||||
|
||||
floatms_t crankingFuel = baseCrankingFuel
|
||||
* engine->engineState.cranking.durationCoefficient
|
||||
* engine->engineState.cranking.coolantTemperatureCoefficient
|
||||
* engine->engineState.cranking.tpsCoefficient;
|
||||
|
||||
DISPLAY_TEXT(Cranking_fuel);
|
||||
engine->engineState.DISPLAY_PREFIX(cranking).DISPLAY_FIELD(fuel) = crankingFuel * 1000;
|
||||
engine->engineState.cranking.fuel = crankingFuel * 1000;
|
||||
|
||||
if (crankingFuel <= 0) {
|
||||
warning(CUSTOM_ERR_ZERO_CRANKING_FUEL, "Cranking fuel value %f", crankingFuel);
|
||||
|
@ -108,29 +92,16 @@ DISPLAY(DISPLAY_IF(isCrankingState)) float getCrankingFuel3(
|
|||
return crankingFuel;
|
||||
}
|
||||
|
||||
/* DISPLAY_ELSE */
|
||||
|
||||
floatms_t getRunningFuel(floatms_t baseFuel DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
||||
ScopePerf perf(PE::GetRunningFuel);
|
||||
|
||||
DISPLAY_TEXT(Base_fuel);
|
||||
ENGINE(engineState.DISPLAY_PREFIX(running).DISPLAY_FIELD(baseFuel)) = baseFuel;
|
||||
DISPLAY_TEXT(eol);
|
||||
ENGINE(engineState.running.baseFuel) = baseFuel;
|
||||
|
||||
float iatCorrection = ENGINE(engineState.running.intakeTemperatureCoefficient);
|
||||
|
||||
DISPLAY_TEXT(Intake_coef);
|
||||
float iatCorrection = ENGINE(engineState.DISPLAY_PREFIX(running).DISPLAY_FIELD(intakeTemperatureCoefficient));
|
||||
DISPLAY_SENSOR(IAT);
|
||||
DISPLAY_TEXT(eol);
|
||||
float cltCorrection = ENGINE(engineState.running.coolantTemperatureCoefficient);
|
||||
|
||||
DISPLAY_TEXT(Coolant_coef);
|
||||
float cltCorrection = ENGINE(engineState.DISPLAY_PREFIX(running).DISPLAY_FIELD(coolantTemperatureCoefficient));
|
||||
DISPLAY_SENSOR(CLT);
|
||||
DISPLAY_TEXT(eol);
|
||||
|
||||
DISPLAY_TEXT(Post_cranking_coef);
|
||||
float postCrankingFuelCorrection = ENGINE(engineState.DISPLAY_PREFIX(running).DISPLAY_FIELD(postCrankingFuelCorrection));
|
||||
DISPLAY_TEXT(eol);
|
||||
float postCrankingFuelCorrection = ENGINE(engineState.running.postCrankingFuelCorrection);
|
||||
|
||||
float baroCorrection = ENGINE(engineState.baroCorrection);
|
||||
|
||||
|
@ -140,15 +111,9 @@ floatms_t getRunningFuel(floatms_t baseFuel DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
|||
|
||||
floatms_t runningFuel = baseFuel * baroCorrection * iatCorrection * cltCorrection * postCrankingFuelCorrection;
|
||||
efiAssert(CUSTOM_ERR_ASSERT, !cisnan(runningFuel), "NaN runningFuel", 0);
|
||||
DISPLAY_TEXT(eol);
|
||||
|
||||
DISPLAY_TEXT(Running_fuel);
|
||||
ENGINE(engineState.DISPLAY_PREFIX(running).DISPLAY_FIELD(fuel)) = runningFuel * 1000;
|
||||
DISPLAY_TEXT(eol);
|
||||
ENGINE(engineState.running.fuel) = runningFuel * 1000;
|
||||
|
||||
DISPLAY_TEXT(Injector_lag);
|
||||
DISPLAY(DISPLAY_PREFIX(running).DISPLAY_FIELD(injectorLag));
|
||||
DISPLAY_SENSOR(VBATT);
|
||||
return runningFuel;
|
||||
}
|
||||
|
||||
|
|
|
@ -48,9 +48,7 @@ temperature_t getTCharge(int rpm, float tps DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
|||
|
||||
float coolantTemp = clt.Value;
|
||||
|
||||
DISPLAY_STATE(Engine)
|
||||
|
||||
if ((engine->engineState.sd.DISPLAY_IF(isTChargeAirModel) = (CONFIG(tChargeMode) == TCHARGE_MODE_AIR_INTERP))) {
|
||||
if ((engine->engineState.sd.isTChargeAirModel = (CONFIG(tChargeMode) == TCHARGE_MODE_AIR_INTERP))) {
|
||||
const floatms_t gramsPerMsToKgPerHour = (3600.0f * 1000.0f) / 1000.0f;
|
||||
// We're actually using an 'old' airMass calculated for the previous cycle, but it's ok, we're not having any self-excitaton issues
|
||||
floatms_t airMassForEngine = engine->engineState.sd./***display*/airMassInOneCylinder * CONFIG(specs.cylindersCount);
|
||||
|
@ -58,32 +56,21 @@ temperature_t getTCharge(int rpm, float tps DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
|||
// And if the engine is stopped (0 rpm), then airFlow is also zero (avoiding NaN division)
|
||||
floatms_t airFlow = (rpm == 0) ? 0 : airMassForEngine * gramsPerMsToKgPerHour / getEngineCycleDuration(rpm PASS_ENGINE_PARAMETER_SUFFIX);
|
||||
// just interpolate between user-specified min and max coefs, based on the max airFlow value
|
||||
DISPLAY_TEXT(interpolate_Air_Flow)
|
||||
engine->engineState.DISPLAY_FIELD(airFlow) = airFlow;
|
||||
DISPLAY_TEXT(Between)
|
||||
engine->engineState.airFlow = airFlow;
|
||||
engine->engineState.sd.Tcharge_coff = interpolateClamped(0.0,
|
||||
CONFIG(DISPLAY_CONFIG(tChargeAirCoefMin)),
|
||||
CONFIG(DISPLAY_CONFIG(tChargeAirFlowMax)),
|
||||
CONFIG(DISPLAY_CONFIG(tChargeAirCoefMax)), airFlow);
|
||||
CONFIG(tChargeAirCoefMin),
|
||||
CONFIG(tChargeAirFlowMax),
|
||||
CONFIG(tChargeAirCoefMax), airFlow);
|
||||
// save it for console output (instead of MAF massAirFlow)
|
||||
} else/* DISPLAY_ELSE */ {
|
||||
// TCHARGE_MODE_RPM_TPS
|
||||
DISPLAY_TEXT(interpolate_3D)
|
||||
DISPLAY_SENSOR(RPM)
|
||||
DISPLAY_TEXT(and)
|
||||
DISPLAY_SENSOR(TPS)
|
||||
DISPLAY_TEXT(EOL)
|
||||
DISPLAY_TEXT(Between)
|
||||
} else {
|
||||
float minRpmKcurrentTPS = interpolateMsg("minRpm", tpMin,
|
||||
CONFIG(DISPLAY_CONFIG(tChargeMinRpmMinTps)), tpMax,
|
||||
CONFIG(DISPLAY_CONFIG(tChargeMinRpmMaxTps)), tps);
|
||||
DISPLAY_TEXT(EOL)
|
||||
CONFIG(tChargeMinRpmMinTps), tpMax,
|
||||
CONFIG(tChargeMinRpmMaxTps), tps);
|
||||
float maxRpmKcurrentTPS = interpolateMsg("maxRpm", tpMin,
|
||||
CONFIG(DISPLAY_CONFIG(tChargeMaxRpmMinTps)), tpMax,
|
||||
CONFIG(DISPLAY_CONFIG(tChargeMaxRpmMaxTps)), tps);
|
||||
CONFIG(tChargeMaxRpmMinTps), tpMax,
|
||||
CONFIG(tChargeMaxRpmMaxTps), tps);
|
||||
|
||||
engine->engineState.sd.Tcharge_coff = interpolateMsg("Kcurr", rpmMin, minRpmKcurrentTPS, rpmMax, maxRpmKcurrentTPS, rpm);
|
||||
/* DISPLAY_ENDIF */
|
||||
}
|
||||
|
||||
if (cisnan(engine->engineState.sd.Tcharge_coff)) {
|
||||
|
|
|
@ -527,32 +527,6 @@ void TriggerState::decodeTriggerEvent(
|
|||
bool isSynchronizationPoint;
|
||||
bool wasSynchronized = getShaftSynchronized();
|
||||
|
||||
DISPLAY_STATE(Trigger_State)
|
||||
DISPLAY_TEXT(Current_Gap);
|
||||
DISPLAY(DISPLAY_FIELD(currentGap));
|
||||
DISPLAY_TEXT(EOL);
|
||||
|
||||
DISPLAY_STATE(Trigger_Central)
|
||||
DISPLAY(DISPLAY_CONFIG(TRIGGERINPUTPINS1));
|
||||
DISPLAY_TEXT("Trigger 1: Fall");
|
||||
DISPLAY(DISPLAY_FIELD(HWEVENTCOUNTERS1));
|
||||
DISPLAY_TEXT(", Rise");
|
||||
DISPLAY(DISPLAY_FIELD(HWEVENTCOUNTERS2));
|
||||
DISPLAY_TEXT(EOL);
|
||||
|
||||
DISPLAY(DISPLAY_CONFIG(TRIGGERINPUTPINS2));
|
||||
DISPLAY_TEXT("Trigger 2: Fall");
|
||||
DISPLAY(DISPLAY_FIELD(HWEVENTCOUNTERS3));
|
||||
DISPLAY_TEXT(", Rise");
|
||||
DISPLAY(DISPLAY_FIELD(HWEVENTCOUNTERS4));
|
||||
DISPLAY_TEXT(EOL);
|
||||
|
||||
DISPLAY_TEXT(VVT_1);
|
||||
DISPLAY(DISPLAY_CONFIG(CAMINPUTS1));
|
||||
DISPLAY(DISPLAY_FIELD(vvtEventRiseCounter));
|
||||
DISPLAY(DISPLAY_FIELD(vvtEventFallCounter));
|
||||
DISPLAY(DISPLAY_FIELD(vvtCamCounter));
|
||||
|
||||
if (triggerShape.isSynchronizationNeeded) {
|
||||
currentGap = 1.0 * toothDurations[0] / toothDurations[1];
|
||||
|
||||
|
|
Loading…
Reference in New Issue