Add Linux device discovery
[fw/altos] / ao-tools / altosui / AltosUI.java
index ab5f18288ca3deafba91c9dc7d745c55b8e327bf..54016ac5d8df112c17378d5ca8d4aa3d7a6ab129 100644 (file)
@@ -532,8 +532,7 @@ public class AltosUI extends JFrame {
                }
        }
 
-       /*
-        * Connect to TeleMetrum, either directly or through
+       /* Connect to TeleMetrum, either directly or through
         * a TeleDongle over the packet link
         */
        private void SaveFlightData() {
@@ -556,6 +555,8 @@ public class AltosUI extends JFrame {
                }
        }
 
+       /* Create the AltosUI menus
+        */
        private void createMenu() {
                JMenuBar menubar = new JMenuBar();
                JMenu menu;
@@ -681,6 +682,10 @@ public class AltosUI extends JFrame {
 
        }
        public static void main(final String[] args) {
+               AltosDevice[] devices = AltosDeviceLinux.list();
+               for (int i = 0; i < devices.length; i++)
+                       System.out.printf("Model: %s Serial: %d Tty: %s\n",
+                                         devices[i].product, devices[i].serial, devices[i].tty);
                AltosUI altosui = new AltosUI();
                altosui.setVisible(true);
        }