/* Pull the serial number out of the version information */
for (;;) {
- String line = serial_line.get_reply(1000);
+ String line = serial_line.get_reply(5000);
if (line == null)
throw new TimeoutException();
any_valid = false;
monitor.set_value(state_names[state], state, block - state_block);
for (addr = 0; addr < 0x100;) {
- String line = serial_line.get_reply(1000);
+ String line = serial_line.get_reply(5000);
if (line == null)
throw new TimeoutException();
int[] values = ParseHex(line);
public void run () {
if (remote) {
- serial_line.set_channel(AltosPreferences.channel(device.getSerial()));
- serial_line.set_callsign(AltosPreferences.callsign());
+ serial_line.set_radio();
serial_line.printf("p\nE 0\n");
serial_line.flush_input();
}
CaptureLog();
} catch (IOException ee) {
JOptionPane.showMessageDialog(frame,
- device.toString(),
+ device.toShortString(),
ee.getLocalizedMessage(),
JOptionPane.ERROR_MESSAGE);
} catch (InterruptedException ie) {
} catch (TimeoutException te) {
JOptionPane.showMessageDialog(frame,
String.format("Connection to \"%s\" failed",
- device.toString()),
+ device.toShortString()),
"Connection Failed",
JOptionPane.ERROR_MESSAGE);
}
} catch (FileNotFoundException ee) {
JOptionPane.showMessageDialog(frame,
String.format("Cannot open device \"%s\"",
- device.toString()),
+ device.toShortString()),
"Cannot open target device",
JOptionPane.ERROR_MESSAGE);
} catch (AltosSerialInUseException si) {
JOptionPane.showMessageDialog(frame,
String.format("Device \"%s\" already in use",
- device.toString()),
+ device.toShortString()),
"Device in use",
JOptionPane.ERROR_MESSAGE);
} catch (IOException ee) {
JOptionPane.showMessageDialog(frame,
- device.toString(),
+ device.toShortString(),
ee.getLocalizedMessage(),
JOptionPane.ERROR_MESSAGE);
}