diff options
author | Keith Packard <keithp@keithp.com> | 2011-07-06 21:36:38 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2011-07-06 21:38:23 -0700 |
commit | 80ca066a825646f833ca609190c76c5252118d9a (patch) | |
tree | 7a8f9d4a7278332302b7ea5326c9e63629b6b1b6 | |
parent | 504ab7ab355652d5d01094c927089029596a0753 (diff) |
altosui: Build device constants into .java code
This eliminates a depedency on updates to the system helper library,
which means we don't have to provide a new library on all platforms
just to support a new USB id.
Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r-- | altosui/Altos.java | 31 |
1 files changed, 11 insertions, 20 deletions
diff --git a/altosui/Altos.java b/altosui/Altos.java index 36490844..96263797 100644 --- a/altosui/Altos.java +++ b/altosui/Altos.java @@ -324,50 +324,42 @@ public class Altos { } static int usb_vendor_altusmetrum() { - if (load_library()) - return libaltosConstants.USB_VENDOR_ALTUSMETRUM; - return 0x000a; + load_library(); + return 0xfffe; } static int usb_product_altusmetrum() { - if (load_library()) - return libaltosConstants.USB_PRODUCT_ALTUSMETRUM; + load_library(); return 0x000a; } static int usb_product_altusmetrum_min() { - if (load_library()) - return libaltosConstants.USB_PRODUCT_ALTUSMETRUM_MIN; + load_library(); return 0x000a; } static int usb_product_altusmetrum_max() { - if (load_library()) - return libaltosConstants.USB_PRODUCT_ALTUSMETRUM_MAX; - return 0x000d; + load_library(); + return 0x0013; } static int usb_product_telemetrum() { - if (load_library()) - return libaltosConstants.USB_PRODUCT_TELEMETRUM; + load_library(); return 0x000b; } static int usb_product_teledongle() { - if (load_library()) - return libaltosConstants.USB_PRODUCT_TELEDONGLE; + load_library(); return 0x000c; } static int usb_product_teleterra() { - if (load_library()) - return libaltosConstants.USB_PRODUCT_TELETERRA; + load_library(); return 0x000d; } static int usb_product_telebt() { - if (load_library()) - return libaltosConstants.USB_PRODUCT_TELEBT; + load_library(); return 0x000e; } @@ -384,8 +376,7 @@ public class Altos { public final static int product_basestation = 0x10000 + 1; static String bt_product_telebt() { - if (load_library()) - return libaltosConstants.BLUETOOTH_PRODUCT_TELEBT; + load_library(); return "TeleBT"; } |