This commit is contained in:
rusefi 2020-05-15 01:46:17 -04:00
parent 28ce458e5b
commit 437e64ad38
2 changed files with 3 additions and 2 deletions

View File

@ -80,7 +80,7 @@ public enum FileLog {
return new FileOutputStream(fileName, true); return new FileOutputStream(fileName, true);
} }
private static void createFolderIfNeeded() { static void createFolderIfNeeded() {
File dir = new File(DIR); File dir = new File(DIR);
if (dir.exists()) if (dir.exists())
return; return;

View File

@ -138,13 +138,14 @@ public class SensorLogger {
} }
private static void startSensorLogFile() { private static void startSensorLogFile() {
FileLog.createFolderIfNeeded();
String fileName = FileLog.DIR + FileLog.getDate() + ".msl"; String fileName = FileLog.DIR + FileLog.getDate() + ".msl";
fileStartTime = System.currentTimeMillis(); fileStartTime = System.currentTimeMillis();
try { try {
logFile = new FileWriter(fileName); logFile = new FileWriter(fileName);
logFile.write("\"rusEfi console" + Launcher.CONSOLE_VERSION + " firmware " + Launcher.firmwareVersion.get() + "\"\r\n"); logFile.write("\"rusEFI console" + Launcher.CONSOLE_VERSION + " firmware " + Launcher.firmwareVersion.get() + "\"\r\n");
logFile.write("Captured " + FileLog.getDate() + "\r\n"); logFile.write("Captured " + FileLog.getDate() + "\r\n");
int debugMode = -1; int debugMode = -1;