mirror of
https://github.com/f4exb/sdrangel.git
synced 2026-06-01 21:54:55 -04:00
Deep redesign: Better support for FCD dongles #9: use fcd_traits template instead of hardcoded values
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
#include "fcdprogui.h"
|
||||
#include "fcdproserializer.h"
|
||||
#include "fcdprothread.h"
|
||||
#include "fcdtraits.h"
|
||||
|
||||
MESSAGE_CLASS_DEFINITION(FCDProInput::MsgConfigureFCD, Message)
|
||||
|
||||
@@ -113,7 +114,7 @@ FCDProInput::FCDProInput() :
|
||||
m_dev(0),
|
||||
m_settings(),
|
||||
m_FCDThread(0),
|
||||
m_deviceDescription("Funcube Dongle Pro")
|
||||
m_deviceDescription(fcd_traits<Pro>::displayedName)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -138,7 +139,7 @@ bool FCDProInput::start(int device)
|
||||
return false;
|
||||
}
|
||||
|
||||
m_dev = fcdOpen(0x04D8, 0xFB56, device);
|
||||
m_dev = fcdOpen(fcd_traits<Pro>::vendorId, fcd_traits<Pro>::productId, device);
|
||||
|
||||
if (m_dev == 0)
|
||||
{
|
||||
@@ -197,7 +198,7 @@ const QString& FCDProInput::getDeviceDescription() const
|
||||
|
||||
int FCDProInput::getSampleRate() const
|
||||
{
|
||||
return 96000;
|
||||
return fcd_traits<Pro>::sampleRate;
|
||||
}
|
||||
|
||||
quint64 FCDProInput::getCenterFrequency() const
|
||||
@@ -259,7 +260,7 @@ void FCDProInput::applySettings(const Settings& settings, bool force)
|
||||
|
||||
if (signalChange)
|
||||
{
|
||||
DSPSignalNotification *notif = new DSPSignalNotification(96000, m_settings.centerFrequency);
|
||||
DSPSignalNotification *notif = new DSPSignalNotification(fcd_traits<Pro>::sampleRate, m_settings.centerFrequency);
|
||||
getOutputMessageQueue()->push(notif);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user