X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=micropeak%2FMicroUSB.java;h=908ac51b6afbc1eff197f6ed5aa0149ce1aca580;hb=9efc57e4052e3c11218973f7666ad18ea5cf2a5a;hp=d48610fe720a07d5e057931eb3e29389254455ad;hpb=65b512c890a3ccf487655b79305ab1cfcf49259c;p=fw%2Faltos diff --git a/micropeak/MicroUSB.java b/micropeak/MicroUSB.java index d48610fe..908ac51b 100644 --- a/micropeak/MicroUSB.java +++ b/micropeak/MicroUSB.java @@ -16,10 +16,12 @@ */ package org.altusmetrum.micropeak; + import java.util.*; import libaltosJNI.*; +import org.altusmetrum.altosuilib.*; -public class MicroUSB extends altos_device { +public class MicroUSB extends altos_device implements AltosDevice { 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"; - return String.format("%-20.20s %4d %s", - name, getSerial(), getPath()); + return String.format("%-20.20s %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()); } @@ -75,11 +77,15 @@ public class MicroUSB extends altos_device { 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 list() { if (!load_library()) return null;