refactoring - extracting idle state

This commit is contained in:
rusefillc 2021-10-16 23:55:29 -04:00
parent 5f7ffd32a1
commit 4533ce4764
11 changed files with 130 additions and 286 deletions

View File

@ -547,7 +547,7 @@ void EtbController::update() {
#if EFI_TUNER_STUDIO
if (engineConfiguration->debugMode == DBG_ETB_LOGIC) {
tsOutputChannels.debugFloatField1 = engine->engineState.targetFromTable;
tsOutputChannels.debugFloatField2 = engine->engineState.idle.etbIdleAddition;
tsOutputChannels.debugFloatField2 = engine->idle.etbIdleAddition;
}
#endif

View File

@ -0,0 +1,37 @@
// this section was generated automatically by rusEFI tool ConfigDefinition.jar based on (unknown script) controllers/actuators/idle_state.txt Sat Oct 16 23:40:23 EDT 2021
// by class com.rusefi.output.CHeaderConsumer
// begin
#pragma once
#include "rusefi_types.h"
// start of idle_state_s
struct idle_state_s {
/**
* offset 0
*/
idle_state_e idleState = (idle_state_e)0;
/**
* that's current position with CLT and IAT corrections
* offset 4
*/
percent_t currentIdlePosition = (percent_t)0;
/**
* current position without adjustments (iacByTpsTaper, afterCrankingIACtaperDuration)
* offset 8
*/
percent_t baseIdlePosition = (percent_t)0;
/**
* true in IDLE throttle pedal state, false if driver is touching the pedal
* todo: better name for this field?
* offset 12
*/
int throttlePedalUpState = (int)0;
/**
* ETB position adjustment related to idle RPM control
* offset 16
*/
percent_t etbIdleAddition = (percent_t)0;
/** total size 20*/
};
// end
// this section was generated automatically by rusEFI tool ConfigDefinition.jar based on (unknown script) controllers/actuators/idle_state.txt Sat Oct 16 23:40:23 EDT 2021

View File

@ -40,7 +40,7 @@
#include "stepper.h"
#endif
// todo: move all static vars to engine->engineState.idle?
// todo: move all static vars to engine->idle?
static bool shouldResetPid = false;
// The idea of 'mightResetPid' is to reset PID only once - each time when TPS > idlePidDeactivationTpsThreshold.
@ -129,7 +129,7 @@ void setIdleMode(idle_mode_e value DECLARE_ENGINE_PARAMETER_SUFFIX) {
}
percent_t getIdlePosition() {
return engine->engineState.idle.currentIdlePosition;
return engine->idle.currentIdlePosition;
}
void setManualIdleValvePosition(int positionPercent) {
@ -340,7 +340,7 @@ float IdleController::getClosedLoop(IIdleController::Phase phase, float tpsPos,
shouldResetPid = true;
}
engine->engineState.idle.idleState = TPS_THRESHOLD;
engine->idle.idleState = TPS_THRESHOLD;
// We aren't idling, so don't apply any correction. A positive correction could inhibit a return to idle.
m_lastAutomaticPosition = 0;
@ -351,7 +351,7 @@ float IdleController::getClosedLoop(IIdleController::Phase phase, float tpsPos,
bool acToggleJustTouched = (nowUs - engine->acSwitchLastChangeTime) < MS2US(500);
// check if within the dead zone
if (!acToggleJustTouched && absI(rpm - targetRpm) <= CONFIG(idlePidRpmDeadZone)) {
engine->engineState.idle.idleState = RPM_DEAD_ZONE;
engine->idle.idleState = RPM_DEAD_ZONE;
// current RPM is close enough, no need to change anything
return m_lastAutomaticPosition;
}
@ -369,15 +369,15 @@ float IdleController::getClosedLoop(IIdleController::Phase phase, float tpsPos,
wasResetPid = false;
}
// increase the errorAmpCoef slowly to restore the process correctly after the PID reset
// todo: move restoreAfterPidResetTimeUs to engineState.idle?
efitimeus_t timeSincePidResetUs = nowUs - /*engine->engineState.idle.*/restoreAfterPidResetTimeUs;
// todo: move restoreAfterPidResetTimeUs to idle?
efitimeus_t timeSincePidResetUs = nowUs - /*engine->idle.*/restoreAfterPidResetTimeUs;
// todo: add 'pidAfterResetDampingPeriodMs' setting
errorAmpCoef = interpolateClamped(0, 0, MS2US(/*CONFIG(pidAfterResetDampingPeriodMs)*/1000), errorAmpCoef, timeSincePidResetUs);
// If errorAmpCoef > 1.0, then PID thinks that RPM is lower than it is, and controls IAC more aggressively
idlePid->setErrorAmplification(errorAmpCoef);
percent_t newValue = idlePid->getOutput(targetRpm, rpm, SLOW_CALLBACK_PERIOD_MS / 1000.0f);
engine->engineState.idle.idleState = PID_VALUE;
engine->idle.idleState = PID_VALUE;
// the state of PID has been changed, so we might reset it now, but only when needed (see idlePidDeactivationTpsThreshold)
mightResetPid = true;
@ -440,10 +440,10 @@ float IdleController::getClosedLoop(IIdleController::Phase phase, float tpsPos,
auto phase = determinePhase(rpm, targetRpm, tps, vehicleSpeed, crankingTaper);
m_lastPhase = phase;
engine->engineState.isAutomaticIdle = tps.Valid && engineConfiguration->idleMode == IM_AUTO;
bool isAutomaticIdle = tps.Valid && engineConfiguration->idleMode == IM_AUTO;
if (engineConfiguration->isVerboseIAC && engine->engineState.isAutomaticIdle) {
efiPrintf("Idle state %s", getIdle_state_e(engine->engineState.idle.idleState));
if (engineConfiguration->isVerboseIAC && isAutomaticIdle) {
efiPrintf("Idle state %s", getIdle_state_e(engine->idle.idleState));
getIdlePid(PASS_ENGINE_PARAMETER_SIGNATURE)->showPidStatus("idle");
}
@ -454,11 +454,11 @@ float IdleController::getClosedLoop(IIdleController::Phase phase, float tpsPos,
if (timeToStopBlip != 0) {
iacPosition = blipIdlePosition;
engine->engineState.idle.idleState = BLIP;
engine->idle.idleState = BLIP;
} else {
// Always apply closed loop correction
iacPosition = getOpenLoop(phase, clt, tps, crankingTaper);
engine->engineState.idle.baseIdlePosition = iacPosition;
engine->idle.baseIdlePosition = iacPosition;
// If TPS is working and automatic mode enabled, add any automatic correction
if (tps.Valid && engineConfiguration->idleMode == IM_AUTO) {
@ -476,7 +476,7 @@ float IdleController::getClosedLoop(IIdleController::Phase phase, float tpsPos,
if (engineConfiguration->idleMode == IM_AUTO) {
// see also tsOutputChannels->idlePosition
getIdlePid(PASS_ENGINE_PARAMETER_SIGNATURE)->postState(&tsOutputChannels, 1000000);
tsOutputChannels.debugIntField4 = engine->engineState.idle.idleState;
tsOutputChannels.debugIntField4 = engine->idle.idleState;
} else {
tsOutputChannels.debugFloatField1 = iacPosition;
extern StepperMotor iacMotor;
@ -485,7 +485,7 @@ float IdleController::getClosedLoop(IIdleController::Phase phase, float tpsPos,
}
#endif /* EFI_TUNER_STUDIO */
engine->engineState.idle.currentIdlePosition = iacPosition;
engine->idle.currentIdlePosition = iacPosition;
return iacPosition;
}
@ -598,9 +598,9 @@ void startIdleThread(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
initIdleHardware(PASS_ENGINE_PARAMETER_SIGNATURE);
#endif /* EFI_UNIT_TEST */
engine->engineState.idle.idleState = INIT;
engine->engineState.idle.baseIdlePosition = -100.0f;
engine->engineState.idle.currentIdlePosition = -100.0f;
engine->idle.idleState = INIT;
engine->idle.baseIdlePosition = -100.0f;
engine->idle.currentIdlePosition = -100.0f;
#if ! EFI_UNIT_TEST

View File

@ -323,7 +323,7 @@ void Engine::updateSwitchInputs(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
engine->clutchUpState = CONFIG(clutchUpPinInverted) ^ efiReadPin(CONFIG(clutchUpPin));
}
if (isBrainPinValid(CONFIG(throttlePedalUpPin))) {
engine->engineState.idle.throttlePedalUpState = efiReadPin(CONFIG(throttlePedalUpPin));
engine->idle.throttlePedalUpState = efiReadPin(CONFIG(throttlePedalUpPin));
}
if (isBrainPinValid(engineConfiguration->brakePedalPin)) {

View File

@ -21,6 +21,7 @@
#include "limp_manager.h"
#include "pin_repository.h"
#include "ac_control.h"
#include "idle_state_generated.h"
#if EFI_SIGNAL_EXECUTOR_ONE_TIMER
// PROD real firmware uses this implementation
@ -321,6 +322,8 @@ public:
*/
void onTriggerSignalEvent();
EngineState engineState;
idle_state_s idle;
SensorsState sensors;
efitick_t mainRelayBenchStartNt = 0;

View File

@ -92,8 +92,6 @@ EngineState::EngineState() {
}
void EngineState::updateSlowSensors(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
// this feeds rusEfi console Live Data
engine->engineState.isCrankingState = ENGINE(rpmCalculator).isCranking();
}
void EngineState::periodicFastCallback(DECLARE_ENGINE_PARAMETER_SIGNATURE) {

View File

@ -22,20 +22,6 @@ end_struct
speed_density_s sd;
struct_no_prefix idle_state_s
custom idle_state_e 4 bits, S32, @OFFSET@, [0:2], "not important"
idle_state_e idleState
custom percent_t 4 bits, F32, @OFFSET@, [0:2], "not important"
percent_t currentIdlePosition;that's current position with CLT and IAT corrections
percent_t baseIdlePosition;current position without adjustments (iacByTpsTaper, afterCrankingIACtaperDuration)
int throttlePedalUpState;true in IDLE throttle pedal state, false if driver is touching the pedal\ntodo: better name for this field?
percent_t etbIdleAddition;ETB position adjustment related to idle RPM control
! end of idle_state_s structure definition
end_struct
! actually define a member of 'idle_state_s' type
idle_state_s idle;
float targetAFR
@ -52,8 +38,6 @@ float tpsVoltageBoard
float injectorFlowCorrection;
float baroCorrection;
bit isCrankingState
bit isAutomaticIdle
struct cranking_fuel_s
@ -88,6 +72,8 @@ end_struct
! actually define a member of 'running_fuel_s' type
running_fuel_s running
custom percent_t 4 bits, F32, @OFFSET@, [0:2], "not important"
percent_t etbFeedForward;
percent_t targetFromTable

View File

@ -1,4 +1,4 @@
// this section was generated automatically by rusEFI tool ConfigDefinition.jar based on (unknown script) controllers/algo/engine_state.txt Sun Oct 17 01:53:35 UTC 2021
// this section was generated automatically by rusEFI tool ConfigDefinition.jar based on (unknown script) controllers/algo/engine_state.txt Sat Oct 16 23:39:25 EDT 2021
// by class com.rusefi.output.CHeaderConsumer
// begin
#pragma once
@ -127,36 +127,6 @@ struct speed_density_s {
/** total size 24*/
};
// start of idle_state_s
struct idle_state_s {
/**
* offset 0
*/
idle_state_e idleState = (idle_state_e)0;
/**
* that's current position with CLT and IAT corrections
* offset 4
*/
percent_t currentIdlePosition = (percent_t)0;
/**
* current position without adjustments (iacByTpsTaper, afterCrankingIACtaperDuration)
* offset 8
*/
percent_t baseIdlePosition = (percent_t)0;
/**
* true in IDLE throttle pedal state, false if driver is touching the pedal
* todo: better name for this field?
* offset 12
*/
int throttlePedalUpState = (int)0;
/**
* ETB position adjustment related to idle RPM control
* offset 16
*/
percent_t etbIdleAddition = (percent_t)0;
/** total size 20*/
};
// start of cranking_fuel_s
struct cranking_fuel_s {
/**
@ -235,174 +205,74 @@ struct engine_state2_s {
/**
* offset 24
*/
idle_state_s idle;
/**
* offset 44
*/
float targetAFR = (float)0;
/**
* offset 48
* offset 28
*/
float engineCycleDurationMs = (float)0;
/**
* offset 52
* offset 32
*/
float minRpmKcurrentTPS = (float)0;
/**
* offset 56
* offset 36
*/
int currentTpsAdc = (int)0;
/**
* offset 60
* offset 40
*/
float tpsVoltageMCU = (float)0;
/**
* offset 64
* offset 44
*/
float tpsVoltageBoard = (float)0;
/**
* offset 68
* offset 48
*/
float currentBaroCorrectedVE = (float)0;
/**
* offset 72
* offset 52
*/
float injectorFlowCorrection = (float)0;
/**
* offset 76
* offset 56
*/
float baroCorrection = (float)0;
/**
offset 80 bit 0 */
bool isCrankingState : 1;
/**
offset 80 bit 1 */
bool isAutomaticIdle : 1;
/**
offset 80 bit 2 */
bool unusedBit_13_2 : 1;
/**
offset 80 bit 3 */
bool unusedBit_13_3 : 1;
/**
offset 80 bit 4 */
bool unusedBit_13_4 : 1;
/**
offset 80 bit 5 */
bool unusedBit_13_5 : 1;
/**
offset 80 bit 6 */
bool unusedBit_13_6 : 1;
/**
offset 80 bit 7 */
bool unusedBit_13_7 : 1;
/**
offset 80 bit 8 */
bool unusedBit_13_8 : 1;
/**
offset 80 bit 9 */
bool unusedBit_13_9 : 1;
/**
offset 80 bit 10 */
bool unusedBit_13_10 : 1;
/**
offset 80 bit 11 */
bool unusedBit_13_11 : 1;
/**
offset 80 bit 12 */
bool unusedBit_13_12 : 1;
/**
offset 80 bit 13 */
bool unusedBit_13_13 : 1;
/**
offset 80 bit 14 */
bool unusedBit_13_14 : 1;
/**
offset 80 bit 15 */
bool unusedBit_13_15 : 1;
/**
offset 80 bit 16 */
bool unusedBit_13_16 : 1;
/**
offset 80 bit 17 */
bool unusedBit_13_17 : 1;
/**
offset 80 bit 18 */
bool unusedBit_13_18 : 1;
/**
offset 80 bit 19 */
bool unusedBit_13_19 : 1;
/**
offset 80 bit 20 */
bool unusedBit_13_20 : 1;
/**
offset 80 bit 21 */
bool unusedBit_13_21 : 1;
/**
offset 80 bit 22 */
bool unusedBit_13_22 : 1;
/**
offset 80 bit 23 */
bool unusedBit_13_23 : 1;
/**
offset 80 bit 24 */
bool unusedBit_13_24 : 1;
/**
offset 80 bit 25 */
bool unusedBit_13_25 : 1;
/**
offset 80 bit 26 */
bool unusedBit_13_26 : 1;
/**
offset 80 bit 27 */
bool unusedBit_13_27 : 1;
/**
offset 80 bit 28 */
bool unusedBit_13_28 : 1;
/**
offset 80 bit 29 */
bool unusedBit_13_29 : 1;
/**
offset 80 bit 30 */
bool unusedBit_13_30 : 1;
/**
offset 80 bit 31 */
bool unusedBit_13_31 : 1;
/**
* offset 84
* offset 60
*/
cranking_fuel_s cranking;
/**
* offset 104
* offset 80
*/
running_fuel_s running;
/**
* offset 132
* offset 108
*/
percent_t etbFeedForward = (percent_t)0;
/**
* offset 136
* offset 112
*/
percent_t targetFromTable = (percent_t)0;
/**
* ignition dwell duration in ms
* See also dwellAngle
* offset 140
* offset 116
*/
floatms_t sparkDwell = (floatms_t)0;
/**
* ignition dwell duration as crankshaft angle
* NAN if engine is stopped
* See also sparkDwell
* offset 144
* offset 120
*/
angle_t dwellAngle = (angle_t)0;
/**
* offset 148
* offset 124
*/
angle_t cltTimingCorrection = (angle_t)0;
/** total size 152*/
/** total size 128*/
};
// end
// this section was generated automatically by rusEFI tool ConfigDefinition.jar based on (unknown script) controllers/algo/engine_state.txt Sun Oct 17 01:53:35 UTC 2021
// this section was generated automatically by rusEFI tool ConfigDefinition.jar based on (unknown script) controllers/algo/engine_state.txt Sat Oct 16 23:39:25 EDT 2021

View File

@ -20,6 +20,9 @@ bash gen_live_documentation_one_file.sh trigger_state TriggerState.java controll
bash gen_live_documentation_one_file.sh wall_fuel_state WallFuelState.java controllers/algo
[ $? -eq 0 ] || { echo "ERROR generating"; exit 1; }
bash gen_live_documentation_one_file.sh idle_state IdleState.java controllers/actuators
[ $? -eq 0 ] || { echo "ERROR generating"; exit 1; }
java -DSystemOut.name=gen_live_documentation \
-cp ../java_tools/ConfigDefinition.jar \
com.rusefi.ldmp.UsagesReader integration/LiveData.yaml

View File

@ -1,6 +1,6 @@
package com.rusefi.config.generated;
// this file was generated automatically by rusEFI tool ConfigDefinition.jar based on (unknown script) controllers/algo/engine_state.txt Sun Oct 17 01:53:35 UTC 2021
// this file was generated automatically by rusEFI tool ConfigDefinition.jar based on (unknown script) controllers/algo/engine_state.txt Sat Oct 16 23:39:25 EDT 2021
// by class com.rusefi.output.FileJavaFieldsConsumer
import com.rusefi.config.*;
@ -43,69 +43,32 @@ public class EngineState {
public static final Field TCHARGEK = Field.create("TCHARGEK", 12, FieldType.FLOAT);
public static final Field TCHARGE_COFF = Field.create("TCHARGE_COFF", 16, FieldType.FLOAT);
public static final Field AIRFLOW = Field.create("AIRFLOW", 20, FieldType.FLOAT);
public static final Field IDLESTATE = Field.create("IDLESTATE", 24, FieldType.INT);
public static final Field CURRENTIDLEPOSITION = Field.create("CURRENTIDLEPOSITION", 28, FieldType.FLOAT);
public static final Field BASEIDLEPOSITION = Field.create("BASEIDLEPOSITION", 32, FieldType.FLOAT);
public static final Field THROTTLEPEDALUPSTATE = Field.create("THROTTLEPEDALUPSTATE", 36, FieldType.INT);
public static final Field ETBIDLEADDITION = Field.create("ETBIDLEADDITION", 40, FieldType.FLOAT);
public static final Field TARGETAFR = Field.create("TARGETAFR", 44, FieldType.FLOAT);
public static final Field ENGINECYCLEDURATIONMS = Field.create("ENGINECYCLEDURATIONMS", 48, FieldType.FLOAT);
public static final Field MINRPMKCURRENTTPS = Field.create("MINRPMKCURRENTTPS", 52, FieldType.FLOAT);
public static final Field CURRENTTPSADC = Field.create("CURRENTTPSADC", 56, FieldType.INT);
public static final Field TPSVOLTAGEMCU = Field.create("TPSVOLTAGEMCU", 60, FieldType.FLOAT);
public static final Field TPSVOLTAGEBOARD = Field.create("TPSVOLTAGEBOARD", 64, FieldType.FLOAT);
public static final Field CURRENTBAROCORRECTEDVE = Field.create("CURRENTBAROCORRECTEDVE", 68, FieldType.FLOAT);
public static final Field INJECTORFLOWCORRECTION = Field.create("INJECTORFLOWCORRECTION", 72, FieldType.FLOAT);
public static final Field BAROCORRECTION = Field.create("BAROCORRECTION", 76, FieldType.FLOAT);
public static final Field ISCRANKINGSTATE = Field.create("ISCRANKINGSTATE", 80, FieldType.BIT, 0);
public static final Field ISAUTOMATICIDLE = Field.create("ISAUTOMATICIDLE", 80, FieldType.BIT, 1);
public static final Field UNUSEDBIT_13_2 = Field.create("UNUSEDBIT_13_2", 80, FieldType.BIT, 2);
public static final Field UNUSEDBIT_13_3 = Field.create("UNUSEDBIT_13_3", 80, FieldType.BIT, 3);
public static final Field UNUSEDBIT_13_4 = Field.create("UNUSEDBIT_13_4", 80, FieldType.BIT, 4);
public static final Field UNUSEDBIT_13_5 = Field.create("UNUSEDBIT_13_5", 80, FieldType.BIT, 5);
public static final Field UNUSEDBIT_13_6 = Field.create("UNUSEDBIT_13_6", 80, FieldType.BIT, 6);
public static final Field UNUSEDBIT_13_7 = Field.create("UNUSEDBIT_13_7", 80, FieldType.BIT, 7);
public static final Field UNUSEDBIT_13_8 = Field.create("UNUSEDBIT_13_8", 80, FieldType.BIT, 8);
public static final Field UNUSEDBIT_13_9 = Field.create("UNUSEDBIT_13_9", 80, FieldType.BIT, 9);
public static final Field UNUSEDBIT_13_10 = Field.create("UNUSEDBIT_13_10", 80, FieldType.BIT, 10);
public static final Field UNUSEDBIT_13_11 = Field.create("UNUSEDBIT_13_11", 80, FieldType.BIT, 11);
public static final Field UNUSEDBIT_13_12 = Field.create("UNUSEDBIT_13_12", 80, FieldType.BIT, 12);
public static final Field UNUSEDBIT_13_13 = Field.create("UNUSEDBIT_13_13", 80, FieldType.BIT, 13);
public static final Field UNUSEDBIT_13_14 = Field.create("UNUSEDBIT_13_14", 80, FieldType.BIT, 14);
public static final Field UNUSEDBIT_13_15 = Field.create("UNUSEDBIT_13_15", 80, FieldType.BIT, 15);
public static final Field UNUSEDBIT_13_16 = Field.create("UNUSEDBIT_13_16", 80, FieldType.BIT, 16);
public static final Field UNUSEDBIT_13_17 = Field.create("UNUSEDBIT_13_17", 80, FieldType.BIT, 17);
public static final Field UNUSEDBIT_13_18 = Field.create("UNUSEDBIT_13_18", 80, FieldType.BIT, 18);
public static final Field UNUSEDBIT_13_19 = Field.create("UNUSEDBIT_13_19", 80, FieldType.BIT, 19);
public static final Field UNUSEDBIT_13_20 = Field.create("UNUSEDBIT_13_20", 80, FieldType.BIT, 20);
public static final Field UNUSEDBIT_13_21 = Field.create("UNUSEDBIT_13_21", 80, FieldType.BIT, 21);
public static final Field UNUSEDBIT_13_22 = Field.create("UNUSEDBIT_13_22", 80, FieldType.BIT, 22);
public static final Field UNUSEDBIT_13_23 = Field.create("UNUSEDBIT_13_23", 80, FieldType.BIT, 23);
public static final Field UNUSEDBIT_13_24 = Field.create("UNUSEDBIT_13_24", 80, FieldType.BIT, 24);
public static final Field UNUSEDBIT_13_25 = Field.create("UNUSEDBIT_13_25", 80, FieldType.BIT, 25);
public static final Field UNUSEDBIT_13_26 = Field.create("UNUSEDBIT_13_26", 80, FieldType.BIT, 26);
public static final Field UNUSEDBIT_13_27 = Field.create("UNUSEDBIT_13_27", 80, FieldType.BIT, 27);
public static final Field UNUSEDBIT_13_28 = Field.create("UNUSEDBIT_13_28", 80, FieldType.BIT, 28);
public static final Field UNUSEDBIT_13_29 = Field.create("UNUSEDBIT_13_29", 80, FieldType.BIT, 29);
public static final Field UNUSEDBIT_13_30 = Field.create("UNUSEDBIT_13_30", 80, FieldType.BIT, 30);
public static final Field UNUSEDBIT_13_31 = Field.create("UNUSEDBIT_13_31", 80, FieldType.BIT, 31);
public static final Field CRANKING_BASEFUEL = Field.create("CRANKING_BASEFUEL", 84, FieldType.FLOAT);
public static final Field CRANKING_COOLANTTEMPERATURECOEFFICIENT = Field.create("CRANKING_COOLANTTEMPERATURECOEFFICIENT", 88, FieldType.FLOAT);
public static final Field CRANKING_TPSCOEFFICIENT = Field.create("CRANKING_TPSCOEFFICIENT", 92, FieldType.FLOAT);
public static final Field CRANKING_DURATIONCOEFFICIENT = Field.create("CRANKING_DURATIONCOEFFICIENT", 96, FieldType.FLOAT);
public static final Field CRANKING_FUEL = Field.create("CRANKING_FUEL", 100, FieldType.FLOAT);
public static final Field RUNNING_POSTCRANKINGFUELCORRECTION = Field.create("RUNNING_POSTCRANKINGFUELCORRECTION", 104, FieldType.FLOAT);
public static final Field RUNNING_INTAKETEMPERATURECOEFFICIENT = Field.create("RUNNING_INTAKETEMPERATURECOEFFICIENT", 108, FieldType.FLOAT);
public static final Field RUNNING_COOLANTTEMPERATURECOEFFICIENT = Field.create("RUNNING_COOLANTTEMPERATURECOEFFICIENT", 112, FieldType.FLOAT);
public static final Field RUNNING_TIMESINCECRANKINGINSECS = Field.create("RUNNING_TIMESINCECRANKINGINSECS", 116, FieldType.FLOAT);
public static final Field RUNNING_INJECTORLAG = Field.create("RUNNING_INJECTORLAG", 120, FieldType.FLOAT);
public static final Field RUNNING_BASEFUEL = Field.create("RUNNING_BASEFUEL", 124, FieldType.FLOAT);
public static final Field RUNNING_FUEL = Field.create("RUNNING_FUEL", 128, FieldType.FLOAT);
public static final Field ETBFEEDFORWARD = Field.create("ETBFEEDFORWARD", 132, FieldType.FLOAT);
public static final Field TARGETFROMTABLE = Field.create("TARGETFROMTABLE", 136, FieldType.FLOAT);
public static final Field SPARKDWELL = Field.create("SPARKDWELL", 140, FieldType.FLOAT);
public static final Field DWELLANGLE = Field.create("DWELLANGLE", 144, FieldType.FLOAT);
public static final Field CLTTIMINGCORRECTION = Field.create("CLTTIMINGCORRECTION", 148, FieldType.FLOAT);
public static final Field TARGETAFR = Field.create("TARGETAFR", 24, FieldType.FLOAT);
public static final Field ENGINECYCLEDURATIONMS = Field.create("ENGINECYCLEDURATIONMS", 28, FieldType.FLOAT);
public static final Field MINRPMKCURRENTTPS = Field.create("MINRPMKCURRENTTPS", 32, FieldType.FLOAT);
public static final Field CURRENTTPSADC = Field.create("CURRENTTPSADC", 36, FieldType.INT);
public static final Field TPSVOLTAGEMCU = Field.create("TPSVOLTAGEMCU", 40, FieldType.FLOAT);
public static final Field TPSVOLTAGEBOARD = Field.create("TPSVOLTAGEBOARD", 44, FieldType.FLOAT);
public static final Field CURRENTBAROCORRECTEDVE = Field.create("CURRENTBAROCORRECTEDVE", 48, FieldType.FLOAT);
public static final Field INJECTORFLOWCORRECTION = Field.create("INJECTORFLOWCORRECTION", 52, FieldType.FLOAT);
public static final Field BAROCORRECTION = Field.create("BAROCORRECTION", 56, FieldType.FLOAT);
public static final Field CRANKING_BASEFUEL = Field.create("CRANKING_BASEFUEL", 60, FieldType.FLOAT);
public static final Field CRANKING_COOLANTTEMPERATURECOEFFICIENT = Field.create("CRANKING_COOLANTTEMPERATURECOEFFICIENT", 64, FieldType.FLOAT);
public static final Field CRANKING_TPSCOEFFICIENT = Field.create("CRANKING_TPSCOEFFICIENT", 68, FieldType.FLOAT);
public static final Field CRANKING_DURATIONCOEFFICIENT = Field.create("CRANKING_DURATIONCOEFFICIENT", 72, FieldType.FLOAT);
public static final Field CRANKING_FUEL = Field.create("CRANKING_FUEL", 76, FieldType.FLOAT);
public static final Field RUNNING_POSTCRANKINGFUELCORRECTION = Field.create("RUNNING_POSTCRANKINGFUELCORRECTION", 80, FieldType.FLOAT);
public static final Field RUNNING_INTAKETEMPERATURECOEFFICIENT = Field.create("RUNNING_INTAKETEMPERATURECOEFFICIENT", 84, FieldType.FLOAT);
public static final Field RUNNING_COOLANTTEMPERATURECOEFFICIENT = Field.create("RUNNING_COOLANTTEMPERATURECOEFFICIENT", 88, FieldType.FLOAT);
public static final Field RUNNING_TIMESINCECRANKINGINSECS = Field.create("RUNNING_TIMESINCECRANKINGINSECS", 92, FieldType.FLOAT);
public static final Field RUNNING_INJECTORLAG = Field.create("RUNNING_INJECTORLAG", 96, FieldType.FLOAT);
public static final Field RUNNING_BASEFUEL = Field.create("RUNNING_BASEFUEL", 100, FieldType.FLOAT);
public static final Field RUNNING_FUEL = Field.create("RUNNING_FUEL", 104, FieldType.FLOAT);
public static final Field ETBFEEDFORWARD = Field.create("ETBFEEDFORWARD", 108, FieldType.FLOAT);
public static final Field TARGETFROMTABLE = Field.create("TARGETFROMTABLE", 112, FieldType.FLOAT);
public static final Field SPARKDWELL = Field.create("SPARKDWELL", 116, FieldType.FLOAT);
public static final Field DWELLANGLE = Field.create("DWELLANGLE", 120, FieldType.FLOAT);
public static final Field CLTTIMINGCORRECTION = Field.create("CLTTIMINGCORRECTION", 124, FieldType.FLOAT);
public static final Field[] VALUES = {
ISTCHARGEAIRMODEL,
UNUSEDBIT_1_1,
@ -144,11 +107,6 @@ public class EngineState {
TCHARGEK,
TCHARGE_COFF,
AIRFLOW,
IDLESTATE,
CURRENTIDLEPOSITION,
BASEIDLEPOSITION,
THROTTLEPEDALUPSTATE,
ETBIDLEADDITION,
TARGETAFR,
ENGINECYCLEDURATIONMS,
MINRPMKCURRENTTPS,
@ -158,38 +116,6 @@ public class EngineState {
CURRENTBAROCORRECTEDVE,
INJECTORFLOWCORRECTION,
BAROCORRECTION,
ISCRANKINGSTATE,
ISAUTOMATICIDLE,
UNUSEDBIT_13_2,
UNUSEDBIT_13_3,
UNUSEDBIT_13_4,
UNUSEDBIT_13_5,
UNUSEDBIT_13_6,
UNUSEDBIT_13_7,
UNUSEDBIT_13_8,
UNUSEDBIT_13_9,
UNUSEDBIT_13_10,
UNUSEDBIT_13_11,
UNUSEDBIT_13_12,
UNUSEDBIT_13_13,
UNUSEDBIT_13_14,
UNUSEDBIT_13_15,
UNUSEDBIT_13_16,
UNUSEDBIT_13_17,
UNUSEDBIT_13_18,
UNUSEDBIT_13_19,
UNUSEDBIT_13_20,
UNUSEDBIT_13_21,
UNUSEDBIT_13_22,
UNUSEDBIT_13_23,
UNUSEDBIT_13_24,
UNUSEDBIT_13_25,
UNUSEDBIT_13_26,
UNUSEDBIT_13_27,
UNUSEDBIT_13_28,
UNUSEDBIT_13_29,
UNUSEDBIT_13_30,
UNUSEDBIT_13_31,
CRANKING_BASEFUEL,
CRANKING_COOLANTTEMPERATURECOEFFICIENT,
CRANKING_TPSCOEFFICIENT,

View File

@ -0,0 +1,21 @@
package com.rusefi.config.generated;
// this file was generated automatically by rusEFI tool ConfigDefinition.jar based on (unknown script) controllers/actuators/idle_state.txt Sat Oct 16 23:40:23 EDT 2021
// by class com.rusefi.output.FileJavaFieldsConsumer
import com.rusefi.config.*;
public class IdleState {
public static final Field IDLESTATE = Field.create("IDLESTATE", 0, FieldType.INT);
public static final Field CURRENTIDLEPOSITION = Field.create("CURRENTIDLEPOSITION", 4, FieldType.FLOAT);
public static final Field BASEIDLEPOSITION = Field.create("BASEIDLEPOSITION", 8, FieldType.FLOAT);
public static final Field THROTTLEPEDALUPSTATE = Field.create("THROTTLEPEDALUPSTATE", 12, FieldType.INT);
public static final Field ETBIDLEADDITION = Field.create("ETBIDLEADDITION", 16, FieldType.FLOAT);
public static final Field[] VALUES = {
IDLESTATE,
CURRENTIDLEPOSITION,
BASEIDLEPOSITION,
THROTTLEPEDALUPSTATE,
ETBIDLEADDITION,
};
}