mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-23 00:18:37 -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::MsgConfigureFCD, Message)
|
||||||
//MESSAGE_CLASS_DEFINITION(FCDInput::MsgReportFCD, Message)
|
//MESSAGE_CLASS_DEFINITION(FCDInput::MsgReportFCD, Message)
|
||||||
|
|
||||||
|
/*
|
||||||
const uint16_t FCDInput::m_vendorId = 0x04D8;
|
const uint16_t FCDInput::m_vendorId = 0x04D8;
|
||||||
|
|
||||||
const uint16_t FCDInput::m_productId = 0xFB31;
|
const uint16_t FCDInput::m_productId = 0xFB31;
|
||||||
const int FCDInput::m_sampleRate = 192000;
|
const int FCDInput::m_sampleRate = 192000;
|
||||||
const std::string FCDInput::m_deviceName("hw:CARD=V20");
|
const std::string FCDInput::m_deviceName("hw:CARD=V20");
|
||||||
|
|
||||||
//const uint16_t FCDInput::m_productId = 0xFB56;
|
const uint16_t FCDInput::m_productId = 0xFB56;
|
||||||
//const int FCDInput::m_sampleRate = 96000;
|
const int FCDInput::m_sampleRate = 96000;
|
||||||
//const std::string FCDInput::m_deviceName("hw:CARD=V10");
|
const std::string FCDInput::m_deviceName("hw:CARD=V10");
|
||||||
|
*/
|
||||||
|
|
||||||
FCDInput::Settings::Settings() :
|
FCDInput::Settings::Settings() :
|
||||||
centerFrequency(435000000),
|
centerFrequency(435000000),
|
||||||
@ -137,7 +138,7 @@ bool FCDInput::start(int device)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_dev = fcdOpen(m_vendorId, m_productId, device);
|
m_dev = fcdOpen(0x04D8, 0xFB31, device);
|
||||||
|
|
||||||
if (m_dev == 0)
|
if (m_dev == 0)
|
||||||
{
|
{
|
||||||
@ -200,7 +201,7 @@ const QString& FCDInput::getDeviceDescription() const
|
|||||||
|
|
||||||
int FCDInput::getSampleRate() const
|
int FCDInput::getSampleRate() const
|
||||||
{
|
{
|
||||||
return m_sampleRate;
|
return 192000;
|
||||||
}
|
}
|
||||||
|
|
||||||
quint64 FCDInput::getCenterFrequency() const
|
quint64 FCDInput::getCenterFrequency() const
|
||||||
@ -262,7 +263,7 @@ void FCDInput::applySettings(const Settings& settings, bool force)
|
|||||||
|
|
||||||
if (signalChange)
|
if (signalChange)
|
||||||
{
|
{
|
||||||
DSPSignalNotification *notif = new DSPSignalNotification(m_sampleRate, m_settings.centerFrequency);
|
DSPSignalNotification *notif = new DSPSignalNotification(192000, m_settings.centerFrequency);
|
||||||
getOutputMessageQueue()->push(notif);
|
getOutputMessageQueue()->push(notif);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -80,11 +80,6 @@ public:
|
|||||||
void set_bias_t(bool on);
|
void set_bias_t(bool on);
|
||||||
void set_lna_gain(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:
|
private:
|
||||||
void applySettings(const Settings& settings, bool force);
|
void applySettings(const Settings& settings, bool force);
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@ void FCDThread::stopWork()
|
|||||||
|
|
||||||
void FCDThread::run()
|
void FCDThread::run()
|
||||||
{
|
{
|
||||||
if ( !OpenSource(FCDInput::m_deviceName.c_str()) )
|
if ( !OpenSource("hw:CARD=V20") )
|
||||||
{
|
{
|
||||||
qCritical() << "FCDThread::run: cannot open FCD sound card";
|
qCritical() << "FCDThread::run: cannot open FCD sound card";
|
||||||
return;
|
return;
|
||||||
|
@ -41,7 +41,6 @@ public:
|
|||||||
void CloseSource();
|
void CloseSource();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
snd_pcm_format_t fcd_format;
|
|
||||||
snd_pcm_t* fcd_handle;
|
snd_pcm_t* fcd_handle;
|
||||||
|
|
||||||
QMutex m_startWaitMutex;
|
QMutex m_startWaitMutex;
|
||||||
|
Loading…
Reference in New Issue
Block a user