From cc600a0389720bc7e435dbda8bec080ef19e0c58 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Mon, 5 Apr 2010 22:21:46 -0700 Subject: Add Linux device discovery AltosDeviceLinux.java scans /proc to locate suitable devices. This will be hooked up to the UI shortly. --- ao-tools/altosui/AltosUI.java | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ao-tools/altosui/AltosUI.java') diff --git a/ao-tools/altosui/AltosUI.java b/ao-tools/altosui/AltosUI.java index a51ca1eb..54016ac5 100644 --- a/ao-tools/altosui/AltosUI.java +++ b/ao-tools/altosui/AltosUI.java @@ -682,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); } -- cgit v1.2.3