Merge pull request #1543 from srcejon/ambe_serial_windows

Scan for serial AMBE devices on Windows
This commit is contained in:
Edouard Griffiths 2022-12-22 06:48:30 +01:00 committed by GitHub
commit 897ecc4d88
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 19 additions and 2 deletions

View File

@ -78,10 +78,27 @@ void AMBEEngine::getComList()
}
}
// Do not activate serial support at all for windows
void AMBEEngine::scan(QList<QString>& ambeDevices)
{
(void) ambeDevices;
qDebug("AMBEEngine::scan");
AMBEEngine::getComList();
std::vector<std::string>::const_iterator it = m_comList.begin();
ambeDevices.clear();
while (it != m_comList.end())
{
AMBEWorker *worker = new AMBEWorker();
qDebug("AMBEEngine::scan: com: %s", it->c_str());
if (worker->open(*it))
{
ambeDevices.push_back(QString(it->c_str()));
worker->close();
}
delete worker;
++it;
}
}
#elif defined(__APPLE__)
void AMBEEngine::getComList()