mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-16 10:40:45 +00:00
Scan for rfcomm device for cms50iw
This commit is contained in:
parent
bc582f1746
commit
d6ee4eada7
@ -69,7 +69,7 @@ bool CMS50F37Loader::openDevice()
|
||||
if (port.isEmpty()) {
|
||||
bool b = scanDevice("",m_vendorID, m_productID);
|
||||
if (!b) {
|
||||
// b = scanDevice("", 0, 0);
|
||||
b = scanDevice("rfcomm", 0, 0);
|
||||
}
|
||||
if (!b) {
|
||||
return false;
|
||||
|
@ -39,12 +39,12 @@ bool SerialOximeter::scanDevice(QString keyword,quint16 vendor_id, quint16 produ
|
||||
QString name = info->portName();
|
||||
QString desc = info->description();
|
||||
|
||||
if ((!keyword.isEmpty() && desc.contains(keyword)) ||
|
||||
if ((!keyword.isEmpty() && desc.contains(keyword, Qt::CaseInsensitive)) ||
|
||||
((info->hasVendorIdentifier() && (info->vendorIdentifier() == vendor_id))
|
||||
&& (info->hasProductIdentifier() && (info->productIdentifier() == product_id))))
|
||||
{
|
||||
ports.push_back(name);
|
||||
QString dbg=QString("Found Serial Port: %1 %2 %3 %4").arg(name).arg(desc).arg(info->manufacturer()).arg(info->systemLocation());
|
||||
QString dbg=QString("Found Serial Port: Name: %1 Desc: %2 Manufacturer: %3 Location: %4").arg(name).arg(desc).arg(info->manufacturer()).arg(info->systemLocation());
|
||||
|
||||
if (info->hasProductIdentifier()) //60000
|
||||
dbg += QString(" PID: %1").arg(info->productIdentifier());
|
||||
|
Loading…
Reference in New Issue
Block a user