SDRPlayInput: separate HW flavour from mirisdr_open

pull/1344/head
ericek111 2022-07-18 15:52:40 +02:00
rodzic 528c28b0a8
commit 557147d09e
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 414DED726771329C
1 zmienionych plików z 7 dodań i 1 usunięć

Wyświetl plik

@ -103,11 +103,17 @@ bool SDRPlayInput::openDevice()
return false; return false;
} }
if ((res = mirisdr_open(&m_dev, MIRISDR_HW_SDRPLAY, m_devNumber)) < 0) if ((res = mirisdr_open(&m_dev, m_devNumber)) < 0)
{ {
qCritical("SDRPlayInput::openDevice: could not open SDRPlay #%d: %s", m_devNumber, strerror(errno)); qCritical("SDRPlayInput::openDevice: could not open SDRPlay #%d: %s", m_devNumber, strerror(errno));
return false; return false;
} }
if ((res = mirisdr_set_hw_flavour(m_dev, MIRISDR_HW_SDRPLAY)) < 0)
{
qCritical("SDRPlayInput::openDevice: failed to set HW flavour: %s", strerror(errno));
return false;
}
char vendor[256]; char vendor[256];
char product[256]; char product[256];