Merge PR #107: Mennekes: Discard unknown discovery results
commit
b4f5e1cca9
|
|
@ -83,6 +83,11 @@ void AmtronECUDiscovery::checkNetworkDevice(const NetworkDeviceInfo &networkDevi
|
|||
cleanupConnection(connection);
|
||||
return;
|
||||
}
|
||||
if (connection->firmwareVersion() == 0 || connection->model().isEmpty()) {
|
||||
qCDebug(dcMennekes()) << "Firmware version or model invalid. Skipping" << networkDeviceInfo.address();
|
||||
cleanupConnection(connection);
|
||||
return;
|
||||
}
|
||||
Result result;
|
||||
result.firmwareVersion = connection->firmwareVersion();
|
||||
result.model = connection->model();
|
||||
|
|
|
|||
|
|
@ -85,6 +85,12 @@ void AmtronHCC3Discovery::checkNetworkDevice(const NetworkDeviceInfo &networkDev
|
|||
cleanupConnection(connection);
|
||||
return;
|
||||
}
|
||||
if (connection->serialNumber() == 0 || connection->name().isEmpty()) {
|
||||
qCDebug(dcMennekes()) << "Serial number or name invalid. Skipping" << networkDeviceInfo.address();
|
||||
cleanupConnection(connection);
|
||||
return;
|
||||
}
|
||||
|
||||
AmtronDiscoveryResult result;
|
||||
result.wallboxName = connection->name();
|
||||
result.serialNumber = connection->serialNumber();
|
||||
|
|
|
|||
Loading…
Reference in New Issue