logging of live data structs was: data points #3614
fixing a couple of brand new bugs
This commit is contained in:
parent
0635c19492
commit
698e856803
Binary file not shown.
|
@ -106,7 +106,7 @@ public class UsagesReader {
|
||||||
}
|
}
|
||||||
|
|
||||||
try (FileWriter fw = new FileWriter("console/binary/generated/wip.ini")) {
|
try (FileWriter fw = new FileWriter("console/binary/generated/wip.ini")) {
|
||||||
fw.write(totalSensors.toString());
|
fw.write(fancyNewStuff.toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,9 +7,9 @@ import java.io.IOException;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public abstract class FieldsStrategy {
|
public abstract class FieldsStrategy {
|
||||||
public void run(ReaderState state, ConfigStructure structure) throws IOException {
|
public void run(ReaderState state, ConfigStructure structure, int sensorTsPosition) throws IOException {
|
||||||
if (state.stack.isEmpty()) {
|
if (state.stack.isEmpty()) {
|
||||||
writeJavaFields(structure.tsFields, "", 0);
|
writeJavaFields(structure.tsFields, "", sensorTsPosition);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -52,7 +52,7 @@ public class FragmentDialogConsumer implements ConfigurationConsumer {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
fieldsStrategy.run(readerState, structure);
|
fieldsStrategy.run(readerState, structure, 0);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,6 @@ import com.rusefi.*;
|
||||||
import java.io.CharArrayWriter;
|
import java.io.CharArrayWriter;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.List;
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import static com.rusefi.ToolUtil.EOL;
|
import static com.rusefi.ToolUtil.EOL;
|
||||||
|
@ -107,6 +106,6 @@ public abstract class JavaFieldsConsumer implements ConfigurationConsumer {
|
||||||
return tsPosition;
|
return tsPosition;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
fieldsStrategy.run(state, structure);
|
fieldsStrategy.run(state, structure, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -58,10 +58,13 @@ public class JavaSensorsConsumer implements ConfigurationConsumer {
|
||||||
|
|
||||||
|
|
||||||
tsPosition += configField.getSize(next);
|
tsPosition += configField.getSize(next);
|
||||||
|
// this value would be consumed by UsagesReader
|
||||||
|
sensorTsPosition = tsPosition;
|
||||||
|
|
||||||
return tsPosition;
|
return tsPosition;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
fieldsStrategy.run(readerState, structure);
|
fieldsStrategy.run(readerState, structure, sensorTsPosition);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String quote(String string) {
|
public static String quote(String string) {
|
||||||
|
|
Loading…
Reference in New Issue