MLG_Binary_LogFormat_1.0 fixes

This commit is contained in:
rusefillc 2022-08-17 00:22:45 -04:00
parent 782d80cb3b
commit 1c89e3110e
1 changed files with 12 additions and 8 deletions

View File

@ -6,6 +6,9 @@ import java.util.function.Function;
/** /**
* MLV .mlq binary log file * MLV .mlq binary log file
* https://www.efianalytics.com/TunerStudio/docs/MLG_Binary_LogFormat_1.0.pdf
* https://www.efianalytics.com/TunerStudio/docs/MLG_Binary_LogFormat_2.0.pdf
*
* </p> * </p>
* Andrey Belomutskiy, (c) 2013-2020 * Andrey Belomutskiy, (c) 2013-2020
*/ */
@ -123,17 +126,18 @@ public class BinarySensorLog<T extends BinaryLogEntry> implements SensorLog, Aut
String name = sensor.getName(); String name = sensor.getName();
String unit = sensor.getUnit(); String unit = sensor.getUnit();
// 0000h // 0000h type enum
stream.write(sensor.getByteSize()); stream.write(7);
// 0001h // 0001h
writeLine(stream, name, 34); writeLine(stream, name, 34);
// 0023h // 0023h
writeLine(stream, unit, 11); writeLine(stream, unit, 10);
// 002Eh scale stream.write(0); // Display Style, 0=Float
stream.writeFloat(1); // todo: multiplier? // 002Eh 46 scale
// 0032h zeroes stream.writeFloat(1);
stream.writeInt(0); // 0032h 50 transform
// 0036h precision stream.writeFloat(0);
// 0036h precision digits
stream.write(2); stream.write(2);
} }
if (stream.size() != infoDataStart) if (stream.size() != infoDataStart)