diff options
| -rw-r--r-- | altosuilib/AltosUSBDevice.java | 5 |
1 files changed, 3 insertions, 2 deletions
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<AltosDevice> list(int product) { |
