From 8dd455204cf8712fa8c142b0c0517cec1bf5fd0f Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Fri, 8 Apr 2011 10:13:55 -0700 Subject: altosui: Add low-level Bluetooth APIs Adds the JNI functions to query and connect to arbitrary bluetooth devices. Adds Java wrappers to construct a list of proximate bluetooth devices. Signed-off-by: Keith Packard --- altosui/AltosBTDevice.java | 142 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 142 insertions(+) create mode 100644 altosui/AltosBTDevice.java (limited to 'altosui/AltosBTDevice.java') diff --git a/altosui/AltosBTDevice.java b/altosui/AltosBTDevice.java new file mode 100644 index 00000000..8eb18bb9 --- /dev/null +++ b/altosui/AltosBTDevice.java @@ -0,0 +1,142 @@ +/* + * Copyright © 2011 Keith Packard + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. + */ + +package altosui; +import java.lang.*; +import java.util.*; +import libaltosJNI.*; + +public class AltosBTDevice extends altos_bt_device { + + static public boolean initialized = false; + static public boolean loaded_library = false; + + public static boolean load_library() { + if (!initialized) { + try { + System.loadLibrary("altos"); + libaltos.altos_init(); + loaded_library = true; + } catch (UnsatisfiedLinkError e) { + loaded_library = false; + } + initialized = true; + } + return loaded_library; + } + + static String bt_product_telebt() { + if (load_library()) + return libaltosConstants.BLUETOOTH_PRODUCT_TELEBT; + return "TeleBT"; + } + + public final static String bt_product_telebt = bt_product_telebt(); + public final static String bt_product_any = "Any"; + public final static String bt_product_basestation = "Basestation"; + + public String getProduct() { + String name = getName(); + if (name == null) + return "Altus Metrum"; + int dash = name.lastIndexOf("-"); + if (dash < 0) + return name; + return name.substring(0,dash); + } + + public int getSerial() { + String name = getName(); + if (name == null) + return 0; + int dash = name.lastIndexOf("-"); + if (dash < 0 || dash >= name.length()) + return 0; + String sn = name.substring(dash + 1, name.length()); + try { + return Integer.parseInt(sn); + } catch (NumberFormatException ne) { + return 0; + } + } + + public String toString() { + String name = getName(); + if (name == null) + name = "Altus Metrum"; + return String.format("%-20.20s %4d %s", + getProduct(), getSerial(), getAddr()); + } + + public String toShortString() { + String name = getName(); + if (name == null) + name = "Altus Metrum"; + return String.format("%s %d %s", + getProduct(), getSerial(), getAddr()); + + } + + public boolean isAltusMetrum() { + if (getName().startsWith(bt_product_telebt)) + return true; + return false; + } + + public boolean matchProduct(String want_product) { + + if (!isAltusMetrum()) + return false; + + if (want_product.equals(bt_product_any)) + return true; + + if (want_product.equals(bt_product_basestation)) + return matchProduct(bt_product_telebt); + + if (want_product.equals(getProduct())) + return true; + + return false; + } + + static AltosBTDevice[] list(String product) { + if (!load_library()) + return null; + + SWIGTYPE_p_altos_bt_list list = libaltos.altos_bt_list_start(); + + ArrayList device_list = new ArrayList(); + if (list != null) { + SWIGTYPE_p_altos_file file; + + for (;;) { + AltosBTDevice device = new AltosBTDevice(); + if (libaltos.altos_bt_list_next(list, device) == 0) + break; + if (device.matchProduct(product)) + device_list.add(device); + } + libaltos.altos_bt_list_finish(list); + } + + AltosBTDevice[] devices = new AltosBTDevice[device_list.size()]; + for (int i = 0; i < device_list.size(); i++) + devices[i] = device_list.get(i); + return devices; + } +} \ No newline at end of file -- cgit v1.2.3 From 5b3f18b38d80aa041b971204bf7a94278bd9584a Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Fri, 8 Apr 2011 19:46:15 -0700 Subject: altosui: Add primitive bluetooth device manager UI. This isn't useful, but does inquire for available bluetooth devices and show them in a list. Signed-off-by: Keith Packard --- altosui/AltosBTDevice.java | 26 ----- altosui/AltosBTDeviceIterator.java | 68 ++++++++++++++ altosui/AltosBTManage.java | 188 +++++++++++++++++++++++++++++++++++++ altosui/AltosConfigureUI.java | 17 +++- altosui/AltosUI.java | 4 + altosui/Makefile.am | 2 + 6 files changed, 278 insertions(+), 27 deletions(-) create mode 100644 altosui/AltosBTDeviceIterator.java create mode 100644 altosui/AltosBTManage.java (limited to 'altosui/AltosBTDevice.java') diff --git a/altosui/AltosBTDevice.java b/altosui/AltosBTDevice.java index 8eb18bb9..233037de 100644 --- a/altosui/AltosBTDevice.java +++ b/altosui/AltosBTDevice.java @@ -113,30 +113,4 @@ public class AltosBTDevice extends altos_bt_device { return false; } - - static AltosBTDevice[] list(String product) { - if (!load_library()) - return null; - - SWIGTYPE_p_altos_bt_list list = libaltos.altos_bt_list_start(); - - ArrayList device_list = new ArrayList(); - if (list != null) { - SWIGTYPE_p_altos_file file; - - for (;;) { - AltosBTDevice device = new AltosBTDevice(); - if (libaltos.altos_bt_list_next(list, device) == 0) - break; - if (device.matchProduct(product)) - device_list.add(device); - } - libaltos.altos_bt_list_finish(list); - } - - AltosBTDevice[] devices = new AltosBTDevice[device_list.size()]; - for (int i = 0; i < device_list.size(); i++) - devices[i] = device_list.get(i); - return devices; - } } \ No newline at end of file diff --git a/altosui/AltosBTDeviceIterator.java b/altosui/AltosBTDeviceIterator.java new file mode 100644 index 00000000..935bf822 --- /dev/null +++ b/altosui/AltosBTDeviceIterator.java @@ -0,0 +1,68 @@ +/* + * Copyright © 2011 Keith Packard + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. + */ + +package altosui; +import java.lang.*; +import java.util.*; +import libaltosJNI.*; + +public class AltosBTDeviceIterator implements Iterator { + String product; + AltosBTDevice current; + boolean done; + SWIGTYPE_p_altos_bt_list list; + + public boolean hasNext() { + System.out.printf ("BT has next?\n"); + if (list == null) + return false; + if (current != null) + return true; + if (done) + return false; + current = new AltosBTDevice(); + while (libaltos.altos_bt_list_next(list, current) != 0) { + System.out.printf("Got BT device %s\n", current.toString()); +// if (current.matchProduct(product)) + return true; + } + current = null; + done = true; + return false; + } + + public AltosBTDevice next() { + if (hasNext()) { + AltosBTDevice next = current; + current = null; + return next; + } + return null; + } + + public void remove() { + throw new UnsupportedOperationException(); + } + + public AltosBTDeviceIterator(String in_product) { + product = in_product; + done = false; + current = null; + list = libaltos.altos_bt_list_start(); + System.out.printf("Iteration of BT list started\n"); + } +} diff --git a/altosui/AltosBTManage.java b/altosui/AltosBTManage.java new file mode 100644 index 00000000..8e9e0f73 --- /dev/null +++ b/altosui/AltosBTManage.java @@ -0,0 +1,188 @@ +/* + * Copyright © 2011 Keith Packard + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. + */ + +package altosui; + +import java.awt.*; +import java.awt.event.*; +import javax.swing.*; +import javax.swing.filechooser.FileNameExtensionFilter; +import javax.swing.table.*; +import java.io.*; +import java.util.*; +import java.text.*; +import java.util.prefs.*; +import java.util.concurrent.*; + +import libaltosJNI.*; + +public class AltosBTManage extends JDialog implements ActionListener { + String product; + LinkedBlockingQueue found_devices; + JFrame frame; + + class DeviceList extends JList implements Iterable { + LinkedList devices; + DefaultListModel list_model; + + public void add (AltosBTDevice device) { + devices.add(device); + list_model.addElement(device); + } + + //Subclass JList to workaround bug 4832765, which can cause the + //scroll pane to not let the user easily scroll up to the beginning + //of the list. An alternative would be to set the unitIncrement + //of the JScrollBar to a fixed value. You wouldn't get the nice + //aligned scrolling, but it should work. + public int getScrollableUnitIncrement(Rectangle visibleRect, + int orientation, + int direction) { + int row; + if (orientation == SwingConstants.VERTICAL && + direction < 0 && (row = getFirstVisibleIndex()) != -1) { + Rectangle r = getCellBounds(row, row); + if ((r.y == visibleRect.y) && (row != 0)) { + Point loc = r.getLocation(); + loc.y--; + int prevIndex = locationToIndex(loc); + Rectangle prevR = getCellBounds(prevIndex, prevIndex); + + if (prevR == null || prevR.y >= r.y) { + return 0; + } + return prevR.height; + } + } + return super.getScrollableUnitIncrement( + visibleRect, orientation, direction); + } + + public Iterator iterator() { + return devices.iterator(); + } + + public DeviceList() { + devices = new LinkedList(); + list_model = new DefaultListModel(); + setModel(list_model); + setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION); + setLayoutOrientation(JList.HORIZONTAL_WRAP); + setVisibleRowCount(-1); + } + } + + DeviceList visible_devices; + + DeviceList selected_devices; + + public void actionPerformed(ActionEvent e) { + } + + public void got_visible_device() { + while (!found_devices.isEmpty()) { + AltosBTDevice device = found_devices.remove(); + visible_devices.add(device); + } + } + + class BTGetVisibleDevices implements Runnable { + public void run () { + + try { + AltosBTDeviceIterator i = new AltosBTDeviceIterator(product); + AltosBTDevice device; + + while ((device = i.next()) != null) { + Runnable r; + + found_devices.add(device); + r = new Runnable() { + public void run() { + got_visible_device(); + } + }; + SwingUtilities.invokeLater(r); + } + } catch (Exception e) { + System.out.printf("uh-oh, exception %s\n", e.toString()); + } + } + } + + public AltosBTManage(String product, JFrame in_frame) { + frame = in_frame; + BTGetVisibleDevices get_visible_devices = new BTGetVisibleDevices(); + Thread t = new Thread(get_visible_devices); + t.start(); + + found_devices = new LinkedBlockingQueue(); + + JButton cancelButton = new JButton("Cancel"); + cancelButton.addActionListener(this); + + final JButton selectButton = new JButton("Select"); + selectButton.setActionCommand("select"); + selectButton.addActionListener(this); + getRootPane().setDefaultButton(selectButton); + + selected_devices = new DeviceList(); + JScrollPane selected_list_scroller = new JScrollPane(selected_devices); + selected_list_scroller.setPreferredSize(new Dimension(400, 80)); + selected_list_scroller.setAlignmentX(LEFT_ALIGNMENT); + + visible_devices = new DeviceList(); + JScrollPane visible_list_scroller = new JScrollPane(visible_devices); + visible_list_scroller.setPreferredSize(new Dimension(400, 80)); + visible_list_scroller.setAlignmentX(LEFT_ALIGNMENT); + + //Create a container so that we can add a title around + //the scroll pane. Can't add a title directly to the + //scroll pane because its background would be white. + //Lay out the label and scroll pane from top to bottom. + JPanel listPane = new JPanel(); + listPane.setLayout(new BoxLayout(listPane, BoxLayout.PAGE_AXIS)); + + JLabel label = new JLabel("Select Device"); + label.setLabelFor(selected_devices); + listPane.add(label); + listPane.add(Box.createRigidArea(new Dimension(0,5))); + listPane.add(selected_list_scroller); + listPane.add(visible_list_scroller); + listPane.setBorder(BorderFactory.createEmptyBorder(10,10,10,10)); + + //Lay out the buttons from left to right. + JPanel buttonPane = new JPanel(); + buttonPane.setLayout(new BoxLayout(buttonPane, BoxLayout.LINE_AXIS)); + buttonPane.setBorder(BorderFactory.createEmptyBorder(0, 10, 10, 10)); + buttonPane.add(Box.createHorizontalGlue()); + buttonPane.add(cancelButton); + buttonPane.add(Box.createRigidArea(new Dimension(10, 0))); + buttonPane.add(selectButton); + + //Put everything together, using the content pane's BorderLayout. + Container contentPane = getContentPane(); + contentPane.add(listPane, BorderLayout.CENTER); + contentPane.add(buttonPane, BorderLayout.PAGE_END); + + //Initialize values. +// list.setSelectedValue(initial, true); + pack(); + setLocationRelativeTo(frame); + setVisible(true); + } +} diff --git a/altosui/AltosConfigureUI.java b/altosui/AltosConfigureUI.java index 9a292c91..a2755a06 100644 --- a/altosui/AltosConfigureUI.java +++ b/altosui/AltosConfigureUI.java @@ -49,6 +49,8 @@ public class AltosConfigureUI JRadioButton serial_debug; + JButton manage_bluetooth; + /* DocumentListener interface methods */ public void changedUpdate(DocumentEvent e) { AltosPreferences.set_callsign(callsign_value.getText()); @@ -199,6 +201,19 @@ public class AltosConfigureUI c.anchor = GridBagConstraints.WEST; pane.add(serial_debug, c); + manage_bluetooth = new JButton("Manage Bluetooth"); + manage_bluetooth.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + new AltosBTManage(AltosBTDevice.bt_product_any, owner); + } + }); + c.gridx = 1; + c.gridy = 6; + c.gridwidth = 3; + c.fill = GridBagConstraints.NONE; + c.anchor = GridBagConstraints.WEST; + pane.add(manage_bluetooth, c); + /* And a close button at the bottom */ close = new JButton("Close"); close.addActionListener(new ActionListener() { @@ -207,7 +222,7 @@ public class AltosConfigureUI } }); c.gridx = 0; - c.gridy = 6; + c.gridy = 7; c.gridwidth = 3; c.fill = GridBagConstraints.NONE; c.anchor = GridBagConstraints.CENTER; diff --git a/altosui/AltosUI.java b/altosui/AltosUI.java index 4d17b0d2..73ddf979 100644 --- a/altosui/AltosUI.java +++ b/altosui/AltosUI.java @@ -198,6 +198,10 @@ public class AltosUI extends JFrame { } private void ConnectToDevice() { + AltosBTManage bt_manage; + + bt_manage = new AltosBTManage(AltosBTDevice.bt_product_any, this); + bt_manage.list(); AltosDevice device = AltosDeviceDialog.show(AltosUI.this, AltosDevice.product_basestation); diff --git a/altosui/Makefile.am b/altosui/Makefile.am index 5b11d1b0..37a40eaa 100644 --- a/altosui/Makefile.am +++ b/altosui/Makefile.am @@ -27,6 +27,8 @@ altosui_JAVA = \ AltosDeviceDialog.java \ AltosDevice.java \ AltosBTDevice.java \ + AltosBTDeviceIterator.java \ + AltosBTManage.java \ AltosDisplayThread.java \ AltosEepromChunk.java \ AltosEepromDelete.java \ -- cgit v1.2.3 From 84163eee7847a09fe78f8762b28f857d76bf5755 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Thu, 14 Apr 2011 10:22:30 -0700 Subject: altosui: Make AltosBTDevice implement AltosDevice interface This will allow the use of either USB or BT devices through the AltosDevice interface. Signed-off-by: Keith Packard --- altosui/Altos.java | 8 ++++++ altosui/AltosBTDevice.java | 59 ++++++++++++++++++--------------------------- altosui/AltosUSBDevice.java | 2 +- 3 files changed, 32 insertions(+), 37 deletions(-) (limited to 'altosui/AltosBTDevice.java') diff --git a/altosui/Altos.java b/altosui/Altos.java index 5df004c5..d221077e 100644 --- a/altosui/Altos.java +++ b/altosui/Altos.java @@ -301,4 +301,12 @@ public class Altos { public final static int product_any = 0x10000; public final static int product_basestation = 0x10000 + 1; + + static String bt_product_telebt() { + if (load_library()) + return libaltosConstants.BLUETOOTH_PRODUCT_TELEBT; + return "TeleBT"; + } + + public final static String bt_product_telebt = bt_product_telebt(); } diff --git a/altosui/AltosBTDevice.java b/altosui/AltosBTDevice.java index 233037de..5e946415 100644 --- a/altosui/AltosBTDevice.java +++ b/altosui/AltosBTDevice.java @@ -20,36 +20,9 @@ import java.lang.*; import java.util.*; import libaltosJNI.*; -public class AltosBTDevice extends altos_bt_device { - - static public boolean initialized = false; - static public boolean loaded_library = false; - - public static boolean load_library() { - if (!initialized) { - try { - System.loadLibrary("altos"); - libaltos.altos_init(); - loaded_library = true; - } catch (UnsatisfiedLinkError e) { - loaded_library = false; - } - initialized = true; - } - return loaded_library; - } - - static String bt_product_telebt() { - if (load_library()) - return libaltosConstants.BLUETOOTH_PRODUCT_TELEBT; - return "TeleBT"; - } - - public final static String bt_product_telebt = bt_product_telebt(); - public final static String bt_product_any = "Any"; - public final static String bt_product_basestation = "Basestation"; +public class AltosBTDevice extends altos_bt_device implements AltosDevice { - public String getProduct() { + public String getProductName() { String name = getName(); if (name == null) return "Altus Metrum"; @@ -59,6 +32,16 @@ public class AltosBTDevice extends altos_bt_device { return name.substring(0,dash); } + public int getProduct() { + if (Altos.bt_product_telebt.equals(getProductName())) + return Altos.product_telebt; + return 0; + } + + public String getPath() { + return getAddr(); + } + public int getSerial() { String name = getName(); if (name == null) @@ -91,24 +74,28 @@ public class AltosBTDevice extends altos_bt_device { } - public boolean isAltusMetrum() { - if (getName().startsWith(bt_product_telebt)) + public SWIGTYPE_p_altos_file open() { + return libaltos.altos_bt_open(this); + } + + private boolean isAltusMetrum() { + if (getName().startsWith(Altos.bt_product_telebt)) return true; return false; } - public boolean matchProduct(String want_product) { + public boolean matchProduct(int want_product) { if (!isAltusMetrum()) return false; - if (want_product.equals(bt_product_any)) + if (want_product == Altos.product_any) return true; - if (want_product.equals(bt_product_basestation)) - return matchProduct(bt_product_telebt); + if (want_product == Altos.product_basestation) + return matchProduct(Altos.product_telebt); - if (want_product.equals(getProduct())) + if (want_product == getProduct()) return true; return false; diff --git a/altosui/AltosUSBDevice.java b/altosui/AltosUSBDevice.java index 03ddf5a8..deed0056 100644 --- a/altosui/AltosUSBDevice.java +++ b/altosui/AltosUSBDevice.java @@ -43,7 +43,7 @@ public class AltosUSBDevice extends altos_device implements AltosDevice { return libaltos.altos_open(this); } - public boolean isAltusMetrum() { + private boolean isAltusMetrum() { if (getVendor() != Altos.vendor_altusmetrum) return false; if (getProduct() < Altos.product_altusmetrum_min) -- cgit v1.2.3 From f249e5926f5fd9f86c41e7f0a414193533d4d8b0 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Mon, 18 Apr 2011 18:16:38 -0500 Subject: altosui: Make bluetooth dialog modal This allows it to be displayed correctly while the device dialog box (also modal) is up. Signed-off-by: Keith Packard --- altosui/AltosBTDevice.java | 2 +- altosui/AltosBTDeviceIterator.java | 4 +- altosui/AltosBTManage.java | 21 ++++++--- altosui/AltosDeviceDialog.java | 91 ++++++++++++++++++++------------------ altosui/AltosUI.java | 4 -- 5 files changed, 65 insertions(+), 57 deletions(-) (limited to 'altosui/AltosBTDevice.java') diff --git a/altosui/AltosBTDevice.java b/altosui/AltosBTDevice.java index 5e946415..ff2be49a 100644 --- a/altosui/AltosBTDevice.java +++ b/altosui/AltosBTDevice.java @@ -62,7 +62,7 @@ public class AltosBTDevice extends altos_bt_device implements AltosDevice { if (name == null) name = "Altus Metrum"; return String.format("%-20.20s %4d %s", - getProduct(), getSerial(), getAddr()); + getProductName(), getSerial(), getAddr()); } public String toShortString() { diff --git a/altosui/AltosBTDeviceIterator.java b/altosui/AltosBTDeviceIterator.java index 935bf822..63ce3674 100644 --- a/altosui/AltosBTDeviceIterator.java +++ b/altosui/AltosBTDeviceIterator.java @@ -21,7 +21,7 @@ import java.util.*; import libaltosJNI.*; public class AltosBTDeviceIterator implements Iterator { - String product; + int product; AltosBTDevice current; boolean done; SWIGTYPE_p_altos_bt_list list; @@ -58,7 +58,7 @@ public class AltosBTDeviceIterator implements Iterator { throw new UnsupportedOperationException(); } - public AltosBTDeviceIterator(String in_product) { + public AltosBTDeviceIterator(int in_product) { product = in_product; done = false; current = null; diff --git a/altosui/AltosBTManage.java b/altosui/AltosBTManage.java index 8e9e0f73..66e1210e 100644 --- a/altosui/AltosBTManage.java +++ b/altosui/AltosBTManage.java @@ -31,9 +31,8 @@ import java.util.concurrent.*; import libaltosJNI.*; public class AltosBTManage extends JDialog implements ActionListener { - String product; LinkedBlockingQueue found_devices; - JFrame frame; + Frame frame; class DeviceList extends JList implements Iterable { LinkedList devices; @@ -104,7 +103,7 @@ public class AltosBTManage extends JDialog implements ActionListener { public void run () { try { - AltosBTDeviceIterator i = new AltosBTDeviceIterator(product); + AltosBTDeviceIterator i = new AltosBTDeviceIterator(Altos.product_any); AltosBTDevice device; while ((device = i.next()) != null) { @@ -124,9 +123,21 @@ public class AltosBTManage extends JDialog implements ActionListener { } } - public AltosBTManage(String product, JFrame in_frame) { + public static void show(Component frameComp) { + Frame frame = JOptionPane.getFrameForComponent(frameComp); + AltosBTManage dialog; + + dialog = new AltosBTManage(frame); + dialog.setVisible(true); + } + + public AltosBTManage(Frame in_frame) { + super(in_frame, "Manage Bluetooth Devices", true); + frame = in_frame; + BTGetVisibleDevices get_visible_devices = new BTGetVisibleDevices(); + Thread t = new Thread(get_visible_devices); t.start(); @@ -182,7 +193,5 @@ public class AltosBTManage extends JDialog implements ActionListener { //Initialize values. // list.setSelectedValue(initial, true); pack(); - setLocationRelativeTo(frame); - setVisible(true); } } diff --git a/altosui/AltosDeviceDialog.java b/altosui/AltosDeviceDialog.java index 154bf20b..fa20f867 100644 --- a/altosui/AltosDeviceDialog.java +++ b/altosui/AltosDeviceDialog.java @@ -22,59 +22,55 @@ import java.util.*; import javax.swing.*; import java.awt.*; import java.awt.event.*; -import libaltosJNI.libaltos; -import libaltosJNI.altos_device; -import libaltosJNI.SWIGTYPE_p_altos_file; -import libaltosJNI.SWIGTYPE_p_altos_list; +import libaltosJNI.*; public class AltosDeviceDialog extends JDialog implements ActionListener { - private static AltosDeviceDialog dialog; - private static AltosDevice value = null; - private JList list; - public static AltosDevice show (Component frameComp, int product) { Frame frame = JOptionPane.getFrameForComponent(frameComp); AltosDevice[] devices; devices = AltosUSBDevice.list(product); + AltosDeviceDialog dialog; - if (devices != null && devices.length > 0) { - value = null; - dialog = new AltosDeviceDialog(frame, frameComp, - devices, - devices[0]); - - dialog.setVisible(true); - return value; - } else { - /* check for missing altos JNI library, which - * will put up its own error dialog - */ - if (AltosUI.load_library(frame)) { - JOptionPane.showMessageDialog(frame, - "No AltOS devices available", - "No AltOS devices", - JOptionPane.ERROR_MESSAGE); - } - return null; - } + dialog = new AltosDeviceDialog(frame, frameComp, + devices); + dialog.setVisible(true); + return dialog.getValue(); + } + + private AltosDevice value; + private JList list; + private JButton cancel_button; + private JButton select_button; + private JButton manage_bluetooth_button; + private Frame frame; + + private AltosDevice getValue() { + return value; } - private AltosDeviceDialog (Frame frame, Component location, - AltosDevice[] devices, - AltosDevice initial) { - super(frame, "Device Selection", true); + private AltosDeviceDialog (Frame in_frame, Component location, + AltosDevice[] devices) { + super(in_frame, "Device Selection", true); + frame = in_frame; value = null; - JButton cancelButton = new JButton("Cancel"); - cancelButton.addActionListener(this); + cancel_button = new JButton("Cancel"); + cancel_button.setActionCommand("cancel"); + cancel_button.addActionListener(this); + + manage_bluetooth_button = new JButton("Manage Bluetooth"); + manage_bluetooth_button.setActionCommand("manage"); + manage_bluetooth_button.addActionListener(this); - final JButton selectButton = new JButton("Select"); - selectButton.setActionCommand("select"); - selectButton.addActionListener(this); - getRootPane().setDefaultButton(selectButton); + select_button = new JButton("Select"); + select_button.setActionCommand("select"); + select_button.addActionListener(this); + if (devices.length == 0) + select_button.setEnabled(false); + getRootPane().setDefaultButton(select_button); list = new JList(devices) { //Subclass JList to workaround bug 4832765, which can cause the @@ -112,7 +108,7 @@ public class AltosDeviceDialog extends JDialog implements ActionListener { list.addMouseListener(new MouseAdapter() { public void mouseClicked(MouseEvent e) { if (e.getClickCount() == 2) { - selectButton.doClick(); //emulate button click + select_button.doClick(); //emulate button click } } }); @@ -139,9 +135,11 @@ public class AltosDeviceDialog extends JDialog implements ActionListener { buttonPane.setLayout(new BoxLayout(buttonPane, BoxLayout.LINE_AXIS)); buttonPane.setBorder(BorderFactory.createEmptyBorder(0, 10, 10, 10)); buttonPane.add(Box.createHorizontalGlue()); - buttonPane.add(cancelButton); + buttonPane.add(cancel_button); buttonPane.add(Box.createRigidArea(new Dimension(10, 0))); - buttonPane.add(selectButton); + buttonPane.add(manage_bluetooth_button); + buttonPane.add(Box.createRigidArea(new Dimension(10, 0))); + buttonPane.add(select_button); //Put everything together, using the content pane's BorderLayout. Container contentPane = getContentPane(); @@ -149,7 +147,8 @@ public class AltosDeviceDialog extends JDialog implements ActionListener { contentPane.add(buttonPane, BorderLayout.PAGE_END); //Initialize values. - list.setSelectedValue(initial, true); + if (devices != null && devices.length > 0) + list.setSelectedValue(devices[0], true); pack(); setLocationRelativeTo(location); } @@ -157,8 +156,12 @@ public class AltosDeviceDialog extends JDialog implements ActionListener { //Handle clicks on the Set and Cancel buttons. public void actionPerformed(ActionEvent e) { if ("select".equals(e.getActionCommand())) - AltosDeviceDialog.value = (AltosDevice)(list.getSelectedValue()); - AltosDeviceDialog.dialog.setVisible(false); + value = (AltosDevice)(list.getSelectedValue()); + if ("manage".equals(e.getActionCommand())) { + AltosBTManage.show(frame); + return; + } + setVisible(false); } } diff --git a/altosui/AltosUI.java b/altosui/AltosUI.java index 0fc6583c..4b808c41 100644 --- a/altosui/AltosUI.java +++ b/altosui/AltosUI.java @@ -198,10 +198,6 @@ public class AltosUI extends JFrame { } private void ConnectToDevice() { - AltosBTManage bt_manage; - - bt_manage = new AltosBTManage(AltosBTDevice.bt_product_any, this); - bt_manage.list(); AltosDevice device = AltosDeviceDialog.show(AltosUI.this, Altos.product_basestation); -- cgit v1.2.3 From 17f38e045fcd8ca0224095c0b2b7b098df77a8d8 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Tue, 19 Apr 2011 08:43:40 -0700 Subject: altosui: Use persistent list of bluetooth devices for device dialogs Store a list of known bluetooth devices as preferences. Always include those in device dialogs with an option to go browse for more devices in both the device dialog and the Configure AltosUI dialog. Signed-off-by: Keith Packard --- altosui/Altos.java | 2 + altosui/AltosBTDevice.java | 24 ++- altosui/AltosBTDeviceIterator.java | 7 +- altosui/AltosBTKnown.java | 97 +++++++++++++ altosui/AltosBTManage.java | 291 ++++++++++++++++++++++++++++--------- altosui/AltosConfigureUI.java | 2 +- altosui/AltosDeviceDialog.java | 53 ++++--- altosui/AltosFlightUI.java | 2 +- altosui/AltosPreferences.java | 25 +++- altosui/AltosSiteMap.java | 2 - altosui/AltosUI.java | 8 +- altosui/AltosUSBDevice.java | 9 +- altosui/Makefile.am | 1 + altosui/libaltos/cjnitest.c | 2 +- altosui/libaltos/libaltos.c | 16 +- altosui/libaltos/libaltos.h | 5 +- 16 files changed, 423 insertions(+), 123 deletions(-) create mode 100644 altosui/AltosBTKnown.java (limited to 'altosui/AltosBTDevice.java') diff --git a/altosui/Altos.java b/altosui/Altos.java index d221077e..a087f73a 100644 --- a/altosui/Altos.java +++ b/altosui/Altos.java @@ -309,4 +309,6 @@ public class Altos { } public final static String bt_product_telebt = bt_product_telebt(); + + public static AltosBTKnown bt_known = new AltosBTKnown(); } diff --git a/altosui/AltosBTDevice.java b/altosui/AltosBTDevice.java index ff2be49a..c2721b26 100644 --- a/altosui/AltosBTDevice.java +++ b/altosui/AltosBTDevice.java @@ -86,8 +86,9 @@ public class AltosBTDevice extends altos_bt_device implements AltosDevice { public boolean matchProduct(int want_product) { - if (!isAltusMetrum()) - return false; + System.out.printf("matchProduct %s %d\n", toString(), want_product); +// if (!isAltusMetrum()) +// return false; if (want_product == Altos.product_any) return true; @@ -100,4 +101,23 @@ public class AltosBTDevice extends altos_bt_device implements AltosDevice { return false; } + + public boolean equals(Object o) { + if (!(o instanceof AltosBTDevice)) + return false; + AltosBTDevice other = (AltosBTDevice) o; + System.out.printf("AltosBTDevice equals %s == %s\n", toString(), other.toString()); + return getName().equals(other.getName()) && getAddr().equals(other.getAddr()); + } + + public int hashCode() { + return getName().hashCode() ^ getAddr().hashCode(); + } + + public AltosBTDevice(String name, String addr) { + libaltos.altos_bt_fill_in(name, addr,this); + } + + public AltosBTDevice() { + } } \ No newline at end of file diff --git a/altosui/AltosBTDeviceIterator.java b/altosui/AltosBTDeviceIterator.java index 63ce3674..7c360705 100644 --- a/altosui/AltosBTDeviceIterator.java +++ b/altosui/AltosBTDeviceIterator.java @@ -21,7 +21,6 @@ import java.util.*; import libaltosJNI.*; public class AltosBTDeviceIterator implements Iterator { - int product; AltosBTDevice current; boolean done; SWIGTYPE_p_altos_bt_list list; @@ -58,11 +57,9 @@ public class AltosBTDeviceIterator implements Iterator { throw new UnsupportedOperationException(); } - public AltosBTDeviceIterator(int in_product) { - product = in_product; + public AltosBTDeviceIterator(int inquiry_time) { done = false; current = null; - list = libaltos.altos_bt_list_start(); - System.out.printf("Iteration of BT list started\n"); + list = libaltos.altos_bt_list_start(inquiry_time); } } diff --git a/altosui/AltosBTKnown.java b/altosui/AltosBTKnown.java new file mode 100644 index 00000000..95830637 --- /dev/null +++ b/altosui/AltosBTKnown.java @@ -0,0 +1,97 @@ +/* + * Copyright © 2011 Keith Packard + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. + */ + +package altosui; +import java.lang.*; +import java.util.*; +import libaltosJNI.*; +import java.util.prefs.*; + +public class AltosBTKnown implements Iterable { + LinkedList devices = new LinkedList(); + Preferences bt_pref = AltosPreferences.bt_devices(); + + private String get_address(String name) { + return bt_pref.get(name, ""); + } + + private void set_address(String name, String addr) { + bt_pref.put(name, addr); + System.out.printf("saving known %s %s\n", name, addr); + } + + private void remove(String name) { + bt_pref.remove(name); + } + + private void load() { + try { + String[] names = bt_pref.keys(); + for (int i = 0; i < names.length; i++) { + String name = names[i]; + String addr = get_address(name); + System.out.printf("Known device %s %s\n", name, addr); + devices.add(new AltosBTDevice(name, addr)); + } + } catch (BackingStoreException be) { + } catch (IllegalStateException ie) { + } + } + + public Iterator iterator() { + return devices.iterator(); + } + + private void flush() { + AltosPreferences.flush_preferences(); + } + + public void set(Iterable new_devices) { + for (AltosBTDevice old : devices) { + boolean found = false; + for (AltosBTDevice new_device : new_devices) { + if (new_device.equals(old)) { + found = true; + break; + } + } + if (!found) + remove(old.getName()); + } + devices = new LinkedList(); + for (AltosBTDevice new_device : new_devices) { + devices.add(new_device); + set_address(new_device.getName(), new_device.getAddr()); + } + flush(); + } + + public List list(int product) { + LinkedList list = new LinkedList(); + for (AltosBTDevice device : devices) { + if (device.matchProduct(product)) + list.add(device); + } + return list; + } + + public AltosBTKnown() { + devices = new LinkedList(); + bt_pref = AltosPreferences.bt_devices(); + load(); + } +} \ No newline at end of file diff --git a/altosui/AltosBTManage.java b/altosui/AltosBTManage.java index 66e1210e..98a8b757 100644 --- a/altosui/AltosBTManage.java +++ b/altosui/AltosBTManage.java @@ -22,6 +22,8 @@ import java.awt.event.*; import javax.swing.*; import javax.swing.filechooser.FileNameExtensionFilter; import javax.swing.table.*; +import javax.swing.event.*; +import javax.swing.plaf.basic.*; import java.io.*; import java.util.*; import java.text.*; @@ -30,17 +32,32 @@ import java.util.concurrent.*; import libaltosJNI.*; -public class AltosBTManage extends JDialog implements ActionListener { +public class AltosBTManage extends JDialog implements ActionListener, Iterable { LinkedBlockingQueue found_devices; Frame frame; + LinkedList listeners; + AltosBTKnown bt_known; class DeviceList extends JList implements Iterable { LinkedList devices; DefaultListModel list_model; public void add (AltosBTDevice device) { - devices.add(device); - list_model.addElement(device); + if (!devices.contains(device)) { + devices.add(device); + list_model.addElement(device); + } + } + + public void remove (AltosBTDevice device) { + if (devices.contains(device)) { + devices.remove(device); + list_model.removeElement(device); + } + } + + public boolean contains(AltosBTDevice device) { + return devices.contains(device); } //Subclass JList to workaround bug 4832765, which can cause the @@ -75,6 +92,14 @@ public class AltosBTManage extends JDialog implements ActionListener { return devices.iterator(); } + public java.util.List selected_list() { + java.util.LinkedList l = new java.util.LinkedList(); + Object[] a = getSelectedValues(); + for (int i = 0; i < a.length; i++) + l.add((AltosBTDevice)a[i]); + return l; + } + public DeviceList() { devices = new LinkedList(); list_model = new DefaultListModel(); @@ -87,111 +112,233 @@ public class AltosBTManage extends JDialog implements ActionListener { DeviceList visible_devices; - DeviceList selected_devices; + DeviceList known_devices; + Thread bt_thread; + + public Iterator iterator() { + return known_devices.iterator(); + } + + public void commit() { + bt_known.set(this); + } + + public void add_known() { + for (AltosBTDevice device : visible_devices.selected_list()) { + System.out.printf("Add known %s\n", device.toString()); + known_devices.add(device); + visible_devices.remove(device); + } + } + + public void remove_known() { + for (AltosBTDevice device : known_devices.selected_list()) { + System.out.printf("Remove known %s\n", device.toString()); + known_devices.remove(device); + visible_devices.add(device); + } + } + + public void addActionListener(ActionListener l) { + listeners.add(l); + } + + private void forwardAction(ActionEvent e) { + for (ActionListener l : listeners) + l.actionPerformed(e); + } public void actionPerformed(ActionEvent e) { + String command = e.getActionCommand(); + System.out.printf("manage command %s\n", command); + if ("ok".equals(command)) { + bt_thread.interrupt(); + commit(); + setVisible(false); + forwardAction(e); + } else if ("cancel".equals(command)) { + bt_thread.interrupt(); + setVisible(false); + forwardAction(e); + } else if ("select".equals(command)) { + add_known(); + } else if ("deselect".equals(command)) { + remove_known(); + } } public void got_visible_device() { while (!found_devices.isEmpty()) { AltosBTDevice device = found_devices.remove(); - visible_devices.add(device); + if (!known_devices.contains(device)) + visible_devices.add(device); } } class BTGetVisibleDevices implements Runnable { public void run () { - - try { - AltosBTDeviceIterator i = new AltosBTDeviceIterator(Altos.product_any); - AltosBTDevice device; - - while ((device = i.next()) != null) { - Runnable r; - - found_devices.add(device); - r = new Runnable() { - public void run() { - got_visible_device(); - } - }; - SwingUtilities.invokeLater(r); + for (;;) + for (int time = 1; time <= 8; time <<= 1) { + AltosBTDeviceIterator i = new AltosBTDeviceIterator(time); + AltosBTDevice device; + + if (Thread.interrupted()) + return; + try { + while ((device = i.next()) != null) { + Runnable r; + + if (Thread.interrupted()) + return; + found_devices.add(device); + r = new Runnable() { + public void run() { + got_visible_device(); + } + }; + SwingUtilities.invokeLater(r); + } + } catch (Exception e) { + System.out.printf("uh-oh, exception %s\n", e.toString()); + } } - } catch (Exception e) { - System.out.printf("uh-oh, exception %s\n", e.toString()); - } } } - public static void show(Component frameComp) { + public static void show(Component frameComp, AltosBTKnown known) { Frame frame = JOptionPane.getFrameForComponent(frameComp); AltosBTManage dialog; - dialog = new AltosBTManage(frame); + dialog = new AltosBTManage(frame, known); dialog.setVisible(true); } - public AltosBTManage(Frame in_frame) { + public AltosBTManage(Frame in_frame, AltosBTKnown in_known) { super(in_frame, "Manage Bluetooth Devices", true); frame = in_frame; - + bt_known = in_known; BTGetVisibleDevices get_visible_devices = new BTGetVisibleDevices(); + bt_thread = new Thread(get_visible_devices); + bt_thread.start(); - Thread t = new Thread(get_visible_devices); - t.start(); + listeners = new LinkedList(); found_devices = new LinkedBlockingQueue(); - JButton cancelButton = new JButton("Cancel"); - cancelButton.addActionListener(this); - - final JButton selectButton = new JButton("Select"); - selectButton.setActionCommand("select"); - selectButton.addActionListener(this); - getRootPane().setDefaultButton(selectButton); - - selected_devices = new DeviceList(); - JScrollPane selected_list_scroller = new JScrollPane(selected_devices); - selected_list_scroller.setPreferredSize(new Dimension(400, 80)); - selected_list_scroller.setAlignmentX(LEFT_ALIGNMENT); + Container pane = getContentPane(); + pane.setLayout(new GridBagLayout()); + + GridBagConstraints c = new GridBagConstraints(); + c.insets = new Insets(4,4,4,4); + + /* + * Known devices label and list + */ + c.fill = GridBagConstraints.NONE; + c.anchor = GridBagConstraints.WEST; + c.gridx = 0; + c.gridy = 0; + c.gridwidth = 1; + c.gridheight = 1; + pane.add(new JLabel("Known Devices"), c); + + known_devices = new DeviceList(); + for (AltosBTDevice device : bt_known) + known_devices.add(device); + + JScrollPane known_list_scroller = new JScrollPane(known_devices); + known_list_scroller.setPreferredSize(new Dimension(400, 80)); + known_list_scroller.setAlignmentX(LEFT_ALIGNMENT); + c.fill = GridBagConstraints.BOTH; + c.anchor = GridBagConstraints.WEST; + c.gridx = 0; + c.gridy = 1; + c.gridwidth = 1; + c.gridheight = 2; + pane.add(known_list_scroller, c); + + /* + * Visible devices label and list + */ + c.fill = GridBagConstraints.NONE; + c.anchor = GridBagConstraints.WEST; + c.gridx = 2; + c.gridy = 0; + c.gridwidth = 1; + c.gridheight = 1; + pane.add(new JLabel("Visible Devices"), c); visible_devices = new DeviceList(); JScrollPane visible_list_scroller = new JScrollPane(visible_devices); visible_list_scroller.setPreferredSize(new Dimension(400, 80)); visible_list_scroller.setAlignmentX(LEFT_ALIGNMENT); + c.fill = GridBagConstraints.BOTH; + c.anchor = GridBagConstraints.WEST; + c.gridx = 2; + c.gridy = 1; + c.gridheight = 2; + c.gridwidth = 1; + pane.add(visible_list_scroller, c); + + /* + * Arrows between the two lists + */ + BasicArrowButton select_arrow = new BasicArrowButton(SwingConstants.WEST); + select_arrow.setActionCommand("select"); + select_arrow.addActionListener(this); + c.fill = GridBagConstraints.NONE; + c.anchor = GridBagConstraints.SOUTH; + c.gridx = 1; + c.gridy = 1; + c.gridheight = 1; + c.gridwidth = 1; + pane.add(select_arrow, c); + + BasicArrowButton deselect_arrow = new BasicArrowButton(SwingConstants.EAST); + deselect_arrow.setActionCommand("deselect"); + deselect_arrow.addActionListener(this); + c.fill = GridBagConstraints.NONE; + c.anchor = GridBagConstraints.NORTH; + c.gridx = 1; + c.gridy = 2; + c.gridheight = 1; + c.gridwidth = 1; + pane.add(deselect_arrow, c); + + JButton cancel_button = new JButton("Cancel"); + cancel_button.setActionCommand("cancel"); + cancel_button.addActionListener(this); + c.fill = GridBagConstraints.NONE; + c.anchor = GridBagConstraints.CENTER; + c.gridx = 0; + c.gridy = 3; + c.gridheight = 1; + c.gridwidth = 1; + pane.add(cancel_button, c); + + JButton ok_button = new JButton("OK"); + ok_button.setActionCommand("ok"); + ok_button.addActionListener(this); + c.fill = GridBagConstraints.NONE; + c.anchor = GridBagConstraints.CENTER; + c.gridx = 2; + c.gridy = 3; + c.gridheight = 1; + c.gridwidth = 1; + pane.add(ok_button, c); + + getRootPane().setDefaultButton(ok_button); - //Create a container so that we can add a title around - //the scroll pane. Can't add a title directly to the - //scroll pane because its background would be white. - //Lay out the label and scroll pane from top to bottom. - JPanel listPane = new JPanel(); - listPane.setLayout(new BoxLayout(listPane, BoxLayout.PAGE_AXIS)); - - JLabel label = new JLabel("Select Device"); - label.setLabelFor(selected_devices); - listPane.add(label); - listPane.add(Box.createRigidArea(new Dimension(0,5))); - listPane.add(selected_list_scroller); - listPane.add(visible_list_scroller); - listPane.setBorder(BorderFactory.createEmptyBorder(10,10,10,10)); - - //Lay out the buttons from left to right. - JPanel buttonPane = new JPanel(); - buttonPane.setLayout(new BoxLayout(buttonPane, BoxLayout.LINE_AXIS)); - buttonPane.setBorder(BorderFactory.createEmptyBorder(0, 10, 10, 10)); - buttonPane.add(Box.createHorizontalGlue()); - buttonPane.add(cancelButton); - buttonPane.add(Box.createRigidArea(new Dimension(10, 0))); - buttonPane.add(selectButton); - - //Put everything together, using the content pane's BorderLayout. - Container contentPane = getContentPane(); - contentPane.add(listPane, BorderLayout.CENTER); - contentPane.add(buttonPane, BorderLayout.PAGE_END); - - //Initialize values. -// list.setSelectedValue(initial, true); pack(); + setLocationRelativeTo(frame); + setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); + addWindowListener(new WindowAdapter() { + @Override + public void windowClosing(WindowEvent e) { + bt_thread.interrupt(); + setVisible(false); + } + }); } } diff --git a/altosui/AltosConfigureUI.java b/altosui/AltosConfigureUI.java index a2755a06..0f5e4a3b 100644 --- a/altosui/AltosConfigureUI.java +++ b/altosui/AltosConfigureUI.java @@ -204,7 +204,7 @@ public class AltosConfigureUI manage_bluetooth = new JButton("Manage Bluetooth"); manage_bluetooth.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { - new AltosBTManage(AltosBTDevice.bt_product_any, owner); + AltosBTManage.show(owner, Altos.bt_known); } }); c.gridx = 1; diff --git a/altosui/AltosDeviceDialog.java b/altosui/AltosDeviceDialog.java index fa20f867..e17504e2 100644 --- a/altosui/AltosDeviceDialog.java +++ b/altosui/AltosDeviceDialog.java @@ -26,37 +26,46 @@ import libaltosJNI.*; public class AltosDeviceDialog extends JDialog implements ActionListener { - public static AltosDevice show (Component frameComp, int product) { - - Frame frame = JOptionPane.getFrameForComponent(frameComp); - AltosDevice[] devices; - devices = AltosUSBDevice.list(product); - AltosDeviceDialog dialog; - - dialog = new AltosDeviceDialog(frame, frameComp, - devices); - dialog.setVisible(true); - return dialog.getValue(); - } - private AltosDevice value; private JList list; private JButton cancel_button; private JButton select_button; private JButton manage_bluetooth_button; private Frame frame; + private int product; private AltosDevice getValue() { return value; } - private AltosDeviceDialog (Frame in_frame, Component location, - AltosDevice[] devices) { + private AltosDevice[] devices() { + java.util.List usb_devices = AltosUSBDevice.list(product); + java.util.List bt_devices = Altos.bt_known.list(product); + AltosDevice[] devices = new AltosDevice[usb_devices.size() + bt_devices.size()]; + + for (int i = 0; i < usb_devices.size(); i++) + devices[i] = usb_devices.get(i); + int off = usb_devices.size(); + for (int j = 0; j < bt_devices.size(); j++) + devices[off + j] = bt_devices.get(j); + return devices; + } + + private void update_devices() { + AltosDevice[] devices = devices(); + list.setListData(devices); + select_button.setEnabled(devices.length > 0); + } + + private AltosDeviceDialog (Frame in_frame, Component location, int in_product) { super(in_frame, "Device Selection", true); + product = in_product; frame = in_frame; value = null; + AltosDevice[] devices = devices(); + cancel_button = new JButton("Cancel"); cancel_button.setActionCommand("cancel"); cancel_button.addActionListener(this); @@ -147,7 +156,7 @@ public class AltosDeviceDialog extends JDialog implements ActionListener { contentPane.add(buttonPane, BorderLayout.PAGE_END); //Initialize values. - if (devices != null && devices.length > 0) + if (devices != null && devices.length != 0) list.setSelectedValue(devices[0], true); pack(); setLocationRelativeTo(location); @@ -158,10 +167,20 @@ public class AltosDeviceDialog extends JDialog implements ActionListener { if ("select".equals(e.getActionCommand())) value = (AltosDevice)(list.getSelectedValue()); if ("manage".equals(e.getActionCommand())) { - AltosBTManage.show(frame); + AltosBTManage.show(frame, Altos.bt_known); + update_devices(); return; } setVisible(false); } + public static AltosDevice show (Component frameComp, int product) { + + Frame frame = JOptionPane.getFrameForComponent(frameComp); + AltosDeviceDialog dialog; + + dialog = new AltosDeviceDialog(frame, frameComp, product); + dialog.setVisible(true); + return dialog.getValue(); + } } diff --git a/altosui/AltosFlightUI.java b/altosui/AltosFlightUI.java index 66dcdad5..eb6c6d9d 100644 --- a/altosui/AltosFlightUI.java +++ b/altosui/AltosFlightUI.java @@ -122,7 +122,7 @@ public class AltosFlightUI extends JFrame implements AltosFlightDisplay { JComboBox telemetries; public AltosFlightUI(AltosVoice in_voice, AltosFlightReader in_reader, final int serial) { - AltosPreferences.init(this); + AltosPreferences.set_component(this); voice = in_voice; reader = in_reader; diff --git a/altosui/AltosPreferences.java b/altosui/AltosPreferences.java index 5f827655..b1192be1 100644 --- a/altosui/AltosPreferences.java +++ b/altosui/AltosPreferences.java @@ -79,11 +79,9 @@ class AltosPreferences { /* Serial debug */ static boolean serial_debug; - public static void init(Component ui) { + public static void init() { preferences = Preferences.userRoot().node("/org/altusmetrum/altosui"); - component = ui; - /* Initialize logdir from preferences */ String logdir_string = preferences.get(logdirPreference, null); if (logdir_string != null) @@ -116,14 +114,23 @@ class AltosPreferences { AltosSerial.set_debug(serial_debug); } + static { init(); } + + static void set_component(Component in_component) { + component = in_component; + } + static void flush_preferences() { try { preferences.flush(); } catch (BackingStoreException ee) { - JOptionPane.showMessageDialog(component, - preferences.absolutePath(), - "Cannot save prefernces", - JOptionPane.ERROR_MESSAGE); + if (component != null) + JOptionPane.showMessageDialog(component, + preferences.absolutePath(), + "Cannot save prefernces", + JOptionPane.ERROR_MESSAGE); + else + System.err.printf("Cannot save preferences\n"); } } @@ -262,4 +269,8 @@ class AltosPreferences { public static boolean serial_debug() { return serial_debug; } + + public static Preferences bt_devices() { + return preferences.node("bt_devices"); + } } diff --git a/altosui/AltosSiteMap.java b/altosui/AltosSiteMap.java index f4b6b7e0..7575c10e 100644 --- a/altosui/AltosSiteMap.java +++ b/altosui/AltosSiteMap.java @@ -164,8 +164,6 @@ public class AltosSiteMap extends JScrollPane implements AltosFlightDisplay { } public static void prefetchMaps(double lat, double lng, int w, int h) { - AltosPreferences.init(null); - AltosSiteMap asm = new AltosSiteMap(true); asm.centre = asm.getBaseLocation(lat, lng); diff --git a/altosui/AltosUI.java b/altosui/AltosUI.java index 4b808c41..7955c1c2 100644 --- a/altosui/AltosUI.java +++ b/altosui/AltosUI.java @@ -99,7 +99,7 @@ public class AltosUI extends JFrame { if (imgURL != null) setIconImage(new ImageIcon(imgURL).getImage()); - AltosPreferences.init(this); + AltosPreferences.set_component(this); pane = getContentPane(); gridbag = new GridBagLayout(); @@ -397,9 +397,9 @@ public class AltosUI extends JFrame { AltosUI altosui = new AltosUI(); altosui.setVisible(true); - AltosDevice[] devices = AltosUSBDevice.list(Altos.product_basestation); - for (int i = 0; i < devices.length; i++) - altosui.telemetry_window(devices[i]); + java.util.List devices = AltosUSBDevice.list(Altos.product_basestation); + for (AltosDevice device : devices) + altosui.telemetry_window(device); } } } diff --git a/altosui/AltosUSBDevice.java b/altosui/AltosUSBDevice.java index deed0056..dc746a64 100644 --- a/altosui/AltosUSBDevice.java +++ b/altosui/AltosUSBDevice.java @@ -77,13 +77,13 @@ public class AltosUSBDevice extends altos_device implements AltosDevice { return false; } - static AltosUSBDevice[] list(int product) { + static java.util.List list(int product) { if (!Altos.load_library()) return null; SWIGTYPE_p_altos_list list = libaltos.altos_list_start(); - ArrayList device_list = new ArrayList(); + ArrayList device_list = new ArrayList(); if (list != null) { for (;;) { AltosUSBDevice device = new AltosUSBDevice(); @@ -95,9 +95,6 @@ public class AltosUSBDevice extends altos_device implements AltosDevice { libaltos.altos_list_finish(list); } - AltosUSBDevice[] devices = new AltosUSBDevice[device_list.size()]; - for (int i = 0; i < device_list.size(); i++) - devices[i] = device_list.get(i); - return devices; + return device_list; } } \ No newline at end of file diff --git a/altosui/Makefile.am b/altosui/Makefile.am index f2de4a3a..f4d84ad2 100644 --- a/altosui/Makefile.am +++ b/altosui/Makefile.am @@ -30,6 +30,7 @@ altosui_JAVA = \ AltosBTDevice.java \ AltosBTDeviceIterator.java \ AltosBTManage.java \ + AltosBTKnown.java \ AltosDisplayThread.java \ AltosEepromChunk.java \ AltosEepromDelete.java \ diff --git a/altosui/libaltos/cjnitest.c b/altosui/libaltos/cjnitest.c index 79561643..88e40d73 100644 --- a/altosui/libaltos/cjnitest.c +++ b/altosui/libaltos/cjnitest.c @@ -41,7 +41,7 @@ main () altos_close(file); } altos_list_finish(list); - bt_list = altos_bt_list_start(); + bt_list = altos_bt_list_start(8); while (altos_bt_list_next(bt_list, &bt_device)) { printf ("%s %s\n", bt_device.name, bt_device.addr); if (strncmp(bt_device.name, "TeleBT", 6) == 0) { diff --git a/altosui/libaltos/libaltos.c b/altosui/libaltos/libaltos.c index 13635a0d..2c47f3e5 100644 --- a/altosui/libaltos/libaltos.c +++ b/altosui/libaltos/libaltos.c @@ -591,10 +591,9 @@ struct altos_bt_list { }; #define INQUIRY_MAX_RSP 255 -#define INQUIRY_LEN 8 struct altos_bt_list * -altos_bt_list_start(void) +altos_bt_list_start(int inquiry_time) { struct altos_bt_list *bt_list; @@ -614,7 +613,7 @@ altos_bt_list_start(void) goto no_sock; bt_list->num_rsp = hci_inquiry(bt_list->dev_id, - INQUIRY_LEN, + inquiry_time, INQUIRY_MAX_RSP, NULL, &bt_list->ii, @@ -665,6 +664,15 @@ altos_bt_list_finish(struct altos_bt_list *bt_list) free(bt_list); } +void +altos_bt_fill_in(char *name, char *addr, struct altos_bt_device *device) +{ + strncpy(device->name, name, sizeof (device->name)); + device->name[sizeof(device->name)-1] = '\0'; + strncpy(device->addr, addr, sizeof (device->addr)); + device->addr[sizeof(device->addr)-1] = '\0'; +} + struct altos_file * altos_bt_open(struct altos_bt_device *device) { @@ -768,7 +776,7 @@ get_number(io_object_t object, CFStringRef entry, int *result) } struct altos_list * -altos_list_start(void) +altos_list_start(int time) { struct altos_list *list = calloc (sizeof (struct altos_list), 1); CFMutableDictionaryRef matching_dictionary = IOServiceMatching("IOUSBDevice"); diff --git a/altosui/libaltos/libaltos.h b/altosui/libaltos/libaltos.h index 9c3f9655..f710919c 100644 --- a/altosui/libaltos/libaltos.h +++ b/altosui/libaltos/libaltos.h @@ -110,7 +110,7 @@ PUBLIC int altos_getchar(struct altos_file *file, int timeout); PUBLIC struct altos_bt_list * -altos_bt_list_start(void); +altos_bt_list_start(int inquiry_time); PUBLIC int altos_bt_list_next(struct altos_bt_list *list, struct altos_bt_device *device); @@ -118,6 +118,9 @@ altos_bt_list_next(struct altos_bt_list *list, struct altos_bt_device *device); PUBLIC void altos_bt_list_finish(struct altos_bt_list *list); +PUBLIC void +altos_bt_fill_in(char *name, char *addr, struct altos_bt_device *device); + PUBLIC struct altos_file * altos_bt_open(struct altos_bt_device *device); -- cgit v1.2.3 From aa5caf6310f074109472e6f55d8bd9751fb75c4c Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Mon, 25 Apr 2011 21:26:21 -0700 Subject: altosui: Fix TeleBT name in flight monitor title Was getting the product number, not the product name. Signed-off-by: Keith Packard --- altosui/AltosBTDevice.java | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'altosui/AltosBTDevice.java') diff --git a/altosui/AltosBTDevice.java b/altosui/AltosBTDevice.java index c2721b26..7a876c25 100644 --- a/altosui/AltosBTDevice.java +++ b/altosui/AltosBTDevice.java @@ -58,19 +58,13 @@ public class AltosBTDevice extends altos_bt_device implements AltosDevice { } public String toString() { - String name = getName(); - if (name == null) - name = "Altus Metrum"; return String.format("%-20.20s %4d %s", getProductName(), getSerial(), getAddr()); } public String toShortString() { - String name = getName(); - if (name == null) - name = "Altus Metrum"; return String.format("%s %d %s", - getProduct(), getSerial(), getAddr()); + getProductName(), getSerial(), getAddr()); } -- cgit v1.2.3 From 31e3255b6cbfaf95c0e97e2d1ec8de72f845994c Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Sun, 28 Aug 2011 15:50:30 -0700 Subject: altosui: Report error message back from libaltos This includes changing all of the error dialogs to show the error message rather than just the file name. Signed-off-by: Keith Packard --- altosui/AltosBTDevice.java | 7 +++ altosui/AltosCSVUI.java | 2 +- altosui/AltosConfig.java | 3 +- altosui/AltosDataChooser.java | 2 +- altosui/AltosDevice.java | 1 + altosui/AltosEepromDownload.java | 12 +++-- altosui/AltosEepromManage.java | 3 +- altosui/AltosFlashUI.java | 4 +- altosui/AltosIgniteUI.java | 3 +- altosui/AltosLanded.java | 4 +- altosui/AltosLaunchUI.java | 3 +- altosui/AltosScanUI.java | 6 +-- altosui/AltosSerial.java | 4 +- altosui/AltosUI.java | 9 ++-- altosui/AltosUSBDevice.java | 7 +++ altosui/libaltos/libaltos.c | 97 +++++++++++++++++++++++++++++++++------- altosui/libaltos/libaltos.h | 8 ++++ 17 files changed, 131 insertions(+), 44 deletions(-) (limited to 'altosui/AltosBTDevice.java') diff --git a/altosui/AltosBTDevice.java b/altosui/AltosBTDevice.java index 7a876c25..55b8f8fc 100644 --- a/altosui/AltosBTDevice.java +++ b/altosui/AltosBTDevice.java @@ -42,6 +42,13 @@ public class AltosBTDevice extends altos_bt_device implements AltosDevice { return getAddr(); } + public String getErrorString() { + altos_error error = new altos_error(); + + libaltos.altos_get_last_error(error); + return String.format("%s (%d)", error.getString(), error.getCode()); + } + public int getSerial() { String name = getName(); if (name == null) diff --git a/altosui/AltosCSVUI.java b/altosui/AltosCSVUI.java index e1b6002d..a212409e 100644 --- a/altosui/AltosCSVUI.java +++ b/altosui/AltosCSVUI.java @@ -99,7 +99,7 @@ public class AltosCSVUI writer.close(); } catch (FileNotFoundException ee) { JOptionPane.showMessageDialog(frame, - file.getName(), + ee.getMessage(), "Cannot open file", JOptionPane.ERROR_MESSAGE); } diff --git a/altosui/AltosConfig.java b/altosui/AltosConfig.java index 122ebecc..93def70d 100644 --- a/altosui/AltosConfig.java +++ b/altosui/AltosConfig.java @@ -480,8 +480,7 @@ public class AltosConfig implements ActionListener { } } catch (FileNotFoundException ee) { JOptionPane.showMessageDialog(owner, - String.format("Cannot open device \"%s\"", - device.toShortString()), + ee.getMessage(), "Cannot open target device", JOptionPane.ERROR_MESSAGE); } catch (AltosSerialInUseException si) { diff --git a/altosui/AltosDataChooser.java b/altosui/AltosDataChooser.java index 15de05c2..d81ca6d1 100644 --- a/altosui/AltosDataChooser.java +++ b/altosui/AltosDataChooser.java @@ -61,7 +61,7 @@ public class AltosDataChooser extends JFileChooser { } } catch (FileNotFoundException fe) { JOptionPane.showMessageDialog(frame, - filename, + fe.getMessage(), "Cannot open file", JOptionPane.ERROR_MESSAGE); } diff --git a/altosui/AltosDevice.java b/altosui/AltosDevice.java index 3357c550..1b5c1a91 100644 --- a/altosui/AltosDevice.java +++ b/altosui/AltosDevice.java @@ -26,5 +26,6 @@ public interface AltosDevice { public abstract int getSerial(); public abstract String getPath(); public abstract boolean matchProduct(int product); + public abstract String getErrorString(); public SWIGTYPE_p_altos_file open(); } diff --git a/altosui/AltosEepromDownload.java b/altosui/AltosEepromDownload.java index 358ad337..e7e52466 100644 --- a/altosui/AltosEepromDownload.java +++ b/altosui/AltosEepromDownload.java @@ -248,6 +248,10 @@ public class AltosEepromDownload implements Runnable { done = true; } + void CaptureTelemetry(AltosEepromChunk eechunk) throws IOException { + + } + void CaptureLog(AltosEepromLog log) throws IOException, InterruptedException, TimeoutException { int block, state_block = 0; int log_format = flights.config_data.log_format; @@ -300,10 +304,10 @@ public class AltosEepromDownload implements Runnable { extension = "eeprom"; CaptureTiny(eechunk); break; -// case Altos.AO_LOG_FORMAT_TELEMETRY: -// extension = "telem"; -// CaptureTelemetry(eechunk); -// break; + case Altos.AO_LOG_FORMAT_TELEMETRY: + extension = "telem"; + CaptureTelemetry(eechunk); + break; case Altos.AO_LOG_FORMAT_TELESCIENCE: extension = "science"; CaptureTeleScience(eechunk); diff --git a/altosui/AltosEepromManage.java b/altosui/AltosEepromManage.java index 2e520628..083c7372 100644 --- a/altosui/AltosEepromManage.java +++ b/altosui/AltosEepromManage.java @@ -219,8 +219,7 @@ public class AltosEepromManage implements ActionListener { t.start(); } catch (FileNotFoundException ee) { JOptionPane.showMessageDialog(frame, - String.format("Cannot open device \"%s\"", - device.toShortString()), + ee.getMessage(), "Cannot open target device", JOptionPane.ERROR_MESSAGE); } catch (AltosSerialInUseException si) { diff --git a/altosui/AltosFlashUI.java b/altosui/AltosFlashUI.java index 3874b500..3956ff20 100644 --- a/altosui/AltosFlashUI.java +++ b/altosui/AltosFlashUI.java @@ -200,8 +200,8 @@ public class AltosFlashUI void exception (Exception e) { if (e instanceof FileNotFoundException) { JOptionPane.showMessageDialog(frame, - "Cannot open image", - file.toString(), + ((FileNotFoundException) e).getMessage(), + "Cannot open file", JOptionPane.ERROR_MESSAGE); } else if (e instanceof AltosSerialInUseException) { JOptionPane.showMessageDialog(frame, diff --git a/altosui/AltosIgniteUI.java b/altosui/AltosIgniteUI.java index c11a8614..b215c228 100644 --- a/altosui/AltosIgniteUI.java +++ b/altosui/AltosIgniteUI.java @@ -122,8 +122,7 @@ public class AltosIgniteUI void ignite_exception(Exception e) { if (e instanceof FileNotFoundException) { JOptionPane.showMessageDialog(owner, - String.format("Cannot open device \"%s\"", - device.toShortString()), + ((FileNotFoundException) e).getMessage(), "Cannot open target device", JOptionPane.ERROR_MESSAGE); } else if (e instanceof AltosSerialInUseException) { diff --git a/altosui/AltosLanded.java b/altosui/AltosLanded.java index 50e6b542..4dd9a2dd 100644 --- a/altosui/AltosLanded.java +++ b/altosui/AltosLanded.java @@ -250,7 +250,7 @@ public class AltosLanded extends JComponent implements AltosFlightDisplay, Actio FileInputStream in = new FileInputStream(file); records = new AltosTelemetryIterable(in); } else { - throw new FileNotFoundException(); + throw new FileNotFoundException(filename); } try { new AltosGraphUI(records, filename); @@ -259,7 +259,7 @@ public class AltosLanded extends JComponent implements AltosFlightDisplay, Actio } } catch (FileNotFoundException fe) { JOptionPane.showMessageDialog(null, - filename, + fe.getMessage(), "Cannot open file", JOptionPane.ERROR_MESSAGE); } diff --git a/altosui/AltosLaunchUI.java b/altosui/AltosLaunchUI.java index 4e630afb..47365e03 100644 --- a/altosui/AltosLaunchUI.java +++ b/altosui/AltosLaunchUI.java @@ -164,8 +164,7 @@ public class AltosLaunchUI void launch_exception(Exception e) { if (e instanceof FileNotFoundException) { JOptionPane.showMessageDialog(owner, - String.format("Cannot open device \"%s\"", - device.toShortString()), + ((FileNotFoundException) e).getMessage(), "Cannot open target device", JOptionPane.ERROR_MESSAGE); } else if (e instanceof AltosSerialInUseException) { diff --git a/altosui/AltosScanUI.java b/altosui/AltosScanUI.java index bce4b32c..df5c51d4 100644 --- a/altosui/AltosScanUI.java +++ b/altosui/AltosScanUI.java @@ -130,8 +130,7 @@ public class AltosScanUI void scan_exception(Exception e) { if (e instanceof FileNotFoundException) { JOptionPane.showMessageDialog(owner, - String.format("Cannot open device \"%s\"", - device.toShortString()), + ((FileNotFoundException) e).getMessage(), "Cannot open target device", JOptionPane.ERROR_MESSAGE); } else if (e instanceof AltosSerialInUseException) { @@ -326,8 +325,7 @@ public class AltosScanUI return true; } catch (FileNotFoundException ee) { JOptionPane.showMessageDialog(owner, - String.format("Cannot open device \"%s\"", - device.toShortString()), + ee.getMessage(), "Cannot open target device", JOptionPane.ERROR_MESSAGE); } catch (AltosSerialInUseException si) { diff --git a/altosui/AltosSerial.java b/altosui/AltosSerial.java index 0a531aa9..4cf306d0 100644 --- a/altosui/AltosSerial.java +++ b/altosui/AltosSerial.java @@ -323,8 +323,10 @@ public class AltosSerial implements Runnable { } altos = device.open(); if (altos == null) { + final String message = device.getErrorString(); close(); - throw new FileNotFoundException(device.toShortString()); + throw new FileNotFoundException(String.format("%s (%s)", + device.toShortString(), message)); } if (debug) System.out.printf("Open %s\n", device.getPath()); diff --git a/altosui/AltosUI.java b/altosui/AltosUI.java index 60adfc7c..3e5bcf43 100644 --- a/altosui/AltosUI.java +++ b/altosui/AltosUI.java @@ -52,8 +52,7 @@ public class AltosUI extends JFrame { new AltosFlightUI(voice, reader, device.getSerial()); } catch (FileNotFoundException ee) { JOptionPane.showMessageDialog(AltosUI.this, - String.format("Cannot open device \"%s\"", - device.toShortString()), + ee.getMessage(), "Cannot open target device", JOptionPane.ERROR_MESSAGE); } catch (AltosSerialInUseException si) { @@ -356,7 +355,7 @@ public class AltosUI extends JFrame { else return new AltosTelemetryIterable(in); } catch (FileNotFoundException fe) { - System.out.printf("Cannot open '%s'\n", filename); + System.out.printf("%s\n", fe.getMessage()); return null; } } @@ -366,7 +365,7 @@ public class AltosUI extends JFrame { try { return new AltosCSV(file); } catch (FileNotFoundException fe) { - System.out.printf("Cannot open '%s'\n", filename); + System.out.printf("%s\n", fe.getMessage()); return null; } } @@ -376,7 +375,7 @@ public class AltosUI extends JFrame { try { return new AltosKML(file); } catch (FileNotFoundException fe) { - System.out.printf("Cannot open '%s'\n", filename); + System.out.printf("%s\n", fe.getMessage()); return null; } } diff --git a/altosui/AltosUSBDevice.java b/altosui/AltosUSBDevice.java index dc746a64..b11a3934 100644 --- a/altosui/AltosUSBDevice.java +++ b/altosui/AltosUSBDevice.java @@ -39,6 +39,13 @@ public class AltosUSBDevice extends altos_device implements AltosDevice { } + public String getErrorString() { + altos_error error = new altos_error(); + + libaltos.altos_get_last_error(error); + return String.format("%s (%d)", error.getString(), error.getCode()); + } + public SWIGTYPE_p_altos_file open() { return libaltos.altos_open(this); } diff --git a/altosui/libaltos/libaltos.c b/altosui/libaltos/libaltos.c index a3796ee3..48e00a44 100644 --- a/altosui/libaltos/libaltos.c +++ b/altosui/libaltos/libaltos.c @@ -49,6 +49,22 @@ altos_fini(void) { } +static struct altos_error last_error; + +static void +altos_set_last_error(int code, char *string) +{ + last_error.code = code; + strncpy(last_error.string, string, sizeof (last_error.string) -1); + last_error.string[sizeof(last_error.string)-1] = '\0'; +} + +PUBLIC void +altos_get_last_error(struct altos_error *error) +{ + *error = last_error; +} + #ifdef DARWIN #undef USE_POLL @@ -96,6 +112,12 @@ struct altos_file { int in_read; }; +static void +altos_set_last_posix_error(void) +{ + altos_set_last_error(errno, strerror(errno)); +} + PUBLIC struct altos_file * altos_open(struct altos_device *device) { @@ -103,12 +125,18 @@ altos_open(struct altos_device *device) int ret; struct termios term; - if (!file) + if (!file) { + altos_set_last_posix_error(); return NULL; + } + +// altos_set_last_error(12, "yeah yeah, failed again"); +// free(file); +// return NULL; file->fd = open(device->path, O_RDWR | O_NOCTTY); if (file->fd < 0) { - perror(device->path); + altos_set_last_posix_error(); free(file); return NULL; } @@ -117,7 +145,7 @@ altos_open(struct altos_device *device) #else file->out_fd = open(device->path, O_RDWR | O_NOCTTY); if (file->out_fd < 0) { - perror(device->path); + altos_set_last_posix_error(); close(file->fd); free(file); return NULL; @@ -125,7 +153,7 @@ altos_open(struct altos_device *device) #endif ret = tcgetattr(file->fd, &term); if (ret < 0) { - perror("tcgetattr"); + altos_set_last_posix_error(); close(file->fd); #ifndef USE_POLL close(file->out_fd); @@ -143,7 +171,7 @@ altos_open(struct altos_device *device) #endif ret = tcsetattr(file->fd, TCSAFLUSH, &term); if (ret < 0) { - perror("tcsetattr"); + altos_set_last_posix_error(); close(file->fd); #ifndef USE_POLL close(file->out_fd); @@ -195,8 +223,10 @@ altos_flush(struct altos_file *file) #else ret = write (file->out_fd, file->out_data, file->out_used); #endif - if (ret < 0) + if (ret < 0) { + altos_set_last_posix_error(); return -errno; + } if (ret) { memmove(file->out_data, file->out_data + ret, file->out_used - ret); @@ -248,7 +278,7 @@ altos_fill(struct altos_file *file, int timeout) fd[1].events = POLLIN; ret = poll(fd, 2, timeout); if (ret < 0) { - perror("altos_getchar"); + altos_set_last_posix_error(); return LIBALTOS_ERROR; } if (ret == 0) @@ -261,7 +291,7 @@ altos_fill(struct altos_file *file, int timeout) { ret = read(file->fd, file->in_data, USB_BUF_SIZE); if (ret < 0) { - perror("altos_getchar"); + altos_set_last_posix_error(); return LIBALTOS_ERROR; } file->in_read = 0; @@ -700,8 +730,10 @@ altos_bt_open(struct altos_bt_device *device) if (!file) goto no_file; file->fd = socket(AF_BLUETOOTH, SOCK_STREAM, BTPROTO_RFCOMM); - if (file->fd < 0) + if (file->fd < 0) { + altos_set_last_posix_error(); goto no_sock; + } addr.rc_family = AF_BLUETOOTH; addr.rc_channel = 1; @@ -711,7 +743,7 @@ altos_bt_open(struct altos_bt_device *device) (struct sockaddr *)&addr, sizeof(addr)); if (status < 0) { - perror("connect"); + altos_set_last_posix_error(); goto no_link; } sleep(1); @@ -912,6 +944,21 @@ struct altos_file { OVERLAPPED ov_write; }; +static void +altos_set_last_windows_error(void) +{ + DWORD error = GetLastError(); + TCHAR message[1024]; + FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, + 0, + error, + 0, + message, + sizeof (message) / sizeof (TCHAR), + NULL); + altos_set_last_error(error, message); +} + PUBLIC struct altos_list * altos_list_start(void) { @@ -922,7 +969,7 @@ altos_list_start(void) list->dev_info = SetupDiGetClassDevs(NULL, "USB", NULL, DIGCF_ALLCLASSES|DIGCF_PRESENT); if (list->dev_info == INVALID_HANDLE_VALUE) { - printf("SetupDiGetClassDevs failed %ld\n", GetLastError()); + altos_set_last_windows_error(); free(list); return NULL; } @@ -956,6 +1003,7 @@ altos_list_next(struct altos_list *list, struct altos_device *device) DICS_FLAG_GLOBAL, 0, DIREG_DEV, KEY_READ); if (dev_key == INVALID_HANDLE_VALUE) { + altos_set_last_windows_error(); printf("cannot open device registry key\n"); continue; } @@ -966,6 +1014,7 @@ altos_list_next(struct altos_list *list, struct altos_device *device) result = RegQueryValueEx(dev_key, "SymbolicName", NULL, NULL, symbolic, &symbolic_len); if (result != 0) { + altos_set_last_windows_error(); printf("cannot find SymbolicName value\n"); RegCloseKey(dev_key); continue; @@ -988,6 +1037,7 @@ altos_list_next(struct altos_list *list, struct altos_device *device) port, &port_len); RegCloseKey(dev_key); if (result != 0) { + altos_set_last_windows_error(); printf("failed to get PortName\n"); continue; } @@ -1003,6 +1053,7 @@ altos_list_next(struct altos_list *list, struct altos_device *device) sizeof(friendlyname), &friendlyname_len)) { + altos_set_last_windows_error(); printf("Failed to get friendlyname\n"); continue; } @@ -1015,8 +1066,10 @@ altos_list_next(struct altos_list *list, struct altos_device *device) return 1; } result = GetLastError(); - if (result != ERROR_NO_MORE_ITEMS) + if (result != ERROR_NO_MORE_ITEMS) { + altos_set_last_windows_error(); printf ("SetupDiEnumDeviceInfo failed error %d\n", (int) result); + } return 0; } @@ -1035,8 +1088,10 @@ altos_queue_read(struct altos_file *file) return LIBALTOS_SUCCESS; if (!ReadFile(file->handle, file->in_data, USB_BUF_SIZE, &got, &file->ov_read)) { - if (GetLastError() != ERROR_IO_PENDING) + if (GetLastError() != ERROR_IO_PENDING) { + altos_set_last_windows_error(); return LIBALTOS_ERROR; + } file->pend_read = TRUE; } else { file->pend_read = FALSE; @@ -1061,8 +1116,10 @@ altos_wait_read(struct altos_file *file, int timeout) ret = WaitForSingleObject(file->ov_read.hEvent, timeout); switch (ret) { case WAIT_OBJECT_0: - if (!GetOverlappedResult(file->handle, &file->ov_read, &got, FALSE)) + if (!GetOverlappedResult(file->handle, &file->ov_read, &got, FALSE)) { + altos_set_last_windows_error(); return LIBALTOS_ERROR; + } file->pend_read = FALSE; file->in_read = 0; file->in_used = got; @@ -1106,15 +1163,20 @@ altos_flush(struct altos_file *file) while (used) { if (!WriteFile(file->handle, data, used, &put, &file->ov_write)) { - if (GetLastError() != ERROR_IO_PENDING) + if (GetLastError() != ERROR_IO_PENDING) { + altos_set_last_windows_error(); return LIBALTOS_ERROR; + } ret = WaitForSingleObject(file->ov_write.hEvent, INFINITE); switch (ret) { case WAIT_OBJECT_0: - if (!GetOverlappedResult(file->handle, &file->ov_write, &put, FALSE)) + if (!GetOverlappedResult(file->handle, &file->ov_write, &put, FALSE)) { + altos_set_last_windows_error(); return LIBALTOS_ERROR; + } break; default: + altos_set_last_windows_error(); return LIBALTOS_ERROR; } } @@ -1142,6 +1204,7 @@ altos_open(struct altos_device *device) 0, NULL, OPEN_EXISTING, FILE_FLAG_OVERLAPPED, NULL); if (file->handle == INVALID_HANDLE_VALUE) { + altos_set_last_windows_error(); free(file); return NULL; } @@ -1157,6 +1220,7 @@ altos_open(struct altos_device *device) dcbSerialParams.DCBlength = sizeof(dcbSerialParams); if (!GetCommState(file->handle, &dcbSerialParams)) { + altos_set_last_windows_error(); CloseHandle(file->handle); free(file); return NULL; @@ -1166,6 +1230,7 @@ altos_open(struct altos_device *device) dcbSerialParams.StopBits = ONESTOPBIT; dcbSerialParams.Parity = NOPARITY; if (!SetCommState(file->handle, &dcbSerialParams)) { + altos_set_last_windows_error(); CloseHandle(file->handle); free(file); return NULL; diff --git a/altosui/libaltos/libaltos.h b/altosui/libaltos/libaltos.h index a05bed4c..f90fbb87 100644 --- a/altosui/libaltos/libaltos.h +++ b/altosui/libaltos/libaltos.h @@ -51,6 +51,11 @@ struct altos_bt_device { //%mutable; }; +struct altos_error { + int code; + char string[1024]; +}; + #define LIBALTOS_SUCCESS 0 #define LIBALTOS_ERROR -1 #define LIBALTOS_TIMEOUT -2 @@ -62,6 +67,9 @@ altos_init(void); PUBLIC void altos_fini(void); +PUBLIC void +altos_get_last_error(struct altos_error *error); + PUBLIC struct altos_list * altos_list_start(void); -- cgit v1.2.3 From 55747ce210d7d80d5b4fdaaf9dc7ee0f7bc8b0a3 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Sun, 17 Jun 2012 18:58:56 -0700 Subject: altosui: Move product definitions from AltosUI to AltosLib Signed-off-by: Keith Packard --- altoslib/AltosLib.java | 24 ++++++++++++ altosui/Altos.java | 85 ------------------------------------------ altosui/AltosBTDevice.java | 1 + altosui/AltosBTKnown.java | 10 ++++- altosui/AltosConfig.java | 2 +- altosui/AltosConfigureUI.java | 2 +- altosui/AltosDeviceDialog.java | 4 +- altosui/AltosUI.java | 1 + 8 files changed, 39 insertions(+), 90 deletions(-) (limited to 'altosui/AltosBTDevice.java') diff --git a/altoslib/AltosLib.java b/altoslib/AltosLib.java index e74eaf99..4a779c55 100644 --- a/altoslib/AltosLib.java +++ b/altoslib/AltosLib.java @@ -78,6 +78,30 @@ public class AltosLib { public static final int ao_flight_landed = 8; public static final int ao_flight_invalid = 9; + /* USB product IDs */ + public final static int vendor_altusmetrum = 0xfffe; + + public final static int product_altusmetrum = 0x000a; + public final static int product_telemetrum = 0x000b; + public final static int product_teledongle = 0x000c; + public final static int product_teleterra = 0x000d; + public final static int product_telebt = 0x000e; + public final static int product_telelaunch = 0x000f; + public final static int product_telelco = 0x0010; + public final static int product_telescience = 0x0011; + public final static int product_telepyro =0x0012; + public final static int product_megametrum = 0x0023; + public final static int product_megadongle = 0x0024; + public final static int product_altusmetrum_min = 0x000a; + public final static int product_altusmetrum_max = 0x0024; + + public final static int product_any = 0x10000; + public final static int product_basestation = 0x10000 + 1; + public final static int product_altimeter = 0x10000 + 2; + + /* Bluetooth "identifier" (bluetooth sucks) */ + public final static String bt_product_telebt = "TeleBT"; + /* Telemetry modes */ public static final int ao_telemetry_off = 0; public static final int ao_telemetry_min = 1; diff --git a/altosui/Altos.java b/altosui/Altos.java index 78e56970..e60b3aaa 100644 --- a/altosui/Altos.java +++ b/altosui/Altos.java @@ -108,89 +108,4 @@ public class Altos extends AltosLib { } return loaded_library; } - - static int usb_vendor_altusmetrum() { - load_library(); - return 0xfffe; - } - - static int usb_product_altusmetrum() { - load_library(); - return 0x000a; - } - - static int usb_product_altusmetrum_min() { - load_library(); - return 0x000a; - } - - static int usb_product_altusmetrum_max() { - load_library(); - return 0x0013; - } - - static int usb_product_telemetrum() { - load_library(); - return 0x000b; - } - - static int usb_product_teledongle() { - load_library(); - return 0x000c; - } - - static int usb_product_teleterra() { - load_library(); - return 0x000d; - } - - static int usb_product_telebt() { - load_library(); - return 0x000e; - } - - static int usb_product_telelaunch() { - load_library(); - return 0x000f; - } - - static int usb_product_telelco() { - load_library(); - return 0x0010; - } - - static int usb_product_telescience() { - load_library(); - return 0x0011; - } - - static int usb_product_telepyro() { - load_library(); - return 0x0012; - } - - public final static int vendor_altusmetrum = usb_vendor_altusmetrum(); - public final static int product_altusmetrum = usb_product_altusmetrum(); - public final static int product_telemetrum = usb_product_telemetrum(); - public final static int product_teledongle = usb_product_teledongle(); - public final static int product_teleterra = usb_product_teleterra(); - public final static int product_telebt = usb_product_telebt(); - public final static int product_telelaunch = usb_product_telelaunch(); - public final static int product_tele10 = usb_product_telelco(); - public final static int product_telescience = usb_product_telescience(); - public final static int product_telepyro = usb_product_telepyro(); - public final static int product_altusmetrum_min = usb_product_altusmetrum_min(); - public final static int product_altusmetrum_max = usb_product_altusmetrum_max(); - - public final static int product_any = 0x10000; - public final static int product_basestation = 0x10000 + 1; - - static String bt_product_telebt() { - load_library(); - return "TeleBT"; - } - - public final static String bt_product_telebt = bt_product_telebt(); - - public static AltosBTKnown bt_known = new AltosBTKnown(); } diff --git a/altosui/AltosBTDevice.java b/altosui/AltosBTDevice.java index 55b8f8fc..f6926b10 100644 --- a/altosui/AltosBTDevice.java +++ b/altosui/AltosBTDevice.java @@ -116,6 +116,7 @@ public class AltosBTDevice extends altos_bt_device implements AltosDevice { } public AltosBTDevice(String name, String addr) { + Altos.load_library(); libaltos.altos_bt_fill_in(name, addr,this); } diff --git a/altosui/AltosBTKnown.java b/altosui/AltosBTKnown.java index e30be057..021e4d0b 100644 --- a/altosui/AltosBTKnown.java +++ b/altosui/AltosBTKnown.java @@ -94,4 +94,12 @@ public class AltosBTKnown implements Iterable { bt_pref = AltosUIPreferences.bt_devices(); load(); } -} \ No newline at end of file + + static AltosBTKnown known; + + static public AltosBTKnown bt_known() { + if (known == null) + known = new AltosBTKnown(); + return known; + } +} diff --git a/altosui/AltosConfig.java b/altosui/AltosConfig.java index 35fef080..cae41858 100644 --- a/altosui/AltosConfig.java +++ b/altosui/AltosConfig.java @@ -491,7 +491,7 @@ public class AltosConfig implements ActionListener { try { serial_line = new AltosSerial(device); try { - if (!device.matchProduct(Altos.product_telemetrum)) + if (!device.matchProduct(Altos.product_altimeter)) remote = true; init_ui(); } catch (InterruptedException ie) { diff --git a/altosui/AltosConfigureUI.java b/altosui/AltosConfigureUI.java index deb179d6..d0ed9325 100644 --- a/altosui/AltosConfigureUI.java +++ b/altosui/AltosConfigureUI.java @@ -344,7 +344,7 @@ public class AltosConfigureUI manage_bluetooth = new JButton("Manage Bluetooth"); manage_bluetooth.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { - AltosBTManage.show(owner, Altos.bt_known); + AltosBTManage.show(owner, AltosBTKnown.bt_known()); } }); c.gridx = 0; diff --git a/altosui/AltosDeviceDialog.java b/altosui/AltosDeviceDialog.java index e53e75c1..fa9d0013 100644 --- a/altosui/AltosDeviceDialog.java +++ b/altosui/AltosDeviceDialog.java @@ -41,7 +41,7 @@ public class AltosDeviceDialog extends AltosDialog implements ActionListener { private AltosDevice[] devices() { java.util.List usb_devices = AltosUSBDevice.list(product); int num_devices = usb_devices.size(); - java.util.List bt_devices = Altos.bt_known.list(product); + java.util.List bt_devices = AltosBTKnown.bt_known().list(product); num_devices += bt_devices.size(); AltosDevice[] devices = new AltosDevice[num_devices]; @@ -169,7 +169,7 @@ public class AltosDeviceDialog extends AltosDialog implements ActionListener { if ("select".equals(e.getActionCommand())) value = (AltosDevice)(list.getSelectedValue()); if ("manage".equals(e.getActionCommand())) { - AltosBTManage.show(frame, Altos.bt_known); + AltosBTManage.show(frame, AltosBTKnown.bt_known()); update_devices(); return; } diff --git a/altosui/AltosUI.java b/altosui/AltosUI.java index 538f8734..926d66f0 100644 --- a/altosui/AltosUI.java +++ b/altosui/AltosUI.java @@ -538,6 +538,7 @@ public class AltosUI extends AltosFrame { } public static void main(final String[] args) { + load_library(null); try { UIManager.setLookAndFeel(AltosUIPreferences.look_and_feel()); } catch (Exception e) { -- cgit v1.2.3 From f078a591cf2fafe89bb1bb883f49d80750129d44 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Wed, 11 Jul 2012 14:28:53 -0700 Subject: altosui: Remove a bunch of debugging printfs These aren't useful at this point. Signed-off-by: Keith Packard --- altoslib/AltosLog.java | 1 - altoslib/AltosPreferences.java | 2 -- altoslib/AltosRecordMM.java | 2 -- altoslib/AltosTelemetryRecordMegaData.java | 2 -- altoslib/AltosTelemetryRecordMegaSensor.java | 4 ---- altosui/AltosBTDevice.java | 2 -- altosui/AltosBTDeviceIterator.java | 2 -- altosui/AltosBTKnown.java | 2 -- altosui/AltosBTManage.java | 3 --- altosui/AltosConfigTD.java | 7 ++----- altosui/AltosConfigureUI.java | 1 - altosui/AltosFlashUI.java | 7 ------- altosui/AltosLaunchUI.java | 1 - 13 files changed, 2 insertions(+), 34 deletions(-) (limited to 'altosui/AltosBTDevice.java') diff --git a/altoslib/AltosLog.java b/altoslib/AltosLog.java index 08c45ca8..55a25bb4 100644 --- a/altoslib/AltosLog.java +++ b/altoslib/AltosLog.java @@ -62,7 +62,6 @@ class AltosLog implements Runnable { boolean open (AltosRecord telem) throws IOException { AltosFile a = new AltosFile(telem); - System.out.printf("open %s\n", a.toString()); log_file = new FileWriter(a, true); if (log_file != null) { while (!pending_queue.isEmpty()) { diff --git a/altoslib/AltosPreferences.java b/altoslib/AltosPreferences.java index 43c7088d..9ab80cf5 100644 --- a/altoslib/AltosPreferences.java +++ b/altoslib/AltosPreferences.java @@ -306,7 +306,6 @@ public class AltosPreferences { public static void set_launcher_serial(int new_launcher_serial) { launcher_serial = new_launcher_serial; - System.out.printf("set launcher serial to %d\n", new_launcher_serial); synchronized (preferences) { preferences.putInt(launcherSerialPreference, launcher_serial); flush_preferences(); @@ -319,7 +318,6 @@ public class AltosPreferences { public static void set_launcher_channel(int new_launcher_channel) { launcher_channel = new_launcher_channel; - System.out.printf("set launcher channel to %d\n", new_launcher_channel); synchronized (preferences) { preferences.putInt(launcherChannelPreference, launcher_channel); flush_preferences(); diff --git a/altoslib/AltosRecordMM.java b/altoslib/AltosRecordMM.java index 8b3d745a..055cf85f 100644 --- a/altoslib/AltosRecordMM.java +++ b/altoslib/AltosRecordMM.java @@ -98,8 +98,6 @@ public class AltosRecordMM extends AltosRecord { } public double acceleration() { - System.out.printf("MM record acceleration %g ground_accel %d accel %d accel_minus_g %d accel_plus_g %d\n", - acceleration, ground_accel, accel, accel_minus_g, accel_plus_g); if (acceleration != MISSING) return acceleration; diff --git a/altoslib/AltosTelemetryRecordMegaData.java b/altoslib/AltosTelemetryRecordMegaData.java index cc35cd83..8f55d238 100644 --- a/altoslib/AltosTelemetryRecordMegaData.java +++ b/altoslib/AltosTelemetryRecordMegaData.java @@ -65,10 +65,8 @@ public class AltosTelemetryRecordMegaData extends AltosTelemetryRecordRaw { AltosRecordMM next; if (!(n instanceof AltosRecordMM)) { - System.out.printf("data making record MM\n"); next = new AltosRecordMM(n); } else { - System.out.printf ("data already has MM\n"); next = (AltosRecordMM) n; } diff --git a/altoslib/AltosTelemetryRecordMegaSensor.java b/altoslib/AltosTelemetryRecordMegaSensor.java index 85a32d12..93c001de 100644 --- a/altoslib/AltosTelemetryRecordMegaSensor.java +++ b/altoslib/AltosTelemetryRecordMegaSensor.java @@ -57,7 +57,6 @@ public class AltosTelemetryRecordMegaSensor extends AltosTelemetryRecordRaw { mag_z = int16(30); rssi = in_rssi; - System.out.printf ("telem record accel: %d\n", accel); } public AltosRecord update_state(AltosRecord previous) { @@ -65,14 +64,11 @@ public class AltosTelemetryRecordMegaSensor extends AltosTelemetryRecordRaw { AltosRecordMM next; if (!(n instanceof AltosRecordMM)) { - System.out.printf("sensor making MM\n"); next = new AltosRecordMM(n); } else { - System.out.printf("sensor has MM\n"); next = (AltosRecordMM) n; } - System.out.printf("telem update_state accel: %d\n", accel); next.accel = accel; next.pres = pres; next.temp = temp; diff --git a/altosui/AltosBTDevice.java b/altosui/AltosBTDevice.java index f6926b10..5e353fdd 100644 --- a/altosui/AltosBTDevice.java +++ b/altosui/AltosBTDevice.java @@ -87,7 +87,6 @@ public class AltosBTDevice extends altos_bt_device implements AltosDevice { public boolean matchProduct(int want_product) { - System.out.printf("matchProduct %s %d\n", toString(), want_product); // if (!isAltusMetrum()) // return false; @@ -107,7 +106,6 @@ public class AltosBTDevice extends altos_bt_device implements AltosDevice { if (!(o instanceof AltosBTDevice)) return false; AltosBTDevice other = (AltosBTDevice) o; - System.out.printf("AltosBTDevice equals %s == %s\n", toString(), other.toString()); return getName().equals(other.getName()) && getAddr().equals(other.getAddr()); } diff --git a/altosui/AltosBTDeviceIterator.java b/altosui/AltosBTDeviceIterator.java index 7c360705..58ed86d5 100644 --- a/altosui/AltosBTDeviceIterator.java +++ b/altosui/AltosBTDeviceIterator.java @@ -26,7 +26,6 @@ public class AltosBTDeviceIterator implements Iterator { SWIGTYPE_p_altos_bt_list list; public boolean hasNext() { - System.out.printf ("BT has next?\n"); if (list == null) return false; if (current != null) @@ -35,7 +34,6 @@ public class AltosBTDeviceIterator implements Iterator { return false; current = new AltosBTDevice(); while (libaltos.altos_bt_list_next(list, current) != 0) { - System.out.printf("Got BT device %s\n", current.toString()); // if (current.matchProduct(product)) return true; } diff --git a/altosui/AltosBTKnown.java b/altosui/AltosBTKnown.java index 021e4d0b..6a8e53cb 100644 --- a/altosui/AltosBTKnown.java +++ b/altosui/AltosBTKnown.java @@ -31,7 +31,6 @@ public class AltosBTKnown implements Iterable { private void set_address(String name, String addr) { bt_pref.put(name, addr); - System.out.printf("saving known %s %s\n", name, addr); } private void remove(String name) { @@ -44,7 +43,6 @@ public class AltosBTKnown implements Iterable { for (int i = 0; i < names.length; i++) { String name = names[i]; String addr = get_address(name); - System.out.printf("Known device %s %s\n", name, addr); devices.add(new AltosBTDevice(name, addr)); } } catch (BackingStoreException be) { diff --git a/altosui/AltosBTManage.java b/altosui/AltosBTManage.java index d2899d65..aeb964bb 100644 --- a/altosui/AltosBTManage.java +++ b/altosui/AltosBTManage.java @@ -126,7 +126,6 @@ public class AltosBTManage extends AltosDialog implements ActionListener, Iterab public void add_known() { for (AltosBTDevice device : visible_devices.selected_list()) { - System.out.printf("Add known %s\n", device.toString()); known_devices.add(device); visible_devices.remove(device); } @@ -134,7 +133,6 @@ public class AltosBTManage extends AltosDialog implements ActionListener, Iterab public void remove_known() { for (AltosBTDevice device : known_devices.selected_list()) { - System.out.printf("Remove known %s\n", device.toString()); known_devices.remove(device); visible_devices.add(device); } @@ -151,7 +149,6 @@ public class AltosBTManage extends AltosDialog implements ActionListener, Iterab public void actionPerformed(ActionEvent e) { String command = e.getActionCommand(); - System.out.printf("manage command %s\n", command); if ("ok".equals(command)) { bt_thread.interrupt(); commit(); diff --git a/altosui/AltosConfigTD.java b/altosui/AltosConfigTD.java index 4048166c..324a5988 100644 --- a/altosui/AltosConfigTD.java +++ b/altosui/AltosConfigTD.java @@ -144,10 +144,8 @@ public class AltosConfigTD implements ActionListener { get_string(line, "Config version", config_version); get_int(line, "serial-number", serial); get_int(line, "Radio channel:", radio_channel); - if (get_int(line, "Radio cal:", radio_calibration)) - System.out.printf("got radio cal %d\n", radio_calibration.get()); - if (get_int(line, "Frequency:", radio_frequency)) - System.out.printf("got radio freq %d\n", radio_frequency.get()); + get_int(line, "Radio cal:", radio_calibration); + get_int(line, "Frequency:", radio_frequency); get_int(line, "Radio setting:", radio_setting); get_string(line,"software-version", version); get_string(line,"product", product); @@ -205,7 +203,6 @@ public class AltosConfigTD implements ActionListener { break; } } - System.out.printf("config_version %s\n", config_version.get()); if (been_there) break; if (!config_version.get().equals("0.0")) diff --git a/altosui/AltosConfigureUI.java b/altosui/AltosConfigureUI.java index d0ed9325..ace245a0 100644 --- a/altosui/AltosConfigureUI.java +++ b/altosui/AltosConfigureUI.java @@ -291,7 +291,6 @@ public class AltosConfigureUI final UIManager.LookAndFeelInfo[] look_and_feels = UIManager.getInstalledLookAndFeels(); - System.out.printf("look_and_feels %d\n", look_and_feels.length); look_and_feel_value = new JComboBox(look_and_feels); DelegatingRenderer.install(look_and_feel_value); diff --git a/altosui/AltosFlashUI.java b/altosui/AltosFlashUI.java index 4ab73a6d..66991d10 100644 --- a/altosui/AltosFlashUI.java +++ b/altosui/AltosFlashUI.java @@ -235,22 +235,17 @@ public class AltosFlashUI public void run() { ui.flash = flash; ui.update_rom_config_info(current_config); - System.out.printf("Done updating rom config info\n"); await_rom_config.release(); } }); - System.out.printf("Waiting for rom configuration updates\n"); await_rom_config.acquire(); - System.out.printf("Got rom config update\n"); if (ui.rom_config != null) { - System.out.printf("rom_config not null\n"); flash.set_romconfig(ui.rom_config); flash.flash(); } } catch (InterruptedException ee) { final Exception e = ee; - System.out.printf("exception %s\n", e.toString()); SwingUtilities.invokeLater(new Runnable() { public void run() { ui.exception(e); @@ -258,7 +253,6 @@ public class AltosFlashUI }); } catch (IOException ee) { final Exception e = ee; - System.out.printf("exception %s\n", e.toString()); SwingUtilities.invokeLater(new Runnable() { public void run() { ui.exception(e); @@ -266,7 +260,6 @@ public class AltosFlashUI }); } catch (AltosSerialInUseException ee) { final Exception e = ee; - System.out.printf("exception %s\n", e.toString()); SwingUtilities.invokeLater(new Runnable() { public void run() { ui.exception(e); diff --git a/altosui/AltosLaunchUI.java b/altosui/AltosLaunchUI.java index eb76243d..44481544 100644 --- a/altosui/AltosLaunchUI.java +++ b/altosui/AltosLaunchUI.java @@ -336,7 +336,6 @@ public class AltosLaunchUI public void actionPerformed(ActionEvent e) { String cmd = e.getActionCommand(); - System.out.printf("cmd %s\n", cmd); if (cmd.equals("armed") || cmd.equals("igniter")) { stop_arm_timer(); } -- cgit v1.2.3 From 708e7937cba52982b91244cf89bfbff46d346135 Mon Sep 17 00:00:00 2001 From: Tom Marble Date: Mon, 10 Sep 2012 16:54:27 -0500 Subject: Changed package name from altosui to AltosUI --- altosui/Altos.java | 2 +- altosui/AltosAscent.java | 2 +- altosui/AltosBTDevice.java | 2 +- altosui/AltosBTDeviceIterator.java | 2 +- altosui/AltosBTKnown.java | 2 +- altosui/AltosBTManage.java | 2 +- altosui/AltosCSV.java | 2 +- altosui/AltosCSVUI.java | 2 +- altosui/AltosChannelMenu.java | 2 +- altosui/AltosCompanionInfo.java | 2 +- altosui/AltosConfig.java | 2 +- altosui/AltosConfigFreqUI.java | 2 +- altosui/AltosConfigTD.java | 2 +- altosui/AltosConfigTDUI.java | 2 +- altosui/AltosConfigUI.java | 2 +- altosui/AltosConfigureUI.java | 2 +- altosui/AltosDataChooser.java | 2 +- altosui/AltosDataPoint.java | 2 +- altosui/AltosDataPointReader.java | 2 +- altosui/AltosDebug.java | 2 +- altosui/AltosDescent.java | 2 +- altosui/AltosDevice.java | 2 +- altosui/AltosDeviceDialog.java | 2 +- altosui/AltosDialog.java | 2 +- altosui/AltosDisplayThread.java | 2 +- altosui/AltosEepromDelete.java | 2 +- altosui/AltosEepromDownload.java | 2 +- altosui/AltosEepromList.java | 2 +- altosui/AltosEepromManage.java | 2 +- altosui/AltosEepromMonitor.java | 2 +- altosui/AltosEepromSelect.java | 2 +- altosui/AltosFlash.java | 2 +- altosui/AltosFlashUI.java | 2 +- altosui/AltosFlightDisplay.java | 2 +- altosui/AltosFlightInfoTableModel.java | 2 +- altosui/AltosFlightStats.java | 2 +- altosui/AltosFlightStatsTable.java | 2 +- altosui/AltosFlightStatus.java | 2 +- altosui/AltosFlightStatusTableModel.java | 2 +- altosui/AltosFlightStatusUpdate.java | 2 +- altosui/AltosFlightUI.java | 2 +- altosui/AltosFontListener.java | 2 +- altosui/AltosFrame.java | 2 +- altosui/AltosFreqList.java | 2 +- altosui/AltosGraph.java | 2 +- altosui/AltosGraphTime.java | 2 +- altosui/AltosGraphUI.java | 2 +- altosui/AltosHexfile.java | 2 +- altosui/AltosIdleMonitorUI.java | 2 +- altosui/AltosIgniteUI.java | 2 +- altosui/AltosInfoTable.java | 2 +- altosui/AltosKML.java | 2 +- altosui/AltosLanded.java | 2 +- altosui/AltosLaunch.java | 2 +- altosui/AltosLaunchUI.java | 2 +- altosui/AltosLed.java | 2 +- altosui/AltosLights.java | 2 +- altosui/AltosPad.java | 2 +- altosui/AltosRomconfig.java | 2 +- altosui/AltosRomconfigUI.java | 2 +- altosui/AltosScanUI.java | 2 +- altosui/AltosSerial.java | 2 +- altosui/AltosSerialInUseException.java | 2 +- altosui/AltosSiteMap.java | 2 +- altosui/AltosSiteMapCache.java | 2 +- altosui/AltosSiteMapPreload.java | 2 +- altosui/AltosSiteMapTile.java | 2 +- altosui/AltosUI.java | 2 +- altosui/AltosUIListener.java | 2 +- altosui/AltosUIPreferences.java | 2 +- altosui/AltosUSBDevice.java | 2 +- altosui/AltosVersion.java.in | 2 +- altosui/AltosVoice.java | 2 +- altosui/AltosWriter.java | 2 +- altosui/GrabNDrag.java | 2 +- altosui/Makefile.am | 28 +++++++++++++--------------- 76 files changed, 88 insertions(+), 90 deletions(-) (limited to 'altosui/AltosBTDevice.java') diff --git a/altosui/Altos.java b/altosui/Altos.java index cd17a93e..d3aad6b2 100644 --- a/altosui/Altos.java +++ b/altosui/Altos.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package altosui; +package AltosUI; import java.awt.*; import java.util.*; diff --git a/altosui/AltosAscent.java b/altosui/AltosAscent.java index a158eb21..de6c90a1 100644 --- a/altosui/AltosAscent.java +++ b/altosui/AltosAscent.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package altosui; +package AltosUI; import java.awt.*; import java.awt.event.*; diff --git a/altosui/AltosBTDevice.java b/altosui/AltosBTDevice.java index 5e353fdd..a6eee085 100644 --- a/altosui/AltosBTDevice.java +++ b/altosui/AltosBTDevice.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package altosui; +package AltosUI; import java.lang.*; import java.util.*; import libaltosJNI.*; diff --git a/altosui/AltosBTDeviceIterator.java b/altosui/AltosBTDeviceIterator.java index 58ed86d5..8d9e6fe6 100644 --- a/altosui/AltosBTDeviceIterator.java +++ b/altosui/AltosBTDeviceIterator.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package altosui; +package AltosUI; import java.lang.*; import java.util.*; import libaltosJNI.*; diff --git a/altosui/AltosBTKnown.java b/altosui/AltosBTKnown.java index 6a8e53cb..ad0672c6 100644 --- a/altosui/AltosBTKnown.java +++ b/altosui/AltosBTKnown.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package altosui; +package AltosUI; import java.lang.*; import java.util.*; import libaltosJNI.*; diff --git a/altosui/AltosBTManage.java b/altosui/AltosBTManage.java index aeb964bb..a411c83e 100644 --- a/altosui/AltosBTManage.java +++ b/altosui/AltosBTManage.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package altosui; +package AltosUI; import java.awt.*; import java.awt.event.*; diff --git a/altosui/AltosCSV.java b/altosui/AltosCSV.java index c876d9ca..c672b78f 100644 --- a/altosui/AltosCSV.java +++ b/altosui/AltosCSV.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package altosui; +package AltosUI; import java.lang.*; import java.io.*; diff --git a/altosui/AltosCSVUI.java b/altosui/AltosCSVUI.java index 2702668b..a28c4ca6 100644 --- a/altosui/AltosCSVUI.java +++ b/altosui/AltosCSVUI.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package altosui; +package AltosUI; import java.awt.*; import java.awt.event.*; diff --git a/altosui/AltosChannelMenu.java b/altosui/AltosChannelMenu.java index 0249a0bd..d7e7f58f 100644 --- a/altosui/AltosChannelMenu.java +++ b/altosui/AltosChannelMenu.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package altosui; +package AltosUI; import java.awt.*; import java.awt.event.*; diff --git a/altosui/AltosCompanionInfo.java b/altosui/AltosCompanionInfo.java index 4ba8fe98..16c972b3 100644 --- a/altosui/AltosCompanionInfo.java +++ b/altosui/AltosCompanionInfo.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package altosui; +package AltosUI; import java.awt.*; import java.awt.event.*; diff --git a/altosui/AltosConfig.java b/altosui/AltosConfig.java index cae41858..0b386ac9 100644 --- a/altosui/AltosConfig.java +++ b/altosui/AltosConfig.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package altosui; +package AltosUI; import java.awt.*; import java.awt.event.*; diff --git a/altosui/AltosConfigFreqUI.java b/altosui/AltosConfigFreqUI.java index 7958a21c..4f8bd0f2 100644 --- a/altosui/AltosConfigFreqUI.java +++ b/altosui/AltosConfigFreqUI.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package altosui; +package AltosUI; import java.awt.*; import java.awt.event.*; diff --git a/altosui/AltosConfigTD.java b/altosui/AltosConfigTD.java index 324a5988..f5d30250 100644 --- a/altosui/AltosConfigTD.java +++ b/altosui/AltosConfigTD.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package altosui; +package AltosUI; import java.awt.*; import java.awt.event.*; diff --git a/altosui/AltosConfigTDUI.java b/altosui/AltosConfigTDUI.java index f2058f69..f653d941 100644 --- a/altosui/AltosConfigTDUI.java +++ b/altosui/AltosConfigTDUI.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package altosui; +package AltosUI; import java.awt.*; import java.awt.event.*; diff --git a/altosui/AltosConfigUI.java b/altosui/AltosConfigUI.java index 62394fa6..b0624ef2 100644 --- a/altosui/AltosConfigUI.java +++ b/altosui/AltosConfigUI.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package altosui; +package AltosUI; import java.awt.*; import java.awt.event.*; diff --git a/altosui/AltosConfigureUI.java b/altosui/AltosConfigureUI.java index da82e8e0..b46c1fae 100644 --- a/altosui/AltosConfigureUI.java +++ b/altosui/AltosConfigureUI.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package altosui; +package AltosUI; import java.awt.*; import java.awt.event.*; diff --git a/altosui/AltosDataChooser.java b/altosui/AltosDataChooser.java index 4bd51c39..b003a606 100644 --- a/altosui/AltosDataChooser.java +++ b/altosui/AltosDataChooser.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package altosui; +package AltosUI; import java.awt.*; import java.awt.event.*; diff --git a/altosui/AltosDataPoint.java b/altosui/AltosDataPoint.java index 5e077320..80f62c2c 100644 --- a/altosui/AltosDataPoint.java +++ b/altosui/AltosDataPoint.java @@ -2,7 +2,7 @@ // Copyright (c) 2010 Anthony Towns // GPL v2 or later -package altosui; +package AltosUI; interface AltosDataPoint { int version(); diff --git a/altosui/AltosDataPointReader.java b/altosui/AltosDataPointReader.java index 821b0771..371c48cb 100644 --- a/altosui/AltosDataPointReader.java +++ b/altosui/AltosDataPointReader.java @@ -2,7 +2,7 @@ // Copyright (c) 2010 Anthony Towns // GPL v2 or later -package altosui; +package AltosUI; import java.io.IOException; import java.text.ParseException; diff --git a/altosui/AltosDebug.java b/altosui/AltosDebug.java index 23e38bc0..4e394011 100644 --- a/altosui/AltosDebug.java +++ b/altosui/AltosDebug.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package altosui; +package AltosUI; import java.lang.*; import java.io.*; diff --git a/altosui/AltosDescent.java b/altosui/AltosDescent.java index 62258814..2e3f26bd 100644 --- a/altosui/AltosDescent.java +++ b/altosui/AltosDescent.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package altosui; +package AltosUI; import java.awt.*; import java.awt.event.*; diff --git a/altosui/AltosDevice.java b/altosui/AltosDevice.java index 1b5c1a91..dc045d7b 100644 --- a/altosui/AltosDevice.java +++ b/altosui/AltosDevice.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package altosui; +package AltosUI; import java.lang.*; import java.util.*; import libaltosJNI.*; diff --git a/altosui/AltosDeviceDialog.java b/altosui/AltosDeviceDialog.java index fa9d0013..7ab08b30 100644 --- a/altosui/AltosDeviceDialog.java +++ b/altosui/AltosDeviceDialog.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package altosui; +package AltosUI; import java.lang.*; import java.util.*; diff --git a/altosui/AltosDialog.java b/altosui/AltosDialog.java index ff38c3e4..1de11317 100644 --- a/altosui/AltosDialog.java +++ b/altosui/AltosDialog.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package altosui; +package AltosUI; import java.awt.*; import java.awt.event.*; diff --git a/altosui/AltosDisplayThread.java b/altosui/AltosDisplayThread.java index cf69c414..0cf942e7 100644 --- a/altosui/AltosDisplayThread.java +++ b/altosui/AltosDisplayThread.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package altosui; +package AltosUI; import java.awt.*; import java.awt.event.*; diff --git a/altosui/AltosEepromDelete.java b/altosui/AltosEepromDelete.java index 73f3a00f..21f09d0e 100644 --- a/altosui/AltosEepromDelete.java +++ b/altosui/AltosEepromDelete.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package altosui; +package AltosUI; import java.awt.*; import java.awt.event.*; diff --git a/altosui/AltosEepromDownload.java b/altosui/AltosEepromDownload.java index b04890cd..a4d6b26e 100644 --- a/altosui/AltosEepromDownload.java +++ b/altosui/AltosEepromDownload.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package altosui; +package AltosUI; import java.awt.*; import java.awt.event.*; diff --git a/altosui/AltosEepromList.java b/altosui/AltosEepromList.java index 6a656215..2a88134c 100644 --- a/altosui/AltosEepromList.java +++ b/altosui/AltosEepromList.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package altosui; +package AltosUI; import java.awt.*; import java.awt.event.*; diff --git a/altosui/AltosEepromManage.java b/altosui/AltosEepromManage.java index 563c90b3..27b03bed 100644 --- a/altosui/AltosEepromManage.java +++ b/altosui/AltosEepromManage.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package altosui; +package AltosUI; import java.awt.*; import java.awt.event.*; diff --git a/altosui/AltosEepromMonitor.java b/altosui/AltosEepromMonitor.java index 75643442..daf8d0ba 100644 --- a/altosui/AltosEepromMonitor.java +++ b/altosui/AltosEepromMonitor.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package altosui; +package AltosUI; import java.awt.*; import java.awt.event.*; diff --git a/altosui/AltosEepromSelect.java b/altosui/AltosEepromSelect.java index 4ad78896..cb242183 100644 --- a/altosui/AltosEepromSelect.java +++ b/altosui/AltosEepromSelect.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package altosui; +package AltosUI; import java.lang.*; import java.util.*; diff --git a/altosui/AltosFlash.java b/altosui/AltosFlash.java index bd0c8a50..996456fd 100644 --- a/altosui/AltosFlash.java +++ b/altosui/AltosFlash.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package altosui; +package AltosUI; import java.awt.*; import java.awt.event.*; diff --git a/altosui/AltosFlashUI.java b/altosui/AltosFlashUI.java index 66991d10..01421de9 100644 --- a/altosui/AltosFlashUI.java +++ b/altosui/AltosFlashUI.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package altosui; +package AltosUI; import java.awt.*; import java.awt.event.*; diff --git a/altosui/AltosFlightDisplay.java b/altosui/AltosFlightDisplay.java index 826f9522..e677fd6f 100644 --- a/altosui/AltosFlightDisplay.java +++ b/altosui/AltosFlightDisplay.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package altosui; +package AltosUI; import org.altusmetrum.AltosLib.*; diff --git a/altosui/AltosFlightInfoTableModel.java b/altosui/AltosFlightInfoTableModel.java index 77969a89..cb798bcb 100644 --- a/altosui/AltosFlightInfoTableModel.java +++ b/altosui/AltosFlightInfoTableModel.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package altosui; +package AltosUI; import java.awt.*; import java.awt.event.*; diff --git a/altosui/AltosFlightStats.java b/altosui/AltosFlightStats.java index ab094c80..d37f90b8 100644 --- a/altosui/AltosFlightStats.java +++ b/altosui/AltosFlightStats.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package altosui; +package AltosUI; import java.awt.*; import java.awt.event.*; diff --git a/altosui/AltosFlightStatsTable.java b/altosui/AltosFlightStatsTable.java index 87ba6aa8..bcfdd84e 100644 --- a/altosui/AltosFlightStatsTable.java +++ b/altosui/AltosFlightStatsTable.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package altosui; +package AltosUI; import java.awt.*; import java.awt.event.*; diff --git a/altosui/AltosFlightStatus.java b/altosui/AltosFlightStatus.java index 6a351004..ee03698b 100644 --- a/altosui/AltosFlightStatus.java +++ b/altosui/AltosFlightStatus.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package altosui; +package AltosUI; import java.awt.*; import java.awt.event.*; diff --git a/altosui/AltosFlightStatusTableModel.java b/altosui/AltosFlightStatusTableModel.java index c2cf8cd1..919c7704 100644 --- a/altosui/AltosFlightStatusTableModel.java +++ b/altosui/AltosFlightStatusTableModel.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package altosui; +package AltosUI; import java.awt.*; import java.awt.event.*; diff --git a/altosui/AltosFlightStatusUpdate.java b/altosui/AltosFlightStatusUpdate.java index d70fc7f8..a0b4e304 100644 --- a/altosui/AltosFlightStatusUpdate.java +++ b/altosui/AltosFlightStatusUpdate.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package altosui; +package AltosUI; import java.awt.*; import java.awt.event.*; diff --git a/altosui/AltosFlightUI.java b/altosui/AltosFlightUI.java index ddc54cbd..08e8550f 100644 --- a/altosui/AltosFlightUI.java +++ b/altosui/AltosFlightUI.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package altosui; +package AltosUI; import java.awt.*; import java.awt.event.*; diff --git a/altosui/AltosFontListener.java b/altosui/AltosFontListener.java index 0dda0f29..a0cb8a56 100644 --- a/altosui/AltosFontListener.java +++ b/altosui/AltosFontListener.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package altosui; +package AltosUI; public interface AltosFontListener { void font_size_changed(int font_size); diff --git a/altosui/AltosFrame.java b/altosui/AltosFrame.java index 70598634..cdbfe7d3 100644 --- a/altosui/AltosFrame.java +++ b/altosui/AltosFrame.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package altosui; +package AltosUI; import java.awt.*; import java.awt.event.*; diff --git a/altosui/AltosFreqList.java b/altosui/AltosFreqList.java index 1bbc97c6..a17afce6 100644 --- a/altosui/AltosFreqList.java +++ b/altosui/AltosFreqList.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package altosui; +package AltosUI; import java.awt.*; import java.awt.event.*; diff --git a/altosui/AltosGraph.java b/altosui/AltosGraph.java index 54d2bb0b..a61a0976 100644 --- a/altosui/AltosGraph.java +++ b/altosui/AltosGraph.java @@ -2,7 +2,7 @@ // Copyright (c) 2010 Anthony Towns // GPL v2 or later -package altosui; +package AltosUI; import java.io.*; diff --git a/altosui/AltosGraphTime.java b/altosui/AltosGraphTime.java index 0955f6e6..f00170ec 100644 --- a/altosui/AltosGraphTime.java +++ b/altosui/AltosGraphTime.java @@ -2,7 +2,7 @@ // Copyright (c) 2010 Anthony Towns // GPL v2 or later -package altosui; +package AltosUI; import java.lang.*; import java.io.*; diff --git a/altosui/AltosGraphUI.java b/altosui/AltosGraphUI.java index 527a7d28..b571fc7d 100644 --- a/altosui/AltosGraphUI.java +++ b/altosui/AltosGraphUI.java @@ -2,7 +2,7 @@ // Copyright (c) 2010 Anthony Towns // GPL v2 or later -package altosui; +package AltosUI; import java.io.*; import java.util.ArrayList; diff --git a/altosui/AltosHexfile.java b/altosui/AltosHexfile.java index d52b46c3..435f13ee 100644 --- a/altosui/AltosHexfile.java +++ b/altosui/AltosHexfile.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package altosui; +package AltosUI; import java.lang.*; import java.io.*; diff --git a/altosui/AltosIdleMonitorUI.java b/altosui/AltosIdleMonitorUI.java index 46ca3e5d..f67644fc 100644 --- a/altosui/AltosIdleMonitorUI.java +++ b/altosui/AltosIdleMonitorUI.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package altosui; +package AltosUI; import java.awt.*; import java.awt.event.*; diff --git a/altosui/AltosIgniteUI.java b/altosui/AltosIgniteUI.java index 78eba8e6..8c4c939f 100644 --- a/altosui/AltosIgniteUI.java +++ b/altosui/AltosIgniteUI.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package altosui; +package AltosUI; import java.awt.*; import java.awt.event.*; diff --git a/altosui/AltosInfoTable.java b/altosui/AltosInfoTable.java index c1400976..8caf5a80 100644 --- a/altosui/AltosInfoTable.java +++ b/altosui/AltosInfoTable.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package altosui; +package AltosUI; import java.awt.*; import java.awt.event.*; diff --git a/altosui/AltosKML.java b/altosui/AltosKML.java index ff0734b8..7e3b0e08 100644 --- a/altosui/AltosKML.java +++ b/altosui/AltosKML.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package altosui; +package AltosUI; import java.lang.*; import java.io.*; diff --git a/altosui/AltosLanded.java b/altosui/AltosLanded.java index a47e1cbd..5c3111a2 100644 --- a/altosui/AltosLanded.java +++ b/altosui/AltosLanded.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package altosui; +package AltosUI; import java.awt.*; import java.awt.event.*; diff --git a/altosui/AltosLaunch.java b/altosui/AltosLaunch.java index 0e493b91..67512cef 100644 --- a/altosui/AltosLaunch.java +++ b/altosui/AltosLaunch.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package altosui; +package AltosUI; import java.io.*; import java.util.concurrent.*; diff --git a/altosui/AltosLaunchUI.java b/altosui/AltosLaunchUI.java index 44481544..a4f12997 100644 --- a/altosui/AltosLaunchUI.java +++ b/altosui/AltosLaunchUI.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package altosui; +package AltosUI; import java.awt.*; import java.awt.event.*; diff --git a/altosui/AltosLed.java b/altosui/AltosLed.java index 1358cd48..4bf43a53 100644 --- a/altosui/AltosLed.java +++ b/altosui/AltosLed.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package altosui; +package AltosUI; import java.awt.*; import java.awt.event.*; diff --git a/altosui/AltosLights.java b/altosui/AltosLights.java index 8bd9e7de..92d11212 100644 --- a/altosui/AltosLights.java +++ b/altosui/AltosLights.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package altosui; +package AltosUI; import java.awt.*; import java.awt.event.*; diff --git a/altosui/AltosPad.java b/altosui/AltosPad.java index 0a3f3d65..8006190d 100644 --- a/altosui/AltosPad.java +++ b/altosui/AltosPad.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package altosui; +package AltosUI; import java.awt.*; import java.awt.event.*; diff --git a/altosui/AltosRomconfig.java b/altosui/AltosRomconfig.java index 0a283e51..1e3d7294 100644 --- a/altosui/AltosRomconfig.java +++ b/altosui/AltosRomconfig.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package altosui; +package AltosUI; import java.io.*; import org.altusmetrum.AltosLib.*; diff --git a/altosui/AltosRomconfigUI.java b/altosui/AltosRomconfigUI.java index 306b8623..25d8d087 100644 --- a/altosui/AltosRomconfigUI.java +++ b/altosui/AltosRomconfigUI.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package altosui; +package AltosUI; import java.awt.*; import java.awt.event.*; diff --git a/altosui/AltosScanUI.java b/altosui/AltosScanUI.java index 9da1290f..534451cb 100644 --- a/altosui/AltosScanUI.java +++ b/altosui/AltosScanUI.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package altosui; +package AltosUI; import java.awt.*; import java.awt.event.*; diff --git a/altosui/AltosSerial.java b/altosui/AltosSerial.java index 6cee1609..61865bbd 100644 --- a/altosui/AltosSerial.java +++ b/altosui/AltosSerial.java @@ -19,7 +19,7 @@ * Deal with TeleDongle on a serial port */ -package altosui; +package AltosUI; import java.lang.*; import java.io.*; diff --git a/altosui/AltosSerialInUseException.java b/altosui/AltosSerialInUseException.java index 7380f331..ae97b3d2 100644 --- a/altosui/AltosSerialInUseException.java +++ b/altosui/AltosSerialInUseException.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package altosui; +package AltosUI; public class AltosSerialInUseException extends Exception { public AltosDevice device; diff --git a/altosui/AltosSiteMap.java b/altosui/AltosSiteMap.java index b57edcab..4195fc3f 100644 --- a/altosui/AltosSiteMap.java +++ b/altosui/AltosSiteMap.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package altosui; +package AltosUI; import java.awt.*; import java.awt.image.*; diff --git a/altosui/AltosSiteMapCache.java b/altosui/AltosSiteMapCache.java index f729a298..6e7e423b 100644 --- a/altosui/AltosSiteMapCache.java +++ b/altosui/AltosSiteMapCache.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package altosui; +package AltosUI; import java.awt.*; import java.awt.image.*; diff --git a/altosui/AltosSiteMapPreload.java b/altosui/AltosSiteMapPreload.java index 676b0790..8c0850fa 100644 --- a/altosui/AltosSiteMapPreload.java +++ b/altosui/AltosSiteMapPreload.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package altosui; +package AltosUI; import java.awt.*; import java.awt.image.*; diff --git a/altosui/AltosSiteMapTile.java b/altosui/AltosSiteMapTile.java index 34550219..1e1cca5a 100644 --- a/altosui/AltosSiteMapTile.java +++ b/altosui/AltosSiteMapTile.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package altosui; +package AltosUI; import java.awt.*; import java.awt.image.*; diff --git a/altosui/AltosUI.java b/altosui/AltosUI.java index 926d66f0..a1678299 100644 --- a/altosui/AltosUI.java +++ b/altosui/AltosUI.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package altosui; +package AltosUI; import java.awt.*; import java.awt.event.*; diff --git a/altosui/AltosUIListener.java b/altosui/AltosUIListener.java index 7ee62afc..e50b30b2 100644 --- a/altosui/AltosUIListener.java +++ b/altosui/AltosUIListener.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package altosui; +package AltosUI; public interface AltosUIListener { public void ui_changed(String look_and_feel); diff --git a/altosui/AltosUIPreferences.java b/altosui/AltosUIPreferences.java index 10ab26c3..010d8e6a 100644 --- a/altosui/AltosUIPreferences.java +++ b/altosui/AltosUIPreferences.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package altosui; +package AltosUI; import java.io.*; import java.util.*; diff --git a/altosui/AltosUSBDevice.java b/altosui/AltosUSBDevice.java index ed5f8307..0c953cbf 100644 --- a/altosui/AltosUSBDevice.java +++ b/altosui/AltosUSBDevice.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package altosui; +package AltosUI; import java.lang.*; import java.util.*; import libaltosJNI.*; diff --git a/altosui/AltosVersion.java.in b/altosui/AltosVersion.java.in index b0b3c0cf..d72e0936 100644 --- a/altosui/AltosVersion.java.in +++ b/altosui/AltosVersion.java.in @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package altosui; +package AltosUI; public class AltosVersion { public final static String version = "@VERSION@"; diff --git a/altosui/AltosVoice.java b/altosui/AltosVoice.java index ab74e0b3..ff83ac29 100644 --- a/altosui/AltosVoice.java +++ b/altosui/AltosVoice.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package altosui; +package AltosUI; import com.sun.speech.freetts.Voice; import com.sun.speech.freetts.VoiceManager; diff --git a/altosui/AltosWriter.java b/altosui/AltosWriter.java index b7375204..9031c268 100644 --- a/altosui/AltosWriter.java +++ b/altosui/AltosWriter.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package altosui; +package AltosUI; import java.lang.*; import java.io.*; diff --git a/altosui/GrabNDrag.java b/altosui/GrabNDrag.java index c350efec..a984c43e 100644 --- a/altosui/GrabNDrag.java +++ b/altosui/GrabNDrag.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package altosui; +package AltosUI; import java.awt.*; import java.awt.image.*; diff --git a/altosui/Makefile.am b/altosui/Makefile.am index eb6ea2a3..9ca4f86e 100644 --- a/altosui/Makefile.am +++ b/altosui/Makefile.am @@ -112,11 +112,9 @@ LIBALTOS= \ libaltos.dylib \ altos.dll -# tmarble: test comment for change of package name -# from altosui to AltosUI -JAR=altosui.jar +JAR=AltosUI.jar -FATJAR=altosui-fat.jar +FATJAR=AltosUI-fat.jar # Icons ICONDIR=$(top_srcdir)/icon @@ -172,7 +170,7 @@ MACOSX_EXTRA=$(FIRMWARE) WINDOWS_FILES=$(FAT_FILES) altos.dll altos64.dll $(top_srcdir)/telemetrum.inf $(WINDOWS_ICON) -all-local: classes/altosui $(JAR) altosui altosui-test altosui-jdb +all-local: classes/AltosUI $(JAR) altosui altosui-test altosui-jdb clean-local: -rm -rf classes $(JAR) $(FATJAR) \ @@ -209,43 +207,43 @@ endif altosuidir=$(datadir)/java -install-altosuiJAVA: altosui.jar +install-altosuiJAVA: AltosUI.jar @$(NORMAL_INSTALL) test -z "$(altosuidir)" || $(MKDIR_P) "$(DESTDIR)$(altosuidir)" - echo " $(INSTALL_DATA)" "$<" "'$(DESTDIR)$(altosuidir)/altosui.jar'"; \ + echo " $(INSTALL_DATA)" "$<" "'$(DESTDIR)$(altosuidir)/AltosUI.jar'"; \ $(INSTALL_DATA) "$<" "$(DESTDIR)$(altosuidir)" -classes/altosui: - mkdir -p classes/altosui +classes/AltosUI: + mkdir -p classes/AltosUI $(JAR): classaltosui.stamp Manifest.txt $(JAVA_ICON) $(ALTOSLIB_CLASS) jar cfm $@ Manifest.txt \ $(ICONJAR) \ - -C classes altosui \ + -C classes AltosUI \ -C libaltos libaltosJNI $(FATJAR): classaltosui.stamp Manifest-fat.txt $(ALTOSLIB_CLASS) $(FREETTS_CLASS) $(JFREECHART_CLASS) $(JCOMMON_CLASS) $(LIBALTOS) $(JAVA_ICON) jar cfm $@ Manifest-fat.txt \ $(ICONJAR) \ - -C classes altosui \ + -C classes AltosUI \ -C libaltos libaltosJNI Manifest.txt: Makefile - echo 'Main-Class: altosui.AltosUI' > $@ + echo 'Main-Class: AltosUI.AltosUI' > $@ echo "Class-Path: AltosLib.jar $(FREETTS)/freetts.jar $(JFREECHART)/jfreechart.jar $(JCOMMON)/jcommon.jar" >> $@ Manifest-fat.txt: - echo 'Main-Class: altosui.AltosUI' > $@ + echo 'Main-Class: AltosUI.AltosUI' > $@ echo "Class-Path: AltosLib.jar freetts.jar jfreechart.jar jcommon.jar" >> $@ altosui: Makefile echo "#!/bin/sh" > $@ - echo 'exec java -cp "$(FREETTS)/*:$(JFREECHART)/*:$(JCOMMON)/*" -Djava.library.path="$(altoslibdir)" -jar "$(altosuidir)/altosui.jar" "$$@"' >> $@ + echo 'exec java -cp "$(FREETTS)/*:$(JFREECHART)/*:$(JCOMMON)/*" -Djava.library.path="$(altoslibdir)" -jar "$(altosuidir)/AltosUI.jar" "$$@"' >> $@ chmod +x $@ altosui-test: Makefile echo "#!/bin/sh" > $@ - echo 'exec java -cp "./*:$(FREETTS)/*:$(JFREECHART)/*:$(JCOMMON)/*" -Djava.library.path="libaltos/.libs" -jar altosui.jar "$$@"' >> $@ + echo 'exec java -cp "./*:$(FREETTS)/*:$(JFREECHART)/*:$(JCOMMON)/*" -Djava.library.path="libaltos/.libs" -jar AltosUI.jar "$$@"' >> $@ chmod +x $@ altosui-jdb: Makefile -- cgit v1.2.3 From 95268d681c9a6652d84db383f55a4fe8a4ac5173 Mon Sep 17 00:00:00 2001 From: Tom Marble Date: Tue, 11 Sep 2012 12:54:31 -0500 Subject: Reverted package name to 'altosui' from 'AltosUI' Also added emacs backup regex (*~) to .gitignore --- .gitignore | 2 +- altosui/Altos.java | 2 +- altosui/AltosAscent.java | 2 +- altosui/AltosBTDevice.java | 2 +- altosui/AltosBTDeviceIterator.java | 2 +- altosui/AltosBTKnown.java | 2 +- altosui/AltosBTManage.java | 2 +- altosui/AltosCSV.java | 2 +- altosui/AltosCSVUI.java | 2 +- altosui/AltosChannelMenu.java | 2 +- altosui/AltosCompanionInfo.java | 2 +- altosui/AltosConfig.java | 2 +- altosui/AltosConfigFreqUI.java | 2 +- altosui/AltosConfigTD.java | 2 +- altosui/AltosConfigTDUI.java | 2 +- altosui/AltosConfigUI.java | 2 +- altosui/AltosConfigureUI.java | 2 +- altosui/AltosDataChooser.java | 2 +- altosui/AltosDataPoint.java | 2 +- altosui/AltosDataPointReader.java | 2 +- altosui/AltosDebug.java | 2 +- altosui/AltosDescent.java | 2 +- altosui/AltosDevice.java | 2 +- altosui/AltosDeviceDialog.java | 2 +- altosui/AltosDialog.java | 2 +- altosui/AltosDisplayThread.java | 2 +- altosui/AltosEepromDelete.java | 2 +- altosui/AltosEepromDownload.java | 2 +- altosui/AltosEepromList.java | 2 +- altosui/AltosEepromManage.java | 2 +- altosui/AltosEepromMonitor.java | 2 +- altosui/AltosEepromSelect.java | 2 +- altosui/AltosFlash.java | 2 +- altosui/AltosFlashUI.java | 2 +- altosui/AltosFlightDisplay.java | 2 +- altosui/AltosFlightInfoTableModel.java | 2 +- altosui/AltosFlightStats.java | 2 +- altosui/AltosFlightStatsTable.java | 2 +- altosui/AltosFlightStatus.java | 2 +- altosui/AltosFlightStatusTableModel.java | 2 +- altosui/AltosFlightStatusUpdate.java | 2 +- altosui/AltosFlightUI.java | 2 +- altosui/AltosFontListener.java | 2 +- altosui/AltosFrame.java | 2 +- altosui/AltosFreqList.java | 2 +- altosui/AltosGraph.java | 2 +- altosui/AltosGraphTime.java | 2 +- altosui/AltosGraphUI.java | 2 +- altosui/AltosHexfile.java | 2 +- altosui/AltosIdleMonitorUI.java | 2 +- altosui/AltosIgniteUI.java | 2 +- altosui/AltosInfoTable.java | 2 +- altosui/AltosKML.java | 2 +- altosui/AltosLanded.java | 2 +- altosui/AltosLaunch.java | 2 +- altosui/AltosLaunchUI.java | 2 +- altosui/AltosLed.java | 2 +- altosui/AltosLights.java | 2 +- altosui/AltosPad.java | 2 +- altosui/AltosRomconfig.java | 2 +- altosui/AltosRomconfigUI.java | 2 +- altosui/AltosScanUI.java | 2 +- altosui/AltosSerial.java | 2 +- altosui/AltosSerialInUseException.java | 2 +- altosui/AltosSiteMap.java | 2 +- altosui/AltosSiteMapCache.java | 2 +- altosui/AltosSiteMapPreload.java | 2 +- altosui/AltosSiteMapTile.java | 2 +- altosui/AltosUI.java | 2 +- altosui/AltosUIListener.java | 2 +- altosui/AltosUIPreferences.java | 2 +- altosui/AltosUSBDevice.java | 2 +- altosui/AltosVersion.java.in | 2 +- altosui/AltosVoice.java | 2 +- altosui/AltosWriter.java | 2 +- altosui/GrabNDrag.java | 2 +- altosui/Makefile.am | 26 +++++++++++++------------- 77 files changed, 89 insertions(+), 89 deletions(-) (limited to 'altosui/AltosBTDevice.java') diff --git a/.gitignore b/.gitignore index 782be7f6..9f33ea3c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +*~ *.a *.adb *.asm @@ -41,7 +42,6 @@ autom4te.cache config.* config.h config.h.in -config.h.in~ config.log config.status build-stamp diff --git a/altosui/Altos.java b/altosui/Altos.java index d3aad6b2..cd17a93e 100644 --- a/altosui/Altos.java +++ b/altosui/Altos.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package AltosUI; +package altosui; import java.awt.*; import java.util.*; diff --git a/altosui/AltosAscent.java b/altosui/AltosAscent.java index de6c90a1..a158eb21 100644 --- a/altosui/AltosAscent.java +++ b/altosui/AltosAscent.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package AltosUI; +package altosui; import java.awt.*; import java.awt.event.*; diff --git a/altosui/AltosBTDevice.java b/altosui/AltosBTDevice.java index a6eee085..5e353fdd 100644 --- a/altosui/AltosBTDevice.java +++ b/altosui/AltosBTDevice.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package AltosUI; +package altosui; import java.lang.*; import java.util.*; import libaltosJNI.*; diff --git a/altosui/AltosBTDeviceIterator.java b/altosui/AltosBTDeviceIterator.java index 8d9e6fe6..58ed86d5 100644 --- a/altosui/AltosBTDeviceIterator.java +++ b/altosui/AltosBTDeviceIterator.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package AltosUI; +package altosui; import java.lang.*; import java.util.*; import libaltosJNI.*; diff --git a/altosui/AltosBTKnown.java b/altosui/AltosBTKnown.java index ad0672c6..6a8e53cb 100644 --- a/altosui/AltosBTKnown.java +++ b/altosui/AltosBTKnown.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package AltosUI; +package altosui; import java.lang.*; import java.util.*; import libaltosJNI.*; diff --git a/altosui/AltosBTManage.java b/altosui/AltosBTManage.java index a411c83e..aeb964bb 100644 --- a/altosui/AltosBTManage.java +++ b/altosui/AltosBTManage.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package AltosUI; +package altosui; import java.awt.*; import java.awt.event.*; diff --git a/altosui/AltosCSV.java b/altosui/AltosCSV.java index c672b78f..c876d9ca 100644 --- a/altosui/AltosCSV.java +++ b/altosui/AltosCSV.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package AltosUI; +package altosui; import java.lang.*; import java.io.*; diff --git a/altosui/AltosCSVUI.java b/altosui/AltosCSVUI.java index a28c4ca6..2702668b 100644 --- a/altosui/AltosCSVUI.java +++ b/altosui/AltosCSVUI.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package AltosUI; +package altosui; import java.awt.*; import java.awt.event.*; diff --git a/altosui/AltosChannelMenu.java b/altosui/AltosChannelMenu.java index d7e7f58f..0249a0bd 100644 --- a/altosui/AltosChannelMenu.java +++ b/altosui/AltosChannelMenu.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package AltosUI; +package altosui; import java.awt.*; import java.awt.event.*; diff --git a/altosui/AltosCompanionInfo.java b/altosui/AltosCompanionInfo.java index 16c972b3..4ba8fe98 100644 --- a/altosui/AltosCompanionInfo.java +++ b/altosui/AltosCompanionInfo.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package AltosUI; +package altosui; import java.awt.*; import java.awt.event.*; diff --git a/altosui/AltosConfig.java b/altosui/AltosConfig.java index 0b386ac9..cae41858 100644 --- a/altosui/AltosConfig.java +++ b/altosui/AltosConfig.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package AltosUI; +package altosui; import java.awt.*; import java.awt.event.*; diff --git a/altosui/AltosConfigFreqUI.java b/altosui/AltosConfigFreqUI.java index 4f8bd0f2..7958a21c 100644 --- a/altosui/AltosConfigFreqUI.java +++ b/altosui/AltosConfigFreqUI.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package AltosUI; +package altosui; import java.awt.*; import java.awt.event.*; diff --git a/altosui/AltosConfigTD.java b/altosui/AltosConfigTD.java index f5d30250..324a5988 100644 --- a/altosui/AltosConfigTD.java +++ b/altosui/AltosConfigTD.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package AltosUI; +package altosui; import java.awt.*; import java.awt.event.*; diff --git a/altosui/AltosConfigTDUI.java b/altosui/AltosConfigTDUI.java index f653d941..f2058f69 100644 --- a/altosui/AltosConfigTDUI.java +++ b/altosui/AltosConfigTDUI.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package AltosUI; +package altosui; import java.awt.*; import java.awt.event.*; diff --git a/altosui/AltosConfigUI.java b/altosui/AltosConfigUI.java index b0624ef2..62394fa6 100644 --- a/altosui/AltosConfigUI.java +++ b/altosui/AltosConfigUI.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package AltosUI; +package altosui; import java.awt.*; import java.awt.event.*; diff --git a/altosui/AltosConfigureUI.java b/altosui/AltosConfigureUI.java index b46c1fae..da82e8e0 100644 --- a/altosui/AltosConfigureUI.java +++ b/altosui/AltosConfigureUI.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package AltosUI; +package altosui; import java.awt.*; import java.awt.event.*; diff --git a/altosui/AltosDataChooser.java b/altosui/AltosDataChooser.java index b003a606..4bd51c39 100644 --- a/altosui/AltosDataChooser.java +++ b/altosui/AltosDataChooser.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package AltosUI; +package altosui; import java.awt.*; import java.awt.event.*; diff --git a/altosui/AltosDataPoint.java b/altosui/AltosDataPoint.java index 80f62c2c..5e077320 100644 --- a/altosui/AltosDataPoint.java +++ b/altosui/AltosDataPoint.java @@ -2,7 +2,7 @@ // Copyright (c) 2010 Anthony Towns // GPL v2 or later -package AltosUI; +package altosui; interface AltosDataPoint { int version(); diff --git a/altosui/AltosDataPointReader.java b/altosui/AltosDataPointReader.java index 371c48cb..821b0771 100644 --- a/altosui/AltosDataPointReader.java +++ b/altosui/AltosDataPointReader.java @@ -2,7 +2,7 @@ // Copyright (c) 2010 Anthony Towns // GPL v2 or later -package AltosUI; +package altosui; import java.io.IOException; import java.text.ParseException; diff --git a/altosui/AltosDebug.java b/altosui/AltosDebug.java index 4e394011..23e38bc0 100644 --- a/altosui/AltosDebug.java +++ b/altosui/AltosDebug.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package AltosUI; +package altosui; import java.lang.*; import java.io.*; diff --git a/altosui/AltosDescent.java b/altosui/AltosDescent.java index 2e3f26bd..62258814 100644 --- a/altosui/AltosDescent.java +++ b/altosui/AltosDescent.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package AltosUI; +package altosui; import java.awt.*; import java.awt.event.*; diff --git a/altosui/AltosDevice.java b/altosui/AltosDevice.java index dc045d7b..1b5c1a91 100644 --- a/altosui/AltosDevice.java +++ b/altosui/AltosDevice.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package AltosUI; +package altosui; import java.lang.*; import java.util.*; import libaltosJNI.*; diff --git a/altosui/AltosDeviceDialog.java b/altosui/AltosDeviceDialog.java index 7ab08b30..fa9d0013 100644 --- a/altosui/AltosDeviceDialog.java +++ b/altosui/AltosDeviceDialog.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package AltosUI; +package altosui; import java.lang.*; import java.util.*; diff --git a/altosui/AltosDialog.java b/altosui/AltosDialog.java index 1de11317..ff38c3e4 100644 --- a/altosui/AltosDialog.java +++ b/altosui/AltosDialog.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package AltosUI; +package altosui; import java.awt.*; import java.awt.event.*; diff --git a/altosui/AltosDisplayThread.java b/altosui/AltosDisplayThread.java index 0cf942e7..cf69c414 100644 --- a/altosui/AltosDisplayThread.java +++ b/altosui/AltosDisplayThread.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package AltosUI; +package altosui; import java.awt.*; import java.awt.event.*; diff --git a/altosui/AltosEepromDelete.java b/altosui/AltosEepromDelete.java index 21f09d0e..73f3a00f 100644 --- a/altosui/AltosEepromDelete.java +++ b/altosui/AltosEepromDelete.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package AltosUI; +package altosui; import java.awt.*; import java.awt.event.*; diff --git a/altosui/AltosEepromDownload.java b/altosui/AltosEepromDownload.java index a4d6b26e..b04890cd 100644 --- a/altosui/AltosEepromDownload.java +++ b/altosui/AltosEepromDownload.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package AltosUI; +package altosui; import java.awt.*; import java.awt.event.*; diff --git a/altosui/AltosEepromList.java b/altosui/AltosEepromList.java index 2a88134c..6a656215 100644 --- a/altosui/AltosEepromList.java +++ b/altosui/AltosEepromList.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package AltosUI; +package altosui; import java.awt.*; import java.awt.event.*; diff --git a/altosui/AltosEepromManage.java b/altosui/AltosEepromManage.java index 27b03bed..563c90b3 100644 --- a/altosui/AltosEepromManage.java +++ b/altosui/AltosEepromManage.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package AltosUI; +package altosui; import java.awt.*; import java.awt.event.*; diff --git a/altosui/AltosEepromMonitor.java b/altosui/AltosEepromMonitor.java index daf8d0ba..75643442 100644 --- a/altosui/AltosEepromMonitor.java +++ b/altosui/AltosEepromMonitor.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package AltosUI; +package altosui; import java.awt.*; import java.awt.event.*; diff --git a/altosui/AltosEepromSelect.java b/altosui/AltosEepromSelect.java index cb242183..4ad78896 100644 --- a/altosui/AltosEepromSelect.java +++ b/altosui/AltosEepromSelect.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package AltosUI; +package altosui; import java.lang.*; import java.util.*; diff --git a/altosui/AltosFlash.java b/altosui/AltosFlash.java index 996456fd..bd0c8a50 100644 --- a/altosui/AltosFlash.java +++ b/altosui/AltosFlash.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package AltosUI; +package altosui; import java.awt.*; import java.awt.event.*; diff --git a/altosui/AltosFlashUI.java b/altosui/AltosFlashUI.java index 01421de9..66991d10 100644 --- a/altosui/AltosFlashUI.java +++ b/altosui/AltosFlashUI.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package AltosUI; +package altosui; import java.awt.*; import java.awt.event.*; diff --git a/altosui/AltosFlightDisplay.java b/altosui/AltosFlightDisplay.java index e677fd6f..826f9522 100644 --- a/altosui/AltosFlightDisplay.java +++ b/altosui/AltosFlightDisplay.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package AltosUI; +package altosui; import org.altusmetrum.AltosLib.*; diff --git a/altosui/AltosFlightInfoTableModel.java b/altosui/AltosFlightInfoTableModel.java index cb798bcb..77969a89 100644 --- a/altosui/AltosFlightInfoTableModel.java +++ b/altosui/AltosFlightInfoTableModel.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package AltosUI; +package altosui; import java.awt.*; import java.awt.event.*; diff --git a/altosui/AltosFlightStats.java b/altosui/AltosFlightStats.java index d37f90b8..ab094c80 100644 --- a/altosui/AltosFlightStats.java +++ b/altosui/AltosFlightStats.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package AltosUI; +package altosui; import java.awt.*; import java.awt.event.*; diff --git a/altosui/AltosFlightStatsTable.java b/altosui/AltosFlightStatsTable.java index bcfdd84e..87ba6aa8 100644 --- a/altosui/AltosFlightStatsTable.java +++ b/altosui/AltosFlightStatsTable.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package AltosUI; +package altosui; import java.awt.*; import java.awt.event.*; diff --git a/altosui/AltosFlightStatus.java b/altosui/AltosFlightStatus.java index ee03698b..6a351004 100644 --- a/altosui/AltosFlightStatus.java +++ b/altosui/AltosFlightStatus.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package AltosUI; +package altosui; import java.awt.*; import java.awt.event.*; diff --git a/altosui/AltosFlightStatusTableModel.java b/altosui/AltosFlightStatusTableModel.java index 919c7704..c2cf8cd1 100644 --- a/altosui/AltosFlightStatusTableModel.java +++ b/altosui/AltosFlightStatusTableModel.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package AltosUI; +package altosui; import java.awt.*; import java.awt.event.*; diff --git a/altosui/AltosFlightStatusUpdate.java b/altosui/AltosFlightStatusUpdate.java index a0b4e304..d70fc7f8 100644 --- a/altosui/AltosFlightStatusUpdate.java +++ b/altosui/AltosFlightStatusUpdate.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package AltosUI; +package altosui; import java.awt.*; import java.awt.event.*; diff --git a/altosui/AltosFlightUI.java b/altosui/AltosFlightUI.java index 08e8550f..ddc54cbd 100644 --- a/altosui/AltosFlightUI.java +++ b/altosui/AltosFlightUI.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package AltosUI; +package altosui; import java.awt.*; import java.awt.event.*; diff --git a/altosui/AltosFontListener.java b/altosui/AltosFontListener.java index a0cb8a56..0dda0f29 100644 --- a/altosui/AltosFontListener.java +++ b/altosui/AltosFontListener.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package AltosUI; +package altosui; public interface AltosFontListener { void font_size_changed(int font_size); diff --git a/altosui/AltosFrame.java b/altosui/AltosFrame.java index cdbfe7d3..70598634 100644 --- a/altosui/AltosFrame.java +++ b/altosui/AltosFrame.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package AltosUI; +package altosui; import java.awt.*; import java.awt.event.*; diff --git a/altosui/AltosFreqList.java b/altosui/AltosFreqList.java index a17afce6..1bbc97c6 100644 --- a/altosui/AltosFreqList.java +++ b/altosui/AltosFreqList.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package AltosUI; +package altosui; import java.awt.*; import java.awt.event.*; diff --git a/altosui/AltosGraph.java b/altosui/AltosGraph.java index a61a0976..54d2bb0b 100644 --- a/altosui/AltosGraph.java +++ b/altosui/AltosGraph.java @@ -2,7 +2,7 @@ // Copyright (c) 2010 Anthony Towns // GPL v2 or later -package AltosUI; +package altosui; import java.io.*; diff --git a/altosui/AltosGraphTime.java b/altosui/AltosGraphTime.java index f00170ec..0955f6e6 100644 --- a/altosui/AltosGraphTime.java +++ b/altosui/AltosGraphTime.java @@ -2,7 +2,7 @@ // Copyright (c) 2010 Anthony Towns // GPL v2 or later -package AltosUI; +package altosui; import java.lang.*; import java.io.*; diff --git a/altosui/AltosGraphUI.java b/altosui/AltosGraphUI.java index b571fc7d..527a7d28 100644 --- a/altosui/AltosGraphUI.java +++ b/altosui/AltosGraphUI.java @@ -2,7 +2,7 @@ // Copyright (c) 2010 Anthony Towns // GPL v2 or later -package AltosUI; +package altosui; import java.io.*; import java.util.ArrayList; diff --git a/altosui/AltosHexfile.java b/altosui/AltosHexfile.java index 435f13ee..d52b46c3 100644 --- a/altosui/AltosHexfile.java +++ b/altosui/AltosHexfile.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package AltosUI; +package altosui; import java.lang.*; import java.io.*; diff --git a/altosui/AltosIdleMonitorUI.java b/altosui/AltosIdleMonitorUI.java index f67644fc..46ca3e5d 100644 --- a/altosui/AltosIdleMonitorUI.java +++ b/altosui/AltosIdleMonitorUI.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package AltosUI; +package altosui; import java.awt.*; import java.awt.event.*; diff --git a/altosui/AltosIgniteUI.java b/altosui/AltosIgniteUI.java index 8c4c939f..78eba8e6 100644 --- a/altosui/AltosIgniteUI.java +++ b/altosui/AltosIgniteUI.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package AltosUI; +package altosui; import java.awt.*; import java.awt.event.*; diff --git a/altosui/AltosInfoTable.java b/altosui/AltosInfoTable.java index 8caf5a80..c1400976 100644 --- a/altosui/AltosInfoTable.java +++ b/altosui/AltosInfoTable.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package AltosUI; +package altosui; import java.awt.*; import java.awt.event.*; diff --git a/altosui/AltosKML.java b/altosui/AltosKML.java index 7e3b0e08..ff0734b8 100644 --- a/altosui/AltosKML.java +++ b/altosui/AltosKML.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package AltosUI; +package altosui; import java.lang.*; import java.io.*; diff --git a/altosui/AltosLanded.java b/altosui/AltosLanded.java index 5c3111a2..a47e1cbd 100644 --- a/altosui/AltosLanded.java +++ b/altosui/AltosLanded.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package AltosUI; +package altosui; import java.awt.*; import java.awt.event.*; diff --git a/altosui/AltosLaunch.java b/altosui/AltosLaunch.java index 67512cef..0e493b91 100644 --- a/altosui/AltosLaunch.java +++ b/altosui/AltosLaunch.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package AltosUI; +package altosui; import java.io.*; import java.util.concurrent.*; diff --git a/altosui/AltosLaunchUI.java b/altosui/AltosLaunchUI.java index a4f12997..44481544 100644 --- a/altosui/AltosLaunchUI.java +++ b/altosui/AltosLaunchUI.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package AltosUI; +package altosui; import java.awt.*; import java.awt.event.*; diff --git a/altosui/AltosLed.java b/altosui/AltosLed.java index 4bf43a53..1358cd48 100644 --- a/altosui/AltosLed.java +++ b/altosui/AltosLed.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package AltosUI; +package altosui; import java.awt.*; import java.awt.event.*; diff --git a/altosui/AltosLights.java b/altosui/AltosLights.java index 92d11212..8bd9e7de 100644 --- a/altosui/AltosLights.java +++ b/altosui/AltosLights.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package AltosUI; +package altosui; import java.awt.*; import java.awt.event.*; diff --git a/altosui/AltosPad.java b/altosui/AltosPad.java index 8006190d..0a3f3d65 100644 --- a/altosui/AltosPad.java +++ b/altosui/AltosPad.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package AltosUI; +package altosui; import java.awt.*; import java.awt.event.*; diff --git a/altosui/AltosRomconfig.java b/altosui/AltosRomconfig.java index 1e3d7294..0a283e51 100644 --- a/altosui/AltosRomconfig.java +++ b/altosui/AltosRomconfig.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package AltosUI; +package altosui; import java.io.*; import org.altusmetrum.AltosLib.*; diff --git a/altosui/AltosRomconfigUI.java b/altosui/AltosRomconfigUI.java index 25d8d087..306b8623 100644 --- a/altosui/AltosRomconfigUI.java +++ b/altosui/AltosRomconfigUI.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package AltosUI; +package altosui; import java.awt.*; import java.awt.event.*; diff --git a/altosui/AltosScanUI.java b/altosui/AltosScanUI.java index 534451cb..9da1290f 100644 --- a/altosui/AltosScanUI.java +++ b/altosui/AltosScanUI.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package AltosUI; +package altosui; import java.awt.*; import java.awt.event.*; diff --git a/altosui/AltosSerial.java b/altosui/AltosSerial.java index 61865bbd..6cee1609 100644 --- a/altosui/AltosSerial.java +++ b/altosui/AltosSerial.java @@ -19,7 +19,7 @@ * Deal with TeleDongle on a serial port */ -package AltosUI; +package altosui; import java.lang.*; import java.io.*; diff --git a/altosui/AltosSerialInUseException.java b/altosui/AltosSerialInUseException.java index ae97b3d2..7380f331 100644 --- a/altosui/AltosSerialInUseException.java +++ b/altosui/AltosSerialInUseException.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package AltosUI; +package altosui; public class AltosSerialInUseException extends Exception { public AltosDevice device; diff --git a/altosui/AltosSiteMap.java b/altosui/AltosSiteMap.java index 4195fc3f..b57edcab 100644 --- a/altosui/AltosSiteMap.java +++ b/altosui/AltosSiteMap.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package AltosUI; +package altosui; import java.awt.*; import java.awt.image.*; diff --git a/altosui/AltosSiteMapCache.java b/altosui/AltosSiteMapCache.java index 6e7e423b..f729a298 100644 --- a/altosui/AltosSiteMapCache.java +++ b/altosui/AltosSiteMapCache.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package AltosUI; +package altosui; import java.awt.*; import java.awt.image.*; diff --git a/altosui/AltosSiteMapPreload.java b/altosui/AltosSiteMapPreload.java index 8c0850fa..676b0790 100644 --- a/altosui/AltosSiteMapPreload.java +++ b/altosui/AltosSiteMapPreload.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package AltosUI; +package altosui; import java.awt.*; import java.awt.image.*; diff --git a/altosui/AltosSiteMapTile.java b/altosui/AltosSiteMapTile.java index 1e1cca5a..34550219 100644 --- a/altosui/AltosSiteMapTile.java +++ b/altosui/AltosSiteMapTile.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package AltosUI; +package altosui; import java.awt.*; import java.awt.image.*; diff --git a/altosui/AltosUI.java b/altosui/AltosUI.java index a1678299..926d66f0 100644 --- a/altosui/AltosUI.java +++ b/altosui/AltosUI.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package AltosUI; +package altosui; import java.awt.*; import java.awt.event.*; diff --git a/altosui/AltosUIListener.java b/altosui/AltosUIListener.java index e50b30b2..7ee62afc 100644 --- a/altosui/AltosUIListener.java +++ b/altosui/AltosUIListener.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package AltosUI; +package altosui; public interface AltosUIListener { public void ui_changed(String look_and_feel); diff --git a/altosui/AltosUIPreferences.java b/altosui/AltosUIPreferences.java index 010d8e6a..10ab26c3 100644 --- a/altosui/AltosUIPreferences.java +++ b/altosui/AltosUIPreferences.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package AltosUI; +package altosui; import java.io.*; import java.util.*; diff --git a/altosui/AltosUSBDevice.java b/altosui/AltosUSBDevice.java index 0c953cbf..ed5f8307 100644 --- a/altosui/AltosUSBDevice.java +++ b/altosui/AltosUSBDevice.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package AltosUI; +package altosui; import java.lang.*; import java.util.*; import libaltosJNI.*; diff --git a/altosui/AltosVersion.java.in b/altosui/AltosVersion.java.in index d72e0936..b0b3c0cf 100644 --- a/altosui/AltosVersion.java.in +++ b/altosui/AltosVersion.java.in @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package AltosUI; +package altosui; public class AltosVersion { public final static String version = "@VERSION@"; diff --git a/altosui/AltosVoice.java b/altosui/AltosVoice.java index ff83ac29..ab74e0b3 100644 --- a/altosui/AltosVoice.java +++ b/altosui/AltosVoice.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package AltosUI; +package altosui; import com.sun.speech.freetts.Voice; import com.sun.speech.freetts.VoiceManager; diff --git a/altosui/AltosWriter.java b/altosui/AltosWriter.java index 9031c268..b7375204 100644 --- a/altosui/AltosWriter.java +++ b/altosui/AltosWriter.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package AltosUI; +package altosui; import java.lang.*; import java.io.*; diff --git a/altosui/GrabNDrag.java b/altosui/GrabNDrag.java index a984c43e..c350efec 100644 --- a/altosui/GrabNDrag.java +++ b/altosui/GrabNDrag.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package AltosUI; +package altosui; import java.awt.*; import java.awt.image.*; diff --git a/altosui/Makefile.am b/altosui/Makefile.am index ca5d2b35..9f75d5e3 100644 --- a/altosui/Makefile.am +++ b/altosui/Makefile.am @@ -112,9 +112,9 @@ LIBALTOS= \ libaltos.dylib \ altos.dll -JAR=AltosUI.jar +JAR=altosui.jar -FATJAR=AltosUI-fat.jar +FATJAR=altosui-fat.jar # Icons ICONDIR=$(top_srcdir)/icon @@ -170,7 +170,7 @@ MACOSX_EXTRA=$(FIRMWARE) WINDOWS_FILES=$(FAT_FILES) altos.dll altos64.dll $(top_srcdir)/telemetrum.inf $(WINDOWS_ICON) -all-local: classes/AltosUI $(JAR) altosui altosui-test altosui-jdb +all-local: classes/altosui $(JAR) altosui altosui-test altosui-jdb clean-local: -rm -rf classes $(JAR) $(FATJAR) \ @@ -207,43 +207,43 @@ endif altosuidir=$(datadir)/java -install-altosuiJAVA: AltosUI.jar +install-altosuiJAVA: altosui.jar @$(NORMAL_INSTALL) test -z "$(altosuidir)" || $(MKDIR_P) "$(DESTDIR)$(altosuidir)" - echo " $(INSTALL_DATA)" "$<" "'$(DESTDIR)$(altosuidir)/AltosUI.jar'"; \ + echo " $(INSTALL_DATA)" "$<" "'$(DESTDIR)$(altosuidir)/altosui.jar'"; \ $(INSTALL_DATA) "$<" "$(DESTDIR)$(altosuidir)" -classes/AltosUI: - mkdir -p classes/AltosUI +classes/altosui: + mkdir -p classes/altosui $(JAR): classaltosui.stamp Manifest.txt $(JAVA_ICON) $(ALTOSLIB_CLASS) jar cfm $@ Manifest.txt \ $(ICONJAR) \ - -C classes AltosUI \ + -C classes altosui \ -C libaltos libaltosJNI $(FATJAR): classaltosui.stamp Manifest-fat.txt $(ALTOSLIB_CLASS) $(FREETTS_CLASS) $(JFREECHART_CLASS) $(JCOMMON_CLASS) $(LIBALTOS) $(JAVA_ICON) jar cfm $@ Manifest-fat.txt \ $(ICONJAR) \ - -C classes AltosUI \ + -C classes altosui \ -C libaltos libaltosJNI Manifest.txt: Makefile - echo 'Main-Class: AltosUI.AltosUI' > $@ + echo 'Main-Class: altosui.AltosUI' > $@ echo "Class-Path: AltosLib.jar $(FREETTS)/freetts.jar $(JFREECHART)/jfreechart.jar $(JCOMMON)/jcommon.jar" >> $@ Manifest-fat.txt: - echo 'Main-Class: AltosUI.AltosUI' > $@ + echo 'Main-Class: altosui.AltosUI' > $@ echo "Class-Path: AltosLib.jar freetts.jar jfreechart.jar jcommon.jar" >> $@ altosui: Makefile echo "#!/bin/sh" > $@ - echo 'exec java -cp "$(FREETTS)/*:$(JFREECHART)/*:$(JCOMMON)/*" -Djava.library.path="$(altoslibdir)" -jar "$(altosuidir)/AltosUI.jar" "$$@"' >> $@ + echo 'exec java -cp "$(FREETTS)/*:$(JFREECHART)/*:$(JCOMMON)/*" -Djava.library.path="$(altoslibdir)" -jar "$(altosuidir)/altosui.jar" "$$@"' >> $@ chmod +x $@ altosui-test: Makefile echo "#!/bin/sh" > $@ - echo 'exec java -cp "./*:$(FREETTS)/*:$(JFREECHART)/*:$(JCOMMON)/*" -Djava.library.path="libaltos/.libs" -jar AltosUI.jar "$$@"' >> $@ + echo 'exec java -cp "./*:$(FREETTS)/*:$(JFREECHART)/*:$(JCOMMON)/*" -Djava.library.path="libaltos/.libs" -jar altosui.jar "$$@"' >> $@ chmod +x $@ altosui-jdb: Makefile -- cgit v1.2.3