1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-06-16 20:58:45 -04:00

DSD demod: adapt serial com pors scan to Windows

This commit is contained in:
f4exb
2016-05-09 11:37:12 +02:00
parent 195a42460b
commit 7e4c05417a
2 changed files with 18 additions and 0 deletions
+16
View File
@@ -45,6 +45,21 @@ DVSerialEngine::~DVSerialEngine()
release();
}
#ifdef __WINDOWS__
void DVSerialEngine::getComList()
{
m_comList.clear();
m_comList8250.clear();
char comCStr[16];
// Arbitrarily set the list to the 20 first COM ports
for (int i = 1; i <= 20; i++)
{
sprintf(comCStr, "COM%d", i);
m_comList.push_back(std::string(comCStr));
}
}
#else
std::string DVSerialEngine::get_driver(const std::string& tty)
{
struct stat st;
@@ -156,6 +171,7 @@ void DVSerialEngine::getComList()
// serial8250-devices must be probe to check for validity
probe_serial8250_comports(m_comList, m_comList8250);
}
#endif // __WINDOWS__
bool DVSerialEngine::scan()
{