Fix feature check (all features must be set to use port)

This commit is contained in:
Petr Ledvina 2014-11-20 14:56:22 +01:00
parent ec3b83682b
commit 4a23814532
1 changed files with 2 additions and 4 deletions

View File

@ -268,10 +268,8 @@ serialPortSearchResult_t *findNextSerialPort(serialPortFunction_e function, cons
#endif
if (functionConstraint->requiredSerialPortFeatures != SPF_NONE) {
if (!(serialPortConstraint->feature & functionConstraint->requiredSerialPortFeatures)) {
continue;
}
if ((serialPortConstraint->feature & functionConstraint->requiredSerialPortFeatures) != functionConstraint->requiredSerialPortFeatures) {
continue;
}
if (functionConstraint->minBaudRate < serialPortConstraint->minBaudRate || functionConstraint->maxBaudRate > serialPortConstraint->maxBaudRate) {