public AltosVoice voice = new AltosVoice();
+ public static boolean load_library(Frame frame) {
+ if (!AltosDevice.load_library()) {
+ JOptionPane.showMessageDialog(frame,
+ String.format("No AltOS library in \"%s\"",
+ System.getProperty("java.library.path","<undefined>")),
+ "Cannot load device access library",
+ JOptionPane.ERROR_MESSAGE);
+ return false;
+ }
+ return true;
+ }
+
public AltosUI() {
+ load_library(null);
+
String[] statusNames = { "Height (m)", "State", "RSSI (dBm)", "Speed (m/s)" };
Object[][] statusData = { { "0", "pad", "-50", "0" } };
}
private void ConnectToDevice() {
- AltosDevice device = AltosDeviceDialog.show(AltosUI.this, AltosDevice.BaseStation);
+ AltosDevice device = AltosDeviceDialog.show(AltosUI.this,
+ AltosDevice.product_basestation);
if (device != null) {
try {