X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=altosui%2FAltosLog.java;h=a5f1830d89d0986149cf1bc88781dcc82296cb77;hp=855ee2b4a724fd22963a02a54db3fd60b2a6b346;hb=74d5dea5d5ef91db823018b631613d15c6da085d;hpb=4132ac5896114e5f3d8fb3f219422e8933078cf4 diff --git a/altosui/AltosLog.java b/altosui/AltosLog.java index 855ee2b4..a5f1830d 100644 --- a/altosui/AltosLog.java +++ b/altosui/AltosLog.java @@ -35,6 +35,7 @@ class AltosLog implements Runnable { int flight; FileWriter log_file; Thread log_thread; + AltosFile file; private void close_log_file() { if (log_file != null) { @@ -54,6 +55,10 @@ class AltosLog implements Runnable { } } + File file() { + return file; + } + boolean open (AltosRecord telem) throws IOException { AltosFile a = new AltosFile(telem); @@ -69,6 +74,7 @@ class AltosLog implements Runnable { } } log_file.flush(); + file = a; } return log_file != null; } @@ -88,7 +94,6 @@ class AltosLog implements Runnable { close_log_file(); serial = telem.serial; flight = telem.flight; - System.out.printf("Opening telem %d %d\n", serial, flight); open(telem); } previous = telem;