import javax.swing.*;
import javax.swing.filechooser.FileNameExtensionFilter;
import javax.swing.table.*;
+import org.altusmetrum.AltosLib.*;
import libaltosJNI.*;
* threads.
*/
-public class AltosSerial implements Runnable {
+public class AltosSerial implements Runnable, AltosLink {
static java.util.List<String> devices_opened = Collections.synchronizedList(new LinkedList<String>());
}
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());
if (debug)
System.out.printf("start remote %7.3f\n", frequency);
if (frequency == 0.0)
- frequency = AltosPreferences.frequency(device.getSerial());
+ frequency = AltosUIPreferences.frequency(device.getSerial());
set_radio_frequency(frequency);
- set_callsign(AltosPreferences.callsign());
+ set_callsign(AltosUIPreferences.callsign());
printf("p\nE 0\n");
flush_input();
remote = true;