diff --git a/firmware/config/boards/kinetis/config/controllers/algo/engine_configuration_generated_structures.h b/firmware/config/boards/kinetis/config/controllers/algo/engine_configuration_generated_structures.h index 2b1b529fbb..8663575d60 100644 --- a/firmware/config/boards/kinetis/config/controllers/algo/engine_configuration_generated_structures.h +++ b/firmware/config/boards/kinetis/config/controllers/algo/engine_configuration_generated_structures.h @@ -1,4 +1,4 @@ -// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration/rusefi_config.txt Tue Nov 19 09:23:08 EST 2019 +// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration/rusefi_config.txt Sat Nov 23 12:39:11 EST 2019 // by class com.rusefi.output.CHeaderConsumer // begin #ifndef CONFIG_BOARDS_KINETIS_CONFIG_CONTROLLERS_ALGO_ENGINE_CONFIGURATION_GENERATED_STRUCTURES_H @@ -379,6 +379,7 @@ #define CMD_DATE "date" #define CMD_DISABLE "disable" #define CMD_ENABLE "enable" +#define CMD_ENGINE_TYPE "engine_type" #define CMD_ETB_DUTY "set_etb_duty" #define CMD_REBOOT "reboot" #define CMD_REBOOT_DFU "reboot_dfu" @@ -4948,4 +4949,4 @@ typedef struct persistent_config_s persistent_config_s; #endif // end -// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration/rusefi_config.txt Tue Nov 19 09:23:08 EST 2019 +// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration/rusefi_config.txt Sat Nov 23 12:39:11 EST 2019 diff --git a/firmware/config/boards/kinetis/config/controllers/algo/rusefi_generated.h b/firmware/config/boards/kinetis/config/controllers/algo/rusefi_generated.h index e7e6b952f6..7d97b05ff3 100644 --- a/firmware/config/boards/kinetis/config/controllers/algo/rusefi_generated.h +++ b/firmware/config/boards/kinetis/config/controllers/algo/rusefi_generated.h @@ -377,6 +377,7 @@ #define CMD_DATE "date" #define CMD_DISABLE "disable" #define CMD_ENABLE "enable" +#define CMD_ENGINE_TYPE "engine_type" #define CMD_ETB_DUTY "set_etb_duty" #define CMD_REBOOT "reboot" #define CMD_REBOOT_DFU "reboot_dfu" diff --git a/firmware/controllers/generated/rusefi_generated.h b/firmware/controllers/generated/rusefi_generated.h index 9cb5dcfd84..d3b4aeeefb 100644 --- a/firmware/controllers/generated/rusefi_generated.h +++ b/firmware/controllers/generated/rusefi_generated.h @@ -377,6 +377,7 @@ #define CMD_DATE "date" #define CMD_DISABLE "disable" #define CMD_ENABLE "enable" +#define CMD_ENGINE_TYPE "engine_type" #define CMD_ETB_DUTY "set_etb_duty" #define CMD_REBOOT "reboot" #define CMD_REBOOT_DFU "reboot_dfu" diff --git a/firmware/controllers/settings.cpp b/firmware/controllers/settings.cpp index a22f7a6b06..b465d5849d 100644 --- a/firmware/controllers/settings.cpp +++ b/firmware/controllers/settings.cpp @@ -1242,7 +1242,7 @@ const command_i_s commandsI[] = {{"ignition_mode", setIgnitionMode}, {"tpsErrorDetectionTooHigh", setTpsErrorDetectionTooHigh}, {"fixed_mode_timing", setFixedModeTiming}, {"timing_mode", setTimingMode}, - {"engine_type", setEngineType}, + {CMD_ENGINE_TYPE, setEngineType}, {"rpm_hard_limit", setRpmHardLimit}, {"firing_order", setFiringOrder}, {"algorithm", setAlgorithmInt}, diff --git a/firmware/integration/rusefi_config.txt b/firmware/integration/rusefi_config.txt index 543fade4c2..2292b9bb2d 100644 --- a/firmware/integration/rusefi_config.txt +++ b/firmware/integration/rusefi_config.txt @@ -1276,6 +1276,7 @@ end_struct #define CMD_CALIBRATE_PEDAL_DOWN "calibrate_pedal_down" #define CMD_ETB_DUTY "set_etb_duty" +#define CMD_ENGINE_TYPE "engine_type" #define CMD_TRIGGERINFO "triggerinfo" #define CMD_WRITECONFIG "writeconfig" #define CMD_DATE "date" diff --git a/java_console/autotest/src/com/rusefi/AutoTest.java b/java_console/autotest/src/com/rusefi/AutoTest.java index ed48aaca6c..2e2847728a 100644 --- a/java_console/autotest/src/com/rusefi/AutoTest.java +++ b/java_console/autotest/src/com/rusefi/AutoTest.java @@ -136,7 +136,7 @@ public class AutoTest { static void setEngineType(int type) { currentEngineType = type; - sendCommand("set engine_type " + type, COMPLEX_COMMAND_RETRY, 30); + sendCommand("set " + Fields.CMD_ENGINE_TYPE + " " + type, COMPLEX_COMMAND_RETRY, 30); sleep(10); sendCommand("enable self_stimulation"); } diff --git a/java_console/autotest/src/com/rusefi/EnduranceTest.java b/java_console/autotest/src/com/rusefi/EnduranceTest.java index 28e6e17e61..cb6ec4cfff 100644 --- a/java_console/autotest/src/com/rusefi/EnduranceTest.java +++ b/java_console/autotest/src/com/rusefi/EnduranceTest.java @@ -1,5 +1,7 @@ package com.rusefi; +import com.rusefi.config.generated.Fields; + import static com.rusefi.IoUtil.sendCommand; import static com.rusefi.IoUtil.sleep; import static com.rusefi.RealHwTest.startRealHardwareTest; @@ -24,12 +26,12 @@ public class EnduranceTest { IoUtil.realHardwareConnect(port); for (int i = 0; i < count; i++) { AutoTest.currentEngineType = 3; - sendCommand("set_engine_type " + 3, AutoTest.COMPLEX_COMMAND_RETRY, 60); + sendCommand("set " + Fields.CMD_ENGINE_TYPE + " " + 3, AutoTest.COMPLEX_COMMAND_RETRY, 60); sleep(2); sendCommand("enable self_stimulation"); // IoUtil.changeRpm(1200); AutoTest.currentEngineType = 28; - sendCommand("set_engine_type " + 28, AutoTest.COMPLEX_COMMAND_RETRY, 60); + sendCommand("set " + Fields.CMD_ENGINE_TYPE + " " + 28, AutoTest.COMPLEX_COMMAND_RETRY, 60); sleep(2); FileLog.MAIN.logLine("++++++++++++++++++++++++++++++++++++ " + i + " +++++++++++++++"); } diff --git a/java_console/io/src/com/rusefi/io/CommandQueue.java b/java_console/io/src/com/rusefi/io/CommandQueue.java index 56d64f4ef9..11bb5c393e 100644 --- a/java_console/io/src/com/rusefi/io/CommandQueue.java +++ b/java_console/io/src/com/rusefi/io/CommandQueue.java @@ -53,7 +53,7 @@ public class CommandQueue { private static boolean isSlowCommand(String cmd) { String lc = cmd.toLowerCase(); - return lc.startsWith("set_engine_type") || lc.startsWith("writeconfig") || lc.startsWith("rewriteconfig"); + return lc.startsWith("set " + Fields.CMD_ENGINE_TYPE) || lc.startsWith("writeconfig") || lc.startsWith("rewriteconfig"); } public static int getTimeout(String cmd) { diff --git a/java_console/models/src/com/rusefi/config/generated/Fields.java b/java_console/models/src/com/rusefi/config/generated/Fields.java index 59298eaacf..a468724c40 100644 --- a/java_console/models/src/com/rusefi/config/generated/Fields.java +++ b/java_console/models/src/com/rusefi/config/generated/Fields.java @@ -1,6 +1,6 @@ package com.rusefi.config.generated; -// this file was generated automatically by rusEfi tool ConfigDefinition.jar based on integration\rusefi_config.txt Mon Nov 18 19:05:30 EST 2019 +// this file was generated automatically by rusEfi tool ConfigDefinition.jar based on integration\rusefi_config.txt Sat Nov 23 12:38:55 EST 2019 // by class com.rusefi.output.FileJavaFieldsConsumer import com.rusefi.config.*; @@ -243,6 +243,7 @@ public class Fields { public static final String CMD_DATE = "date"; public static final String CMD_DISABLE = "disable"; public static final String CMD_ENABLE = "enable"; + public static final String CMD_ENGINE_TYPE = "engine_type"; public static final String CMD_ETB_DUTY = "set_etb_duty"; public static final String CMD_REBOOT = "reboot"; public static final String CMD_REBOOT_DFU = "reboot_dfu"; diff --git a/java_console/ui/src/com/rusefi/PresetsPane.java b/java_console/ui/src/com/rusefi/PresetsPane.java index 69899b994c..5d583410ec 100644 --- a/java_console/ui/src/com/rusefi/PresetsPane.java +++ b/java_console/ui/src/com/rusefi/PresetsPane.java @@ -1,5 +1,6 @@ package com.rusefi; +import com.rusefi.config.generated.Fields; import com.rusefi.io.CommandQueue; import org.jetbrains.annotations.NotNull; @@ -40,7 +41,7 @@ public class PresetsPane { private final String labelTest; public SetEngineTypeCommandControl(String labelTest, String imageFileName, int engineType) { - super(labelTest, imageFileName, CommandControl.SET, "set engine_type " + engineType); + super(labelTest, imageFileName, CommandControl.SET, "set " + Fields.CMD_ENGINE_TYPE + " " + engineType); this.labelTest = labelTest; }