1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-12-23 01:55:48 -05:00

SDRPlay v1: fix setting of hardware flavour. Fixes #2127

This commit is contained in:
f4exb 2024-06-02 03:07:33 +02:00
parent cfc0114c87
commit ade3eedfa5

View File

@ -110,12 +110,6 @@ bool SDRPlayInput::openDevice()
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];
char serial[256]; char serial[256];
@ -142,6 +136,12 @@ bool SDRPlayInput::openDevice()
m_variant = SDRPlayRSP1; m_variant = SDRPlayRSP1;
} }
if ((res = mirisdr_set_hw_flavour(m_dev, (m_variant == SDRPlayRSP1) ? MIRISDR_HW_DEFAULT : MIRISDR_HW_SDRPLAY)) < 0)
{
qCritical("SDRPlayInput::openDevice: failed to set HW flavour: %s", strerror(errno));
return false;
}
qDebug("SDRPlayInput::openDevice: m_variant: %d", (int) m_variant); qDebug("SDRPlayInput::openDevice: m_variant: %d", (int) m_variant);
return true; return true;