mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-22 16:08:39 -05:00
Deep redesign: Better support for FCD dongles #5: hardcode values since traits do not work with Qt framework
This commit is contained in:
parent
5f84e56cf5
commit
919a1326f4
@ -29,15 +29,16 @@
|
||||
MESSAGE_CLASS_DEFINITION(FCDInput::MsgConfigureFCD, Message)
|
||||
//MESSAGE_CLASS_DEFINITION(FCDInput::MsgReportFCD, Message)
|
||||
|
||||
/*
|
||||
const uint16_t FCDInput::m_vendorId = 0x04D8;
|
||||
|
||||
const uint16_t FCDInput::m_productId = 0xFB31;
|
||||
const int FCDInput::m_sampleRate = 192000;
|
||||
const std::string FCDInput::m_deviceName("hw:CARD=V20");
|
||||
|
||||
//const uint16_t FCDInput::m_productId = 0xFB56;
|
||||
//const int FCDInput::m_sampleRate = 96000;
|
||||
//const std::string FCDInput::m_deviceName("hw:CARD=V10");
|
||||
const uint16_t FCDInput::m_productId = 0xFB56;
|
||||
const int FCDInput::m_sampleRate = 96000;
|
||||
const std::string FCDInput::m_deviceName("hw:CARD=V10");
|
||||
*/
|
||||
|
||||
FCDInput::Settings::Settings() :
|
||||
centerFrequency(435000000),
|
||||
@ -137,7 +138,7 @@ bool FCDInput::start(int device)
|
||||
return false;
|
||||
}
|
||||
|
||||
m_dev = fcdOpen(m_vendorId, m_productId, device);
|
||||
m_dev = fcdOpen(0x04D8, 0xFB31, device);
|
||||
|
||||
if (m_dev == 0)
|
||||
{
|
||||
@ -200,7 +201,7 @@ const QString& FCDInput::getDeviceDescription() const
|
||||
|
||||
int FCDInput::getSampleRate() const
|
||||
{
|
||||
return m_sampleRate;
|
||||
return 192000;
|
||||
}
|
||||
|
||||
quint64 FCDInput::getCenterFrequency() const
|
||||
@ -262,7 +263,7 @@ void FCDInput::applySettings(const Settings& settings, bool force)
|
||||
|
||||
if (signalChange)
|
||||
{
|
||||
DSPSignalNotification *notif = new DSPSignalNotification(m_sampleRate, m_settings.centerFrequency);
|
||||
DSPSignalNotification *notif = new DSPSignalNotification(192000, m_settings.centerFrequency);
|
||||
getOutputMessageQueue()->push(notif);
|
||||
}
|
||||
}
|
||||
|
@ -80,11 +80,6 @@ public:
|
||||
void set_bias_t(bool on);
|
||||
void set_lna_gain(bool on);
|
||||
|
||||
static const uint16_t m_vendorId; //!< USB vendor ID.
|
||||
static const uint16_t m_productId; //!< USB product ID.
|
||||
static const int m_sampleRate;
|
||||
static const std::string m_deviceName;
|
||||
|
||||
private:
|
||||
void applySettings(const Settings& settings, bool force);
|
||||
|
||||
|
@ -58,7 +58,7 @@ void FCDThread::stopWork()
|
||||
|
||||
void FCDThread::run()
|
||||
{
|
||||
if ( !OpenSource(FCDInput::m_deviceName.c_str()) )
|
||||
if ( !OpenSource("hw:CARD=V20") )
|
||||
{
|
||||
qCritical() << "FCDThread::run: cannot open FCD sound card";
|
||||
return;
|
||||
|
@ -41,7 +41,6 @@ public:
|
||||
void CloseSource();
|
||||
|
||||
private:
|
||||
snd_pcm_format_t fcd_format;
|
||||
snd_pcm_t* fcd_handle;
|
||||
|
||||
QMutex m_startWaitMutex;
|
||||
|
Loading…
Reference in New Issue
Block a user