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 c6562c4802..6221f5f9dc 100644 --- a/firmware/config/boards/kinetis/config/controllers/algo/rusefi_generated.h +++ b/firmware/config/boards/kinetis/config/controllers/algo/rusefi_generated.h @@ -1018,6 +1018,7 @@ #define PROTOCOL_ENGINE_SNIFFER "wave_chart" #define PROTOCOL_ES_DOWN "d" #define PROTOCOL_ES_UP "u" +#define PROTOCOL_HELLO_PREFIX "***" #define PROTOCOL_HIP_NAME "HIP" #define PROTOCOL_INJ1_SHORT_NAME "i1" #define PROTOCOL_MSG "msg" diff --git a/firmware/controllers/generated/rusefi_generated.h b/firmware/controllers/generated/rusefi_generated.h index 7ffab66248..1f8823f715 100644 --- a/firmware/controllers/generated/rusefi_generated.h +++ b/firmware/controllers/generated/rusefi_generated.h @@ -1018,6 +1018,7 @@ #define PROTOCOL_ENGINE_SNIFFER "wave_chart" #define PROTOCOL_ES_DOWN "d" #define PROTOCOL_ES_UP "u" +#define PROTOCOL_HELLO_PREFIX "***" #define PROTOCOL_HIP_NAME "HIP" #define PROTOCOL_INJ1_SHORT_NAME "i1" #define PROTOCOL_MSG "msg" diff --git a/firmware/integration/rusefi_config.txt b/firmware/integration/rusefi_config.txt index 039bfe9964..877c7749ec 100644 --- a/firmware/integration/rusefi_config.txt +++ b/firmware/integration/rusefi_config.txt @@ -1535,6 +1535,7 @@ end_struct #define CMD_TRIGGER_HW_INPUT "trigger_hw_input" #define PROTOCOL_MSG "msg" +#define PROTOCOL_HELLO_PREFIX "***" #define PROTOCOL_OUTPIN "outpin" #define PROTOCOL_ANALOG_CHART "analog_chart" 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 527e5d5b1f..979b582eb3 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 gen_config.bat integration\rusefi_config.txt Sun May 31 13:45:22 EDT 2020 +// this file was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Sun May 31 14:04:20 EDT 2020 // by class com.rusefi.output.FileJavaFieldsConsumer import com.rusefi.config.*; @@ -1007,6 +1007,7 @@ public class Fields { public static final String PROTOCOL_ENGINE_SNIFFER = "wave_chart"; public static final String PROTOCOL_ES_DOWN = "d"; public static final String PROTOCOL_ES_UP = "u"; + public static final String PROTOCOL_HELLO_PREFIX = "***"; public static final String PROTOCOL_HIP_NAME = "HIP"; public static final String PROTOCOL_INJ1_SHORT_NAME = "i1"; public static final String PROTOCOL_MSG = "msg"; diff --git a/java_tools/ConfigDefinition.jar b/java_tools/ConfigDefinition.jar index c14a88ab38..0684abf247 100644 Binary files a/java_tools/ConfigDefinition.jar and b/java_tools/ConfigDefinition.jar differ diff --git a/java_tools/configuration_definition/src/com/rusefi/VariableRegistry.java b/java_tools/configuration_definition/src/com/rusefi/VariableRegistry.java index 739251a759..305ee8f263 100644 --- a/java_tools/configuration_definition/src/com/rusefi/VariableRegistry.java +++ b/java_tools/configuration_definition/src/com/rusefi/VariableRegistry.java @@ -56,7 +56,7 @@ public class VariableRegistry { } value = applyVariables(value); int multPosition = value.indexOf(MULT_TOKEN); - if (multPosition != -1) { + if (!isQuoted(value, '"') && multPosition != -1) { Integer first = Integer.valueOf(value.substring(0, multPosition)); Integer second = Integer.valueOf(value.substring(multPosition + 1)); value = String.valueOf(first * second); diff --git a/java_tools/configuration_definition/src/com/rusefi/test/ConfigFieldParserTest.java b/java_tools/configuration_definition/src/com/rusefi/test/ConfigFieldParserTest.java index 89cfecb7f9..2164a5a51f 100644 --- a/java_tools/configuration_definition/src/com/rusefi/test/ConfigFieldParserTest.java +++ b/java_tools/configuration_definition/src/com/rusefi/test/ConfigFieldParserTest.java @@ -52,6 +52,17 @@ public class ConfigFieldParserTest { assertEquals(16, TypesHelper.getElementSize(state, "pid_s")); } + @Test + public void manyStartAreNotMultiplication() throws IOException { + String test = "struct pid_s\n" + + "#define ERROR_BUFFER_SIZE \"***\"\n" + + "end_struct\n" + + ""; + VariableRegistry.INSTANCE.clear(); + BufferedReader reader = new BufferedReader(new StringReader(test)); + new ReaderState().readBufferedReader(reader, Collections.emptyList()); + } + @Test public void multiplicationInDefine() throws IOException { String test = "struct pid_s\n" +