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");
}
}