parent
f18192dc31
commit
51f96c82a9
|
@ -46,10 +46,10 @@ public class SdCardFieldsGeneratorTest {
|
|||
"\t{test->reference.fue2lMult, \"Lua: Fuel mult\", \"\", 0},\n" +
|
||||
"\t{test->reference.rpmAcceleration, \"dRPM\", \"RPM/s\", 2},\n" +
|
||||
"\t{test->reference.lua.fuelMult, \"Lua: Fuel mult\", \"\", 0},\n" +
|
||||
"// structureStartingTsPosition 0 test->reference/\"lua.clutchUpState\", skipping bit at 4 4@0\n" +
|
||||
"// structureStartingTsPosition 0 test->reference/\"lua.brakePedalState\", skipping bit at 4 4@1\n" +
|
||||
"// structureStartingTsPosition 0 test->reference/\"lua.disableDecelerationFuelCutOff\", skipping bit at 4 4@2\n" +
|
||||
"// structureStartingTsPosition 0 test->reference/\"lua.torqueReductionState\", skipping bit at 4 4@3\n" +
|
||||
"// structureStartingTsPosition 0 test->reference/\"lua.clutchUpState\", skipping bit at 24 24@0\n" +
|
||||
"// structureStartingTsPosition 0 test->reference/\"lua.brakePedalState\", skipping bit at 24 24@1\n" +
|
||||
"// structureStartingTsPosition 0 test->reference/\"lua.disableDecelerationFuelCutOff\", skipping bit at 24 24@2\n" +
|
||||
"// structureStartingTsPosition 0 test->reference/\"lua.torqueReductionState\", skipping bit at 24 24@3\n" +
|
||||
"\t{test->reference.speedToRpmRatio, \"ra\", \"value\", 0},\n", actor, false);
|
||||
}
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ class PerFieldWithStructuresIterator extends FieldIterator {
|
|||
// java side of things does not care for 'cs.withPrefix'
|
||||
String extraPrefix = variableNamePrefix + strategy.getArrayElementName(cf) + prefixSeparator;
|
||||
PerFieldWithStructuresIterator fieldIterator = new PerFieldWithStructuresIterator(state, cs.getTsFields(), extraPrefix, strategy, prefixSeparator);
|
||||
fieldIterator.loop(0);
|
||||
fieldIterator.loop(currentPosition);
|
||||
content = fieldIterator.sb.toString();
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -76,8 +76,8 @@ public class SdCardFieldsContent {
|
|||
if (configField.isBit()) {
|
||||
// 'structureStartingTsPosition' is about fragment list see fragments.h
|
||||
int offsetWithinCurrentStructure = currentPosition - structureStartingTsPosition;
|
||||
// if (offsetWithinCurrentStructure < 0)
|
||||
// throw new IllegalStateException(humanName + " seems broken: " + currentPosition + " vs " + structureStartingTsPosition);
|
||||
if (offsetWithinCurrentStructure < 0)
|
||||
throw new IllegalStateException(humanName + " seems broken: " + currentPosition + " vs " + structureStartingTsPosition);
|
||||
return "// structureStartingTsPosition " + structureStartingTsPosition + " " + expression + "/" + humanName + ", skipping bit " + namePrefix + " at " + currentPosition + " " + offsetWithinCurrentStructure + "@" + perFieldWithStructuresIterator.bitState.get() + "\n";
|
||||
}
|
||||
|
||||
|
|
|
@ -164,10 +164,10 @@ public class LiveDataProcessorTest {
|
|||
"\t{engine->outputChannels.oootempC, \"Temperature\", \"C\", 0},\n" +
|
||||
"\t{engine->outputChannels.oooesr, \"ESR\", \"ohm\", 0},\n" +
|
||||
"\t{engine->outputChannels.lua.fuelMult, \"Lua: Fuel mult\", \"\", 0},\n" +
|
||||
"// structureStartingTsPosition 24 engine->outputChannels/\"lua.clutchUpState\", skipping bit at 4 -20@0\n" +
|
||||
"// structureStartingTsPosition 24 engine->outputChannels/\"lua.brakePedalState\", skipping bit at 4 -20@1\n" +
|
||||
"// structureStartingTsPosition 24 engine->outputChannels/\"lua.disableDecelerationFuelCutOff\", skipping bit at 4 -20@2\n" +
|
||||
"// structureStartingTsPosition 24 engine->outputChannels/\"lua.torqueReductionState\", skipping bit at 4 -20@3\n" +
|
||||
"// structureStartingTsPosition 24 engine->outputChannels/\"lua.clutchUpState\", skipping bit at 32 8@0\n" +
|
||||
"// structureStartingTsPosition 24 engine->outputChannels/\"lua.brakePedalState\", skipping bit at 32 8@1\n" +
|
||||
"// structureStartingTsPosition 24 engine->outputChannels/\"lua.disableDecelerationFuelCutOff\", skipping bit at 32 8@2\n" +
|
||||
"// structureStartingTsPosition 24 engine->outputChannels/\"lua.torqueReductionState\", skipping bit at 32 8@3\n" +
|
||||
"};\n",
|
||||
destinationFolder + SdCardFieldsContent.SD_CARD_OUTPUT_FILE_NAME);
|
||||
|
||||
|
|
Loading…
Reference in New Issue