diff options
| author | Keith Packard <keithp@keithp.com> | 2010-07-28 15:41:34 -0700 |
|---|---|---|
| committer | Keith Packard <keithp@keithp.com> | 2010-07-28 15:41:34 -0700 |
| commit | 6599e9576c3da9325a1731144c1b8bc4943184c0 (patch) | |
| tree | f17962ea64cbc8a337c595a22a9382179b0428e8 /ao-tools/altosui/AltosFile.java | |
| parent | 8a6040e143ecc7830cc1c0114de85f3b72c067eb (diff) | |
altosui: Add eeprom data capture function. No UI yet.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'ao-tools/altosui/AltosFile.java')
| -rw-r--r-- | ao-tools/altosui/AltosFile.java | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/ao-tools/altosui/AltosFile.java b/ao-tools/altosui/AltosFile.java index c7ee8679..7f65381f 100644 --- a/ao-tools/altosui/AltosFile.java +++ b/ao-tools/altosui/AltosFile.java @@ -24,14 +24,23 @@ import altosui.AltosTelemetry; import altosui.AltosPreferences; class AltosFile extends File { - public AltosFile(AltosTelemetry telem) { + + public AltosFile(int year, int month, int day, int serial, int flight, String extension) { super (AltosPreferences.logdir(), String.format("%04d-%02d-%02d-serial-%03d-flight-%03d.%s", - Calendar.getInstance().get(Calendar.YEAR), - Calendar.getInstance().get(Calendar.MONTH), - Calendar.getInstance().get(Calendar.DAY_OF_MONTH), - telem.serial, - telem.flight, - "telem")); + year, month, day, serial, flight, extension)); + } + + public AltosFile(int serial, int flight, String extension) { + this(Calendar.getInstance().get(Calendar.YEAR), + Calendar.getInstance().get(Calendar.MONTH) + 1, + Calendar.getInstance().get(Calendar.DAY_OF_MONTH), + serial, + flight, + extension); + } + + public AltosFile(AltosTelemetry telem) { + this(telem.serial, telem.flight, "telem"); } } |
