timestamp scale bugfix

This commit is contained in:
rusefillc 2024-09-22 21:21:13 -04:00
parent 430ec5cd7a
commit 22e66be7cd
1 changed files with 2 additions and 1 deletions

View File

@ -56,7 +56,8 @@ public class BinarySensorLog<T extends BinaryLogEntry> implements SensorLog, Aut
try { try {
stream.write(0); stream.write(0);
stream.write(lineCounter++); stream.write(lineCounter++);
stream.writeShort((int) (timeProvider.currentTimestampUs() * 100)); // Offset 2, size 2 = Timestamp at 10us resolution
stream.writeShort((int) (timeProvider.currentTimestampUs() / 10));
ByteArrayOutputStream baos = new ByteArrayOutputStream(); ByteArrayOutputStream baos = new ByteArrayOutputStream();
DataOutputStream dos = new DataOutputStream(baos); DataOutputStream dos = new DataOutputStream(baos);