projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
altosui: Build device constants into .java code
[fw/altos]
/
altosui
/
Altos.java
diff --git
a/altosui/Altos.java
b/altosui/Altos.java
index 37a4f67bfdb278188b7a78c42dcd6091f2edd098..9626379730a16f806170f487f1945047a7a35822 100644
(file)
--- a/
altosui/Altos.java
+++ b/
altosui/Altos.java
@@
-240,9
+240,15
@@
public class Altos {
}
}
}
}
+ int i;
+ for (i = l - 1; i >= 0; i--)
+ if (bytes[s+i] != 0)
+ break;
+
+ l = i + 1;
byte[] b = new byte[l];
byte[] b = new byte[l];
- for (i
nt i
= 0; i < l; i++)
+ for (i = 0; i < l; i++)
b[i] = (byte) bytes[s+i];
String n = new String(b, unicode_set);
return n;
b[i] = (byte) bytes[s+i];
String n = new String(b, unicode_set);
return n;
@@
-318,50
+324,42
@@
public class Altos {
}
static int usb_vendor_altusmetrum() {
}
static int usb_vendor_altusmetrum() {
- if (load_library())
- return libaltosConstants.USB_VENDOR_ALTUSMETRUM;
- return 0x000a;
+ load_library();
+ return 0xfffe;
}
static int usb_product_altusmetrum() {
}
static int usb_product_altusmetrum() {
- if (load_library())
- return libaltosConstants.USB_PRODUCT_ALTUSMETRUM;
+ load_library();
return 0x000a;
}
static int usb_product_altusmetrum_min() {
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() {
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() {
}
static int usb_product_telemetrum() {
- if (load_library())
- return libaltosConstants.USB_PRODUCT_TELEMETRUM;
+ load_library();
return 0x000b;
}
static int usb_product_teledongle() {
return 0x000b;
}
static int usb_product_teledongle() {
- if (load_library())
- return libaltosConstants.USB_PRODUCT_TELEDONGLE;
+ load_library();
return 0x000c;
}
static int usb_product_teleterra() {
return 0x000c;
}
static int usb_product_teleterra() {
- if (load_library())
- return libaltosConstants.USB_PRODUCT_TELETERRA;
+ load_library();
return 0x000d;
}
static int usb_product_telebt() {
return 0x000d;
}
static int usb_product_telebt() {
- if (load_library())
- return libaltosConstants.USB_PRODUCT_TELEBT;
+ load_library();
return 0x000e;
}
return 0x000e;
}
@@
-378,8
+376,7
@@
public class Altos {
public final static int product_basestation = 0x10000 + 1;
static String bt_product_telebt() {
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";
}
return "TeleBT";
}