diff --git a/java_console/inifile/src/test/java/com/opensr5/ini/test/IniFileReaderTest.java b/java_console/inifile/src/test/java/com/opensr5/ini/test/IniFileReaderTest.java index 94b85ae854..7613cd7014 100644 --- a/java_console/inifile/src/test/java/com/opensr5/ini/test/IniFileReaderTest.java +++ b/java_console/inifile/src/test/java/com/opensr5/ini/test/IniFileReaderTest.java @@ -130,7 +130,7 @@ public class IniFileReaderTest { "[Constants]\n" + " crc32CheckCommand = \"k\\x00\\x00\\x00\\x00\\x00\\x00\"\n" + "page = 1\n" + - "primingSquirtDurationMs\t\t\t= scalar, F32,\t96,\t\"*C\", 1, 0, -40, 200, 1\n" + + "primingSquirtDurationMs\t\t\t= scalar, F32,\t96,\t\"*C\", 1.0, 0, -40, 200, 1\n" + ""; RawIniFile lines = IniFileReader.read(new ByteArrayInputStream(string.getBytes())); IniFileModel model = new IniFileModel().readIniFile(lines); diff --git a/java_tools/ConfigDefinition.jar b/java_tools/ConfigDefinition.jar index a3eaec2219..29d122d182 100644 Binary files a/java_tools/ConfigDefinition.jar and b/java_tools/ConfigDefinition.jar differ diff --git a/java_tools/configuration_definition/src/main/java/com/rusefi/ConfigField.java b/java_tools/configuration_definition/src/main/java/com/rusefi/ConfigField.java index aac915c4d2..f56d6533d0 100644 --- a/java_tools/configuration_definition/src/main/java/com/rusefi/ConfigField.java +++ b/java_tools/configuration_definition/src/main/java/com/rusefi/ConfigField.java @@ -95,7 +95,13 @@ public class ConfigField { String[] tokens = getTokens(); if (tokens.length > 1) { String scale = tokens[1].trim(); - if (!hasAutoscale && !scale.trim().equals("1")) { + Double scaleDouble; + try { + scaleDouble = Double.parseDouble(scale); + } catch (NumberFormatException ignore) { + scaleDouble = -1.0; + } + if (!hasAutoscale && scaleDouble != 1) { throw new IllegalStateException("Unexpected scale of " + scale + " without autoscale on " + this); } } diff --git a/java_tools/configuration_definition/src/test/java/com/rusefi/test/ConfigFieldParserTest.java b/java_tools/configuration_definition/src/test/java/com/rusefi/test/ConfigFieldParserTest.java index 21b9aea2fe..1e522003bf 100644 --- a/java_tools/configuration_definition/src/test/java/com/rusefi/test/ConfigFieldParserTest.java +++ b/java_tools/configuration_definition/src/test/java/com/rusefi/test/ConfigFieldParserTest.java @@ -50,7 +50,7 @@ public class ConfigFieldParserTest { @Test public void testFloatMsAlias() { String test = "struct pid_s\n" + - "floatms_t afr_type;PID dTime;\"ms\", 1, 0, 0, 3000, 0\n" + + "floatms_t afr_type;PID dTime;\"ms\", 1.0, 0, 0, 3000, 0\n" + "percent_t afr_typet;PID dTime;\"ms\", 1, 0, 0, 3000, 0\n" + "end_struct\n"; ReaderState state = new ReaderState();