diff --git a/firmware/console/binary/tunerstudio_outputs.h b/firmware/console/binary/tunerstudio_outputs.h index a9b88673d4..677078dfde 100644 --- a/firmware/console/binary/tunerstudio_outputs.h +++ b/firmware/console/binary/tunerstudio_outputs.h @@ -79,6 +79,7 @@ typedef struct { unsigned int isKnockChipOk : 1; // bit 27 unsigned int launchTriggered : 1; // bit 28 unsigned int isTps2Error : 1; // bit 29 + unsigned int isIdleClosedLoop : 1; // bit 30 // RPM, vss scaled_channel rpm; // 4 diff --git a/firmware/controllers/actuators/idle_thread.cpp b/firmware/controllers/actuators/idle_thread.cpp index a643d6ba4f..cbe4943c0b 100644 --- a/firmware/controllers/actuators/idle_thread.cpp +++ b/firmware/controllers/actuators/idle_thread.cpp @@ -522,22 +522,21 @@ static percent_t automaticIdleController(float tpsPos, float rpm, int targetRpm, engine->rpmCalculator.getRevolutionCounterSinceStart()); } +#if EFI_TUNER_STUDIO + tsOutputChannels.isIdleClosedLoop = phase == Phase::Idling && CONFIG(idleMode) == IM_AUTO; if (engineConfiguration->debugMode == DBG_IDLE_CONTROL) { if (engineConfiguration->idleMode == IM_AUTO) { -#if EFI_TUNER_STUDIO // see also tsOutputChannels->idlePosition getIdlePid(PASS_ENGINE_PARAMETER_SIGNATURE)->postState(&tsOutputChannels, 1000000); tsOutputChannels.debugIntField4 = engine->engineState.idle.idleState; -#endif /* EFI_TUNER_STUDIO */ } else { -#if EFI_TUNER_STUDIO tsOutputChannels.debugFloatField1 = iacPosition; extern StepperMotor iacMotor; tsOutputChannels.debugIntField1 = iacMotor.getTargetPosition(); -#endif /* EFI_TUNER_STUDIO */ } } +#endif /* EFI_TUNER_STUDIO */ engine->engineState.idle.currentIdlePosition = iacPosition; diff --git a/firmware/tunerstudio/rusefi.input b/firmware/tunerstudio/rusefi.input index 9b77986394..39be76fa45 100644 --- a/firmware/tunerstudio/rusefi.input +++ b/firmware/tunerstudio/rusefi.input @@ -205,6 +205,7 @@ enable2ndByteCanID = false ind_isWarnNow =bits, U32, 0, [25:25], "true", "false"; ind_pedal_error =bits, U32, 0, [26:26], "true", "false"; isTps2Error = bits, U32, 0, [29:29], "true", "false"; + isIdleClosedLoop= bits, U32, 0, [30:30], "true", "false"; ; RPM, vss RPMValue = scalar, U16, 4, "RPM", 1, 0.00000 @@ -1153,6 +1154,7 @@ gaugeCategory = DynoView indicator = { clutchDownState }, "clutch", "cltch Down", white, black, yellow, black indicator = { brakePedalIndicator }, "brake", "brake down", white, black, red, black indicator = { acSwitchState }, "AC off", "AC on", white, black, blue, white + indicator = { isIdleClosedLoop }, "idle open loop", "idle closed loop", white, black, green, black ; error codes indicator = { isTpsError}, "tps", "tps error", white, black, red, black