diff --git a/firmware/controllers/settings.cpp b/firmware/controllers/settings.cpp index 5c58646540..8a6a435fea 100644 --- a/firmware/controllers/settings.cpp +++ b/firmware/controllers/settings.cpp @@ -889,11 +889,11 @@ static void enableOrDisable(const char *param, bool isEnabled) { engineConfiguration->canReadEnabled = isEnabled; } else if (strEqualCaseInsensitive(param, "can_write")) { engineConfiguration->canWriteEnabled = isEnabled; - } else if (strEqualCaseInsensitive(param, "injection")) { + } else if (strEqualCaseInsensitive(param, CMD_INJECTION)) { engineConfiguration->isInjectionEnabled = isEnabled; } else if (strEqualCaseInsensitive(param, "trigger_details")) { engineConfiguration->verboseTriggerSynchDetails = isEnabled; - } else if (strEqualCaseInsensitive(param, "ignition")) { + } else if (strEqualCaseInsensitive(param, CMD_IGNITION)) { engineConfiguration->isIgnitionEnabled = isEnabled; } else if (strEqualCaseInsensitive(param, CMD_SELF_STIMULATION)) { engine->directSelfStimulation = isEnabled; diff --git a/java_console/autotest/src/com/rusefi/functional_tests/BaseTest.java b/java_console/autotest/src/com/rusefi/functional_tests/BaseTest.java index 7c08979ef1..82e1a97944 100644 --- a/java_console/autotest/src/com/rusefi/functional_tests/BaseTest.java +++ b/java_console/autotest/src/com/rusefi/functional_tests/BaseTest.java @@ -8,8 +8,7 @@ import com.rusefi.io.CommandQueue; import com.rusefi.waves.EngineReport; import static com.devexperts.logging.Logging.getLogging; -import static com.rusefi.IoUtil.getEnableCommand; -import static com.rusefi.IoUtil.sleepSeconds; +import static com.rusefi.IoUtil.*; import static com.rusefi.waves.EngineReport.isCloseEnough; public class BaseTest { @@ -60,6 +59,11 @@ public class BaseTest { log.info("AUTOTEST setEngineType " + type); currentEngineType = type; // sendCommand(CMD_PINS); + sendCommand(getDisableCommand(Fields.CMD_INJECTION)); + sendCommand(getDisableCommand(Fields.CMD_IGNITION)); + // changing engine type while engine is running does not work well - we rightfully + // get invalid configuration critical errors + sleepSeconds(1); sendCommand("set " + Fields.CMD_ENGINE_TYPE + " " + type, COMPLEX_COMMAND_RETRY, Timeouts.SET_ENGINE_TIMEOUT); // TODO: document the reason for this sleep?! sleepSeconds(3);