Merge pull request #1543 from srcejon/ambe_serial_windows

Scan for serial AMBE devices on Windows
pull/1544/head
Edouard Griffiths 2022-12-22 06:48:30 +01:00 zatwierdzone przez GitHub
commit 897ecc4d88
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 19 dodań i 2 usunięć

Wyświetl plik

@ -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()