From ee028acb5f96917b02833b71d322f0f834c553c1 Mon Sep 17 00:00:00 2001 From: rusefillc Date: Tue, 26 Apr 2022 19:25:45 -0400 Subject: [PATCH] autoscale and scale --- .../test/java/com/rusefi/test/ConfigFieldParserTest.java | 6 +++--- .../test/java/com/rusefi/test/TSProjectConsumerTest.java | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) 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 44cc3c1bd1..d6bddd891c 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 @@ -209,7 +209,7 @@ public class ConfigFieldParserTest { @Test public void expressionInMultiplier() throws IOException { String test = "struct pid_s\n" + - "\tint16_t periodMs;PID dTime;\"ms\", {1/10}, 0, 0, 3000, 0\n" + + "\tint16_t autoscale periodMs;PID dTime;\"ms\", {1/10}, 0, 0, 3000, 0\n" + "\tint16_t periodMs2;PID dTime;\"ms\", 1, 0, 0, 3000, 0\n" + "custom afr_table_t 4x4 array, U08, @OFFSET@, [4x4],\"deg\",\t {1/10}, 0, 0, 25.0, 1 \n" + "afr_table_t afrTable;\t\t\n" + @@ -632,11 +632,11 @@ public class ConfigFieldParserTest { assertEquals(cf.getName(), "fie4_ld"); } { - ConfigField cf = ConfigField.parse(state, "int_8 fi_eld;comm_;ts"); + ConfigField cf = ConfigField.parse(state, "int_8 fi_eld;comm_;ts,1,1"); assertEquals(cf.getType(), "int_8"); assertEquals(cf.getName(), "fi_eld"); assertEquals("Comment", cf.getComment(), "comm_"); - assertEquals(cf.getTsInfo(), "ts"); + assertEquals(cf.getTsInfo(), "ts,1,1"); } { ConfigField cf = ConfigField.parse(state, "int[3 iterate] field"); diff --git a/java_tools/configuration_definition/src/test/java/com/rusefi/test/TSProjectConsumerTest.java b/java_tools/configuration_definition/src/test/java/com/rusefi/test/TSProjectConsumerTest.java index 695062fdd5..bf54969f35 100644 --- a/java_tools/configuration_definition/src/test/java/com/rusefi/test/TSProjectConsumerTest.java +++ b/java_tools/configuration_definition/src/test/java/com/rusefi/test/TSProjectConsumerTest.java @@ -35,7 +35,7 @@ public class TSProjectConsumerTest { "#else\n" + "afr_table_t afrTable;\t\t\n" + "#endif\n" + - "\tint16_t periodMs;PID dTime;\"ms\", {1/10}, 0, 0, 3000, 0\n" + + "\tint16_t autoscale periodMs;PID dTime;\"ms\", {1/10}, 0, 0, 3000, 0\n" + "end_struct\n" + ""; @@ -63,7 +63,7 @@ public class TSProjectConsumerTest { assertEquals("\tpublic static final Field PERIODMS2 = Field.create(\"PERIODMS2\", 0, FieldType.INT).setScale(1.0);\n" + "\tpublic static final Field AFRTABLE = Field.create(\"AFRTABLE\", 4, FieldType.INT).setScale(1.0);\n" + - "\tpublic static final Field PERIODMS = Field.create(\"PERIODMS\", 20, FieldType.INT16).setScale(1.0);\n" + + "\tpublic static final Field PERIODMS = Field.create(\"PERIODMS\", 20, FieldType.INT16).setScale(0.1);\n" + "\tpublic static final Field ALIGNMENTFILL_AT_22 = Field.create(\"ALIGNMENTFILL_AT_22\", 22, FieldType.INT8).setScale(1.0);\n", javaFieldsConsumer.getContent()); @@ -85,7 +85,7 @@ public class TSProjectConsumerTest { "\tms\n" + "\t * offset 20\n" + "\t */\n" + - "\tint16_t periodMs = (int16_t)0;\n" + + "\tscaled_channel periodMs = (int16_t)0;\n" + "\t/**\n" + "\t * need 4 byte alignment\n" + "\tunits\n" +