X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=altosui%2FAltosUI.java;h=a1bc83bf11c28c40fe2545f7e5dcd8691f37f277;hp=9dad8718507dd384c07a59c5506fb4d8234b2cc4;hb=9e18c524fa2d1f648f265b3c3105f5ceacf06c10;hpb=488a527267decece48e6682e0e0c7fc29cbed329 diff --git a/altosui/AltosUI.java b/altosui/AltosUI.java index 9dad8718..a1bc83bf 100644 --- a/altosui/AltosUI.java +++ b/altosui/AltosUI.java @@ -22,7 +22,7 @@ import java.awt.event.*; import javax.swing.*; import java.io.*; import java.util.concurrent.*; -import org.altusmetrum.altoslib_2.*; +import org.altusmetrum.altoslib_3.*; import org.altusmetrum.altosuilib_1.*; public class AltosUI extends AltosUIFrame { @@ -233,7 +233,7 @@ public class AltosUI extends AltosUIFrame { }); setLocationByPlatform(false); - + /* Insets aren't set before the window is visible */ setVisible(true); } @@ -468,7 +468,7 @@ public class AltosUI extends AltosUIFrame { } return false; } - + static boolean process_summary(File file) { AltosStateIterable states = record_iterable(file); if (states == null) @@ -547,7 +547,7 @@ public class AltosUI extends AltosUIFrame { System.out.printf(" --kml\tgenerate KML output for use with Google Earth\n"); System.exit(code); } - + public static void main(final String[] args) { int errors = 0; load_library(null); @@ -560,8 +560,9 @@ public class AltosUI extends AltosUIFrame { AltosUI altosui = new AltosUI(); java.util.List devices = AltosUSBDevice.list(Altos.product_basestation); - for (AltosDevice device : devices) - altosui.telemetry_window(device); + if (devices != null) + for (AltosDevice device : devices) + altosui.telemetry_window(device); } else { int process = process_none; for (int i = 0; i < args.length; i++) { @@ -573,7 +574,7 @@ public class AltosUI extends AltosUIFrame { } else { double lat = Double.parseDouble(args[i+1]); double lon = Double.parseDouble(args[i+2]); - AltosSiteMap.prefetchMaps(lat, lon, 5, 5); + AltosSiteMap.prefetchMaps(lat, lon); i += 2; } } else if (args[i].equals("--replay"))