diff options
| author | Bdale Garbee <bdale@gag.com> | 2010-09-09 20:05:27 -0600 |
|---|---|---|
| committer | Bdale Garbee <bdale@gag.com> | 2010-09-09 20:05:27 -0600 |
| commit | 0ea75761416bff299233991e961ba25b6c7dcf89 (patch) | |
| tree | 80f9d47e6601e449479b1b3378962467e923e7c2 /ao-tools/altosui/AltosUI.java | |
| parent | 35d70c92307dd478bc619b2f6c5a88e155cdad28 (diff) | |
| parent | 8ee3464d8064ebe1694c7b20177878c0d9961451 (diff) | |
Merge branch 'master' of ssh://git.gag.com/scm/git/fw/altos
Diffstat (limited to 'ao-tools/altosui/AltosUI.java')
| -rw-r--r-- | ao-tools/altosui/AltosUI.java | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/ao-tools/altosui/AltosUI.java b/ao-tools/altosui/AltosUI.java index 3aaeb888..ca587b25 100644 --- a/ao-tools/altosui/AltosUI.java +++ b/ao-tools/altosui/AltosUI.java @@ -70,8 +70,22 @@ public class AltosUI extends JFrame { 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" } }; |
