Skip to content

Commit f6b0dee

Browse files
calvertdwihmc-rosie
authored andcommitted
Change to just the svo prefix to save disk space.
1 parent b769fed commit f6b0dee

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main/java/us/ihmc/robotDataLogger/logger/ZEDSVOLogger.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public class ZEDSVOLogger
3737
private final RepeatingTaskThread grabThread = new RepeatingTaskThread(getClass().getName() + "GrabThread", this::grab);
3838
private final RepeatingTaskThread connectionWatchdogThread = new RepeatingTaskThread(getClass().getName() + "ConnectionWatchdog", this::connectionCheck);
3939

40-
private String svoFileName;
40+
private String svoPrefix;
4141
private LongSupplier timestampSupplier;
4242
private FileWriter timestampWriter;
4343
private Instant startTime;
@@ -49,12 +49,12 @@ public class ZEDSVOLogger
4949

5050
public void start(String svoFile, String datFile, LongSupplier timestampSupplier, String address, int port)
5151
{
52-
this.svoFileName = svoFile;
5352
this.timestampSupplier = timestampSupplier;
5453

5554
if (stopRequested)
5655
throw new IllegalStateException("Cannot restart ZEDSVOLogger once stopped");
5756

57+
svoPrefix = svoFile.substring(0, "yyyyMMdd_HHmmss".length());
5858
timestampWriter = ExceptionTools.handle(() -> new FileWriter(datFile, true), DefaultExceptionHandler.RUNTIME_EXCEPTION);
5959

6060
initParameters = new SL_InitParameters();
@@ -132,7 +132,7 @@ public void grab()
132132

133133
try
134134
{
135-
timestampWriter.write("%d %d %s%n".formatted(timestampSupplier.getAsLong(), frameTimeNanos, svoFileName));
135+
timestampWriter.write("%d %d %s%n".formatted(timestampSupplier.getAsLong(), frameTimeNanos, svoPrefix));
136136
}
137137
catch (IOException e)
138138
{

0 commit comments

Comments
 (0)