This leaves the code in place, but commented out so that it isn't used
until we've got a bluetooth device ready for use.
Signed-off-by: Keith Packard <keithp@keithp.com>
public final static String bt_product_telebt = bt_product_telebt();
public final static String bt_product_telebt = bt_product_telebt();
- public static AltosBTKnown bt_known = new AltosBTKnown();
+// public static AltosBTKnown bt_known = new AltosBTKnown();
JRadioButton serial_debug;
JRadioButton serial_debug;
- JButton manage_bluetooth;
+// BLUETOOTH
+// JButton manage_bluetooth;
JButton manage_frequencies;
/* DocumentListener interface methods */
JButton manage_frequencies;
/* DocumentListener interface methods */
c.anchor = GridBagConstraints.WEST;
pane.add(serial_debug, c);
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) {
- AltosBTManage.show(owner, Altos.bt_known);
- }
- });
- c.gridx = 0;
- c.gridy = 6;
- c.gridwidth = 2;
- c.fill = GridBagConstraints.NONE;
- c.anchor = GridBagConstraints.WEST;
- pane.add(manage_bluetooth, c);
+// BLUETOOTH
+// manage_bluetooth = new JButton("Manage Bluetooth");
+// manage_bluetooth.addActionListener(new ActionListener() {
+// public void actionPerformed(ActionEvent e) {
+// AltosBTManage.show(owner, Altos.bt_known);
+// }
+// });
+// c.gridx = 0;
+// c.gridy = 6;
+// c.gridwidth = 2;
+// c.fill = GridBagConstraints.NONE;
+// c.anchor = GridBagConstraints.WEST;
+// pane.add(manage_bluetooth, c);
manage_frequencies = new JButton("Manage Frequencies");
manage_frequencies.addActionListener(new ActionListener() {
manage_frequencies = new JButton("Manage Frequencies");
manage_frequencies.addActionListener(new ActionListener() {
AltosConfigFreqUI.show(owner);
}
});
AltosConfigFreqUI.show(owner);
}
});
+// BLUETOOTH
+// c.gridx = 2;
+ c.gridx = 1;
c.gridy = 6;
c.gridwidth = 2;
c.fill = GridBagConstraints.NONE;
c.gridy = 6;
c.gridwidth = 2;
c.fill = GridBagConstraints.NONE;
private JList list;
private JButton cancel_button;
private JButton select_button;
private JList list;
private JButton cancel_button;
private JButton select_button;
- private JButton manage_bluetooth_button;
+// BLUETOOTH
+// private JButton manage_bluetooth_button;
private Frame frame;
private int product;
private Frame frame;
private int product;
private AltosDevice[] devices() {
java.util.List<AltosDevice> usb_devices = AltosUSBDevice.list(product);
private AltosDevice[] devices() {
java.util.List<AltosDevice> usb_devices = AltosUSBDevice.list(product);
- java.util.List<AltosDevice> bt_devices = Altos.bt_known.list(product);
- AltosDevice[] devices = new AltosDevice[usb_devices.size() + bt_devices.size()];
+ int num_devices = usb_devices.size();
+// BLUETOOTH
+// java.util.List<AltosDevice> bt_devices = Altos.bt_known.list(product);
+// num_devices += bt_devices.size();
+ AltosDevice[] devices = new AltosDevice[num_devices];
for (int i = 0; i < usb_devices.size(); i++)
devices[i] = usb_devices.get(i);
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);
+// BLUETOOTH
+// int off = usb_devices.size();
+// for (int j = 0; j < bt_devices.size(); j++)
+// devices[off + j] = bt_devices.get(j);
cancel_button.setActionCommand("cancel");
cancel_button.addActionListener(this);
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);
+// BLUETOOTH
+// manage_bluetooth_button = new JButton("Manage Bluetooth");
+// manage_bluetooth_button.setActionCommand("manage");
+// manage_bluetooth_button.addActionListener(this);
select_button = new JButton("Select");
select_button.setActionCommand("select");
select_button = new JButton("Select");
select_button.setActionCommand("select");
buttonPane.add(Box.createHorizontalGlue());
buttonPane.add(cancel_button);
buttonPane.add(Box.createRigidArea(new Dimension(10, 0)));
buttonPane.add(Box.createHorizontalGlue());
buttonPane.add(cancel_button);
buttonPane.add(Box.createRigidArea(new Dimension(10, 0)));
- buttonPane.add(manage_bluetooth_button);
+// BLUETOOTH
+// buttonPane.add(manage_bluetooth_button);
buttonPane.add(Box.createRigidArea(new Dimension(10, 0)));
buttonPane.add(select_button);
buttonPane.add(Box.createRigidArea(new Dimension(10, 0)));
buttonPane.add(select_button);
public void actionPerformed(ActionEvent e) {
if ("select".equals(e.getActionCommand()))
value = (AltosDevice)(list.getSelectedValue());
public void actionPerformed(ActionEvent e) {
if ("select".equals(e.getActionCommand()))
value = (AltosDevice)(list.getSelectedValue());
- if ("manage".equals(e.getActionCommand())) {
- AltosBTManage.show(frame, Altos.bt_known);
- update_devices();
- return;
- }
+// BLUETOOTH
+// if ("manage".equals(e.getActionCommand())) {
+// AltosBTManage.show(frame, Altos.bt_known);
+// update_devices();
+// return;
+// }
+altosui_BT = \
+ AltosBTDevice.java \
+ AltosBTDeviceIterator.java \
+ AltosBTManage.java \
+ AltosBTKnown.java
+
altosui_JAVA = \
GrabNDrag.java \
AltosAscent.java \
altosui_JAVA = \
GrabNDrag.java \
AltosAscent.java \
AltosDeviceDialog.java \
AltosDevice.java \
AltosUSBDevice.java \
AltosDeviceDialog.java \
AltosDevice.java \
AltosUSBDevice.java \
- AltosBTDevice.java \
- AltosBTDeviceIterator.java \
- AltosBTManage.java \
- AltosBTKnown.java \
AltosDisplayThread.java \
AltosEepromChunk.java \
AltosEepromDelete.java \
AltosDisplayThread.java \
AltosEepromChunk.java \
AltosEepromDelete.java \
altos_close(file);
}
altos_list_finish(list);
altos_close(file);
}
altos_list_finish(list);
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);
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);
}
}
altos_bt_list_finish(bt_list);
}
}
altos_bt_list_finish(bt_list);
altos_fini();
return 0;
}
altos_fini();
return 0;
}
struct altos_bt_list {
inquiry_info *ii;
int sock;
struct altos_bt_list {
inquiry_info *ii;
int sock;
+#endif /* HAS_BLUETOOTH */
+#define HAS_BLUETOOTH 0
+
#define USB_VENDOR_FSF 0xfffe
#define USB_VENDOR_ALTUSMETRUM USB_VENDOR_FSF
#define USB_PRODUCT_ALTUSMETRUM 0x000a
#define USB_VENDOR_FSF 0xfffe
#define USB_VENDOR_ALTUSMETRUM USB_VENDOR_FSF
#define USB_PRODUCT_ALTUSMETRUM 0x000a
PUBLIC int
altos_getchar(struct altos_file *file, int timeout);
PUBLIC int
altos_getchar(struct altos_file *file, int timeout);
PUBLIC struct altos_bt_list *
altos_bt_list_start(int inquiry_time);
PUBLIC struct altos_bt_list *
altos_bt_list_start(int inquiry_time);
PUBLIC struct altos_file *
altos_bt_open(struct altos_bt_device *device);
PUBLIC struct altos_file *
altos_bt_open(struct altos_bt_device *device);
#endif /* _LIBALTOS_H_ */
#endif /* _LIBALTOS_H_ */