apparently we duplicated idle position, field renaming #98

(cherry picked from commit 304458961315f3f2dbf4cb93c15e6e73d0017d0e)
This commit is contained in:
Matthew Kennedy 2023-05-04 16:35:17 -04:00 committed by rusefillc
parent d07aa72d5c
commit effdbce4ca
3 changed files with 17 additions and 25 deletions

View File

@ -22,12 +22,10 @@ bit sd_msd
bit isFan2On
bit unusedBitLAtwfs;
bit toothLogReady;
bit unused3123
bit isTpsError;
bit isCltError;
bit isMapError;
bit isIatError;
bit unused131313;
bit isTriggerError;
bit hasCriticalError;
bit isWarnNow;
@ -40,7 +38,7 @@ bit isIdleClosedLoop;
uint16_t RPMValue;@@GAUGE_NAME_RPM@@;"RPM",1, 0, 0, 8000, 0
uint16_t rpmAcceleration;dRPM;"RPM/s",1, 0, 0, 5, 2
uint16_t rpmAcceleration;dRPM;"RPM acceleration",1, 0, 0, 5, 2
uint16_t autoscale speedToRpmRatio;@@GAUGE_NAME_GEAR_RATIO@@;"value",{1/@@PACK_MULT_PERCENT@@}, 0, 0, 0, 2
uint8_t unusedVehicleSpeedKph;@@GAUGE_NAME_VVS@@;"kph",1, 0, 0, 0, 1
@ -63,7 +61,7 @@ uint16_t rpmAcceleration;dRPM;"RPM/s",1, 0, 0, 5, 2
uint16_t autoscale baroPressure;;"kPa",{1/@@PACK_MULT_PRESSURE@@}, 0, 0, 0, 1
uint16_t autoscale lambdaValue;@@GAUGE_NAME_LAMBDA@@;"",{1/@@PACK_MULT_LAMBDA@@}, 0, 0, 0, 3
uint8_t autoscale idleCurrentPosition;;"%", 0.5, 0, 0, 100, 1
uint8_t autoscale knockRetard;@@GAUGE_NAME_KNOCK_RETARD@@;"deg",{1/10}, 0, 0, 0, 1
uint16_t autoscale VBatt;@@GAUGE_NAME_VBAT@@;"V",{1/@@PACK_MULT_VOLTAGE@@}, 0, 0, 0, 2
@ -253,20 +251,18 @@ int8_t[4] unusedPadding
uint16_t autoscale mafEstimate;@@GAUGE_NAME_AIR_FLOW_ESTIMATE@@;"kg/h",{1/@@PACK_MULT_MASS_FLOW@@}, 0, 0, 0, 0
uint16_t instantRpm;sync: instant RPM;"rpm", 1, 0, 0, 0, 0
uint16_t systemEventReuse;;"counter", 1, 0, 0, 0, 0
uint16_t autoscale rawMap;;"V",{1/@@PACK_MULT_VOLTAGE@@}, 0, 0, 5, 3
uint16_t autoscale rawAfr;;"V",{1/@@PACK_MULT_VOLTAGE@@}, 0, 0, 5, 3
uint8_t tpsAccelFrom;;"%", 1, 0, 0, 100, 0
uint8_t tpsAccelTo;;"%", 1, 0, 0, 100, 0
uint8_t tpsAccelFrom;Fuel: TPS AE From;"%", 1, 0, 0, 100, 0
uint8_t tpsAccelTo;Fuel: TPS AE To;"%", 1, 0, 0, 100, 0
float calibrationValue2;;"", 1, 0, 0, 0, 0
bit isMainRelayOn;
bit isUsbConnected;isUsbConnected\nOriginal reason for this is to check if USB is connected from Lua
uint32_t luaInvocationCounter;;"count",1, 0, 0, 0, 0
uint32_t luaLastCycleDuration;;"nt",1, 0, 0, 0, 0
uint32_t luaInvocationCounter;Lua: Tick counter;"count",1, 0, 0, 0, 0
uint32_t luaLastCycleDuration;Lua: Last tick duration;"nt",1, 0, 0, 0, 0
uint8_t testBenchIter;;"count",1, 0, 0, 0, 0
uint8_t tcu_currentRange;"Current Range";"", 1, 0, 0, 0, 0
@ -377,7 +373,7 @@ bit vvtChannel4
uint32_t outputRequestPeriod
float mapFast
float[LUA_GAUGE_COUNT iterate] luaGauges;;"value",1, 0, 0, 50000, 3
float[LUA_GAUGE_COUNT iterate] luaGauges;Lua: Gauge;"value",1, 0, 0, 50000, 3
uint16_t autoscale rawMaf2;;"V",{1/@@PACK_MULT_VOLTAGE@@}, 0, 0, 5, 3
uint16_t autoscale mafMeasured2;@@GAUGE_NAME_AIR_FLOW_MEASURED_2@@;"kg/h",{1/@@PACK_MULT_MASS_FLOW@@}, 0, 0, 0, 1

View File

@ -712,10 +712,6 @@ DcHardware *getdcHardware();
tsOutputChannels->egt[i] = getMax31855EgtValue(i);
#endif /* EFI_MAX_31855 */
#if EFI_IDLE_CONTROL
tsOutputChannels->idleAirValvePosition = getIdlePosition();
#endif
tsOutputChannels->warningCounter = engine->engineState.warnings.warningCounter;
tsOutputChannels->lastErrorCode = static_cast<uint16_t>(engine->engineState.warnings.lastErrorCode);
for (int i = 0; i < 8;i++) {

View File

@ -332,12 +332,12 @@ float IdleController::getIdlePosition(float rpm) {
iacPosition = engine->blipIdlePosition;
idleState = BLIP;
} else {
// Always apply closed loop correction
// Always apply open loop correction
iacPosition = getOpenLoop(phase, rpm, clt, tps, crankingTaper);
baseIdlePosition = iacPosition;
useClosedLoop = tps.Valid && engineConfiguration->idleMode == IM_AUTO;
// If TPS is working and automatic mode enabled, add any automatic correction
// If TPS is working and automatic mode enabled, add any closed loop correction
if (useClosedLoop) {
iacPosition += getClosedLoop(phase, tps.Value, rpm, targetRpm);
}
@ -348,14 +348,14 @@ float IdleController::getIdlePosition(float rpm) {
#if EFI_TUNER_STUDIO && (EFI_PROD_CODE || EFI_SIMULATOR)
engine->outputChannels.isIdleClosedLoop = phase == Phase::Idling;
if (engineConfiguration->idleMode == IM_AUTO) {
// see also tsOutputChannels->idlePosition
getIdlePid()->postState(engine->outputChannels.idleStatus);
} else {
engine->outputChannels.idleCurrentPosition = iacPosition;
extern StepperMotor iacMotor;
engine->outputChannels.idleTargetPosition = iacMotor.getTargetPosition();
}
if (engineConfiguration->idleMode == IM_AUTO) {
// see also tsOutputChannels->idlePosition
getIdlePid()->postState(engine->outputChannels.idleStatus);
}
engine->outputChannels.idleAirValvePosition = iacPosition;
extern StepperMotor iacMotor;
engine->outputChannels.idleTargetPosition = iacMotor.getTargetPosition();
#endif /* EFI_TUNER_STUDIO */
currentIdlePosition = iacPosition;