X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=altosuilib%2FAltosUSBDevice.java;fp=altosuilib%2FAltosUSBDevice.java;h=f43d6befda46e57ec9ee26f0d105452308afe9b9;hp=16a0e7709dd5be7c3793bd3eb42c86c481164d6c;hb=ba285ecf51e317917858740504a7d691b9839588;hpb=378ebab2e70917b4182cbd840a3fa66e4e42fd92 diff --git a/altosuilib/AltosUSBDevice.java b/altosuilib/AltosUSBDevice.java index 16a0e770..f43d6bef 100644 --- a/altosuilib/AltosUSBDevice.java +++ b/altosuilib/AltosUSBDevice.java @@ -95,7 +95,7 @@ public class AltosUSBDevice extends altos_device implements AltosDevice { } public int hashCode() { - return getVendor() ^ getProduct() ^ getSerial(); + return getVendor() ^ getProduct() ^ getSerial() ^ getPath().hashCode(); } public boolean equals(Object o) { @@ -108,7 +108,8 @@ public class AltosUSBDevice extends altos_device implements AltosDevice { return getVendor() == other.getVendor() && getProduct() == other.getProduct() && - getSerial() == other.getSerial(); + getSerial() == other.getSerial() && + getPath().equals(other.getPath()); } static public java.util.List list(int product) {