Skip to content

Commit

Permalink
Set/get EMI type is only mandatory if > 1 EMI types are supported
Browse files Browse the repository at this point in the history
  • Loading branch information
bmalinowsky committed Apr 25, 2024
1 parent e4d402b commit 63e7c69
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/io/calimero/link/KNXNetworkMonitorUsb.java
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,13 @@ private boolean trySetActiveEmi(final UsbConnection.EmiType active)
throws KNXPortClosedException, KNXTimeoutException, InterruptedException
{
if (emiTypes.contains(active)) {
conn.setActiveEmiType(active);
activeEmi = conn.activeEmiType();
// set & get/response of EMI type is only mandatory if > 1 EMI types are supported
if (emiTypes.size() > 1) {
conn.setActiveEmiType(active);
activeEmi = conn.activeEmiType();
}
else
activeEmi = active;
return activeEmi == active;
}
return false;
Expand Down

0 comments on commit 63e7c69

Please sign in to comment.