Non-square dimension maps #5641

This commit is contained in:
rusefillc 2023-10-25 20:22:35 -04:00
parent 5223298df7
commit 80ee662bed
3 changed files with 10 additions and 4 deletions

View File

@ -1289,8 +1289,8 @@ curve = rangeMatrix, "Range Switch Input Matrix"
zBins = gppwm4_table
table = tcuSolenoidTableTbl, tcuSolenoidTableMap, "Solenoids Active By Gear", 1
xBins = solenoidCountArray, tcuCurrentGear
yBins = gearCountArray, tcuCurrentGear
xBins = gearCountArray, tcuCurrentGear
yBins = solenoidCountArray, tcuCurrentGear
zBins = tcuSolenoidTable
xyLabels = "Solenoid", "Gear"

View File

@ -64,7 +64,7 @@ public class ConfigFieldParserTest {
TestTSProjectConsumer tsProjectConsumer = new TestTSProjectConsumer("", state);
state.readBufferedReader(test, tsProjectConsumer);
assertEquals("afr_type = array, S32, 0, [3x1], \"ms\", 1, 0, 0, 3000, 0, noMsqSave\n" +
assertEquals("afr_type = array, S32, 0, [1x3], \"ms\", 1, 0, 0, 3000, 0, noMsqSave\n" +
"; total TS size = 12\n", tsProjectConsumer.getContent());
}

View File

@ -7,7 +7,11 @@ import com.rusefi.ReaderState;
import com.rusefi.parse.Type;
import com.rusefi.parse.TypesHelper;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.TreeSet;
import java.util.stream.Collectors;
import static com.rusefi.ToolUtil.EOL;
import static com.rusefi.output.JavaSensorsConsumer.quote;
@ -122,7 +126,9 @@ public class TsOutput {
tsHeader.append(" " + tsPosition + ",");
tsHeader.append(" [");
boolean first = true;
for (int size : configField.getArraySizes()) {
List<Integer> list = Arrays.stream(configField.getArraySizes()).boxed().collect(Collectors.toList());
Collections.reverse(list);
for (int size : list) {
if (first) {
first = false;
} else {