mirror of https://github.com/rusefi/rusefi-1.git
compact pinout enum syntax part two
This commit is contained in:
parent
c1095c560d
commit
05ed284419
Binary file not shown.
|
@ -14,7 +14,7 @@ public class PinoutLogic {
|
||||||
private static final String CONFIG_BOARDS = "config/boards/";
|
private static final String CONFIG_BOARDS = "config/boards/";
|
||||||
private static final String CONNECTORS = "/connectors";
|
private static final String CONNECTORS = "/connectors";
|
||||||
private static final String QUOTED_NONE = quote("NONE");
|
private static final String QUOTED_NONE = quote("NONE");
|
||||||
private static final String QUOTED_INVALID = quote("INVALID");
|
public static final String QUOTED_INVALID = quote("INVALID");
|
||||||
|
|
||||||
private final File[] boardYamlFiles;
|
private final File[] boardYamlFiles;
|
||||||
private final String boardName;
|
private final String boardName;
|
||||||
|
|
|
@ -146,8 +146,11 @@ public class ReaderState {
|
||||||
if (enums.size() <= totalCount / 2)
|
if (enums.size() <= totalCount / 2)
|
||||||
throw new IllegalStateException("Too many bits allocated for " + enums + " capacity=" + totalCount + "/size=" + enums.size());
|
throw new IllegalStateException("Too many bits allocated for " + enums + " capacity=" + totalCount + "/size=" + enums.size());
|
||||||
*/
|
*/
|
||||||
|
/*
|
||||||
|
why did we have this here? todo: remove in June 2022
|
||||||
for (int i = enums.size(); i < totalCount; i++)
|
for (int i = enums.size(); i < totalCount; i++)
|
||||||
tunerStudioLine += ", \"INVALID\"";
|
tunerStudioLine += ", " + PinoutLogic.QUOTED_INVALID;
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
tsCustomLine.put(name, tunerStudioLine);
|
tsCustomLine.put(name, tunerStudioLine);
|
||||||
|
|
|
@ -88,8 +88,8 @@ public class ConfigFieldParserTest {
|
||||||
|
|
||||||
TestTSProjectConsumer tsProjectConsumer = new TestTSProjectConsumer("", state);
|
TestTSProjectConsumer tsProjectConsumer = new TestTSProjectConsumer("", state);
|
||||||
state.readBufferedReader(test, tsProjectConsumer);
|
state.readBufferedReader(test, tsProjectConsumer);
|
||||||
assertEquals("afr_type1 = bits, S08, 0, [0:1], \"BPSX\", \"Innovate\", \"14Point7\", \"INVALID\"\n" +
|
assertEquals("afr_type1 = bits, S08, 0, [0:1], \"BPSX\", \"Innovate\", \"14Point7\"\n" +
|
||||||
"afr_type2 = bits, S08, 1, [0:1], \"BPSX\", \"Innovate\", \"14Point7\", \"INVALID\"\n" +
|
"afr_type2 = bits, S08, 1, [0:1], \"BPSX\", \"Innovate\", \"14Point7\"\n" +
|
||||||
"int = scalar, S08, 2, \"\", 1, 0, 0, 100, 0\n" +
|
"int = scalar, S08, 2, \"\", 1, 0, 0, 100, 0\n" +
|
||||||
"; total TS size = 4\n", tsProjectConsumer.getContent());
|
"; total TS size = 4\n", tsProjectConsumer.getContent());
|
||||||
}
|
}
|
||||||
|
@ -108,8 +108,8 @@ public class ConfigFieldParserTest {
|
||||||
TestTSProjectConsumer tsProjectConsumer = new TestTSProjectConsumer("", state);
|
TestTSProjectConsumer tsProjectConsumer = new TestTSProjectConsumer("", state);
|
||||||
state.readBufferedReader(test, tsProjectConsumer);
|
state.readBufferedReader(test, tsProjectConsumer);
|
||||||
assertEquals("int = scalar, S08, 0, \"\", 1, 0, 0, 100, 0\n" +
|
assertEquals("int = scalar, S08, 0, \"\", 1, 0, 0, 100, 0\n" +
|
||||||
"afr_type1 = bits, S16, 2, [0:1], \"BPSX\", \"Innovate\", \"14Point7\", \"INVALID\"\n" +
|
"afr_type1 = bits, S16, 2, [0:1], \"BPSX\", \"Innovate\", \"14Point7\"\n" +
|
||||||
"afr_type2 = bits, S16, 4, [0:1], \"BPSX\", \"Innovate\", \"14Point7\", \"INVALID\"\n" +
|
"afr_type2 = bits, S16, 4, [0:1], \"BPSX\", \"Innovate\", \"14Point7\"\n" +
|
||||||
"; total TS size = 8\n", tsProjectConsumer.getContent());
|
"; total TS size = 8\n", tsProjectConsumer.getContent());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -126,7 +126,7 @@ public class ConfigFieldParserTest {
|
||||||
TestTSProjectConsumer tsProjectConsumer = new TestTSProjectConsumer("", state);
|
TestTSProjectConsumer tsProjectConsumer = new TestTSProjectConsumer("", state);
|
||||||
state.readBufferedReader(test, tsProjectConsumer);
|
state.readBufferedReader(test, tsProjectConsumer);
|
||||||
assertEquals("int2 = scalar, S08, 0, \"\", 1, 0, 0, 100, 0\n" +
|
assertEquals("int2 = scalar, S08, 0, \"\", 1, 0, 0, 100, 0\n" +
|
||||||
"afr_type3 = bits, S32, 4, [0:1], \"BPSX\", \"Innovate\", \"14Point7\", \"INVALID\"\n" +
|
"afr_type3 = bits, S32, 4, [0:1], \"BPSX\", \"Innovate\", \"14Point7\"\n" +
|
||||||
"; total TS size = 8\n", tsProjectConsumer.getContent());
|
"; total TS size = 8\n", tsProjectConsumer.getContent());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue