This commit is contained in:
parent
8a354ed233
commit
8ada6971b4
|
@ -60,6 +60,7 @@ static void showIdleInfo(void) {
|
||||||
const char * idleModeStr = getIdle_mode_e(engineConfiguration->idleMode);
|
const char * idleModeStr = getIdle_mode_e(engineConfiguration->idleMode);
|
||||||
scheduleMsg(logger, "idleMode=%s position=%f isStepper=%s", idleModeStr,
|
scheduleMsg(logger, "idleMode=%s position=%f isStepper=%s", idleModeStr,
|
||||||
getIdlePosition(), boolToString(boardConfiguration->useStepperIdle));
|
getIdlePosition(), boolToString(boardConfiguration->useStepperIdle));
|
||||||
|
|
||||||
if (boardConfiguration->useStepperIdle) {
|
if (boardConfiguration->useStepperIdle) {
|
||||||
scheduleMsg(logger, "directionPin=%s reactionTime=%f", hwPortname(boardConfiguration->idle.stepperDirectionPin),
|
scheduleMsg(logger, "directionPin=%s reactionTime=%f", hwPortname(boardConfiguration->idle.stepperDirectionPin),
|
||||||
engineConfiguration->idleStepperReactionTime);
|
engineConfiguration->idleStepperReactionTime);
|
||||||
|
@ -71,8 +72,10 @@ static void showIdleInfo(void) {
|
||||||
scheduleMsg(logger, "idle valve freq=%d on %s", boardConfiguration->idle.solenoidFrequency,
|
scheduleMsg(logger, "idle valve freq=%d on %s", boardConfiguration->idle.solenoidFrequency,
|
||||||
hwPortname(boardConfiguration->idle.solenoidPin));
|
hwPortname(boardConfiguration->idle.solenoidPin));
|
||||||
}
|
}
|
||||||
scheduleMsg(logger, "mode=%s", getIdle_control_e(engineConfiguration->idleControl));
|
|
||||||
if (engineConfiguration->idleControl == IC_PID) {
|
|
||||||
|
|
||||||
|
if (engineConfiguration->idleMode == IM_AUTO) {
|
||||||
scheduleMsg(logger, "idle P=%f I=%f D=%f dT=%d", engineConfiguration->idleRpmPid.pFactor,
|
scheduleMsg(logger, "idle P=%f I=%f D=%f dT=%d", engineConfiguration->idleRpmPid.pFactor,
|
||||||
engineConfiguration->idleRpmPid.iFactor,
|
engineConfiguration->idleRpmPid.iFactor,
|
||||||
engineConfiguration->idleRpmPid.dFactor,
|
engineConfiguration->idleRpmPid.dFactor,
|
||||||
|
@ -80,7 +83,7 @@ static void showIdleInfo(void) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void setIdleControlEnabled(int value) {
|
void setIdleMode(idle_mode_e value) {
|
||||||
engineConfiguration->idleMode = value ? IM_AUTO : IM_MANUAL;
|
engineConfiguration->idleMode = value ? IM_AUTO : IM_MANUAL;
|
||||||
showIdleInfo();
|
showIdleInfo();
|
||||||
}
|
}
|
||||||
|
@ -331,9 +334,6 @@ void startIdleThread(Logging*sharedLogger) {
|
||||||
|
|
||||||
addConsoleAction("idleinfo", showIdleInfo);
|
addConsoleAction("idleinfo", showIdleInfo);
|
||||||
|
|
||||||
|
|
||||||
addConsoleActionI("set_idle_enabled", (VoidInt) setIdleControlEnabled);
|
|
||||||
|
|
||||||
addConsoleActionII("blipidle", blipIdle);
|
addConsoleActionII("blipidle", blipIdle);
|
||||||
|
|
||||||
// split this whole file into manual controller and auto controller? move these commands into the file
|
// split this whole file into manual controller and auto controller? move these commands into the file
|
||||||
|
|
|
@ -20,7 +20,7 @@ void setIdleDT(int value);
|
||||||
void setIdlePFactor(float value);
|
void setIdlePFactor(float value);
|
||||||
void setIdleIFactor(float value);
|
void setIdleIFactor(float value);
|
||||||
void setIdleDFactor(float value);
|
void setIdleDFactor(float value);
|
||||||
void setIdleControlEnabled(int value);
|
void setIdleMode(idle_mode_e value);
|
||||||
void setTargetIdleRpm(int value);
|
void setTargetIdleRpm(int value);
|
||||||
void setIdleDT(int value);
|
void setIdleDT(int value);
|
||||||
|
|
||||||
|
|
|
@ -860,6 +860,10 @@ static void enableOrDisable(const char *param, bool isEnabled) {
|
||||||
engineConfiguration->isEngineChartEnabled = isEnabled;
|
engineConfiguration->isEngineChartEnabled = isEnabled;
|
||||||
} else if (strEqualCaseInsensitive(param, "step1limimter")) {
|
} else if (strEqualCaseInsensitive(param, "step1limimter")) {
|
||||||
boardConfiguration->enabledStep1Limiter = isEnabled;
|
boardConfiguration->enabledStep1Limiter = isEnabled;
|
||||||
|
#if EFI_PROD_CODE || defined(__DOXYGEN__)
|
||||||
|
} else if (strEqualCaseInsensitive(param, "auto_idle")) {
|
||||||
|
setIdleMode(isEnabled ? IM_AUTO : IM_MANUAL);
|
||||||
|
#endif /* EFI_PROD_CODE */
|
||||||
} else if (strEqualCaseInsensitive(param, "serial")) {
|
} else if (strEqualCaseInsensitive(param, "serial")) {
|
||||||
boardConfiguration->useSerialPort = isEnabled;
|
boardConfiguration->useSerialPort = isEnabled;
|
||||||
} else if (strEqualCaseInsensitive(param, "stepperidle")) {
|
} else if (strEqualCaseInsensitive(param, "stepperidle")) {
|
||||||
|
@ -1051,7 +1055,7 @@ static void getValue(const char *paramStr) {
|
||||||
#if EFI_PROD_CODE || defined(__DOXYGEN__)
|
#if EFI_PROD_CODE || defined(__DOXYGEN__)
|
||||||
} else if (strEqualCaseInsensitive(paramStr, "bor")) {
|
} else if (strEqualCaseInsensitive(paramStr, "bor")) {
|
||||||
showBor();
|
showBor();
|
||||||
#endif
|
#endif /* EFI_PROD_CODE */
|
||||||
} else if (strEqualCaseInsensitive(paramStr, "nb_vvt_index")) {
|
} else if (strEqualCaseInsensitive(paramStr, "nb_vvt_index")) {
|
||||||
scheduleMsg(&logger, "nb_vvt_index=%d", engineConfiguration->nbVvtIndex);
|
scheduleMsg(&logger, "nb_vvt_index=%d", engineConfiguration->nbVvtIndex);
|
||||||
} else if (strEqualCaseInsensitive(paramStr, "global_trigger_offset_angle")) {
|
} else if (strEqualCaseInsensitive(paramStr, "global_trigger_offset_angle")) {
|
||||||
|
|
Loading…
Reference in New Issue