From be06316e808a5a947305edd06fd58c8c9fd317be Mon Sep 17 00:00:00 2001 From: rusefillc Date: Sun, 26 Nov 2023 00:01:34 -0500 Subject: [PATCH] only:EPIC: Improve toolset for default tune canned tune generation #4871 --- .../src/main/java/com/rusefi/tools/tune/CurveData.java | 2 +- .../src/test/java/com/rusefi/tune/TuneReadWriteTest.java | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/java_tools/tune-tools/src/main/java/com/rusefi/tools/tune/CurveData.java b/java_tools/tune-tools/src/main/java/com/rusefi/tools/tune/CurveData.java index ddc332e7ef..cb911f9fee 100644 --- a/java_tools/tune-tools/src/main/java/com/rusefi/tools/tune/CurveData.java +++ b/java_tools/tune-tools/src/main/java/com/rusefi/tools/tune/CurveData.java @@ -80,7 +80,7 @@ public class CurveData { return "static const float " + getCannedName() + "[" + rawData.length + "] = " + toString(rawData) + - ";\n\n"; + ";\n"; } @NotNull diff --git a/java_tools/tune-tools/src/test/java/com/rusefi/tune/TuneReadWriteTest.java b/java_tools/tune-tools/src/test/java/com/rusefi/tune/TuneReadWriteTest.java index e7605779fc..3ccdaab3c1 100644 --- a/java_tools/tune-tools/src/test/java/com/rusefi/tune/TuneReadWriteTest.java +++ b/java_tools/tune-tools/src/test/java/com/rusefi/tune/TuneReadWriteTest.java @@ -45,12 +45,10 @@ public class TuneReadWriteTest { CurveData xRpmCurve = CurveData.valueOf(TUNE_NAME, xRpmBinsName, model); Assert.assertEquals("static const float hardCodedignitionIatCorrRpmBins[16] = " + - "{880.0, 1260.0, 1640.0, 2020.0, 2400.0, 2780.0, 3000.0, 3380.0, 3760.0, 4140.0, 4520.0, 5000.0, 5700.0, 6500.0, 7200.0, 8000.0};\n" + - "\n", xRpmCurve.getCsourceCode()); + "{880.0, 1260.0, 1640.0, 2020.0, 2400.0, 2780.0, 3000.0, 3380.0, 3760.0, 4140.0, 4520.0, 5000.0, 5700.0, 6500.0, 7200.0, 8000.0};\n", xRpmCurve.getCsourceCode()); Assert.assertEquals("static void cannedignitionIatCorrRpmBins() {\n" + "\tstatic const float hardCodedignitionIatCorrRpmBins[16] = {880.0, 1260.0, 1640.0, 2020.0, 2400.0, 2780.0, 3000.0, 3380.0, 3760.0, 4140.0, 4520.0, 5000.0, 5700.0, 6500.0, 7200.0, 8000.0};\n" + - "\n" + "\tcopyArray(config->ignitionIatCorrRpmBins, hardCodedignitionIatCorrRpmBins);\n" + "}\n" + "\n", xRpmCurve.getCsourceMethod("config->")); @@ -83,9 +81,7 @@ public class TuneReadWriteTest { public void testALotTogether() throws IOException { String expected = "static void cannedveTable() {\n" + "\tstatic const float hardCodedveRpmBins[16] = {650.0, 800.0, 1100.0, 1400.0, 1700.0, 2000.0, 2300.0, 2600.0, 2900.0, 3200.0, 3500.0, 3800.0, 4100.0, 4400.0, 4700.0, 7000.0};\n" + - "\n" + "\tstatic const float hardCodedveLoadBins[16] = {10.0, 20.0, 30.0, 40.0, 50.0, 60.0, 70.0, 80.0, 90.0, 100.0, 110.0, 120.0, 130.0, 140.0, 150.0, 160.0};\n" + - "\n" + "static const float hardCodedveTable[16][16] = {\n" + "/*unittest*/\n" + "{/* 0 10.000\t*//* 0 650.0*/80.000,\t/* 1 800.0*/80.000,\t/* 2 1100.0*/80.000,\t/* 3 1400.0*/80.000,\t/* 4 1700.0*/80.000,\t/* 5 2000.0*/80.000,\t/* 6 2300.0*/80.000,\t/* 7 2600.0*/80.000,\t/* 8 2900.0*/80.000,\t/* 9 3200.0*/80.000,\t/* 10 3500.0*/80.000,\t/* 11 3800.0*/80.000,\t/* 12 4100.0*/80.000,\t/* 13 4400.0*/80.000,\t/* 14 4700.0*/80.000,\t/* 15 7000.0*/80.000,\t},\n" +