*/
package org.altusmetrum.micropeak;
+
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;
String name = getName();
if (name == null)
name = "Altus Metrum";
- return String.format("%-20.20s %4d %s",
- name, getSerial(), getPath());
+ return String.format("%-24.24s %s",
+ name, getPath());
}
public String toShortString() {
String name = getName();
if (name == null)
name = "Altus Metrum";
- return String.format("%s %d %s",
- name, getSerial(), getPath());
+ return String.format("%s %s",
+ name, getPath());
}
private boolean isMicro() {
if (getVendor() != 0x0403)
return false;
- if (getProduct() != 0x6001)
+ if (getProduct() != 0x6015)
return false;
return true;
}
+ public boolean matchProduct(int product) {
+ return isMicro();
+ }
+
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) {