projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
altos/lpc: Get 100Hz timer running
[fw/altos]
/
micropeak
/
MicroUSB.java
diff --git
a/micropeak/MicroUSB.java
b/micropeak/MicroUSB.java
index d48610fe720a07d5e057931eb3e29389254455ad..3bd61470cc847c4eb0d763562014f10c73f23ab7 100644
(file)
--- a/
micropeak/MicroUSB.java
+++ b/
micropeak/MicroUSB.java
@@
-16,10
+16,12
@@
*/
package org.altusmetrum.micropeak;
*/
package org.altusmetrum.micropeak;
+
import java.util.*;
import libaltosJNI.*;
import java.util.*;
import libaltosJNI.*;
+import org.altusmetrum.altosuilib_1.*;
-public class MicroUSB extends altos_device {
+public class MicroUSB extends altos_device
implements AltosDevice
{
static boolean initialized = false;
static boolean loaded_library = false;
static boolean initialized = false;
static boolean loaded_library = false;
@@
-48,16
+50,16
@@
public class MicroUSB extends altos_device {
String name = getName();
if (name == null)
name = "Altus Metrum";
String name = getName();
if (name == null)
name = "Altus Metrum";
- return String.format("%-2
0.20s %4d
%s",
- name, get
Serial(), get
Path());
+ return String.format("%-2
4.24s
%s",
+ name, getPath());
}
public String toShortString() {
String name = getName();
if (name == null)
name = "Altus Metrum";
}
public String toShortString() {
String name = getName();
if (name == null)
name = "Altus Metrum";
- return String.format("%s %
d %
s",
- name, get
Serial(), get
Path());
+ return String.format("%s %s",
+ name, getPath());
}
}
@@
-75,16
+77,20
@@
public class MicroUSB extends altos_device {
private boolean isMicro() {
if (getVendor() != 0x0403)
return false;
private boolean isMicro() {
if (getVendor() != 0x0403)
return false;
- if (getProduct() != 0x60
01
)
+ if (getProduct() != 0x60
15
)
return false;
return true;
}
return false;
return true;
}
+ public boolean matchProduct(int product) {
+ return isMicro();
+ }
+
static java.util.List<MicroUSB> list() {
if (!load_library())
return null;
static java.util.List<MicroUSB> list() {
if (!load_library())
return null;
- SWIGTYPE_p_altos_list list = libaltos.altos_list_start();
+ SWIGTYPE_p_altos_list list = libaltos.altos_
ftdi_
list_start();
ArrayList<MicroUSB> device_list = new ArrayList<MicroUSB>();
if (list != null) {
ArrayList<MicroUSB> device_list = new ArrayList<MicroUSB>();
if (list != null) {