Bug fixes and event

This commit is contained in:
gac-S_Changer
2025-06-18 15:38:07 +02:00
parent 80c828036d
commit 2863a6a88a
4 changed files with 25 additions and 7 deletions

View File

@@ -342,11 +342,13 @@ public class Puck extends DeviceBase {
}
public void setId(String value) {
for (Device d : getParent().getChildren()) {
if (d instanceof Puck) {
if (((Puck)d).getId() != null){
if (((Puck)d).getId().equals(value)){
((Puck)d).setId(null);
if (value!=null){
for (Device d : getParent().getChildren()) {
if (d instanceof Puck) {
if (((Puck)d).getId() != null){
if (isSameId (((Puck)d).getId(), value)){
((Puck)d).setId(null);
}
}
}
}
@@ -355,6 +357,9 @@ public class Puck extends DeviceBase {
}
public static boolean isSameId(String id1, String id2){
if ((id1==null) || (id2==null)){
return false;
}
return id1.equals(id2) || BarcodeMatcher.matchBarcodes(id1,id2);
}